From: Andy Allan Date: Wed, 28 Mar 2018 08:55:10 +0000 (+0800) Subject: Use named paths for a few trace links X-Git-Tag: live~3687^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/5e76b66271c3e30ea759062b5273b64c19538911 Use named paths for a few trace links --- diff --git a/app/views/trace/edit.html.erb b/app/views/trace/edit.html.erb index 07e9820e6..b2254afdd 100644 --- a/app/views/trace/edit.html.erb +++ b/app/views/trace/edit.html.erb @@ -10,7 +10,7 @@
-

<%= @trace.name %> (<%= link_to t('trace.edit.download'), :controller => 'trace', :action => 'data', :id => @trace.id %>)

+

<%= @trace.name %> (<%= link_to t('trace.edit.download'), trace_data_path(@trace) %>)

diff --git a/app/views/trace/view.html.erb b/app/views/trace/view.html.erb index ef951372f..df45f2f2d 100644 --- a/app/views/trace/view.html.erb +++ b/app/views/trace/view.html.erb @@ -13,7 +13,7 @@ - + @@ -57,7 +57,7 @@ <% if current_user && (current_user==@trace.user || current_user.administrator? || current_user.moderator?)%>
<%= if_user(@trace.user) do %> - <%= button_to t('trace.view.edit_track'), :controller => 'trace', :action => 'edit', :id => @trace.id %> + <%= button_to t('trace.view.edit_track'), trace_edit_path(@trace) %> <% end %> <%= button_to t('trace.view.delete_track'), :controller => 'trace', :action => 'delete', :id => @trace.id %>
<%= t'trace.view.filename' %><%= @trace.name %> (<%= link_to t('trace.view.download'), :controller => 'trace', :action => 'data', :id => @trace.id %>)<%= @trace.name %> (<%= link_to t('trace.view.download'), trace_data_path(@trace) %>)
<%= t'trace.view.uploaded' %>