X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/2f9291ba5764fe104264ae7e3b6a361e11212e8b..b1694ce39e6cdd184b858ad44218e8c7425d9f22:/app/views/redactions/show.html.erb?ds=sidebyside diff --git a/app/views/redactions/show.html.erb b/app/views/redactions/show.html.erb index 36b454188..1eb20f16f 100644 --- a/app/views/redactions/show.html.erb +++ b/app/views/redactions/show.html.erb @@ -1,20 +1,24 @@ -<% @title = t('.title') %> +<% @title = t(".title") %> <% content_for :heading do %> - <h1><%= t('.heading', :title => @redaction.title) %></h1> + <h1><%= t(".heading", :title => @redaction.title) %></h1> <% end %> <p> - <b><%= t '.user' %></b> + <b><%= t ".user" %></b> <%= link_to(@redaction.user.display_name, user_path(@redaction.user)) %> </p> <div class="richtext"> - <b><%= t '.description' %></b> + <b><%= t ".description" %></b> <%= @redaction.description.to_html %> </div> -<% if current_user and current_user.moderator? %> +<% if can?(:edit, Redaction) || can?(:destroy, Redaction) %> <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') } %> + <% if can?(:edit, Redaction) %> + <%= button_to t(".edit"), edit_redaction_path(@redaction), :method => :get %></td> + <% end %> + <% if can?(:destroy, Redaction) %> + <%= button_to t(".destroy"), @redaction, :method => "delete", :remote => true, :data => { :confirm => t(".confirm") } %> + <% end %> </div> <% end %>