2007-05-26 19:42:37 +04:00
|
|
|
<div class="attachments">
|
|
|
|
<% for attachment in attachments %>
|
2012-01-14 19:55:54 +04:00
|
|
|
<p><%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
|
2012-04-06 09:44:14 +04:00
|
|
|
<% if attachment.is_text? %>
|
|
|
|
<%= link_to image_tag('magnifier.png'),
|
2012-01-14 19:55:54 +04:00
|
|
|
:controller => 'attachments', :action => 'show',
|
|
|
|
:id => attachment, :filename => attachment.filename %>
|
|
|
|
<% end %>
|
2012-04-06 12:49:04 +04:00
|
|
|
<%= h(" - #{attachment.description}") unless attachment.description.blank? %>
|
|
|
|
<span class="size">(<%= number_to_human_size attachment.filesize %>)</span>
|
2012-04-06 09:44:14 +04:00
|
|
|
<% if options[:deletable] %>
|
2011-11-27 15:16:47 +04:00
|
|
|
<%= link_to image_tag('delete.png'), attachment_path(attachment),
|
2008-02-29 22:46:58 +03:00
|
|
|
:confirm => l(:text_are_you_sure),
|
2011-11-27 15:16:47 +04:00
|
|
|
:method => :delete,
|
2008-02-29 22:46:58 +03:00
|
|
|
:class => 'delete',
|
|
|
|
:title => l(:button_delete) %>
|
|
|
|
<% end %>
|
2008-12-09 19:54:46 +03:00
|
|
|
<% if options[:author] %>
|
2011-08-02 16:54:18 +04:00
|
|
|
<span class="author"><%= h(attachment.author) %>, <%= format_time(attachment.created_on) %></span>
|
2007-05-26 19:42:37 +04:00
|
|
|
<% end %>
|
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
</div>
|