]> git.openstreetmap.org Git - rails.git/blob - app/helpers/browse_helper.rb
So the way [17620] did it sucked but [17624] broke it unless you
[rails.git] / app / helpers / browse_helper.rb
1 module BrowseHelper
2   def link_to_page(page, page_param)
3     return link_to(page, page_param => page)
4   end
5   
6   def printable_name(object, version=false)
7     name = t 'printable_name.with_id', :id => object.id.to_s
8     if version
9       name = t 'printable_name.with_version', :id => name, :version => object.version.to_s
10     end
11     if object.tags.include? 'name'
12       name = t 'printable_name.with_name',  :name => object.tags['name'].to_s, :id => name
13     end
14     return name
15   end
16 end