From 0b41afa5716eca611d5038218e9b29a00435a0cf Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 6 Feb 2015 10:51:29 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BD=9C=E4=B8=9A=E5=8C=BF?=
=?UTF-8?q?=E8=AF=84=E7=95=8C=E9=9D=A2=EF=BC=8C=E5=B7=A6=E4=BE=A7=E9=99=84?=
=?UTF-8?q?=E4=BB=B6=E5=90=8D=E6=98=BE=E7=A4=BA=E6=B7=B7=E4=B9=B1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/attachments/_links.html.erb | 10 ++++++++--
app/views/memos/show.html.erb | 4 ++--
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/app/views/attachments/_links.html.erb b/app/views/attachments/_links.html.erb
index 0c2b0d7c2..989ed776d 100644
--- a/app/views/attachments/_links.html.erb
+++ b/app/views/attachments/_links.html.erb
@@ -1,7 +1,10 @@
+<% is_float ||= false %>
<% for attachment in attachments %>
-
+ <%if is_float%>
+
+ <% end%>
<% if options[:length] %>
<%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true,:length => options[:length] -%>
@@ -9,7 +12,10 @@
<%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
<% end %>
-
+ <%if is_float%>
+
+ <% end%>
+
<% if attachment.is_text? %>
<%= link_to image_tag('magnifier.png'),
:controller => 'attachments',
diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb
index 0330b65e4..995529fe9 100644
--- a/app/views/memos/show.html.erb
+++ b/app/views/memos/show.html.erb
@@ -67,7 +67,7 @@
<% 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} %>
+ <%= render :partial => 'attachments/links', :locals => {:attachments => @memo.attachments, :options => options, :is_float => true} %>
<% end %>
@@ -136,7 +136,7 @@
<% if reply.attachments.any?%>
<% options = {:author => true, :deletable => reply.deleted_attach_able_by?(User.current) } %>
- <%= render :partial => 'attachments/links', :locals => {:attachments => reply.attachments, :options => options} %>
+ <%= render :partial => 'attachments/links', :locals => {:attachments => reply.attachments, :options => options, :is_float => true} %>
<% end %>