组织添加历史版本删除功能

This commit is contained in:
huang 2016-10-15 09:17:47 +08:00
parent 7e1d871cf0
commit f1e4628e75
1 changed files with 8 additions and 2 deletions

View File

@ -79,8 +79,14 @@
</li>
<% end %>
<li>
<% if file.destroyable %>
<%= link_to( '删除资源', attachment_path(file),
:data => {:confirm => file.destroyable ? l(:text_are_you_sure) : l(:text_history_are_you_sure)}, :method => :delete,:class => "postOptionLink") if (delete_allowed || User.current.id == file.author_id) && file.container_id == org_subfield.id && file.container_type == "OrgSubfield" %>
:data => {:confirm => file.destroyable ? l(:text_are_you_sure) : l(:text_history_are_you_sure)},
:method => :delete,
:class => "postOptionLink") if (delete_allowed || User.current.id == file.author_id) && file.container_id == org_subfield.id && file.container_type == "OrgSubfield" %>
<% else %>
<%= link_to '删除资源', attachment_versions_delete_path(file), :class => "postOptionLink", :remote => true %>
<% end %>
</li>
</ul>
<%else%>