Merge branch 'pull/5035'

This commit is contained in:
Anton Khorev 2024-08-01 02:36:26 +03:00
commit bbd6140f4b
3 changed files with 10 additions and 2 deletions

View file

@ -10,4 +10,12 @@ module TraceHelper
image_tag trace_icon_path(trace.user, trace), image_tag trace_icon_path(trace.user, trace),
options.merge(:size => 50) options.merge(:size => 50)
end 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 end

View file

@ -2,7 +2,7 @@
<h1><%= t ".heading", :name => @trace.name %></h1> <h1><%= t ".heading", :name => @trace.name %></h1>
<% end %> <% end %>
<%= image_tag trace_picture_path(@trace.user, @trace), :class => "trace_image" %> <%= trace_picture(@trace) %>
<%= bootstrap_form_for @trace do |f| %> <%= bootstrap_form_for @trace do |f| %>
<%= f.text_field :name, :disabled => true %> <%= f.text_field :name, :disabled => true %>

View file

@ -4,7 +4,7 @@
<% if Settings.status != "gpx_offline" %> <% if Settings.status != "gpx_offline" %>
<% if @trace.inserted %> <% if @trace.inserted %>
<%= image_tag trace_picture_path(@trace.user, @trace), :class => "trace_image" %> <%= trace_picture(@trace) %>
<% else %> <% else %>
<span class="text-danger"><%= t ".pending" %></span> <span class="text-danger"><%= t ".pending" %></span>
<% end %> <% end %>