Merge pull request #3676 from harry-wood/notes-disappear-time
Display how long until a note will disappear
This commit is contained in:
commit
067b0de439
6 changed files with 51 additions and 5 deletions
|
@ -23,4 +23,9 @@ module NoteHelper
|
|||
link_to h(author.display_name), link_options.merge(:controller => "/users", :action => "show", :display_name => author.display_name)
|
||||
end
|
||||
end
|
||||
|
||||
def disappear_in(note)
|
||||
date = note.freshly_closed_until
|
||||
tag.span(distance_of_time_in_words(date, Time.now.utc), :title => l(date, :format => :friendly))
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue