add date tooltips to relative dates

This commit is contained in:
Andreas N 2015-02-20 00:18:43 +01:00
parent a451cab3e9
commit a3bfa41baa
1 changed files with 8 additions and 4 deletions

View File

@ -10,9 +10,11 @@
= user_screen_name a.question.user, a.question.author_is_anonymous
asked
- if @user.nil? or a.question.author_is_anonymous
%span{title: a.question.created_at, data: { toggle: :tooltip, placement: :bottom }}
= time_ago_in_words(a.question.created_at)
- else
%a{href: show_user_question_path(a.question.user.screen_name, a.question.id)}
%span{title: a.question.created_at, data: { toggle: :tooltip, placement: :bottom }}
= time_ago_in_words(a.question.created_at)
ago
- unless a.question.author_is_anonymous
@ -48,7 +50,8 @@
= user_screen_name a.user
.answerbox--answer-date
%a{href: show_user_answer_path(a.user.screen_name, a.id)}
%span= time_ago_in_words(a.created_at)
%span{title: a.created_at, data: { toggle: :tooltip, placement: :bottom }}
= time_ago_in_words(a.created_at)
ago
.col-md-6.col-sm-8.col-xs-6.text-right
= render 'shared/answerbox_buttons', a: a
@ -57,7 +60,8 @@
.col-md-6.col-sm-4.col-xs-6.text-left.text-muted
%i.fa.fa-clock-o
%a{href: show_user_answer_path(a.user.screen_name, a.id)}
%span= time_ago_in_words(a.created_at)
%span{title: a.created_at, data: { toggle: :tooltip, placement: :bottom }}
= time_ago_in_words(a.created_at)
ago
.col-md-6.col-sm-8.col-xs-6.text-right
= render 'shared/answerbox_buttons', a: a