项目、组织存在历史版本一键删除功能
This commit is contained in:
parent
333c9c6db0
commit
0c137515c1
|
@ -80,7 +80,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to( '删除资源', attachment_path(file),
|
<%= 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>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<%else%>
|
<%else%>
|
||||||
|
|
|
@ -82,8 +82,8 @@
|
||||||
<%end%>
|
<%end%>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to( '删除资源', attachment_path(file),
|
<%= link_to( '删除资源', attachment_path(file),
|
||||||
:data => {:confirm => l(:text_are_you_sure)},
|
: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" && file.destroyable %>
|
:method => :delete,:class => "postOptionLink") if (delete_allowed || User.current.id == file.author_id) && file.container_id == @course.id && file.container_type == "Course" %>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in New Issue