mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-19 16:54:25 +00:00
26 lines
938 B
Twig
26 lines
938 B
Twig
{%- macro page(text, page, class = "") -%}
|
|
<li class="page-item {{ class }}"><a class="page-link" href="{{ page.generateUrl() }}">{{ text }}</a></li>
|
|
{%- endmacro -%}
|
|
|
|
{% import _self as m %}
|
|
|
|
{% if paginator|length > 1 %}
|
|
<nav aria-label="Page navigation">
|
|
<ul class="pagination pagination-sm justify-content-center short">
|
|
|
|
{% for i in range(10, 1) %}
|
|
{%- if paginator.hasPage(current - i) -%}
|
|
{{ m.page(current - i, paginator.getPage(current - i) ) }}
|
|
{%- endif -%}
|
|
{%- endfor -%}
|
|
<li class="active page-item"><span class="page-link">{{ current }}</span></li>
|
|
{% for i in range(1,10) %}
|
|
{%- if paginator.hasPage(current + i) -%}
|
|
{{ m.page(current + i, paginator.getPage(current + i) ) }}
|
|
{%- endif -%}
|
|
{%- endfor -%}
|
|
|
|
</ul>
|
|
</nav>
|
|
{% endif %}
|