]> git.openstreetmap.org Git - rails.git/blobdiff - app/helpers/browse_helper.rb
Using GraphHopper new API
[rails.git] / app / helpers / browse_helper.rb
index 70f724cca5bd63abe1e6fab4546ddd830108f8f8..b192a63d558ee4c4ba8bd7e06dc815536168a1fa 100644 (file)
@@ -24,11 +24,16 @@ module BrowseHelper
   end
 
   def link_class(type, object)
+    classes = [ type ]
+
     if object.redacted?
-      type + " deleted"
+      classes << "deleted"
     else
-      type + " " + h(icon_tags(object).join(' ')) + (object.visible == false ? ' deleted' : '')
+      classes += icon_tags(object).flatten.map { |t| h(t) }
+      classes << "deleted" unless object.visible?
     end
+
+    classes.join(" ")
   end
 
   def link_title(object)