{% extends "base.html" %} {% from "_macros.html" import cell %} {% block title %}{{ admin.get_verbose_name_plural() }} · {{ site.title }}{% endblock %} {% block content %} {{ admin.get_verbose_name_plural() }} {% if pagination.total is not none %}{% if pagination.estimated %}{{ tn("list.records_estimated", pagination.total) }}{% else %}{{ tn("list.records", pagination.total) }}{% endif %}{% endif %} {{ t("list.export_csv") }} {{ t("list.export_json") }} {% if xlsx_available %}{{ t("list.export_xlsx") }}{% endif %} {% if admin.can_import and admin.can_create %}{{ t("list.import_csv") }}{% endif %} {% if can_create %}+ {{ new_label or t("list.new", model=admin.get_verbose_name()) }}{% endif %} {% if flash %} {{ flash }} {% endif %} {% if admin.search_fields %} {% endif %} {% for f in filters %} {{ f.label }} {% if f.type == 'select' %} {{ t("list.any") }} {% for option in f.options %} {{ option.label }} {% endfor %} {% elif f.type == 'daterange' %} {% for shortcut in f.shortcuts %}{{ shortcut.label }}{% endfor %} {% else %} {% endif %} {% endfor %} {% if admin.search_fields or admin.list_filter %} {{ t("list.apply") }} {% endif %} {% if parent_filters %} {% for chip in parent_filters %} {{ t("list.filtered_by", field=chip.field, value=chip.value) }} {{ t("list.clear_filter") }} {% endfor %} {% endif %} {% if lens_tabs %} {% for tab in lens_tabs %} {{ tab.label }} {% endfor %} {% endif %} {% set ncols = columns|length + related_columns|length + 1 + (1 if bulk_actions else 0) %} {% if bulk_actions %} {% if submission_nonce %}{% endif %} {% for value, label, confirm_text in bulk_actions %} {{ label }} {% endfor %} {{ t("list.apply_selected") }} {% endif %} {% if bulk_actions %}{% endif %} {% for column in columns %} {% if column in sort_state %} {% set state = sort_state[column] %} {{ column | field_label }} {% if state.active %}{% if state.ascending %}↑{% else %}↓{% endif %}{% endif %} {% else %}{{ column | field_label }}{% endif %} {% endfor %} {% for related in related_columns %}{{ related.label }}{% endfor %} {{ t("list.actions") }} {% for row in rows %} {% if bulk_actions %}{% endif %} {% set detail_url = url_for('admin_detail', slug=admin.get_slug(), identity=row.identity) %} {% for column in columns %}{% if loop.first %}{{ cell(row.values[column]) }}{% else %}{{ cell(row.values[column]) }}{% endif %}{% endfor %} {% for related in row.related %}{% if related.url %}{{ related.count | number }}{% else %}{{ related.count | number }}{% endif %}{% endfor %} {{ t("common.view") }} {% else %} {{ t("list.empty") }} {% endfor %} {% if bulk_actions %} {% endif %} {% if pagination.show_nav %} {% if pagination.page > 1 %} ← {{ t("common.prev") }} {% endif %} {% if pagination.total is none %}{{ t("common.page", page=pagination.page) }}{% elif pagination.estimated %}{{ t("common.page_of_estimated", page=pagination.page, pages=pagination.pages) }}{% else %}{{ t("common.page_of", page=pagination.page, pages=pagination.pages) }}{% endif %} {% if pagination.has_next %} {{ t("common.next") }} → {% endif %} {% endif %} {% endblock %}