@@ -1,36 +1,36 | |||
|
1 | 1 | <div class="contextual"> |
|
2 | 2 | <%= link_to_if_authorized l(:button_edit), {:controller => 'documents', :action => 'edit', :id => @document}, :class => 'icon icon-edit' %> |
|
3 | 3 | <%= link_to_if_authorized l(:button_delete), {:controller => 'documents', :action => 'destroy', :id => @document}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %> |
|
4 | 4 | </div> |
|
5 | 5 | |
|
6 | 6 | <h2><%= @document.title %></h2> |
|
7 | 7 | |
|
8 | 8 | <p><em><%= @document.category.name %><br /> |
|
9 | 9 | <%= format_date @document.created_on %></em></p> |
|
10 | <%= textilizable @document.description %> | |
|
10 | <%= textilizable @document.description, :attachments => @document.attachments %> | |
|
11 | 11 | <br /> |
|
12 | 12 | |
|
13 | 13 | <h3><%= l(:label_attachment_plural) %></h3> |
|
14 | 14 | <ul class="documents"> |
|
15 | 15 | <% for attachment in @attachments %> |
|
16 | 16 | <li> |
|
17 | 17 | <div class="contextual"> |
|
18 | 18 | <%= link_to_if_authorized l(:button_delete), {:controller => 'documents', :action => 'destroy_attachment', :id => @document, :attachment_id => attachment}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %> |
|
19 | 19 | </div> |
|
20 | 20 | <%= link_to attachment.filename, :action => 'download', :id => @document, :attachment_id => attachment %> |
|
21 | 21 | (<%= number_to_human_size attachment.filesize %>)<br /> |
|
22 | 22 | <em><%= attachment.author.display_name %>, <%= format_date(attachment.created_on) %></em><br /> |
|
23 | 23 | <%= lwr(:label_download, attachment.downloads) %> |
|
24 | 24 | </li> |
|
25 | 25 | <% end %> |
|
26 | 26 | </ul> |
|
27 | 27 | <br /> |
|
28 | 28 | |
|
29 | 29 | |
|
30 | 30 | <% if authorize_for('documents', 'add_attachment') %> |
|
31 | 31 | <p><%= toggle_link l(:label_attachment_new), "add_attachment_form" %></p> |
|
32 | 32 | <% form_tag({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :class => "tabular", :id => "add_attachment_form", :style => "display:none;") do %> |
|
33 | 33 | <%= render :partial => 'attachments/form' %> |
|
34 | 34 | <%= submit_tag l(:button_add) %> |
|
35 | 35 | <% end %> |
|
36 | 36 | <% end %> |
General Comments 0
You need to be logged in to leave comments.
Login now