]> git.openstreetmap.org Git - rails.git/blobdiff - app/helpers/browse_helper.rb
no_auto_account_create translated
[rails.git] / app / helpers / browse_helper.rb
index c86ad5b71c0701bd1b3f65a7ce7381b4afcc74ad..67420151c48efa016f844028b7bfc9d0997af330 100644 (file)
@@ -1,2 +1,16 @@
 module BrowseHelper
 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
 end