2 include ActionView::Helpers::TranslationHelper
4 def note_description(author, description)
5 if !author.nil? && author.status == "deleted"
6 RichText.new("text", t("notes.show.description_when_author_is_deleted"))
12 def note_event(event, at, by)
14 t("notes.show.event_#{event}_by_anonymous_html",
15 :time_ago => friendly_date_ago(at))
17 t("notes.show.event_#{event}_by_html",
18 :time_ago => friendly_date_ago(at),
19 :user => note_author(by))
23 def note_author(author, link_options = {})
26 elsif author.status == "deleted"
27 t("users.no_such_user.deleted")
29 link_to h(author.display_name), link_options.merge(:controller => "/users", :action => "show", :display_name => author.display_name),
30 :class => "mw-100 d-inline-block align-bottom text-truncate text-wrap", :dir => "auto"