{% extends "quite_admin/base.html" %} {% from "quite_admin/_icons.html" import export_icon %} {% from "quite_admin/_filter_controls.html" import add_filter_button, condition_chips with context %} {% from "quite_admin/_ui.html" import empty_state, page_links with context %} {% block content %} {% if inline_fields %}

{% endif %}

{{ resource.label }}

{% if cursor_mode %}{{ t('{count} on this page', count=result.records|length) }}{% else %}{{ result.total }} {{ tn('record', 'records', result.total) }}{% endif %}
{% if filter_descriptors %}{{ add_filter_button() }}{% endif %}
{% if filter_fields or relation_filters %}{% include 'quite_admin/filters.html' %}{% endif %}
{% if export_columns %}
{{ export_icon() }}
{% for name, value in export_params %}{% endfor %}

{{ t('Exports all matching records using the current search, filters and sorting. Apply filters before exporting.') }}

{{ t('Columns') }}
{% set visible_columns = columns|map(attribute='name')|list %} {% for column in export_columns %}{% endfor %}

{{ t('Related collections use one value per line in each cell; missing single relations are empty. Limits: 10000 records, or 1000 with related columns.') }}

{% endif %} {% if permissions.create %}+ {{ t('Create record') }}{% endif %}
{% if active_filters or query.search %}
{% if query.search %}{{ t('Search') }}: {{ query.search }} {{ t('Remove') }}{% endif %}{{ condition_chips(active_filters, clear_filters_url) }}
{% endif %} {% set primary_name = resource.options.record_label or (columns|rejectattr('primary_key')|selectattr('kind', 'equalto', 'string')|map(attribute='name')|first|default('')) %}
{% for field in columns %}{% else %}{% endfor %} {% if permissions.delete %}{% endif %} {% set can_open = permissions.view or permissions.edit %} {% for record in result.records %}{% set key = resource.schema.record_key(record) %} {% for field in columns %}{% else %}{% endfor %} {% if permissions.delete %}{% endif %} {% else %}{% endfor %}
{% if not cursor_mode or field.name in cursor_sortable %}{{ field.label }} {% else %}{{ field.label }}{% endif %}{{ t('Record') }}{{ t('Delete') }}
{% if loop.first and can_open and field.name not in inline_fields and field.kind != 'boolean' %}{% endif %} {% if loop.first and can_open and (field.name in inline_fields or field.kind == 'boolean') %}↗{% endif %} {% if field.kind == 'boolean' %} {{ t('None') }} {% if field.nullable and field.name in inline_fields %}{% endif %} {% else %} {% if field.name in inline_fields %}{% endif %} {% endif %} {% if loop.first and can_open and field.name not in inline_fields and field.kind != 'boolean' %}{% endif %} {% if can_open %}{{ t('Open record') }}{% else %}—{% endif %}{{ t('Delete') }}
{% call empty_state('No matching records' if query.search or active_filters else 'No records', 'Try different filters or search.' if query.search or active_filters else 'This collection has no records yet.') %}{% if query.search or active_filters %}{{ t('Clear') }}{% elif permissions.create %}{{ t('Create record') }}{% endif %}{% endcall %}
{% endblock %}