X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/4347d9d3b00a8fffe78daa93eac5b490905f9ac8..c3cc8eb687e92c890a7c4801c262fb2e6c96ef0a:/app/helpers/note_helper.rb?ds=inline diff --git a/app/helpers/note_helper.rb b/app/helpers/note_helper.rb index 7e52937a0..809480a04 100644 --- a/app/helpers/note_helper.rb +++ b/app/helpers/note_helper.rb @@ -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