Valid html solution to disabling pagination links
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
{% load i18n %}
|
||||
<nav class="pagination" aria-label="pagination">
|
||||
<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 %}>
|
||||
<a class="pagination-previous {% if not page.has_previous %}is-disabled{% endif %}" {% 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 }}"{% endif %}>
|
||||
<span class="icon icon-arrow-left"></span>
|
||||
{% trans "Previous" %}
|
||||
</a>
|
||||
|
||||
<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 %}>
|
||||
<a class="pagination-next {% if not page.has_next %}is-disabled{% endif %}" {% 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 }}"{% endif %}>
|
||||
{% trans "Next" %}
|
||||
<span class="icon icon-arrow-right"></span>
|
||||
</a>
|
||||
|
Reference in New Issue
Block a user