From 8688c03aee9a637ea508cca100a5860d328de3bc Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 18 Sep 2014 16:20:58 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=90=E5=88=B6=E6=96=87=E4=BB=B6=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E4=B8=AD=E6=98=B5=E7=A7=B0=E7=9A=84=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/attachments/_links.html.erb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/views/attachments/_links.html.erb b/app/views/attachments/_links.html.erb index de43dce4c..698198120 100644 --- a/app/views/attachments/_links.html.erb +++ b/app/views/attachments/_links.html.erb @@ -12,7 +12,7 @@ :filename => attachment.filename%> <% end %> - <%= h(truncate(" - #{attachment.description}", length: 20, omission: '...')) unless attachment.description.blank? %> + <%= h(truncate(" - #{attachment.description}", length: 15, omission: '...')) unless attachment.description.blank? %> (<%= number_to_human_size attachment.filesize %>) <% if options[:deletable] %> @@ -34,7 +34,10 @@ <% end %> <% if options[:author] %> - <%= link_to h(attachment.author),user_path(attachment.author) %>, <%= format_time(attachment.created_on) %> + + <%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author) %>, + <%= format_time(attachment.created_on) %> + <% end %>

<% end %>