Add page count and links to bottom of board view

Current page shows up on the bottom of every board with next/prev links
where applicable.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2022-05-07 15:14:50 -07:00
parent daa2febb5d
commit 994e4904a6
3 changed files with 36 additions and 4 deletions

View File

@@ -63,4 +63,22 @@
<hr />
{% endfor %}
{# Page footer #}
<div class="row pagination">
{% if current_page > 1 %}
<a href="/{{board.url}}/page/{{ current_page|add:"-1" }}">{% localize on %}Prev{% endlocalize %}</a>
{% endif %}
[
{% for page in pages %}
{% if current_page == page %}
<strong>{{page}}</strong>
{% else %}
<a href="page/{{page}}">{{page}}</a>
{% endif %}
{% endfor %}
]
{% if current_page < last_page %}
<a href="/{{board.url}}/page/{{ current_page|add:"1" }}">{% localize on %}Next{% endlocalize %}</a>
{% endif %}
</div>
{% endblock content %}