2007-03-12 20:59:02 +03:00
|
|
|
<div class="contextual">
|
2011-11-30 23:51:16 +04:00
|
|
|
<% if User.current.allowed_to?(:manage_documents, @project) %>
|
|
|
|
<%= link_to l(:button_edit), edit_document_path(@document), :class => 'icon icon-edit', :accesskey => accesskey(:edit) %>
|
2012-07-07 18:36:49 +04:00
|
|
|
<%= delete_link document_path(@document) %>
|
2011-11-30 23:51:16 +04:00
|
|
|
<% end %>
|
2007-03-12 20:59:02 +03:00
|
|
|
</div>
|
|
|
|
|
2007-12-07 21:42:40 +03:00
|
|
|
<h2><%=h @document.title %></h2>
|
2007-03-12 20:59:02 +03:00
|
|
|
|
2007-12-07 21:42:40 +03:00
|
|
|
<p><em><%=h @document.category.name %><br />
|
2007-03-12 20:59:02 +03:00
|
|
|
<%= format_date @document.created_on %></em></p>
|
2008-01-04 20:55:08 +03:00
|
|
|
<div class="wiki">
|
2007-05-28 16:15:19 +04:00
|
|
|
<%= textilizable @document.description, :attachments => @document.attachments %>
|
2008-01-04 20:55:08 +03:00
|
|
|
</div>
|
2007-03-12 20:59:02 +03:00
|
|
|
|
|
|
|
<h3><%= l(:label_attachment_plural) %></h3>
|
2008-12-09 19:54:46 +03:00
|
|
|
<%= link_to_attachments @document %>
|
2007-03-12 20:59:02 +03:00
|
|
|
|
|
|
|
<% if authorize_for('documents', 'add_attachment') %>
|
2012-07-22 17:29:26 +04:00
|
|
|
<p><%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;",
|
2008-02-29 22:46:58 +03:00
|
|
|
:id => 'attach_files_link' %></p>
|
2012-04-25 21:17:49 +04:00
|
|
|
<%= form_tag({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %>
|
2008-02-29 22:46:58 +03:00
|
|
|
<div class="box">
|
|
|
|
<p><%= render :partial => 'attachments/form' %></p>
|
|
|
|
</div>
|
2007-03-12 20:59:02 +03:00
|
|
|
<%= submit_tag l(:button_add) %>
|
2011-09-17 03:56:07 +04:00
|
|
|
<% end %>
|
2006-06-28 22:11:03 +04:00
|
|
|
<% end %>
|
2007-12-07 21:42:40 +03:00
|
|
|
|
2011-10-02 22:45:17 +04:00
|
|
|
<% html_title @document.title -%>
|
2010-03-18 23:06:16 +03:00
|
|
|
|
|
|
|
<% content_for :header_tags do %>
|
|
|
|
<%= stylesheet_link_tag 'scm' %>
|
|
|
|
<% end %>
|