##// END OF EJS Templates
Show thumbnails on documents (#22941)....
Jean-Philippe Lang -
r15223:ea89cc6e7e4b
parent child
Show More
@@ -1,41 +1,41
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><%= @document.title %></h2>
10 <h2><%= @document.title %></h2>
11
11
12 <p><em><%= @document.category.name %><br />
12 <p><em><%= @document.category.name %><br />
13 <%= format_date @document.created_on %></em></p>
13 <%= format_date @document.created_on %></em></p>
14
14
15 <% if @document.custom_field_values.any? %>
15 <% if @document.custom_field_values.any? %>
16 <ul>
16 <ul>
17 <% render_custom_field_values(@document) do |custom_field, formatted| %>
17 <% render_custom_field_values(@document) do |custom_field, formatted| %>
18 <li><span class="label"><%= custom_field.name %>:</span> <%= formatted %></li>
18 <li><span class="label"><%= custom_field.name %>:</span> <%= formatted %></li>
19 <% end %>
19 <% end %>
20 </ul>
20 </ul>
21 <% end %>
21 <% end %>
22
22
23 <div class="wiki">
23 <div class="wiki">
24 <%= textilizable @document, :description, :attachments => @document.attachments %>
24 <%= textilizable @document, :description, :attachments => @document.attachments %>
25 </div>
25 </div>
26
26
27 <h3><%= l(:label_attachment_plural) %></h3>
27 <h3><%= l(:label_attachment_plural) %></h3>
28 <%= link_to_attachments @document %>
28 <%= link_to_attachments @document, :thumbnails => true %>
29
29
30 <% if authorize_for('documents', 'add_attachment') %>
30 <% if authorize_for('documents', 'add_attachment') %>
31 <p><%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;",
31 <p><%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;",
32 :id => 'attach_files_link' %></p>
32 :id => 'attach_files_link' %></p>
33 <%= form_tag({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %>
33 <%= form_tag({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %>
34 <div class="box">
34 <div class="box">
35 <p><%= render :partial => 'attachments/form' %></p>
35 <p><%= render :partial => 'attachments/form' %></p>
36 </div>
36 </div>
37 <%= submit_tag l(:button_add) %>
37 <%= submit_tag l(:button_add) %>
38 <% end %>
38 <% end %>
39 <% end %>
39 <% end %>
40
40
41 <% html_title @document.title -%>
41 <% html_title @document.title -%>
General Comments 0
You need to be logged in to leave comments. Login now