mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
17 lines
795 B
HTML
17 lines
795 B
HTML
{# Render an HTMX-enabled table with paginator #}
|
|
{% load helpers %}
|
|
{% load render_table from django_tables2 %}
|
|
|
|
{% 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 placement='top' %}
|
|
{% 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 %}
|
|
|
|
{# Include the updated object count for display elsewhere on the page #}
|
|
<div class="d-none" hx-swap-oob="innerHTML:.total-object-count">{{ table.rows|length }}</div>
|