|
|
|
@ -9,7 +9,7 @@
|
|
|
|
|
<% if options[:length] %>
|
|
|
|
|
<%= link_to_short_attachment attachment, :class => 'icon icon-attachment', :download => true,:length => options[:length] -%>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= link_to_short_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
|
|
|
|
|
<%= link_to_short_attachment attachment, :class => 'icon icon-attachment', :download => true, :length => 32 -%>
|
|
|
|
|
<% end %>
|
|
|
|
|
</span>
|
|
|
|
|
<%if is_float%>
|
|
|
|
@ -26,9 +26,7 @@
|
|
|
|
|
<span title="<%= attachment.description%>">
|
|
|
|
|
<%= h(truncate(" - #{attachment.description}", length: options[:length] ? options[:length]:15, omission: '...')) unless attachment.description.blank? %>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="size">(
|
|
|
|
|
<%= number_to_human_size attachment.filesize %>)
|
|
|
|
|
</span>
|
|
|
|
|
<span class="size">(<%= number_to_human_size attachment.filesize , :precision => 0 %>)</span>
|
|
|
|
|
<% if options[:deletable] %>
|
|
|
|
|
<% if attachment.container_type == 'HomeworkAttach' %>
|
|
|
|
|
<%= link_to image_tag('delete.png'), {:controller => 'attachments', :action => 'delete_homework', :id => attachment.id},
|
|
|
|
|