1
0
mirror of https://github.com/ToxicCrack/PrintABrick.git synced 2025-05-17 04:40:08 -07:00

Add pagination template

This commit is contained in:
Unknown 2017-04-29 01:25:30 +02:00
parent 06fed52f3d
commit cf7ebfb703

View File

@ -0,0 +1,36 @@
{% if pageCount > 1 %}
<div class="ui pagination menu spacing 20">
{% if first is defined and current != first %}
<a class="icon item" href="{{ path(route, query|merge({(pageParameterName): first})) }}">
<i class="angle double left icon"></i>
</a>
{% endif %}
{% if previous is defined %}
<a class="item icon" href="{{ path(route, query|merge({(pageParameterName): previous})) }}">
<i class="angle left icon"></i>
</a>
{% endif %}
{% for page in pagesInRange %}
{% if page != current %}
<a class="item" href="{{ path(route, query|merge({(pageParameterName): page})) }}">{{ page }}</a>
{% else %}
<span class="active item">{{ page }}</span>
{% endif %}
{% endfor %}
{% if next is defined %}
<a class="icon item" href="{{ path(route, query|merge({(pageParameterName): next})) }}">
<i class="angle right icon"></i>
</a>
{% endif %}
{% if last is defined and current != last %}
<a class="icon item" href="{{ path(route, query|merge({(pageParameterName): last})) }}">
<i class="angle right double icon"></i>
</a>
{% endif %}
</div>
{% endif %}