项目、组织存在历史版本一键删除功能

This commit is contained in:
huang 2016-10-14 15:08:29 +08:00
parent 333c9c6db0
commit 0c137515c1
2 changed files with 3 additions and 3 deletions

View File

@ -80,7 +80,7 @@
<% end %>
<li>
<%= 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 == org_subfield.id && file.container_type == "OrgSubfield" && file.destroyable %>
: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" %>
</li>
</ul>
<%else%>

View File

@ -82,8 +82,8 @@
<%end%>
<li>
<%= 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 == @course.id && file.container_type == "Course" && file.destroyable %>
: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 == @course.id && file.container_type == "Course" %>
</li>
</ul>
<% end %>