moviewyrm/bookwyrm/templates/snippets/pagination.html
2021-03-29 08:19:17 -07:00

20 lines
786 B
HTML

{% 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 %}
{% 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 %}
</nav>