OSDN Git Service

added svn:eol-style native property on /app files
[redminele/redmine.git] / app / views / documents / show.rhtml
1 <div class="contextual">
2 <%= link_to_if_authorized l(:button_edit), {:controller => 'documents', :action => 'edit', :id => @document}, :class => 'icon icon-edit' %>
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 </div>
5
6 <h2><%= @document.title %></h2>
7
8 <p><em><%= @document.category.name %><br />
9 <%= format_date @document.created_on %></em></p>
10 <%= textilizable @document.description %>
11 <br />
12
13 <h3><%= l(:label_attachment_plural) %></h3>
14 <ul class="documents">  
15 <% for attachment in @attachments %>
16     <li>
17         <div class="contextual">
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         </div>
20         <%= link_to attachment.filename, :action => 'download', :id => @document, :attachment_id => attachment %>
21         (<%= number_to_human_size attachment.filesize %>)<br />
22         <em><%= attachment.author.display_name %>, <%= format_date(attachment.created_on) %></em><br />
23         <%= lwr(:label_download, attachment.downloads) %>
24     </li>
25 <% end %>
26 </ul>
27 <br />
28
29
30 <% if authorize_for('documents', 'add_attachment') %>
31   <% form_tag ({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :class => "tabular") do %>
32     <p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
33     <%= image_to_function "add.png", "addFileField();return false" %></label>
34     <%= file_field_tag 'attachments[]', :size => 30  %> <em>(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
35   <%= submit_tag l(:button_add) %>
36   <% end %> 
37 <% end %>