<% add_decidim_page_title(t(".title")) %>

<%= t(".title") %> <% if allowed_to? :create, :sortition %> <%= link_to t("actions.new_sortition", scope: "decidim.sortitions.admin"), new_sortition_path, class: "button button__sm button__secondary" %> <% end %> <%= render partial: "decidim/admin/components/resource_action" %>

<% sortitions.each do |sortition| %> <% end %>
<%= t("models.sortition.fields.reference", scope: "decidim.sortitions.admin") %> <%= t("models.sortition.fields.title", scope: "decidim.sortitions.admin") %> <%= t("models.sortition.fields.created_at", scope: "decidim.sortitions.admin") %>
<%= sortition.reference %> <% if allowed_to? :update, :sortition, sortition: sortition %> <%= link_to decidim_html_escape(translated_attribute(sortition.title)), edit_sortition_path(sortition) %> <% else %> <%= decidim_html_escape(translated_attribute(sortition.title)) %> <% end %> <%= l sortition.created_at, format: :short %> <% if allowed_to? :update, :sortition, sortition: sortition %> <%= icon_link_to "pencil-line", edit_sortition_path(sortition), t("actions.edit", scope: "decidim.sortitions.admin"), class: "action-icon--edit" %> <% else %> <% end %> <%= icon_link_to "eye-line", sortition_path(sortition), t("actions.show", scope: "decidim.sortitions.admin"), class: "action-icon--preview", target: "_blank", data: { "external-link": false } %> <%= resource_permissions_link(sortition) %> <% if allowed_to? :destroy, :sortition, sortition: sortition %> <%= icon_link_to "delete-bin-line", confirm_destroy_sortition_path(sortition), t("actions.destroy", scope: "decidim.sortitions.admin"), class: "action-icon--remove" %> <% else %> <% end %>
<%= decidim_paginate sortitions %>