<%= link_to main_component_path(component), target: "_blank" do %>
<%= translated_attribute component.name %>
<% end %>
|
<%= t "decidim.components.#{component.manifest.name}.name" %>
|
<%= td_resource_scope_for(component.scope) %>
<% if component.manifest.admin_engine %>
<%= icon_link_to "pencil", manage_component_path(component), t("actions.manage", scope: "decidim.admin"), class: "action-icon--manage" %>
<% else %>
<% end %>
<% if allowed_to?(:update, :component, component: component) %>
<% if component.published? %>
<%= icon_link_to "x", 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", url_for(action: :publish, id: component, controller: "components"), t("actions.publish", scope: "decidim.admin"), class: "action-icon--publish", method: :put %>
<% end %>
<% else %>
<% end %>
<% if allowed_to? :update, :component, component: component %>
<%= icon_link_to "cog", 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.manifest.actions.empty? %>
<%= icon "key", class: "action-icon action-icon--disabled" %>
<% else %>
<%= icon_link_to "key", 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? :share, :component, component: component %>
<%= icon_link_to "share", url_for(action: :share, id: component, controller: "components"), t("actions.share", scope: "decidim.admin"), class: "action-icon--share", target: "_blank" %>
<% else %>
<% end %>
<% if allowed_to? :destroy, :component, component: component %>
<%= icon_link_to "circle-x", url_for(action: :destroy, id: component, controller: "components"), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete %>
<% else %>
<% end %>
|
<% end %>