X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/d69a518b9e69107503b332728dfa583594293ea1..2153fb6efde49f305c3f0d987f37a27d8e43ae26:/app/helpers/browse_helper.rb diff --git a/app/helpers/browse_helper.rb b/app/helpers/browse_helper.rb index c86ad5b71..879d516ef 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 = t 'printable_name.with_id', :id => object.id.to_s + if version + name = t 'printable_name.with_version', :id => name, :version => object.version.to_s + end + if object.tags.include? 'name' + name = t 'printable_name.with_name', :name => object.tags['name'].to_s, :id => name + end + return name + end end