Chris@1464:
Chris@1464: <% if User.current.allowed_to?(:edit_documents, @project) %>
Chris@1464: <%= link_to l(:button_edit), edit_document_path(@document), :class => 'icon icon-edit', :accesskey => accesskey(:edit) %>
Chris@1464: <% end %>
Chris@1464: <% if User.current.allowed_to?(:delete_documents, @project) %>
Chris@1464: <%= delete_link document_path(@document) %>
Chris@1464: <% end %>
Chris@1464:
Chris@1464:
Chris@1464: <%=h @document.title %>
Chris@1464:
Chris@1464: <%=h @document.category.name %>
Chris@1464: <%= format_date @document.created_on %>
Chris@1464:
Chris@1464: <%= textilizable @document, :description, :attachments => @document.attachments %>
Chris@1464:
Chris@1464:
Chris@1464: <%= l(:label_attachment_plural) %>
Chris@1464: <%= link_to_attachments @document %>
Chris@1464:
Chris@1464: <% if authorize_for('documents', 'add_attachment') %>
Chris@1464: <%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;",
Chris@1464: :id => 'attach_files_link' %>
Chris@1464: <%= form_tag({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %>
Chris@1464:
Chris@1464:
<%= render :partial => 'attachments/form' %>
Chris@1464:
Chris@1464: <%= submit_tag l(:button_add) %>
Chris@1464: <% end %>
Chris@1464: <% end %>
Chris@1464:
Chris@1464: <% html_title @document.title -%>