Пагинация

This commit is contained in:
2022-09-03 16:13:03 +08:00
parent bd1dea84d5
commit d797ff933b
3 changed files with 33 additions and 3 deletions

View File

@@ -54,6 +54,23 @@
{% endfor %}
</tbody>
</table>
{% if pages.count > 0 %}
<nav aria-label="pages">
<ul class="pagination pagination-sm justify-content-center">
{% for page in range(1, pages.count) %}
{% if page == pages.current %}
<li class="page-item active" aria-current="page">
<span class="page-link">{{ page }}</span>
</li>
{% else %}
<li class="page-item">
<a class="page-link" href="{{ base_url('page/' ~ page) }}">{{ page }}</a>
</li>
{% endif %}
{% endfor %}
</ul>
</nav>
{% endif %}
{% endblock %}
{% block footer %}