summaryrefslogtreecommitdiffstats
path: root/app/views/attachments
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-02-16 21:00:11 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-02-16 21:00:11 +0000
commitd4e6355eb3f220787e9374eeef6fb496f213f0d1 (patch)
tree1fe20acbf595c1df2407cc563ed37acf74292c10 /app/views/attachments
parenta8f98bb74903954f28c4299f4ea7a7279d9028dd (diff)
downloadredmine-d4e6355eb3f220787e9374eeef6fb496f213f0d1.tar.gz
redmine-d4e6355eb3f220787e9374eeef6fb496f213f0d1.zip
Better handling of attachments when issue validation fails (#10253).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8891 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/attachments')
-rw-r--r--app/views/attachments/_form.html.erb8
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',