{#
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 %}
<div class="list-page">
{# 前へ #}
{% if pages.previous is defined %}
<a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': pages.previous})) }}" class="page prev"></a>
{% endif %}
{# 1ページリンクが表示されない場合、「...」を表示 #}
{% if pages.firstPageInRange != 1 %}
<span>...</span>
{% endif %}
{% for page in pages.pagesInRange %}
{% if page == pages.current %}
<a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': page})) }}" class="page active"><span>{{ page }}</span></a>
{% else %}
<a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': page})) }}" class="page"><span>{{ page }}</span></a>
{% endif %}
{% endfor %}
{# 最終ページリンクが表示されない場合、「...」を表示 #}
{% if pages.last != pages.lastPageInRange %}
<span>...</span>
{% endif %}
{# 次へ #}
{% if pages.next is defined %}
<a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': pages.next})) }}" class="page next"></a>
{% endif %}
</div>
{% endif %}