2015-09-28 14:35:55 +08:00
|
|
|
<div class="mt10 fl" style="width: 600px">
|
2015-09-18 17:44:16 +08:00
|
|
|
<% for attachment in attachments %>
|
|
|
|
<!--<p style="width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">-->
|
|
|
|
<!--<div style="max-width:55%;white-space: nowrap; overflow: hidden; text-overflow: ellipsis;float: left;">-->
|
|
|
|
<!--<span title="<%#= attachment.filename%>" id = "attachment_">-->
|
|
|
|
<% if options[:length] %>
|
|
|
|
<span class="pic_files fl "></span>
|
|
|
|
<%= link_to_short_attachment attachment, :class => 'fl FilesName02', :download => true,:length => options[:length] -%>
|
|
|
|
<a class="fl FilesName02"> (<%= number_to_human_size attachment.filesize , :precision => 0 %>)</a>
|
|
|
|
<% if options[:deletable] %>
|
|
|
|
<%#= link_to image_tag('delete.png'), attachment_path(attachment),
|
|
|
|
:data => {:confirm => l(:text_are_you_sure)},
|
|
|
|
:method => :delete,
|
|
|
|
:class => 'delete',
|
|
|
|
#:remote => true,
|
|
|
|
#:id => "attachments_" + attachment.id.to_s,
|
|
|
|
:title => l(:button_delete) %>
|
|
|
|
<span class="pic_del fl "> <a href="<%=attachment_path(attachment) %>" onclick="confirm(<%=l(:text_are_you_sure) %>)" data-method="delete"> </a></span>
|
|
|
|
<% end %>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<% else %>
|
|
|
|
<span class="pic_files fl "></span>
|
2015-09-28 14:35:55 +08:00
|
|
|
<%= link_to_short_attachment attachment, :class => 'fl FilesName02', :download => true, :length => 45 -%>
|
2015-09-18 17:44:16 +08:00
|
|
|
<a href="javascript:void(0);" class="fl FilesName02"> (<%= number_to_human_size attachment.filesize , :precision => 0 %>)</a>
|
|
|
|
<% if options[:deletable] %>
|
|
|
|
<a href="<%=attachment_path(attachment) %>" onclick="confirm(<%=l(:text_are_you_sure) %>)" data-method="delete"> <span class="pic_del fl "></span> </a>
|
|
|
|
<% end %>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% if defined?(thumbnails) && thumbnails %>
|
|
|
|
<% images = attachments.select(&:thumbnailable?) %>
|
|
|
|
<% if images.any? %>
|
|
|
|
<div class="pro_pic mb10" width="100" height="73">
|
|
|
|
<% images.each do |attachment| %>
|
|
|
|
<div><%= thumbnail_tag(attachment) %></div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|