{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% if pages.pageCount > 1 %}
<ul class="l-pagination__list">
{# 前へ #}
{% if pages.previous is defined %}
<li class="l-pagination__item l-pagination__item--prev">
<a href="{{ path(
app.request.attributes.get('_route'),
app.request.query.all|merge({'pageno': pages.previous})) }}"></a></li>
{% endif %}
{# 1ページリンクが表示されない場合、「...」を表示 #}
{% if pages.firstPageInRange != 1 %}
<li class="l-pagination__item l-pagination__item--dots">...</li>
{% endif %}
{% for page in pages.pagesInRange %}
{% if page == pages.current %}
<li class="l-pagination__item l-pagination__item--active"><a href="{{ path(
app.request.attributes.get('_route'),
app.request.query.all|merge({'pageno': page})) }}"> {{ page }} </a></li>
{% else %}
<li class="l-pagination__item"><a href="{{ path(
app.request.attributes.get('_route'),
app.request.query.all|merge({'pageno': page})) }}"> {{ page }} </a></li>
{% endif %}
{% endfor %}
{# 最終ページリンクが表示されない場合、「...」を表示 #}
{% if pages.last != pages.lastPageInRange %}
<li class="l-pagination__item l-pagination__item--dots">...</li>
{% endif %}
{# 次へ #}
{% if pages.next is defined %}
<li class="l-pagination__item l-pagination__item--next">
<a href="{{ path(
app.request.attributes.get('_route'),
app.request.query.all|merge({'pageno': pages.next})) }}"></a></li>
{% endif %}
</ul>
{% endif %}