% if User.current.logged? %>
<% if (is_project_manager?(User.current, @project) || file.author_id == User.current.id) && project_contains_attachment?(@project,file) %>
<% if (delete_allowed || User.current.id == file.author_id) && file.container_id == @project.id && file.container_type == "Project" %>
- <%= link_to("发 送".html_safe, 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{file.id}','#{User.current.id}','file')") %>
- <%= link_to '更新版本',attachments_versions_path(file),:class => "postOptionLink",:remote=>true %>
<% if @project.is_public? %>
-
<%= link_to (file.is_public? ? "设为私有":"设为公开"),
update_file_dense_attachments_path(:attachmentid=>file.id,
:newtype=>(file.is_public? ? 0:1)),
:remote=>true,
:class=>"postOptionLink",
:method => :post %>
<%end%>
-
<%= link_to( '删除资源', attachment_path(file),
:data => {:confirm => l(:text_are_you_sure)},
:method => :delete,:class => "postOptionLink") if (delete_allowed || User.current.id == file.author_id) && file.container_id == @project.id && file.container_type == "Project" && file.destroyable %>
<% end %>
<%else%>
- <%= link_to("发 送".html_safe, 'javascript:void(0)',:class => "postOptionLink2",:onclick=>"show_send('#{file.id}','#{User.current.id}','file')") %>
<% end %>
<% end %>