<%= link_to translated_attribute(attachment_collection.name), edit_polymorphic_path([collection_for, attachment_collection]) %>
|
<% if allowed_to? :update, :attachment_collection, attachment_collection: attachment_collection %>
<%= icon_link_to "pencil", edit_polymorphic_path([collection_for, attachment_collection]), t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %>
<% end %>
<% if allowed_to? :destroy, :attachment_collection, attachment_collection: attachment_collection %>
<% if attachment_collection.unused? %>
<%= icon_link_to "circle-x", polymorphic_path([collection_for, attachment_collection]), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %>
<% else %>
" data-tooltip="true" data-disable-hover="false">
<%= icon "circle-x", class: "action-icon action-icon--disabled", role: "img" %>
<% end %>
<% end %>
|
<% end %>