From f3b46c582393cfea59b7a59bb16800ac42484cd6 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 11 May 2015 15:50:23 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=B5=84=E6=BA=90=E5=BA=93?= =?UTF-8?q?=E6=9D=83=E9=99=90=E4=BC=98=E5=8C=96=EF=BC=9A=20=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=91=98=E3=80=81=E8=B5=84=E6=BA=90=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E8=80=85=E6=8B=A5=E6=9C=89=E8=AE=BE=E7=BD=AE=E5=85=AC=E5=BC=80?= =?UTF-8?q?=E7=A7=81=E6=9C=89=E6=9D=83=E9=99=90=20=E7=A7=81=E6=9C=89?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E4=B8=8D=E6=8F=90=E4=BE=9B=E5=BC=95=E7=94=A8?= =?UTF-8?q?=E5=85=B6=E5=AE=83=E9=A1=B9=E7=9B=AE=E5=92=8C=E5=85=AC=E5=BC=80?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/_project_file_list.html.erb | 12 ++++-------- app/views/messages/edit.html.erb | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/app/views/files/_project_file_list.html.erb b/app/views/files/_project_file_list.html.erb index 3dd5134d7..e11e4416b 100644 --- a/app/views/files/_project_file_list.html.erb +++ b/app/views/files/_project_file_list.html.erb @@ -20,20 +20,16 @@
<%= link_to_attachment file, :download => true,:text => truncate(file.filename,length: 35, omission: '...'), :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "c_dblue f_14 f_b f_l" %> <% if User.current.logged? %> - <% if (manage_allowed || file.author_id == User.current.id) && project_contains_attachment?(project,file) %> + + + <% if project.is_public? %> <%= link_to(l(:label_slected_to_other_project),quote_resource_show_project_project_file_path(project,file),:class => "f_l re_select",:remote => true) if has_project?(User.current,file) %> - - <% if manage_allowed && file.container_id == project.id && file.container_type == "Project" %> + <% if (Member.where(:user_id => User.current.id, :project_id => @project.id).first.roles.to_s.include?("Manager") || file.author_id == User.current.id) && project_contains_attachment?(project,file) && file.container_id == project.id && file.container_type == "Project" %> <%= link_to (file.is_public? ? "公开":"私有"), update_file_dense_attachments_path(:attachmentid=>file.id,:newtype=>(file.is_public? ? 0:1)),:remote=>true,:class=>"f_l re_open",:method => :post %> - <% else %> - <% end %> - <% else %> - <%= link_to(l(:label_slected_to_project),quote_resource_show_project_project_file_path(project,file),:class => "f_l re_select",:remote => true) if has_project?(User.current,file) %> <% end %> - <% else %> <% end %>
diff --git a/app/views/messages/edit.html.erb b/app/views/messages/edit.html.erb index 8fbeafcb9..d30aee45d 100644 --- a/app/views/messages/edit.html.erb +++ b/app/views/messages/edit.html.erb @@ -23,7 +23,7 @@ <% elsif @message.course %> <%#= course_board_breadcrumb(@message) %>
-