show.html.erb
41 lines
| 1.5 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> | ||
|
r13661 | <h2><%= @document.title %></h2> | ||
|
r330 | |||
|
r13661 | <p><em><%= @document.category.name %><br /> | ||
|
r330 | <%= format_date @document.created_on %></em></p> | ||
|
r13622 | |||
<% if @document.custom_field_values.any? %> | ||||
<ul> | ||||
<% render_custom_field_values(@document) do |custom_field, formatted| %> | ||||
<li><span class="label"><%= custom_field.name %>:</span> <%= formatted %></li> | ||||
<% end %> | ||||
</ul> | ||||
<% end %> | ||||
|
r1022 | <div class="wiki"> | ||
|
r11531 | <%= 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 -%> | ||