{% extends "staff/base.html" %} {% block header_scripts %} {% endblock %} {% block content %} {% set create_url = get_create_url() %} {% if create_url %} New {% endif %} {% htmxfragment "list" as="section" %}
{% if table_style == "simple" %} {{ title }} {% else %} {% if page.has_other_pages() %} Page {{ page.number }} of {{ page.paginator.num_pages }} ({{ page.paginator.count }} results) {% 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 filters %} {% 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 %} {% if table_style != "simple" and actions %} {% endif %} {% for field in fields %} {% endfor %} {% for text, url in get_object_links(object).items() %} {% endfor %} {% 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 %}
{{ text }}
{% if table_style != "simple" %} {% endif %} {% endhtmxfragment %} {% endblock %}