From 66cc15971e7d4b75fe954ca9901970c313e09208 Mon Sep 17 00:00:00 2001 From: Andreas N Date: Fri, 20 Feb 2015 00:40:41 +0100 Subject: [PATCH] more date tooltips --- app/views/inbox/_entry.html.haml | 3 ++- app/views/moderation/_moderationbox.html.haml | 3 ++- app/views/notifications/_notification.html.haml | 12 ++++++++---- app/views/question/show.html.haml | 3 ++- app/views/shared/_question.html.haml | 1 + 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/app/views/inbox/_entry.html.haml b/app/views/inbox/_entry.html.haml index 821daa36..c93e7817 100644 --- a/app/views/inbox/_entry.html.haml +++ b/app/views/inbox/_entry.html.haml @@ -8,7 +8,8 @@ %h6.text-muted.media-heading.answerbox--question-user = user_screen_name i.question.user, i.question.author_is_anonymous asked - = time_ago_in_words(i.question.created_at) + %span{title: i.question.created_at, data: { toggle: :tooltip, placement: :bottom }} + = time_ago_in_words(i.question.created_at) ago - unless i.question.author_is_anonymous - if i.question.answer_count > 0 diff --git a/app/views/moderation/_moderationbox.html.haml b/app/views/moderation/_moderationbox.html.haml index 51eae25e..a671a220 100644 --- a/app/views/moderation/_moderationbox.html.haml +++ b/app/views/moderation/_moderationbox.html.haml @@ -4,7 +4,8 @@ = user_screen_name report.user reported a = report.type.sub('Reports::', '') - = time_ago_in_words(report.created_at) + %span{title: report.created_at, data: { toggle: :tooltip, placement: :bottom }} + = time_ago_in_words(report.created_at) ago .panel-body %p diff --git a/app/views/notifications/_notification.html.haml b/app/views/notifications/_notification.html.haml index 00fb1ccb..efc508f6 100644 --- a/app/views/notifications/_notification.html.haml +++ b/app/views/notifications/_notification.html.haml @@ -11,7 +11,8 @@ answered %a{href: show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.id), title: "#{notification.target.content[0..40]}...", data: { toggle: :tooltip, placement: :top }} your question - = time_ago_in_words notification.target.created_at + %span{title: notification.target.created_at, data: { toggle: :tooltip, placement: :bottom }} + = time_ago_in_words notification.target.created_at ago .notification--icon %i.fa.fa-exclamation @@ -23,7 +24,8 @@ = user_screen_name notification.target.source %p.notification--text followed you - = time_ago_in_words notification.target.created_at + %span{title: notification.target.created_at, data: { toggle: :tooltip, placement: :bottom }} + = time_ago_in_words notification.target.created_at ago .notification--icon %i.fa.fa-users @@ -37,7 +39,8 @@ smiled at %a{href: show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id), title: "#{notification.target.answer.content[0..40]}...", data: { toggle: :tooltip, placement: :top }} your answer - = time_ago_in_words notification.target.created_at + %span{title: notification.target.created_at, data: { toggle: :tooltip, placement: :bottom }} + = time_ago_in_words notification.target.created_at ago .notification--icon %i.fa.fa-smile-o @@ -51,7 +54,8 @@ commented on %a{href: show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id), title: "#{notification.target.answer.content[0..40]}...", data: { toggle: :tooltip, placement: :top }} your answer - = time_ago_in_words notification.target.created_at + %span{title: notification.target.created_at, data: { toggle: :tooltip, placement: :bottom }} + = time_ago_in_words notification.target.created_at ago .notification--icon %i.fa.fa-comments \ No newline at end of file diff --git a/app/views/question/show.html.haml b/app/views/question/show.html.haml index b259bfa5..b02aeaf5 100644 --- a/app/views/question/show.html.haml +++ b/app/views/question/show.html.haml @@ -10,7 +10,8 @@ %h6.text-muted.media-heading.answerbox--question-user = user_screen_name @question.user, @question.author_is_anonymous asked - = time_ago_in_words(@question.created_at) + %span{title: @question.created_at, data: { toggle: :tooltip, placement: :bottom }} + = time_ago_in_words(@question.created_at) ago %p.answerbox--question-text= @question.content diff --git a/app/views/shared/_question.html.haml b/app/views/shared/_question.html.haml index d2b79ee3..f2f4da75 100644 --- a/app/views/shared/_question.html.haml +++ b/app/views/shared/_question.html.haml @@ -6,6 +6,7 @@ = user_screen_name q.user asked %a{href: show_user_question_path(q.user.screen_name, q.id)} + %span{title: q.created_at, data: { toggle: :tooltip, placement: :bottom }} = time_ago_in_words(q.created_at) ago - if q.answer_count > 1