#1839上传附件名延后省略号显示
This commit is contained in:
parent
320ee9289a
commit
7ab5eeab65
|
@ -1,14 +1,15 @@
|
||||||
<div class="attachments" style="font-weight:normal;">
|
<div class="attachments" style="font-weight:normal;">
|
||||||
<% for attachment in attachments %>
|
<% for attachment in attachments %>
|
||||||
<p style="width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
<p style="width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||||
<span title="<%= attachment.filename%>" id = "attachment_">
|
<div style="width:65%;white-space: nowrap; overflow: hidden; text-overflow: ellipsis;float: left;">
|
||||||
<% if options[:length] %>
|
<span title="<%= attachment.filename%>" id = "attachment_">
|
||||||
<%= link_to_short_attachment attachment, :class => 'icon icon-attachment', :download => true,:length => options[:length] -%>
|
<% if options[:length] %>
|
||||||
<% else %>
|
<%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true,:length => options[:length] -%>
|
||||||
<%= link_to_short_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
|
<% else %>
|
||||||
<% end %>
|
<%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
|
||||||
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
|
</div>
|
||||||
<% if attachment.is_text? %>
|
<% if attachment.is_text? %>
|
||||||
<%= link_to image_tag('magnifier.png'),
|
<%= link_to image_tag('magnifier.png'),
|
||||||
:controller => 'attachments',
|
:controller => 'attachments',
|
||||||
|
@ -19,8 +20,9 @@
|
||||||
<span title="<%= attachment.description%>">
|
<span title="<%= attachment.description%>">
|
||||||
<%= h(truncate(" - #{attachment.description}", length: options[:length] ? options[:length]:15, omission: '...')) unless attachment.description.blank? %>
|
<%= h(truncate(" - #{attachment.description}", length: options[:length] ? options[:length]:15, omission: '...')) unless attachment.description.blank? %>
|
||||||
</span>
|
</span>
|
||||||
<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] %>
|
||||||
<% if attachment.container_type == 'HomeworkAttach' %>
|
<% if attachment.container_type == 'HomeworkAttach' %>
|
||||||
<%= link_to image_tag('delete.png'), {:controller => 'attachments', :action => 'delete_homework', :id => attachment.id},
|
<%= link_to image_tag('delete.png'), {:controller => 'attachments', :action => 'delete_homework', :id => attachment.id},
|
||||||
|
@ -39,8 +41,8 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if options[:wrap] %>
|
<% if options[:wrap] %>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if options[:author] %>
|
<% if options[:author] %>
|
||||||
<span class="author" title="<%= attachment.author%>">
|
<span class="author" title="<%= attachment.author%>">
|
||||||
|
|
Loading…
Reference in New Issue