修复bug#2476 : 项目--问题跟踪:关于上传附件的描述的显示问题

This commit is contained in:
yutao 2015-05-19 12:22:53 +08:00
parent 895058f38e
commit f3da7979f8
1 changed files with 6 additions and 4 deletions

View File

@ -28,7 +28,8 @@
<div class="attachments" style="font-weight:normal;">
<% is_float ||= false %>
<% for attachment in attachments %>
<p style="width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
<div style="float:left;">
<p style="height:14px;line-height:10px;width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
<%if is_float%>
<div style="max-width:55%;white-space: nowrap; overflow: hidden; text-overflow: ellipsis;float: left;">
<% end%>
@ -50,9 +51,10 @@
:id => attachment,
:filename => attachment.filename%>
<% end %>
<span title="<%= attachment.description%>">
<%= h(truncate(" - #{attachment.description}", length: options[:length] ? options[:length]:15, omission: '...')) unless attachment.description.blank? %>
</span>
</div>
<div style="float:left;max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" title="<%= attachment.description%>">
<%= h(" - #{attachment.description}") unless attachment.description.blank? %>
</div>
<span class="size">(
<%= number_to_human_size attachment.filesize %>)
</span>