Merge pull request #854 from mouse-reeve/pagination-placeholders

Show disabled placeholders in pagination
This commit is contained in:
Mouse Reeve 2021-04-02 10:05:01 -07:00 committed by GitHub
commit 19a13bdb56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,20 +1,12 @@
{% load i18n %}
<nav class="pagination" aria-label="pagination">
{% if page.has_previous %}
<p class="pagination-previous">
<a href="{{ path }}?{% for k, v in request.GET.items %}{% if k != 'page' %}{{ k }}={{ v }}&{% endif %}{% endfor %}page={{ page.previous_page_number }}{{ anchor }}">
<span class="icon icon-arrow-left"></span>
{% trans "Previous" %}
</a>
</p>
{% endif %}
<a class="pagination-previous" {% if page.has_previous %}href="{{ path }}?{% for k, v in request.GET.items %}{% if k != 'page' %}{{ k }}={{ v }}&{% endif %}{% endfor %}page={{ page.previous_page_number }}{{ anchor }}" {% else %}disabled{% endif %}>
<span class="icon icon-arrow-left"></span>
{% trans "Previous" %}
</a>
{% if page.has_next %}
<p class="pagination-next">
<a href="{{ path }}?{% for k, v in request.GET.items %}{% if k != 'page' %}{{ k }}={{ v }}&{% endif %}{% endfor %}page={{ page.next_page_number }}{{ anchor }}">
{% trans "Next" %}
<span class="icon icon-arrow-right"></span>
</a>
</p>
{% endif %}
<a class="pagination-next" {% if page.has_next %}href="{{ path }}?{% for k, v in request.GET.items %}{% if k != 'page' %}{{ k }}={{ v }}&{% endif %}{% endfor %}page={{ page.next_page_number }}{{ anchor }}"{% else %} disabled{% endif %}>
{% trans "Next" %}
<span class="icon icon-arrow-right"></span>
</a>
</nav>