app/template/default/pager_case.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="pagination justify-content-center mt-5">
  10.         {# 最初へ #}
  11.         {% if pages.firstPageInRange != 1 %}
  12. <!--
  13.             <li class="page-item">
  14.                 <a href="{{ path(
  15.                 app.request.attributes.get('_route'),
  16.                 app.request.query.all|merge({'pageno': pages.first})) }}" class="page-link text-dark">{{ '最初へ'|trans }}</a></li>
  17. -->
  18.         {% endif %}
  19.         {# 前へ #}
  20.         {% if pages.previous is defined %}
  21.             {% if pages.previous != 1 %}
  22.             <li class="page-item">
  23.                 <a href="{{ path(
  24.                 app.request.attributes.get('_route'),
  25.                 app.request.query.all|merge({'pageno': pages.previous})) }}" class="page-link text-dark">{{ '前へ'|trans }}</a></li>
  26.             {% else %}
  27.             <li class="page-item">
  28.                 <a href="{{ path(
  29.                 app.request.attributes.get('_route')) }}" class="page-link text-dark">{{ '前へ'|trans }}</a></li>
  30.             {% endif %}
  31.         {% endif %}
  32.         {# 1ページリンクが表示されない場合、「...」を表示 #}
  33.         {% if pages.firstPageInRange != 1 %}
  34.             <li class="page-item">...</li>
  35.         {% endif %}
  36.         {% for page in pages.pagesInRange %}
  37.             {% if page == pages.current %}
  38.                 <li class="page-item"><a href="{{ path(
  39.                     app.request.attributes.get('_route'),
  40.                     app.request.query.all|merge({'pageno': page})) }}" class="page-link text-dark active"> {{ page }} </a></li>
  41.             {% else %}
  42.                 <li class="page-item"><a href="{{ path(
  43.                     app.request.attributes.get('_route'),
  44.                     app.request.query.all|merge({'pageno': page})) }}" class="page-link text-dark"> {{ page }} </a></li>
  45.             {% endif %}
  46.         {% endfor %}
  47.         {# 最終ページリンクが表示されない場合、「...」を表示 #}
  48.         {% if pages.last != pages.lastPageInRange %}
  49.             <li class="page-item">...</li>
  50.         {% endif %}
  51.         {# 次へ #}
  52.         {% if pages.next is defined %}
  53.             <li class="page-item">
  54.                 <a href="{{ path(
  55.                 app.request.attributes.get('_route'),
  56.                 app.request.query.all|merge({'pageno': pages.next})) }}" class="page-link text-dark">{{ '次へ'|trans }}</a></li>
  57.         {% endif %}
  58.         {# 最後へ #}
  59.         {% if pages.last != pages.lastPageInRange %}
  60. <!--
  61.             <li class="page-item">
  62.                 <a href="{{ path(
  63.                 app.request.attributes.get('_route'),
  64.                 app.request.query.all|merge({'pageno': pages.last})) }}" class="page-link text-dark">{{ '最後へ'|trans }}</a></li>
  65. -->
  66.         {% endif %}
  67.     </ul>
  68. {% endif %}