X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dd27ee8afe3160d9d0b0bd31a265e6d93f1ee743..9f84c6f46e14eb64f985d2b67a331957f648380a:/app/views/trace/view.html.erb?ds=sidebyside diff --git a/app/views/trace/view.html.erb b/app/views/trace/view.html.erb index 57cc39a08..ef951372f 100644 --- a/app/views/trace/view.html.erb +++ b/app/views/trace/view.html.erb @@ -30,7 +30,7 @@ <% end %> <%= t'trace.view.owner' %> - <%= link_to h(@trace.user.display_name), {:controller => 'user', :action => 'view', :display_name => @trace.user.display_name} %> + <%= link_to h(@trace.user.display_name), user_path(@trace.user) %> <%= t'trace.view.description' %> @@ -54,9 +54,11 @@

-<%= if_user(@trace.user) do %> +<% if current_user && (current_user==@trace.user || current_user.administrator? || current_user.moderator?)%>
- <%= button_to t('trace.view.edit_track'), :controller => 'trace', :action => 'edit', :id => @trace.id %> + <%= if_user(@trace.user) do %> + <%= button_to t('trace.view.edit_track'), :controller => 'trace', :action => 'edit', :id => @trace.id %> + <% end %> <%= button_to t('trace.view.delete_track'), :controller => 'trace', :action => 'delete', :id => @trace.id %>
<% end %>