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) %>
-