-<%= if_user(@trace.user) do %>
- <table>
- <tr>
- <td><%= button_to t('trace.view.edit_track'), :controller => 'trace', :action => 'edit', :id => @trace.id %></td>
- <td><%= button_to t('trace.view.delete_track'), :controller => 'trace', :action => 'delete', :id => @trace.id %></td>
- </tr>
- </table>
+<% 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 %>
+ <% end %>
+ <%= button_to t('trace.view.delete_track'), :controller => 'trace', :action => 'delete', :id => @trace.id %>
+ </div>