diff app/views/documents/show.html.erb @ 1298:4f746d8966dd redmine_2.3_integration

Merge from redmine-2.3 branch to create new branch redmine-2.3-integration
author Chris Cannam
date Fri, 14 Jun 2013 09:28:30 +0100
parents 622f24f53b42
children
line wrap: on
line diff
--- a/app/views/documents/show.html.erb	Fri Jun 14 09:07:32 2013 +0100
+++ b/app/views/documents/show.html.erb	Fri Jun 14 09:28:30 2013 +0100
@@ -1,6 +1,8 @@
 <div class="contextual">
-<% if User.current.allowed_to?(:manage_documents, @project) %>
+<% if User.current.allowed_to?(:edit_documents, @project) %>
 <%= link_to l(:button_edit), edit_document_path(@document), :class => 'icon icon-edit', :accesskey => accesskey(:edit) %>
+<% end %>
+<% if User.current.allowed_to?(:delete_documents, @project) %>
 <%= delete_link document_path(@document) %>
 <% end %>
 </div>
@@ -10,7 +12,7 @@
 <p><em><%=h @document.category.name %><br />
 <%= format_date @document.created_on %></em></p>
 <div class="wiki">
-<%= textilizable @document.description, :attachments => @document.attachments %>
+<%= textilizable @document, :description, :attachments => @document.attachments %>
 </div>
 
 <h3><%= l(:label_attachment_plural) %></h3>