forked from mirrors/bookwyrm
Show disabled placeholders in pagination
This commit is contained in:
parent
bfacfbb09a
commit
bb9e49c8fa
1 changed files with 8 additions and 16 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue