diff options
Diffstat (limited to 'app/views/attachments')
-rw-r--r-- | app/views/attachments/_form.html.erb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/views/attachments/_form.html.erb b/app/views/attachments/_form.html.erb index a7c463989..464d3a2d7 100644 --- a/app/views/attachments/_form.html.erb +++ b/app/views/attachments/_form.html.erb @@ -1,3 +1,11 @@ +<% if defined?(container) && container && container.saved_attachments %> + <% container.saved_attachments.each_with_index do |attachment, i| %> + <span class="icon icon-attachment" style="display:block; line-height:1.5em;"> + <%= h(attachment.filename) %> (<%= number_to_human_size(attachment.filesize) %>) + <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.id}.#{attachment.digest}" %> + </span> + <% end %> +<% end %> <span id="attachments_fields"> <span> <%= file_field_tag 'attachments[1][file]', :size => 30, :id => nil, :class => 'file', |