]> git.openstreetmap.org Git - rails.git/commitdiff
Use named paths for a few trace links
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 28 Mar 2018 08:55:10 +0000 (16:55 +0800)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 28 Mar 2018 08:55:10 +0000 (16:55 +0800)
app/views/trace/edit.html.erb
app/views/trace/view.html.erb

index 07e9820e6ada5894679561fab8a25a7c041cd3e8..b2254afddd01a11ed521fdf5343239a5ae9ec87b 100644 (file)
@@ -10,7 +10,7 @@
   <fieldset>
     <div class='form-row'>
       <label class='standard-label'><%= t'trace.edit.filename' %></label>
-      <p class='deemphasize'><%= @trace.name %> (<%= link_to t('trace.edit.download'), :controller => 'trace', :action => 'data', :id => @trace.id %>)</p>
+      <p class='deemphasize'><%= @trace.name %> (<%= link_to t('trace.edit.download'), trace_data_path(@trace) %>)</p>
     </div>
     <div class='form-row'>
       <label class='standard-label'><%= t'trace.edit.uploaded_at' %></label>
index ef951372fedcba824fa78dd37a4c0f1f87e01e17..df45f2f2d1102b3b82232f5d5e1a448971a5dba6 100644 (file)
@@ -13,7 +13,7 @@
 <table border="0">
   <tr>
     <td><%= t'trace.view.filename' %></td>
-    <td><%= @trace.name %> (<%= link_to t('trace.view.download'), :controller => 'trace', :action => 'data', :id => @trace.id %>)</td>
+    <td><%= @trace.name %> (<%= link_to t('trace.view.download'), trace_data_path(@trace) %>)</td>
   </tr>
   <tr>
     <td><%= t'trace.view.uploaded' %></td>
@@ -57,7 +57,7 @@
 <% if current_user && (current_user==@trace.user || current_user.administrator? || current_user.moderator?)%>
   <div class="buttons">
     <%= 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 %>
   </div>