update listing and add pagination
This commit is contained in:
28
templates/Froxlor/table/pagination.html.twig
Normal file
28
templates/Froxlor/table/pagination.html.twig
Normal file
@@ -0,0 +1,28 @@
|
||||
{% 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">«</a>
|
||||
{% endif %}
|
||||
{% if pagination.current_page >= pagination.last_page %}
|
||||
<a href="?s={{ s }}&page={{ page }}&action={{ action }}&pageno={{ pagination.current_page - 1 }}">‹</a>
|
||||
{% endif %}
|
||||
{% if pagination.current_page < pagination.last_page %}
|
||||
<a href="?s={{ s }}&page={{ page }}&action={{ action }}&pageno={{ pagination.current_page + 1 }}">›</a>
|
||||
{% endif %}
|
||||
{% if pagination.current_page < pagination.last_page %}
|
||||
<a href="?s={{ s }}&page={{ page }}&action={{ action }}&pageno={{ pagination.last_page }}">»</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro titlesorting(pagination, key, th) %}
|
||||
{% if pagination is defined and key in pagination.sortfields %}
|
||||
<th class="p-3 {{ th.class }}">
|
||||
{{ th.text }}
|
||||
<a href="?s={{ s }}&page={{ page }}&action={{ action }}&pageno={{ pagination.current_page }}&sortfield={{ key }}&sortorder=desc">↓</a>
|
||||
<a href="?s={{ s }}&page={{ page }}&action={{ action }}&pageno={{ pagination.current_page }}&sortfield={{ key }}&sortorder=asc">↑</a>
|
||||
</th>
|
||||
{% else %}
|
||||
<th class="p-3 {{ th.class }}">{{ th.text }}</th>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
Reference in New Issue
Block a user