2024-04-25 12:53:54 -05:00

17 lines
673 B
HTML

{# Render an HTMX-enabled table with paginator #}
{% load helpers %}
{% load render_table from django_tables2 %}
{# OOB Swaps to update various components #}
{{ oob_swaps }}
{% with preferences|get_key:"pagination.placement" as paginator_placement %}
{% if paginator_placement == 'top' or paginator_placement == 'both' %}
{% include 'inc/paginator.html' with htmx=True table=table paginator=table.paginator page=table.page %}
{% endif %}
{% render_table table 'inc/table_htmx.html' %}
{% if paginator_placement != 'top' %}
{% include 'inc/paginator.html' with htmx=True table=table paginator=table.paginator page=table.page %}
{% endif %}
{% endwith %}