]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/redactions/show.html.erb
Use user_path links. Fixes #1785
[rails.git] / app / views / redactions / show.html.erb
index 2404df734e3fb78ab213bf915faecddabcf025de..99f7cd1f1a42d834434f3ab37cfa72b8607d65ed 100644 (file)
@@ -5,18 +5,16 @@
 
 <p>
   <b><%= t 'redaction.show.user' %></b>
-  <%= link_to(@redaction.user.display_name, {:controller => 'user', :action => 'view', :display_name => @redaction.user.display_name}) %>
+  <%= link_to(@redaction.user.display_name, user_path(@redaction.user)) %>
 </p>
 <p class="richtext">
   <b><%= t 'redaction.show.description' %></b>
   <%= @redaction.description.to_html %>
 </p>
 
-<% if @user and @user.moderator? %>
-<table>
-<tr>
-<td><%= button_to t('redaction.show.edit'), edit_redaction_path(@redaction), :method => :get %></td>
-<td><%= button_to t('redaction.show.destroy'), @redaction, :method => "delete", :remote => true, :data => { :confirm => t('redaction.show.confirm') } %></td>
-</tr>
-</table>
+<% if current_user and current_user.moderator? %>
+<div class="buttons">
+  <%= button_to t('redaction.show.edit'), edit_redaction_path(@redaction), :method => :get %></td>
+  <%= button_to t('redaction.show.destroy'), @redaction, :method => "delete", :remote => true, :data => { :confirm => t('redaction.show.confirm') } %>
+</div>
 <% end %>