]> git.openstreetmap.org Git - rails.git/blobdiff - app/helpers/trace_helper.rb
Merge pull request #4919 from rkoeze/rkoeze/add-github-pr-template
[rails.git] / app / helpers / trace_helper.rb
index 3922ce2b335e483af82af455710a7f445f0935b1..fbbeb3dffb48e376c1aeef5053ef39c166b2950b 100644 (file)
@@ -1,9 +1,21 @@
 module TraceHelper
   def link_to_tag(tag)
-    if @action == "mine"
-      return link_to(tag, :tag => tag, :page => nil)
-    else
-      return link_to(tag, :tag => tag, :display_name => @display_name, :page => nil)
-    end
+    link_to(tag, :tag => tag, :page => nil)
+  end
+
+  def trace_icon(trace, options = {})
+    options[:class] ||= "trace_image"
+    options[:alt] ||= ""
+
+    image_tag trace_icon_path(trace.user, trace),
+              options.merge(:size => 50)
+  end
+
+  def trace_picture(trace, options = {})
+    options[:class] ||= "trace_image"
+    options[:alt] ||= ""
+
+    image_tag trace_picture_path(trace.user, trace),
+              options.merge(:size => 250)
   end
 end