{% extends "base.html" %} {% load static erp_tags %} {% block title %}{{ page_title }}{% endblock %} {% block chat_context %} {% endblock %} {% block content %}
{# Card Header: Title + Actions #} {% comment %} w-100 wrapper: Tabler's .card-header is display:flex;align-items:center (Soft UI's was display:block). Without a single full-width child, these block .row grids become flex items and collapse to content width — which crammed New/Export/gear together against the search box. {% endcomment %}
{# Wraps at 360 px: a long "New ..." label ("New Purchase Order") must drop under the title, never widen the page. #}
{{ page_title }}
{% if create_url_name %} New {{ entity_label }} {% endif %} {% include "erp/_list_export.html" %} {% include "erp/_column_chooser.html" %}
{% comment %} Filters & Search: one form, so search, filters and sort travel together. Selects auto-submit for pointer users only; keyboard users (arrow keys fire "change" in some browsers) use Apply (phase4-fields.md 5.7). {% endcomment %} {% include "erp/_saved_filters.html" %}
{% for filter in list_filters %}
{% endfor %} {% include "erp/_list_sort_inputs.html" %}
{# /.w-100 #}
{# Data Table #}
{% include "erp/_list_live_region.html" %}
{% include "erp/_list_caption.html" %} {% if bulk_actions %} {% endif %} {% for col in header_columns %} {% endfor %} {% for obj in object_list %} {% if bulk_actions %} {% endif %} {% for col in visible_columns %} {% endfor %} {% empty %} {% endfor %}
{% if col.sortable %} {{ col.label }}{% if col.aria_sort == "ascending" %}{% elif col.aria_sort == "descending" %}{% else %}{% endif %} {% elif col.source == "definition" %} {{ col.label }} {% else %} {{ col.label }} {% endif %}
{% with field_val=obj|get_field:col.field %} {% if col.source != "field" %} {% list_cell obj col %} {% elif col.badge %} {% with raw_val=obj|get_raw_field:col.field %} {{ field_val }} {% endwith %} {% elif col.bool_badge %} {% with bv=obj|get_raw_field:col.field|bool_badge %} {% if bv == "yes" %}Yes {% elif bv == "no" %}No {% else %}{{ field_val|default:"—" }}{% endif %} {% endwith %} {% elif col.date_only %} {{ field_val|date:"M j, Y"|default:"—" }} {% elif col.money %} {{ field_val|money }} {% elif col.link and col.link_url_name and col.link_pk %} {% with target_pk=obj|get_raw_field:col.link_pk %} {% if target_pk %}{{ field_val }}{% else %}—{% endif %} {% endwith %} {% elif col.link and col.link_url_name %} {{ field_val }} {% else %} {{ field_val|default:"—" }} {% endif %} {% endwith %}
{% block list_empty %}No {{ entity_label_plural|lower }} found.{% endblock %}
{# Pagination #} {% if is_paginated %} {% endif %}
{% if bulk_actions %} {# Hidden CSRF token for bulk action form submissions #} {% csrf_token %} {# Floating Bulk Action Bar #}
0 selected {% for action in bulk_actions %} {% endfor %}
{% endif %} {% endblock %} {% block javascripts %} {% endblock %}