2 include ActionView::Helpers::TranslationHelper
4 def note_event(event, at, by)
6 t("browse.note.#{event}_by_anonymous_html",
7 :when => friendly_date_ago(at),
10 t("browse.note.#{event}_by_html",
11 :when => friendly_date_ago(at),
13 :user => note_author(by))
17 def note_author(author, link_options = {})
20 elsif author.status == "deleted"
21 t("users.no_such_user.deleted")
23 link_to h(author.display_name), link_options.merge(:controller => "/users", :action => "show", :display_name => author.display_name)
27 def disappear_in(note)
28 date = note.freshly_closed_until
29 tag.span(distance_of_time_in_words(date, Time.now.utc), :title => l(date, :format => :friendly))