From 41a6b8ab0614ed0c467d336de0111f8be589de70 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Mon, 28 Sep 2015 14:35:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=90=8D=E7=A7=B0=E5=B0=BD?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E7=9A=84=E6=98=BE=E7=A4=BA=E5=AE=8C=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/memos/_attachments_links.html.erb | 34 ++------------------- app/views/memos/show.html.erb | 2 +- 2 files changed, 3 insertions(+), 33 deletions(-) diff --git a/app/views/memos/_attachments_links.html.erb b/app/views/memos/_attachments_links.html.erb index 967bc0883..ca0f41d16 100644 --- a/app/views/memos/_attachments_links.html.erb +++ b/app/views/memos/_attachments_links.html.erb @@ -1,4 +1,4 @@ -
+
<% for attachment in attachments %> @@ -20,43 +20,13 @@
<% else %> - <%= link_to_short_attachment attachment, :class => 'fl FilesName02', :download => true, :length => 80 -%> + <%= link_to_short_attachment attachment, :class => 'fl FilesName02', :download => true, :length => 45 -%> (<%= number_to_human_size attachment.filesize , :precision => 0 %>) <% 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) %> <% end %>
<% end %> - - <%# if attachment.is_text? %> - <%#= link_to image_tag('magnifier.png'), - :controller => 'attachments', - :action => 'show', - :id => attachment, - :filename => attachment.filename%> - <%# end %> - - - - - - - - - - - <%#= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author) %> - - - - <% end %> <% if defined?(thumbnails) && thumbnails %> <% images = attachments.select(&:thumbnailable?) %> diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index 1e2f0f25b..550c7a4fe 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -69,7 +69,7 @@ <%= @memo.content.html_safe%>
-
+
<% if @memo.attachments.any?%> <% options = {:author => true, :deletable => @memo.deleted_attach_able_by?(User.current) } %> <%= render :partial => 'attachments_links', :locals => {:attachments => @memo.attachments, :options => options, :is_float => true} %>