app/template/default/pager.twig line 1

Open in your IDE?
  1. {#
  2. This file is part of EC-CUBE
  3. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  4. http://www.ec-cube.co.jp/
  5. For the full copyright and license information, please view the LICENSE
  6. file that was distributed with this source code.
  7. #}
  8. {% if pages.pageCount > 1 %}
  9.     <ul class="ec-pager">
  10.         {# 最初へ #}
  11.         {#
  12.         {% if pages.firstPageInRange != 1 %}
  13.             <li class="ec-pager__item">
  14.                 <a href="{{ path(
  15.                 app.request.attributes.get('_route'),
  16.                 app.request.query.all|merge({'pageno': pages.first})) }}">{{ '最初へ'|trans }}</a></li>
  17.         {% endif %}
  18.         #}
  19.         {# 前へ #}
  20.         {% if pages.previous is defined %}
  21.             <li class="ec-pager__item pager__item_nav pager__item_nav__prev">
  22.                 <a href="{{ path(
  23.                 app.request.attributes.get('_route'),
  24.                 app.request.query.all|merge({'pageno': pages.previous})) }}">{{ 'Prev'|trans }}</a></li>
  25.         {% endif %}
  26.         {# 1ページリンクが表示されない場合、「...」を表示 #}
  27.         {% if pages.firstPageInRange != 1 %}
  28.             <li class="ec-pager__item">...</li>
  29.         {% endif %}
  30.         {% for page in pages.pagesInRange %}
  31.             {% if page == pages.current %}
  32.                 <li class="ec-pager__item--active"><a href="{{ path(
  33.                     app.request.attributes.get('_route'),
  34.                     app.request.query.all|merge({'pageno': page})) }}"> {{ page }} </a></li>
  35.             {% else %}
  36.                 <li class="ec-pager__item"><a href="{{ path(
  37.                     app.request.attributes.get('_route'),
  38.                     app.request.query.all|merge({'pageno': page})) }}"> {{ page }} </a></li>
  39.             {% endif %}
  40.         {% endfor %}
  41.         {# 最終ページリンクが表示されない場合、「...」を表示 #}
  42.         {% if pages.last != pages.lastPageInRange %}
  43.             <li class="ec-pager__item">...</li>
  44.         {% endif %}
  45.         {# 次へ #}
  46.         {% if pages.next is defined %}
  47.             <li class="ec-pager__item pager__item_nav pager__item_nav__next">
  48.                 <a href="{{ path(
  49.                 app.request.attributes.get('_route'),
  50.                 app.request.query.all|merge({'pageno': pages.next})) }}">{{ 'Next'|trans }}</a></li>
  51.         {% endif %}
  52.         {# 最後へ #}
  53.         {#
  54.         {% if pages.last != pages.lastPageInRange %}
  55.             <li class="ec-pager__item">
  56.                 <a href="{{ path(
  57.                 app.request.attributes.get('_route'),
  58.                 app.request.query.all|merge({'pageno': pages.last})) }}">{{ '最後へ'|trans }}</a></li>
  59.         {% endif %}
  60.         #}
  61.     </ul>
  62. {% endif %}