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

<% if parent_result %> <%= "#{translated_attribute(parent_result.title)} > " %> <% end %> <%= t(".title") %> <%= export_dropdowns(query) %> <%= import_dropdown do %>
  • <%= link_to t("actions.import", scope: "decidim.accountability", name: t("models.result.name", scope: "decidim.accountability.admin")), new_projects_import_path if allowed_to?(:create, :result) && parent_result.nil? %>
  • <%= link_to t("actions.import_csv", scope: "decidim.accountability"), import_results_path if allowed_to? :create, :result %>
  • <% end %> <%= render partial: "decidim/accountability/admin/shared/subnav" unless parent_result %> <%= link_to t("actions.new_result", scope: "decidim.accountability"), new_result_path(parent_id: parent_result), class: "button button__sm button__secondary" if allowed_to? :create, :result %> <%= render partial: "decidim/admin/components/resource_action" %>

    <%= admin_filter_selector(:results) %>
    <% if resource_with_scopes_enabled? %> <% end %> <% results.each do |result| %> <%= td_resource_scope_for(result.scope) %> <% end %>
    <%= sort_link(query, :id, t("models.result.fields.id", scope: "decidim.accountability"), default_order: :desc ) %> <%= sort_link(query, :title, t("models.result.fields.title", scope: "decidim.accountability")) %> <%= sort_link(query, :category_name, t("models.result.fields.category", scope: "decidim.accountability") ) %> <%= sort_link(query, :scope_name, t("models.result.fields.scope", scope: "decidim.accountability") ) %> <%= sort_link(query, :status_name, t("models.result.fields.status", scope: "decidim.accountability") ) %> <%= sort_link(query, :progress, t("models.result.fields.progress", scope: "decidim.accountability") ) %> <%= sort_link(query, :created_at, t("models.result.fields.created_at", scope: "decidim.accountability") ) %> <%= t("actions.title", scope: "decidim.accountability") %>
    <%= result.id %>
    <% if result.parent_id.nil? %> <%= link_to translated_attribute(result.title), results_path(parent_id: result.id) %>
    <% else %> <%= translated_attribute(result.title) %> <% end %>
    <% if result.category %> <%= translated_attribute result.category.name %> <% end %> <% if result.status %> <%= translated_attribute result.status.name %> <% end %> <%= result.progress&.to_i %> <%= l result.created_at, format: :decidim_short %> <% if allowed_to? :update, :result, result: result %> <%= icon_link_to "pencil-line", edit_result_path(result), t("actions.edit", scope: "decidim.accountability"), class: "action-icon--edit" %> <% end %> <% if allowed_to? :create_children, :result, result: result %> <%= icon_link_to "add-line", results_path(parent_id: result.id), t("actions.new_result", scope: "decidim.accountability"), class: "action-icon--plus" %> <% end %> <% if allowed_to? :update, :result, result: result %> <%= icon_link_to "time-line", result_timeline_entries_path(result), t("actions.timeline_entries", scope: "decidim.accountability"), class: "action-icon--clock" %> <% end %> <% if allowed_to? :update, :result, result: result %> <%= icon_link_to "folder-line", result_attachment_collections_path(result), t("actions.attachment_collections", scope: "decidim.accountability"), class: "action-icon--attachment_collections" %> <% end %> <% if allowed_to? :update, :result, result: result %> <%= icon_link_to "attachment-line", result_attachments_path(result), t("actions.attachments", scope: "decidim.accountability"), class: "action-icon--attachments" %> <% end %> <%= icon_link_to "eye-line", resource_locator(result).path, t("actions.preview", scope: "decidim.accountability"), class: "action-icon--preview", target: :blank, data: { "external-link": false } %> <%= resource_permissions_link(result) %> <% if allowed_to? :destroy, :result, result: result %> <%= icon_link_to "delete-bin-line", result_path(result), t("actions.destroy", scope: "decidim.accountability"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.accountability", name: t("models.result.name", scope: "decidim.accountability.admin")) } %> <% end %>
    <%= decidim_paginate results %>