X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/b909dc4ab80599ac093c5fc1ef21016be1577170..0e5e08a96e62a7bc058ac1cf87f5808f06988bb4:/app/helpers/browse_helper.rb diff --git a/app/helpers/browse_helper.rb b/app/helpers/browse_helper.rb index c86ad5b71..67420151c 100644 --- a/app/helpers/browse_helper.rb +++ b/app/helpers/browse_helper.rb @@ -1,2 +1,16 @@ module BrowseHelper + def link_to_page(page, page_param) + return link_to(page, page_param => page) + end + + def printable_name(object, version=false) + name = object.id.to_s + if version + name = "#{name}, v#{object.version.to_s}" + end + if object.tags.include? 'name' + name = "#{object.tags['name'].to_s} (#{name})" + end + return name + end end