Merge pull request #20393 from netbox-community/20390-pagination-dropdown
Fixes #20390: Fix styling of pagination dropdown menu
This commit is contained in:
@@ -79,21 +79,23 @@
|
|||||||
{# /Showing #}
|
{# /Showing #}
|
||||||
|
|
||||||
{# Pagination options #}
|
{# Pagination options #}
|
||||||
<nav class="text-end" aria-label="{% trans "Pagination options" %}">
|
<nav aria-label="{% trans "Pagination options" %}">
|
||||||
{% if page %}
|
{% if page %}
|
||||||
<div class="dropdown">
|
<div class="dropdown dropdown-menu-end">
|
||||||
<button class="btn btn-sm btn-outline-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown">
|
<button class="btn btn-sm btn-outline-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown">
|
||||||
{% trans "Per Page" %}
|
{% trans "Per Page" %}
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
{% for n in page.paginator.get_page_lengths %}
|
{% for n in page.paginator.get_page_lengths %}
|
||||||
{% if htmx %}
|
<li>
|
||||||
<a href="#" hx-get="{{ table.htmx_url }}{% querystring request per_page=n %}" class="dropdown-item">{{ n }}</a>
|
{% if htmx %}
|
||||||
{% else %}
|
<a href="#" hx-get="{{ table.htmx_url }}{% querystring request per_page=n %}" class="dropdown-item">{{ n }}</a>
|
||||||
<a href="{% querystring request per_page=n %}" class="dropdown-item">{{ n }}</a>
|
{% else %}
|
||||||
{% endif %}
|
<a href="{% querystring request per_page=n %}" class="dropdown-item">{{ n }}</a>
|
||||||
|
{% endif %}
|
||||||
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</nav>
|
</nav>
|
||||||
|
Reference in New Issue
Block a user