<% if component.manifest.admin_engine %> <%= icon_link_to "pencil-line", manage_component_path(component), t("actions.manage", scope: "decidim.admin"), class: "action-icon--manage" %> <% else %> <% end %> <% if allowed_to? :share, :component, component: component %> <%= icon_link_to "share-line", url_for(action: :share, id: component, controller: "components"), t("actions.share", scope: "decidim.admin"), target: :blank, class: "action-icon--share" %> <% else %> <% end %> <% if allowed_to? :update, :component, component: component %> <%= icon_link_to "settings-4-line", url_for(action: :edit, id: component, controller: "components"), t("actions.configure", scope: "decidim.admin"), class: "action-icon--configure" %> <% else %> <% end %> <% if allowed_to?(:update, :component, component: component) %> <% if component.published? %> <%= icon_link_to "close-circle-line", url_for(action: :unpublish, id: component, controller: "components"), t("actions.unpublish", scope: "decidim.admin"), class: "action-icon--unpublish", method: :put %> <% else %> <%= icon_link_to "check-line", url_for(action: :publish, id: component, controller: "components"), t("actions.publish", scope: "decidim.admin"), class: "action-icon--publish", method: :put %> <% end %> <% else %> <% end %> <%= icon_link_to "eye-line", main_component_path(component), t("actions.preview", scope: "decidim.admin"), class: "action-icon--preview", target: :blank, data: { "external-link": false } %> <% if allowed_to? :update, :component, component: component %> <% if component.manifest.actions.empty? %> <%= icon "key-2-line", class: "action-icon action-icon--disabled" %> <% else %> <%= icon_link_to "key-2-line", url_for(action: :edit, component_id: component, controller: "component_permissions"), t("actions.permissions", scope: "decidim.admin"), class: "action-icon--permissions" %> <% end %> <% else %> <% end %> <% if allowed_to? :destroy, :component, component: component %> <%= icon_link_to "delete-bin-line", url_for(action: :destroy, id: component, controller: "components"), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete %> <% else %> <% end %>