mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
27
Resources/views/Pagination/long.html.twig
Normal file
27
Resources/views/Pagination/long.html.twig
Normal file
@@ -0,0 +1,27 @@
|
||||
{%- macro page(text, page, class = "") -%}
|
||||
<span class="link {{ class }}"><a href="{{ page.generateUrl() }}">{{ text }}</a></span>
|
||||
{%- endmacro -%}
|
||||
|
||||
{% import _self as m %}
|
||||
|
||||
{% if paginator|length > 1 %}
|
||||
<div class="pagination long">
|
||||
{%- if paginator.hasPreviousPage() -%}
|
||||
{{ m.page('Previous'|trans, paginator.getPreviousPage() ) }}
|
||||
{%- endif -%}
|
||||
{% for i in range(10, 1) %}
|
||||
{%- if paginator.hasPage(current - i) -%}
|
||||
{{ m.page(current - i, paginator.getPage(current - i) ) }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
<span class="current link">{{ current }}</span>
|
||||
{% for i in range(1,10) %}
|
||||
{%- if paginator.hasPage(current + i) -%}
|
||||
{{ m.page(current + i, paginator.getPage(current + i) ) }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- if paginator.hasNextPage() -%}
|
||||
{{ m.page('Next'|trans, paginator.getNextPage() ) }}
|
||||
{%- endif -%}
|
||||
</div>
|
||||
{% endif %}
|
Reference in New Issue
Block a user