From e900e6d6fd9832ffa72a66e0b069f72d5248228b Mon Sep 17 00:00:00 2001 From: linhk <304431313@.com> Date: Fri, 22 Aug 2014 11:04:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=9F=A5=E7=9C=8B=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E9=A1=B5=E9=9D=A2=E5=86=85=E5=AE=B9=E6=9C=AA=E6=8D=A2?= =?UTF-8?q?=E8=A1=8CBug=20=E4=BF=AE=E6=94=B9=E6=96=87=E6=9C=AC=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E8=A1=8C=E5=8F=B7=E6=A0=B7=E5=BC=8F=E5=B1=85=E4=B8=8A?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E6=96=B0=E5=A2=9E=E8=AF=84=E5=AE=A1?= =?UTF-8?q?=E5=9C=A8=E6=B2=A1=E6=9C=89=E7=9A=84=E6=97=B6=E5=80=99=E5=BC=95?= =?UTF-8?q?=E5=8F=91=E7=9A=84Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/attachments/file.html.erb | 8 +++++--- app/views/common/_file.html.erb | 8 ++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/views/attachments/file.html.erb b/app/views/attachments/file.html.erb index c85cbe32a..37db6f2bc 100644 --- a/app/views/attachments/file.html.erb +++ b/app/views/attachments/file.html.erb @@ -4,14 +4,16 @@
<%= h("#{@attachment.description} - ") unless @attachment.description.blank? %>
<%= link_to_attachment @attachment, :text => l(:button_download), :download => true -%> - (<%= number_to_human_size @attachment.filesize %>)    - <%= link = link_to(l(:button_add), {:controller => 'code_review', + (<%= number_to_human_size @attachment.filesize %>)    + + <% if @attachment!=nil&&@attachment.container_type == 'Document' %> + <%= link = link_to(l(:button_add), {:controller => 'code_review', :action => 'assign', :action_type => 'attachment', :id=>@attachment.project, :change_id => '', :attachment_id => @attachment.id, }, :class => 'icon icon-add') %> + <% end %>
- <%= render :partial => 'common/file', :locals => {:content => @content, :filename => @attachment.filename} %> diff --git a/app/views/common/_file.html.erb b/app/views/common/_file.html.erb index 22126b949..d4c0875c2 100644 --- a/app/views/common/_file.html.erb +++ b/app/views/common/_file.html.erb @@ -1,14 +1,14 @@- <%= line_num %> + | + <%= line_num %> |
- <%= line.html_safe %>+ <%= line.html_safe %> |
---|