fix pagination and collections

This commit is contained in:
envoyr
2022-02-25 21:56:12 +01:00
parent fb6660b78a
commit c48a22a58e
6 changed files with 38 additions and 45 deletions

View File

@@ -1,18 +1,20 @@
{% macro paging(pagination) %}
<div class="card-footer border-top">
{% if pagination.current_page >= pagination.last_page %}
<a href="?s={{ s }}&page={{ page }}&action={{ action }}&pageno=1">&laquo;</a>
{% endif %}
{% if pagination.current_page >= pagination.last_page %}
<a href="?s={{ s }}&page={{ page }}&action={{ action }}&pageno={{ pagination.current_page - 1 }}">&lsaquo;</a>
{% endif %}
{% if pagination.current_page < pagination.last_page %}
<a href="?s={{ s }}&page={{ page }}&action={{ action }}&pageno={{ pagination.current_page + 1 }}">&rsaquo;</a>
{% endif %}
{% if pagination.current_page < pagination.last_page %}
<a href="?s={{ s }}&page={{ page }}&action={{ action }}&pageno={{ pagination.last_page }}">&raquo;</a>
{% endif %}
</div>
{% if pagination.last_page > 1 %}
<div class="card-footer border-top">
{% if pagination.current_page >= pagination.last_page %}
<a href="?s={{ s }}&page={{ page }}&action={{ action }}&pageno=1">&laquo;</a>
{% endif %}
{% if pagination.current_page >= pagination.last_page %}
<a href="?s={{ s }}&page={{ page }}&action={{ action }}&pageno={{ pagination.current_page - 1 }}">&lsaquo;</a>
{% endif %}
{% if pagination.current_page < pagination.last_page %}
<a href="?s={{ s }}&page={{ page }}&action={{ action }}&pageno={{ pagination.current_page + 1 }}">&rsaquo;</a>
{% endif %}
{% if pagination.current_page < pagination.last_page %}
<a href="?s={{ s }}&page={{ page }}&action={{ action }}&pageno={{ pagination.last_page }}">&raquo;</a>
{% endif %}
</div>
{% endif %}
{% endmacro %}
{% macro titlesorting(pagination, key, th) %}
@@ -25,4 +27,4 @@
{% else %}
<th class="p-3 {{ th.class }}">{{ th.text }}</th>
{% endif %}
{% endmacro %}
{% endmacro %}