Introduces table for attachment list

pull/508/head
Hagen Schink 11 years ago
parent 735e9f338a
commit 1c5cd9ad0b
  1. 32
      app/views/attachments/_links.html.erb

@ -28,21 +28,31 @@ See doc/COPYRIGHT.rdoc for more details.
++#%> ++#%>
<div class="attachments"> <div class="attachments">
<% for attachment in attachments %> <table>
<p><%= link_to_attachment attachment, :class => 'icon icon-attachment' -%> <tbody>
<%= h(" - #{attachment.description}") unless attachment.description.blank? %> <% for attachment in attachments %>
<tr id="attachment_<%= attachment.id %>">
<td>
<%= link_to_attachment attachment, :class => 'icon icon-attachment' -%>
<%= h(" - #{attachment.description}") unless attachment.description.blank? %>
<span class="size">(<%= number_to_human_size attachment.filesize %>)</span> <span class="size">(<%= number_to_human_size attachment.filesize %>)</span>
<% if options[:deletable] %> <% if options[:deletable] %>
<%= link_to image_tag('webalys/delete.png', :alt => l(:button_delete), :title => l(:button_delete)), <%= link_to image_tag('webalys/delete.png',
attachment_path(attachment), alt: l(:button_delete),
{ :confirm => l(:text_are_you_sure), title: l(:button_delete)),
:method => :delete, attachment,
:class => 'delete', { confirm: l(:text_are_you_sure),
:title => l(:button_delete) } %> method: :delete,
class: 'delete',
title: l(:button_delete),
remote: true } %>
<% end %> <% end %>
<% if options[:author] %> <% if options[:author] %>
<span class="author"><%= h(attachment.author) %>, <%= format_time(attachment.created_on) %></span> <span class="author"><%= h(attachment.author) %>, <%= format_time(attachment.created_on) %></span>
<% end %> <% end %>
</p> </td>
<% end %> </tr>
<% end %>
</tbody>
</table>
</div> </div>

Loading…
Cancel
Save