mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-08 00:28:16 -06:00
16756 fix script result pagination issue
This commit is contained in:
parent
81fe12a7d9
commit
7b21ee484f
@ -1,6 +1,7 @@
|
|||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
{% load log_levels %}
|
{% load log_levels %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
{% load render_table from django_tables2 %}
|
||||||
|
|
||||||
<div class="htmx-container">
|
<div class="htmx-container">
|
||||||
<p>
|
<p>
|
||||||
@ -41,7 +42,21 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="table-responsive" id="object_list">
|
<div class="table-responsive" id="object_list">
|
||||||
<h5 class="card-header">{% trans "Log" %}</h5>
|
<h5 class="card-header">{% trans "Log" %}</h5>
|
||||||
{% include 'htmx/table.html' %}
|
|
||||||
|
<div class="table-responsive">
|
||||||
|
{% 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 %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{# 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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user