{#
This file is part of EC-CUBE
Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
http://www.lockon.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="c-pager">
<ul class="c-pager__list u-list-sanitize">
{# 最初へ
{% if pages.firstPageInRange != 1 %}
<li class="c-pager__list-item">
<a class="c-pager__link--text" href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': pages.first})) }}">
{{ '最初へ'|trans }}
</a>
</li>
{% endif %}
#}
{# 前へ #}
{% if pages.previous is defined %}
<li class="c-pager__list-item is-prev">
<a class="c-pager__link--text" href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': pages.previous})) }}">
{{ '前へ'|trans }}
</a>
</li>
{% endif %}
{# 1ページリンクが表示されない場合、「...」を表示 #}
{% if pages.firstPageInRange != 1 %}
<li class="c-pager__list-item">...</li>
{% endif %}
{% for page in pages.pagesInRange %}
{% if page == pages.current %}
<li class="c-pager__list-item is-active">
<a class="c-pager__link--number" href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': page})) }}">
<span class="c-pager__link--number-text">{{ page }}</span>
</a>
</li>
{% else %}
<li class="c-pager__list-item">
<a class="c-pager__link--number" href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': page})) }}">
<span class="c-pager__link--number-text">{{ page }}</span>
</a>
</li>
{% endif %}
{% endfor %}
{# 最終ページリンクが表示されない場合、「...」を表示 #}
{% if pages.last != pages.lastPageInRange %}
<li class="c-pager__list-item">...</li>
{% endif %}
{# 次へ #}
{% if pages.next is defined %}
<li class="c-pager__list-item is-next">
<a class="c-pager__link--text" href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': pages.next})) }}">
{{ '次へ'|trans }}
</a>
</li>
{% endif %}
{# 最後へ
{% if pages.last != pages.lastPageInRange %}
<li class="c-pager__list-item">
<a class="c-pager__link--text" href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': pages.last})) }}">
{{ '最後へ'|trans }}
</a>
</li>
{% endif %}
#}
</ul>
</div>
{% endif %}