|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
|
|
|
|
|
<% delete_allowed = User.current.allowed_to?(:manage_files, project) %>
|
|
|
|
|
<div class="re_con_top">
|
|
|
|
|
<p class="f_l c_blue f_b f_14">共有 <%= all_attachments.count%> 个资源</p>
|
|
|
|
|
<p class="f_r" style="color: #808080">
|
|
|
|
@ -22,13 +22,13 @@
|
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
|
<% if (manage_allowed || file.author_id == User.current.id) && project_contains_attachment?(project,file) %>
|
|
|
|
|
<%= 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) %>
|
|
|
|
|
<% 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 %>
|
|
|
|
|
<% if authority_pubilic_for_files(project, file) %>
|
|
|
|
|
<% if authority_pubilic_for_files(project, file) && delete_allowed %>
|
|
|
|
|
<span id="is_public_<%= file.id %>">
|
|
|
|
|
<%= 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 %>
|
|
|
|
|
</span>
|
|
|
|
|
<% 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 %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|