{% extends "admin/base.html" %}
{% use_elements %}
{% block header_scripts %}
{% endblock %}
{% block content %}
{% htmxfragment "list" %}
{{ page.paginator.count }} result{{ page.paginator.count|pluralize }}
{% endif %}
| {% endif %} {% for field in fields %} {% set label = get_field_label(field) %} {% if order_by_field is defined %} {# 3-state sort cycle: unsorted -> ascending -> descending -> cleared. #} {% if field != order_by_field %} {% set next_order_by = field %} {% set aria_sort = "none" %} {% set sort_action = "Sort by " ~ label ~ " ascending" %} {% elif order_by_direction != "-" %} {% set next_order_by = "-" ~ field %} {% set aria_sort = "ascending" %} {% set sort_action = "Sort by " ~ label ~ " descending" %} {% else %} {% set next_order_by = "" %} {% set aria_sort = "descending" %} {% set sort_action = "Stop sorting by " ~ label %} {% endif %} |
{% if table_style == "preview" %}
{{ label }}
{% else %}
{{ label }}
{% if field == order_by_field %}
{% if order_by_direction == "-" %}
{# Sorted descending; the next click clears, so reveal an x on hover/focus. #}
|
{% else %}
{{ label }} | {% endif %} {% endfor %} {# A th that spans any links columns that will be added #}|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {% endif %} {% for field in fields %} {# Make every column clickable if it doesn't contain a link already #} |
{% set value = get_field_value(object, field) %}
{% set value = format_field_value(object, field, value) %}
{% include get_field_value_template(object, field, value) with context %}
|
{% endfor %}
{% set object_links = get_object_links(object) %}
{% if object_links %}
{% endif %} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{% if search_query %} No results for "{{ search_query }}" {% else %} No items yet {% endif %}