##// END OF EJS Templates
Moved javascript include tag to head....
Jean-Philippe Lang -
r10749:42b6f8365ad4
parent child
Show More
@@ -1,28 +1,30
1 <span id="attachments_fields">
1 <span id="attachments_fields">
2 <% if defined?(container) && container && container.saved_attachments %>
2 <% if defined?(container) && container && container.saved_attachments %>
3 <% container.saved_attachments.each_with_index do |attachment, i| %>
3 <% container.saved_attachments.each_with_index do |attachment, i| %>
4 <span id="attachments_p<%= i %>">
4 <span id="attachments_p<%= i %>">
5 <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename') +
5 <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename') +
6 text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 255, :placeholder => l(:label_optional_description), :class => 'description') +
6 text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 255, :placeholder => l(:label_optional_description), :class => 'description') +
7 link_to('&nbsp;'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %>
7 link_to('&nbsp;'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %>
8 <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
8 <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
9 </span>
9 </span>
10 <% end %>
10 <% end %>
11 <% end %>
11 <% end %>
12 </span>
12 </span>
13 <span class="add_attachment">
13 <span class="add_attachment">
14 <%= file_field_tag 'attachments_files',
14 <%= file_field_tag 'attachments_files',
15 :id => nil,
15 :id => nil,
16 :multiple => true,
16 :multiple => true,
17 :onchange => 'addInputFiles(this);',
17 :onchange => 'addInputFiles(this);',
18 :data => {
18 :data => {
19 :max_file_size => Setting.attachment_max_size.to_i.kilobytes,
19 :max_file_size => Setting.attachment_max_size.to_i.kilobytes,
20 :max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
20 :max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
21 :max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
21 :max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
22 :upload_path => uploads_path(:format => 'js'),
22 :upload_path => uploads_path(:format => 'js'),
23 :description_placeholder => l(:label_optional_description)
23 :description_placeholder => l(:label_optional_description)
24 } %>
24 } %>
25 (<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
25 (<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
26 </span>
26 </span>
27
27
28 <%= javascript_include_tag 'attachments' %>
28 <% content_for :header_tags do %>
29 <%= javascript_include_tag 'attachments' %>
30 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now