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