<% 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? :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 %>

<% @assemblies.each do |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" %> <% end %> <% if allowed_to? :update, :assembly, assembly: assembly %> <%= link_to translated_attribute(assembly.title), edit_assembly_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? :create, :assembly, assembly: assembly %> <%= icon_link_to "clipboard", new_assembly_copy_path(assembly), t("actions.duplicate", scope: "decidim.admin"), class: "action-icon--copy" %> <% 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" %> <% end %> <% if assembly.children.count.positive? || allowed_to?(:create, :assembly) %> <%= icon_link_to "dial", decidim_admin_assemblies.assemblies_path(parent_id: assembly.id), t("decidim.admin.titles.assemblies"), class: "action-icon--dial #{'highlighted' if assembly.children.count.positive?}" %> <% 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" %> <% end %>
<%= paginate @assemblies, theme: "decidim" %>