<% if parent_scope %> <%= scope_breadcrumbs(parent_scope).join(" - ").html_safe %> <%= link_to t("actions.add", scope: "decidim.admin"), new_scope_scope_path(parent_scope), class: "button tiny button--title" if allowed_to? :create, :scope %><%= link_to t("actions.edit", scope: "decidim.admin"), edit_scope_path(parent_scope), class: "button tiny button--title" if allowed_to? :edit, :scope, scope: parent_scope %> <% else %> <%= t "decidim.admin.titles.scopes" %> <%= link_to t("actions.add", scope: "decidim.admin"), new_scope_path, class: "button tiny button--title" if allowed_to? :create, :scope %> <% end %>

<% if @scopes.any? %>
<% @scopes.each do |scope| %> <% end %>
<%= t("models.scope.fields.name", scope: "decidim.admin") %> <%= t("models.scope.fields.scope_type", scope: "decidim.admin") %>
<%= link_to translated_attribute(scope.name), scope_scopes_path(scope) %> <%= scope.scope_type ? translated_attribute(scope.scope_type.name) : "-" %> <%= icon_link_to "zoom-in", scope_scopes_path(scope), t("actions.browse", scope: "decidim.admin"), class: "action-icon--browse", method: :get, data: {} %> <% if allowed_to? :update, :scope, scope: scope %> <%= icon_link_to "pencil", [:edit, scope], t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit", method: :get, data: {} %> <% end %> <% if allowed_to? :destroy, :scope, scope: scope %> <%= icon_link_to "circle-x", scope, t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %> <% end %>
<% else %>

<%= t("decidim.admin.scopes.no_scopes") %>

<% end %>