From 1c5cd9ad0b781d464accea5181d708a0a1421327 Mon Sep 17 00:00:00 2001 From: Hagen Schink Date: Tue, 15 Oct 2013 17:28:53 +0200 Subject: [PATCH] Introduces table for attachment list --- app/views/attachments/_links.html.erb | 44 ++++++++++++++++----------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/app/views/attachments/_links.html.erb b/app/views/attachments/_links.html.erb index d2e4813660..94ef04cd50 100644 --- a/app/views/attachments/_links.html.erb +++ b/app/views/attachments/_links.html.erb @@ -28,21 +28,31 @@ See doc/COPYRIGHT.rdoc for more details. ++#%>
-<% for attachment in attachments %> -

<%= link_to_attachment attachment, :class => 'icon icon-attachment' -%> -<%= h(" - #{attachment.description}") unless attachment.description.blank? %> - (<%= number_to_human_size attachment.filesize %>) - <% if options[:deletable] %> - <%= link_to image_tag('webalys/delete.png', :alt => l(:button_delete), :title => l(:button_delete)), - attachment_path(attachment), - { :confirm => l(:text_are_you_sure), - :method => :delete, - :class => 'delete', - :title => l(:button_delete) } %> - <% end %> - <% if options[:author] %> - <%= h(attachment.author) %>, <%= format_time(attachment.created_on) %> - <% end %> -

-<% end %> + + + <% for attachment in attachments %> + + + + <% end %> + +
+ <%= link_to_attachment attachment, :class => 'icon icon-attachment' -%> + <%= h(" - #{attachment.description}") unless attachment.description.blank? %> + (<%= number_to_human_size attachment.filesize %>) + <% if options[:deletable] %> + <%= link_to image_tag('webalys/delete.png', + alt: l(:button_delete), + title: l(:button_delete)), + attachment, + { confirm: l(:text_are_you_sure), + method: :delete, + class: 'delete', + title: l(:button_delete), + remote: true } %> + <% end %> + <% if options[:author] %> + <%= h(attachment.author) %>, <%= format_time(attachment.created_on) %> + <% end %> +