annotate app/views/attachments/_form.html.erb @ 1327:287f201c2802 redmine-2.2-integration

Add italic
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Wed, 19 Jun 2013 20:56:22 +0100
parents bb32da3bea34
children 4f746d8966dd
rev   line source
Chris@1115 1 <% if defined?(container) && container && container.saved_attachments %>
Chris@1115 2 <% container.saved_attachments.each_with_index do |attachment, i| %>
Chris@1115 3 <span class="icon icon-attachment" style="display:block; line-height:1.5em;">
Chris@1115 4 <%= h(attachment.filename) %> (<%= number_to_human_size(attachment.filesize) %>)
Chris@1115 5 <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.id}.#{attachment.digest}" %>
Chris@1115 6 </span>
Chris@1115 7 <% end %>
Chris@1115 8 <% end %>
Chris@0 9 <span id="attachments_fields">
Chris@909 10 <span>
Chris@1115 11 <%= file_field_tag 'attachments[1][file]', :id => nil, :class => 'file',
Chris@909 12 :onchange => "checkFileSize(this, #{Setting.attachment_max_size.to_i.kilobytes}, '#{escape_javascript(l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)))}');" -%>
Chris@1116 13 <nobr><%= text_field_tag 'attachments[1][description]', '', :id => nil, :class => 'description', :maxlength => 255, :placeholder => l(:label_optional_description) %>
chris@985 14 <%= link_to_function(image_tag('delete.png'), 'removeFileField(this)', :title => (l(:button_delete))) %></nobr>
Chris@909 15 </span>
Chris@0 16 </span>
Chris@1116 17
Chris@1115 18 <span class="add_attachment"><%= link_to l(:label_add_another_file), '#', :onclick => 'addFileField(); return false;', :class => 'add_attachment' %>
Chris@1115 19 (<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</span>