To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / app / views / documents / show.html.erb @ 1531:ae8145b28b2b

History | View | Annotate | Download (1.23 KB)

1
<div class="contextual">
2
<% if User.current.allowed_to?(:edit_documents, @project) %>
3
<%= link_to l(:button_edit), edit_document_path(@document), :class => 'icon icon-edit', :accesskey => accesskey(:edit) %>
4
<% end %>
5
<% if User.current.allowed_to?(:delete_documents, @project) %>
6
<%= delete_link document_path(@document) %>
7
<% end %>
8
</div>
9

    
10
<h2><%=h @document.title %></h2>
11

    
12
<p><em><%=h @document.category.name %><br />
13
<%= format_date @document.created_on %></em></p>
14
<div class="wiki">
15
<%= textilizable @document, :description, :attachments => @document.attachments %>
16
</div>
17

    
18
<h3><%= l(:label_attachment_plural) %></h3>
19
<%= link_to_attachments @document %>
20

    
21
<% if authorize_for('documents', 'add_attachment') %>
22
<p><%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;",
23
                                             :id => 'attach_files_link' %></p>
24
  <%= form_tag({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %>
25
  <div class="box">
26
  <p><%= render :partial => 'attachments/form' %></p>
27
  </div>
28
  <%= submit_tag l(:button_add) %>
29
  <% end %>
30
<% end %>
31

    
32
<% html_title @document.title -%>