show.html.erb
32 lines
| 1.2 KiB
| text/plain
|
TextLexer
|
r330 | <div class="contextual"> | ||
|
r10976 | <% if User.current.allowed_to?(:edit_documents, @project) %> | ||
|
r7890 | <%= link_to l(:button_edit), edit_document_path(@document), :class => 'icon icon-edit', :accesskey => accesskey(:edit) %> | ||
|
r10976 | <% end %> | ||
<% if User.current.allowed_to?(:delete_documents, @project) %> | ||||
|
r9754 | <%= delete_link document_path(@document) %> | ||
|
r7890 | <% end %> | ||
|
r330 | </div> | ||
|
r951 | <h2><%=h @document.title %></h2> | ||
|
r330 | |||
|
r951 | <p><em><%=h @document.category.name %><br /> | ||
|
r330 | <%= format_date @document.created_on %></em></p> | ||
|
r1022 | <div class="wiki"> | ||
|
r549 | <%= textilizable @document.description, :attachments => @document.attachments %> | ||
|
r1022 | </div> | ||
|
r330 | |||
<h3><%= l(:label_attachment_plural) %></h3> | ||||
|
r2114 | <%= link_to_attachments @document %> | ||
|
r330 | |||
<% if authorize_for('documents', 'add_attachment') %> | ||||
|
r9885 | <p><%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;", | ||
|
r1166 | :id => 'attach_files_link' %></p> | ||
|
r9346 | <%= form_tag({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %> | ||
|
r1166 | <div class="box"> | ||
<p><%= render :partial => 'attachments/form' %></p> | ||||
</div> | ||||
|
r330 | <%= submit_tag l(:button_add) %> | ||
|
r7142 | <% end %> | ||
|
r2 | <% end %> | ||
|
r951 | |||
|
r7445 | <% html_title @document.title -%> | ||