Skip to content

Commit

Permalink
Merge pull request #64 from molgen/fix-pagination
Browse files Browse the repository at this point in the history
NewsPage: Fix pagination
  • Loading branch information
donald authored Jan 21, 2020
2 parents fdc0e00 + 72bf506 commit b3d52f6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions mpicms/templates/base/components/pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
{% firstof items.number '1' as current %}

<nav class="pagination is-centered" role="navigation" aria-label="pagination">
<a class="pagination-previous"><i class="fas fa-chevron-left"></i></a>
{% if items.has_previous %}
<a class="pagination-previous" href="?{% url_replace request 'page' items.previous_page_number %}"><i class="fas fa-chevron-left"></i></a>
{% endif %}
<ul class="pagination-list">
{% if current|add:0 >= 3 %}
<li>
Expand Down Expand Up @@ -45,7 +47,9 @@
</li>
{% endif %}
</ul>
<a class="pagination-next"><i class="fas fa-chevron-right"></i></a>
{% if items.has_next %}
<a class="pagination-next" href="?{% url_replace request 'page' items.next_page_number %}"><i class="fas fa-chevron-right"></i></a>
{% endif %}
</nav>

{% endif %}
{% endif %}

0 comments on commit b3d52f6

Please sign in to comment.