@@ -1,32 +1,32 | |||||
1 | <div class="contextual"> |
|
1 | <div class="contextual"> | |
2 | <% if User.current.allowed_to?(:edit_documents, @project) %> |
|
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) %> |
|
3 | <%= link_to l(:button_edit), edit_document_path(@document), :class => 'icon icon-edit', :accesskey => accesskey(:edit) %> | |
4 | <% end %> |
|
4 | <% end %> | |
5 | <% if User.current.allowed_to?(:delete_documents, @project) %> |
|
5 | <% if User.current.allowed_to?(:delete_documents, @project) %> | |
6 | <%= delete_link document_path(@document) %> |
|
6 | <%= delete_link document_path(@document) %> | |
7 | <% end %> |
|
7 | <% end %> | |
8 | </div> |
|
8 | </div> | |
9 |
|
9 | |||
10 | <h2><%=h @document.title %></h2> |
|
10 | <h2><%=h @document.title %></h2> | |
11 |
|
11 | |||
12 | <p><em><%=h @document.category.name %><br /> |
|
12 | <p><em><%=h @document.category.name %><br /> | |
13 | <%= format_date @document.created_on %></em></p> |
|
13 | <%= format_date @document.created_on %></em></p> | |
14 | <div class="wiki"> |
|
14 | <div class="wiki"> | |
15 |
<%= textilizable @document |
|
15 | <%= textilizable @document, :description, :attachments => @document.attachments %> | |
16 | </div> |
|
16 | </div> | |
17 |
|
17 | |||
18 | <h3><%= l(:label_attachment_plural) %></h3> |
|
18 | <h3><%= l(:label_attachment_plural) %></h3> | |
19 | <%= link_to_attachments @document %> |
|
19 | <%= link_to_attachments @document %> | |
20 |
|
20 | |||
21 | <% if authorize_for('documents', 'add_attachment') %> |
|
21 | <% if authorize_for('documents', 'add_attachment') %> | |
22 | <p><%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;", |
|
22 | <p><%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;", | |
23 | :id => 'attach_files_link' %></p> |
|
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 %> |
|
24 | <%= form_tag({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %> | |
25 | <div class="box"> |
|
25 | <div class="box"> | |
26 | <p><%= render :partial => 'attachments/form' %></p> |
|
26 | <p><%= render :partial => 'attachments/form' %></p> | |
27 | </div> |
|
27 | </div> | |
28 | <%= submit_tag l(:button_add) %> |
|
28 | <%= submit_tag l(:button_add) %> | |
29 | <% end %> |
|
29 | <% end %> | |
30 | <% end %> |
|
30 | <% end %> | |
31 |
|
31 | |||
32 | <% html_title @document.title -%> |
|
32 | <% html_title @document.title -%> |
General Comments 0
You need to be logged in to leave comments.
Login now