From 6b08e6fed545d3c07e9b8ccc7b0878879cdbca76 Mon Sep 17 00:00:00 2001 From: pixeldesu Date: Sun, 17 May 2015 05:52:49 +0200 Subject: [PATCH] tooltips for comment timestamps [ci skip] --- app/views/moderation/_discussion.html.haml | 3 ++- app/views/shared/_comments.html.haml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/moderation/_discussion.html.haml b/app/views/moderation/_discussion.html.haml index c20992c3..51054f2e 100644 --- a/app/views/moderation/_discussion.html.haml +++ b/app/views/moderation/_discussion.html.haml @@ -10,7 +10,8 @@ .media-body.comments--body %h6.media-heading.answerbox--question-user = user_screen_name comment.user - %span.text-muted= "#{time_ago_in_words(comment.created_at)} ago" + %span.text-muted{title: comment.created_at, data: { toggle: :tooltip, placement: :right }} + = "#{time_ago_in_words(comment.created_at)} ago" - if comment.user == current_user .pull-right .btn-group diff --git a/app/views/shared/_comments.html.haml b/app/views/shared/_comments.html.haml index e2d4129e..d302687b 100644 --- a/app/views/shared/_comments.html.haml +++ b/app/views/shared/_comments.html.haml @@ -11,7 +11,8 @@ .media-body.comments--body %h6.media-heading.answerbox--question-user = user_screen_name comment.user - %span.text-muted= "#{time_ago_in_words(comment.created_at)} ago" + %span.text-muted{title: comment.created_at, data: { toggle: :tooltip, placement: :right }} + = "#{time_ago_in_words(comment.created_at)} ago" .pull-right %span.hidden-xs.text-muted - unless user_signed_in?