Fix #4511: Remove delete/undelete controls from the artist index.
* Only show the delete artist button on the artist edit page. * Only show the delete pool button on the pool edit page. * Only show the delete wiki button on the wiki edit page.
This commit is contained in:
@@ -13,10 +13,12 @@
|
||||
<% if policy(@pool).update? %>
|
||||
<%= subnav_link_to "Edit", edit_pool_path(@pool), "data-shortcut": "e" %>
|
||||
<% end %>
|
||||
<% if policy(@pool).undelete? %>
|
||||
<%= subnav_link_to "Undelete", undelete_pool_path(@pool), :method => :post, :remote => true %>
|
||||
<% elsif policy(@pool).destroy? %>
|
||||
<%= subnav_link_to "Delete", pool_path(@pool), :method => :delete, :"data-shortcut" => "shift+d", :"data-confirm" => "Are you sure you want to delete this pool?", :remote => true %>
|
||||
<% if current_page?(action: :edit) %>
|
||||
<% if policy(@pool).undelete? %>
|
||||
<%= subnav_link_to "Undelete", undelete_pool_path(@pool), :method => :post, :remote => true %>
|
||||
<% elsif policy(@pool).destroy? %>
|
||||
<%= subnav_link_to "Delete", pool_path(@pool), :method => :delete, :"data-shortcut" => "shift+d", :"data-confirm" => "Are you sure you want to delete this pool?", :remote => true %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if PoolVersion.enabled? %>
|
||||
<%= subnav_link_to "History", pool_versions_path(:search => {:pool_id => @pool.id}) %>
|
||||
|
||||
Reference in New Issue
Block a user