From 5e76b66271c3e30ea759062b5273b64c19538911 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 28 Mar 2018 16:55:10 +0800 Subject: [PATCH 1/1] Use named paths for a few trace links --- app/views/trace/edit.html.erb | 2 +- app/views/trace/view.html.erb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 %>
-- 2.39.5
<%= 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' %>