X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dff0eef78737dc54eb227af2080e80ecdd3e3999..9f84c6f46e14eb64f985d2b67a331957f648380a:/app/views/trace/view.html.erb
diff --git a/app/views/trace/view.html.erb b/app/views/trace/view.html.erb
index dda78f954..ef951372f 100644
--- a/app/views/trace/view.html.erb
+++ b/app/views/trace/view.html.erb
@@ -25,12 +25,12 @@
<%= @trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %> |
<%= t'trace.view.start_coordinates' %> |
- <%= @trace.latitude %>; <%= @trace.longitude %> (<%=link_to t('trace.view.map'), :controller => 'site', :action => 'index', :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %> / <%=link_to t('trace.view.edit'), :controller => 'site', :action => 'edit', :gpx=> @trace.id, :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %>) |
+ <%= @trace.latitude %>; <%= @trace.longitude %> (<%=link_to t('trace.view.map'), :controller => 'site', :action => 'index', :mlat => @trace.latitude, :mlon => @trace.longitude, :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %> / <%=link_to t('trace.view.edit'), :controller => 'site', :action => 'edit', :gpx=> @trace.id, :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %>) |
<% 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 %>