From fa817dffeae76fa101ee8849bbac645307c0c82f Mon Sep 17 00:00:00 2001 From: Drew Blessing Date: Fri, 13 Dec 2013 15:31:23 -0600 Subject: Add time ago tooltips to show actual date/time Clean up admin dashboad tooltips Clean up admin dashboad tooltips Clean up admin dashboad tooltips Add helper method change to use app helper Modify tooltips to use new helper Convert remaining times Adjust one tooltip --- app/helpers/notes_helper.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'app/helpers/notes_helper.rb') diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb index a3ec4cca59d..822d27cf179 100644 --- a/app/helpers/notes_helper.rb +++ b/app/helpers/notes_helper.rb @@ -31,8 +31,14 @@ module NotesHelper def note_timestamp(note) # Shows the created at time and the updated at time if different - ts = "#{time_ago_in_words(note.created_at)} ago" - ts << content_tag(:small, " (Edited #{time_ago_in_words(note.updated_at)} ago)") if note.updated_at != note.created_at + ts = "#{time_ago_with_tooltip(note.created_at, 'bottom', 'note_created_ago')} ago" + if note.updated_at != note.created_at + ts << capture_haml do + haml_tag :small do + haml_concat " (Edited #{time_ago_with_tooltip(note.updated_at, 'bottom', 'note_edited_ago')} ago)" + end + end + end ts.html_safe end end -- cgit v1.2.1