mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #15944: Extend paginator template to be aware of placement
This commit is contained in:
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
{% with preferences|get_key:"pagination.placement" as paginator_placement %}
|
{% with preferences|get_key:"pagination.placement" as paginator_placement %}
|
||||||
{% if paginator_placement == 'top' or paginator_placement == 'both' %}
|
{% if paginator_placement == 'top' or paginator_placement == 'both' %}
|
||||||
{% include 'inc/paginator.html' with htmx=True table=table paginator=table.paginator page=table.page %}
|
{% include 'inc/paginator.html' with htmx=True table=table paginator=table.paginator page=table.page placement='top' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% render_table table 'inc/table_htmx.html' %}
|
{% render_table table 'inc/table_htmx.html' %}
|
||||||
{% if paginator_placement != 'top' %}
|
{% if paginator_placement != 'top' %}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
{% if page %}
|
{% if page %}
|
||||||
<div
|
<div
|
||||||
class="d-flex justify-content-between align-items-center border-top p-2"
|
class="d-flex justify-content-between align-items-center border-{% if placement == 'top' %}bottom{% else %}top{% endif %} p-2"
|
||||||
hx-target="closest .htmx-container"
|
hx-target="closest .htmx-container"
|
||||||
hx-disinherit="hx-select hx-swap"
|
hx-disinherit="hx-select hx-swap"
|
||||||
{% if not table.embedded %}hx-push-url="true"{% endif %}
|
{% if not table.embedded %}hx-push-url="true"{% endif %}
|
||||||
|
Reference in New Issue
Block a user