<% parent_assembly.self_and_ancestors.each do |assembly| %> <%= link_to translated_attribute(assembly.title), edit_assembly_path(assembly) %> > <% end if parent_assembly %> <%= t("assemblies", scope: "decidim.admin.titles") %> <% if allowed_to? :import, :assembly %> <%= link_to t("actions.import_assembly", scope: "decidim.admin"), new_import_path, class: "button tiny button--title" %> <% end %> <% if allowed_to? :create, :assembly %> <%= link_to t("actions.new_assembly", scope: "decidim.admin"), new_assembly_path(parent_id: parent_assembly&.id), class: "button tiny button--title" %> <% end %>

<%= admin_filter_selector %>
<% @assemblies.each do |assembly| %> <% next unless allowed_to? :list, :assembly, assembly: assembly %> <% end %>
<%= sort_link(query, :title, t("models.assembly.fields.title", scope: "decidim.admin")) %> <%= sort_link(query, :created_at, t("models.assembly.fields.created_at", scope: "decidim.admin"), default_order: :desc) %> <%= sort_link(query, :private_space, t("models.assembly.fields.private", scope: "decidim.admin")) %> <%= sort_link(query, :published_at, t("models.assembly.fields.published", scope: "decidim.admin")) %>
<% if assembly.promoted? %> "> <%= icon "star", role: "img", "aria-hidden": true %> <% end %> <% if allowed_to? :update, :assembly, assembly: assembly %> <%= link_to translated_attribute(assembly.title), edit_assembly_path(assembly) %>
<% elsif allowed_to? :read, :component, assembly: assembly %> <%= link_to translated_attribute(assembly.title), components_path(assembly) %>
<% elsif allowed_to? :preview, :assembly, assembly: assembly %> <%= link_to translated_attribute(assembly.title), decidim_assemblies.assembly_path(assembly) %>
<% elsif allowed_to? :read, :moderation, assembly: assembly %> <%= link_to translated_attribute(assembly.title), moderations_path(assembly) %>
<% else %> <%= translated_attribute(assembly.title) %> <% end %>
<%= l(assembly.created_at, format: :short) %> <% if assembly.private_space? %> <%= t("assemblies.index.private", scope: "decidim.admin") %> <% else %> <%= t("assemblies.index.public", scope: "decidim.admin") %> <% end %> <% if assembly.published? %> <%= t("assemblies.index.published", scope: "decidim.admin") %> <% else %> <%= t("assemblies.index.not_published", scope: "decidim.admin") %> <% end %> <% if allowed_to? :export, :assembly, assembly: assembly %> <%= icon_link_to "data-transfer-download", assembly_export_path(assembly), t("actions.export", scope: "decidim.admin"), method: :post, class: "action-icon--export" %> <% else %> <% end %> <% if allowed_to? :copy, :assembly, assembly: assembly %> <%= icon_link_to "clipboard", new_assembly_copy_path(assembly), t("actions.duplicate", scope: "decidim.admin"), class: "action-icon--copy" %> <% else %> <% end %> <% if allowed_to? :update, :assembly, assembly: assembly %> <%= icon_link_to "pencil", edit_assembly_path(assembly), t("actions.configure", scope: "decidim.admin"), class: "action-icon--new" %> <% else %> <% end %> <% if assembly.children.count.positive? || allowed_to?(:create, :assembly) %> <%= icon_link_to "dial", url_for(query_params_with(parent_id_eq: assembly.id)), t("decidim.admin.titles.assemblies"), class: "action-icon--dial #{'highlighted' if assembly.children.count.positive?}" %> <% else %> <% end %> <% if allowed_to? :preview, :assembly, assembly: assembly %> <%= icon_link_to "eye", decidim_assemblies.assembly_path(assembly), t("actions.preview", scope: "decidim.admin"), class: "action-icon--preview" %> <% else %> <% end %>
<%= paginate @assemblies, theme: "decidim" %>