Improve formatting of note descriptions in GPX and RSS responses
This commit is contained in:
parent
2bceba38ba
commit
82eedbf651
6 changed files with 36 additions and 16 deletions
|
@ -133,6 +133,22 @@ module ApplicationHelper
|
|||
content_tag(:span, time_ago_in_words(date), :title => l(date, :format => :friendly))
|
||||
end
|
||||
|
||||
def note_author(object, link_options = {})
|
||||
if object.author.nil?
|
||||
h(object.author_name)
|
||||
else
|
||||
link_to h(object.author_name), link_options.merge({:controller => "user", :action => "view", :display_name => object.author_name})
|
||||
end
|
||||
end
|
||||
|
||||
def with_format(format, &block)
|
||||
old_format = @template_format
|
||||
@template_format = format
|
||||
result = block.call
|
||||
@template_format = old_format
|
||||
return result
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def javascript_strings_for_key(key)
|
||||
|
|
|
@ -42,14 +42,6 @@ module BrowseHelper
|
|||
end
|
||||
end
|
||||
|
||||
def note_author(object)
|
||||
if object.author.nil?
|
||||
h(object.author_name)
|
||||
else
|
||||
link_to h(object.author_name), :controller => "user", :action => "view", :display_name => object.author_name
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
ICON_TAGS = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue