Skip to content

Commit

Permalink
Fixes #15944: Extend paginator template to be aware of placement
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremystretch committed May 3, 2024
1 parent d824e90 commit 00a17c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion netbox/templates/htmx/table.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{% 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 %}
{% 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' %}
Expand Down
2 changes: 1 addition & 1 deletion netbox/templates/inc/paginator.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{% if page %}
<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-disinherit="hx-select hx-swap"
{% if not table.embedded %}hx-push-url="true"{% endif %}
Expand Down

0 comments on commit 00a17c0

Please sign in to comment.