]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/redactions/show.html.erb
Merge remote-tracking branch 'upstream/pull/2190'
[rails.git] / app / views / redactions / show.html.erb
index 04df9ade9b4eec98a46549f2e6c5f57028d66da3..a87cca604fd9c220a66fb07d22d24786e3c0fb99 100644 (file)
@@ -1,16 +1,20 @@
-<% @title = t('redaction.show.title') %>
-<h1><%= t('redaction.show.heading', :title => @redaction.title) %></h1>
+<% @title = t(".title") %>
+<% content_for :heading do %>
+  <h1><%= t(".heading", :title => @redaction.title) %></h1>
+<% end %>
 
 <p>
-  <b><%= t 'redaction.show.user' %></b>
-  <%= link_to(h(@redaction.user.display_name), {:controller => 'user', :action => 'view', :display_name => @redaction.user.display_name}) %>
+  <b><%= t ".user" %></b>
+  <%= link_to(@redaction.user.display_name, user_path(@redaction.user)) %>
 </p>
-<p>
-  <b><%= t 'redaction.show.description' %></b>
+<div class="richtext">
+  <b><%= t ".description" %></b>
   <%= @redaction.description.to_html %>
-</p>
+</div>
 
-<% if @user and @user.moderator? %>
-<%= link_to t('redaction.show.edit'), edit_redaction_path(@redaction) %>
-<%= button_to(t('redaction.show.destroy'), @redaction, :confirm => t('redaction.show.confirm'), :method => "delete", :remote => true) %>
+<% if current_user and current_user.moderator? %>
+<div class="buttons">
+  <%= button_to t(".edit"), edit_redaction_path(@redaction), :method => :get %></td>
+  <%= button_to t(".destroy"), @redaction, :method => "delete", :remote => true, :data => { :confirm => t(".confirm") } %>
+</div>
 <% end %>