|
|
|
@ -1,22 +1,22 @@
|
|
|
|
|
{% if page.has_other_pages %}
|
|
|
|
|
{% if is_paginated %}
|
|
|
|
|
<nav class="pagination is-centered" role="navigation" aria-label="pagination">
|
|
|
|
|
{% if page.has_previous %}
|
|
|
|
|
<a class="pagination-previous" href="?page={{ page.previous_page_number }}"><</a>
|
|
|
|
|
{% if page_obj.has_previous %}
|
|
|
|
|
<a class="pagination-previous" href="?page={{ page_obj.previous_page_number }}"><</a>
|
|
|
|
|
{% else %}
|
|
|
|
|
<a class="pagination-previous is-disabled"><</a>
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% if page.has_next %}
|
|
|
|
|
<a class="pagination-next" href="?page={{ page.next_page_number }}">></a>
|
|
|
|
|
{% if page_obj.has_next %}
|
|
|
|
|
<a class="pagination-next" href="?page={{ page_obj.next_page_number }}">></a>
|
|
|
|
|
{% else %}
|
|
|
|
|
<a class="pagination-next is-disabled">></a>
|
|
|
|
|
{% endif %}
|
|
|
|
|
<ul class="pagination-list">
|
|
|
|
|
{% for p in page_range %}
|
|
|
|
|
<li>
|
|
|
|
|
{% if p == page.paginator.ELLIPSIS %}
|
|
|
|
|
<span class="pagination-ellipsis">{{ page.paginator.ELLIPSIS }}</span>
|
|
|
|
|
{% elif p == page.number %}
|
|
|
|
|
<a class="pagination-link is-current">{{ p }}</a>
|
|
|
|
|
{% if p == paginator.ELLIPSIS %}
|
|
|
|
|
<span class="pagination-ellipsis">{{ paginator.ELLIPSIS }}</span>
|
|
|
|
|
{% elif p == page_obj.number %}
|
|
|
|
|
<span class="pagination-link is-current">{{ p }}</span>
|
|
|
|
|
{% else %}
|
|
|
|
|
<a class="pagination-link" href="?page={{ p }}">{{ p }}</a>
|
|
|
|
|
{% endif %}
|
|
|
|
|