From 7b21ee484f929868a09c573f61e3ab57427e5be3 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Date: Mon, 12 Aug 2024 14:32:56 +0700 Subject: [PATCH] 16756 fix script result pagination issue --- netbox/templates/extras/htmx/script_result.html | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/netbox/templates/extras/htmx/script_result.html b/netbox/templates/extras/htmx/script_result.html index 3fe03bbe7..8bdbf744b 100644 --- a/netbox/templates/extras/htmx/script_result.html +++ b/netbox/templates/extras/htmx/script_result.html @@ -1,6 +1,7 @@ {% load helpers %} {% load log_levels %} {% load i18n %} +{% load render_table from django_tables2 %}

@@ -41,7 +42,21 @@

{% trans "Log" %}
- {% include 'htmx/table.html' %} + +
+ {% 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 #} +
{{ table.rows|length }}
{% endif %}