From 7ab5eeab659d89e0100847fbc7e44cfbf4e4fd2b Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 3 Feb 2015 10:42:36 +0800 Subject: [PATCH] =?UTF-8?q?#1839=E4=B8=8A=E4=BC=A0=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E5=90=8D=E5=BB=B6=E5=90=8E=E7=9C=81=E7=95=A5=E5=8F=B7=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/attachments/_links.html.erb | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/app/views/attachments/_links.html.erb b/app/views/attachments/_links.html.erb index 2954adbcb..e604409d3 100644 --- a/app/views/attachments/_links.html.erb +++ b/app/views/attachments/_links.html.erb @@ -1,14 +1,15 @@
<% for attachment in attachments %>

- - <% 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 -%> - <% end %> - - +

+ + <% if options[:length] %> + <%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true,:length => options[:length] -%> + <% else %> + <%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true -%> + <% end %> + +
<% if attachment.is_text? %> <%= link_to image_tag('magnifier.png'), :controller => 'attachments', @@ -19,8 +20,9 @@ <%= h(truncate(" - #{attachment.description}", length: options[:length] ? options[:length]:15, omission: '...')) unless attachment.description.blank? %> - (<%= number_to_human_size attachment.filesize %>) - + ( + <%= number_to_human_size attachment.filesize %>) + <% if options[:deletable] %> <% if attachment.container_type == 'HomeworkAttach' %> <%= link_to image_tag('delete.png'), {:controller => 'attachments', :action => 'delete_homework', :id => attachment.id}, @@ -39,8 +41,8 @@ <% end %> <% end %> <% if options[:wrap] %> -
-   +
+   <% end %> <% if options[:author] %>