]> git.openstreetmap.org Git - rails.git/blob - app/helpers/note_helper.rb
Merge branch 'master' into notes
[rails.git] / app / helpers / note_helper.rb
1 module NoteHelper
2   def note_event(at, by)
3     if by.nil?
4       I18n.t("browse.note.at_html", :when => friendly_date(at)).html_safe
5     else
6       I18n.t("browse.note.at_by_html", :when => friendly_date(at), :user => note_author(by)).html_safe
7     end
8   end
9
10   def note_author(author, link_options = {})
11     if author.nil?
12       ""
13     else
14       link_to h(author.display_name), link_options.merge({:controller => "user", :action => "view", :display_name => author.display_name})
15     end
16   end
17 end