{% extends "admin/base.html" %} {% use_elements %} {% block header_scripts %} {% endblock %} {% block content %} {% htmxfragment "list" %}
{% if table_style == "simple" %}
{{ title }}
{% else %} {% if page.has_other_pages() %} Page {{ page.number }} of {{ page.paginator.num_pages }} ({{ page.paginator.count }} results, {{ page.paginator.per_page }} per page) {% else %} Showing all {{ page.paginator.count }} results {% endif %} {% endif %}
{% if table_style == "simple" %} View {{ page.paginator.count }} result{{ "s" if page.paginator.count != 1 else "" }} {% else %} {% if actions %}
{{ csrf_input }}
{% endif %}
{% if displays %} {% endif %} {% if show_search %}
{% endif %}
{% endif %}
{% if table_style != "simple" and actions %} {% endif %} {% for field in fields %} {% if order_by_field is defined %} {% else %} {% endif %} {% endfor %} {# A th that spans any links columns that will be added #} {% for object in objects %} {% set row_url = get_object_url(object) %} {% if table_style != "simple" and actions %} {% endif %} {% for field in fields %} {# Make every column clickable if it doesn't contain a link already #} {% endfor %} {% set object_links = get_object_links(object) %} {% if object_links %} {% endif %} {% endfor %}
{% if table_style == "simple" %}
{{ field }}
{% else %} {{ field }} {% if field == order_by_field %} {% if order_by_direction == "-" %} {% else %} {% endif %} {% endif %} {% endif %}
{{ field }}
{% set value = get_field_value(object, field) %} {% include get_field_value_template(object, field, value) with context %}
{% if table_style != "simple" %} {% endif %} {% endhtmxfragment %} {% endblock %}