]> git.openstreetmap.org Git - rails.git/commitdiff
Merge branch 'pull/5035'
authorAnton Khorev <tony29@yandex.ru>
Wed, 31 Jul 2024 23:36:26 +0000 (02:36 +0300)
committerAnton Khorev <tony29@yandex.ru>
Wed, 31 Jul 2024 23:36:26 +0000 (02:36 +0300)
app/helpers/trace_helper.rb
app/views/traces/edit.html.erb
app/views/traces/show.html.erb

index db1f8357ea39c30339491c1ca1cb04ca7466fbf0..fbbeb3dffb48e376c1aeef5053ef39c166b2950b 100644 (file)
@@ -10,4 +10,12 @@ module TraceHelper
     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
index 2059178cfa91303ca496f68839d590f6db097141..1c440adf25432440ac04b2f1dc330f137df66617 100644 (file)
@@ -2,7 +2,7 @@
   <h1><%= t ".heading", :name => @trace.name %></h1>
 <% end %>
 
-<%= image_tag trace_picture_path(@trace.user, @trace), :class => "trace_image" %>
+<%= trace_picture(@trace) %>
 
 <%= bootstrap_form_for @trace do |f| %>
   <%= f.text_field :name, :disabled => true %>
index 51b21f9828e0f72cfdd56488f0e6657e9098a442..63adf15729c5aaa662d2f4f3d111b6d4d00de5c7 100644 (file)
@@ -4,7 +4,7 @@
 
 <% if Settings.status != "gpx_offline" %>
   <% if @trace.inserted %>
-    <%= image_tag trace_picture_path(@trace.user, @trace), :class => "trace_image" %>
+    <%= trace_picture(@trace) %>
   <% else %>
     <span class="text-danger"><%= t ".pending" %></span>
   <% end %>