You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

edit_all.html.erb 1.2KB

1234567891011121314151617181920212223242526272829303132
  1. <h2>
  2. <%= safe_join([link_to_attachment_container(@container), l(:label_edit_attachments)].compact, ' » ') %>
  3. </h2>
  4. <%= error_messages_for *@attachments %>
  5. <%= form_tag(container_attachments_path(@container), :method => 'patch') do %>
  6. <%= back_url_hidden_field_tag %>
  7. <div class="box attachments">
  8. <table>
  9. <% @attachments.each do |attachment| %>
  10. <tr>
  11. <td colspan="2">
  12. <span class="icon icon-attachment"><%= attachment.filename_was %></span>
  13. <span class="size">(<%= number_to_human_size attachment.filesize %>)</span>
  14. <span class="author"><%= attachment.author %>, <%= format_time(attachment.created_on) %></span>
  15. </td>
  16. </tr>
  17. <tr id="attachment-<%= attachment.id %>">
  18. <td><%= text_field_tag "attachments[#{attachment.id}][filename]", attachment.filename, :size => 40 %></td>
  19. <td>
  20. <%= text_field_tag "attachments[#{attachment.id}][description]", attachment.description, :size => 80, :placeholder => l(:label_optional_description) %>
  21. </td>
  22. </tr>
  23. <% end %>
  24. </table>
  25. </div>
  26. <p>
  27. <%= submit_tag l(:button_save) %>
  28. <%= link_to l(:button_cancel), back_url if back_url.present? %>
  29. </p>
  30. <% end %>