_links.html.erb
23 lines
| 1.1 KiB
| text/plain
|
TextLexer
|
r538 | <div class="attachments"> | ||
<% for attachment in attachments %> | ||||
|
r8525 | <p><%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true -%> | ||
|
r9190 | <% if attachment.is_text? %> | ||
<%= link_to image_tag('magnifier.png'), | ||||
|
r8525 | :controller => 'attachments', :action => 'show', | ||
:id => attachment, :filename => attachment.filename %> | ||||
<% end %> | ||||
|
r9198 | <%= h(" - #{attachment.description}") unless attachment.description.blank? %> | ||
<span class="size">(<%= number_to_human_size attachment.filesize %>)</span> | ||||
|
r9190 | <% if options[:deletable] %> | ||
|
r7828 | <%= link_to image_tag('delete.png'), attachment_path(attachment), | ||
|
r1166 | :confirm => l(:text_are_you_sure), | ||
|
r7828 | :method => :delete, | ||
|
r1166 | :class => 'delete', | ||
:title => l(:button_delete) %> | ||||
<% end %> | ||||
|
r2114 | <% if options[:author] %> | ||
|
r6238 | <span class="author"><%= h(attachment.author) %>, <%= format_time(attachment.created_on) %></span> | ||
|
r538 | <% end %> | ||
</p> | ||||
<% end %> | ||||
</div> | ||||