<%= link_to translated_attribute(attachment.title), edit_polymorphic_path([attached_to, attachment]) %>
|
<%= translated_attribute(attachment.attachment_collection&.name) %>
|
<%= attachment.file_type %>
|
<%= number_to_human_size(attachment.file_size) %>
|
<% if allowed_to? :update, :attachment, attachment: attachment %>
<%= icon_link_to "pencil", edit_polymorphic_path([attached_to, attachment]), t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %>
<% end %>
<% if allowed_to? :destroy, :attachment, attachment: attachment %>
<%= icon_link_to "circle-x", polymorphic_path([attached_to, attachment]), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %>
<% end %>
|
<% end %>