]> git.openstreetmap.org Git - rails.git/blob - app/helpers/browse_helper.rb
Add some more missing translations. Use .to_sentence instead of .join(', ') so that...
[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 = object.id.to_s
8     if version
9       name = "#{name}, v#{object.version.to_s}"
10     end
11     if object.tags.include? 'name'
12       name = "#{object.tags['name'].to_s} (#{name})"
13     end
14     return name
15   end
16 end