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.     <div class="list-page">
  10.         {# 前へ #}
  11.         {% if pages.previous is defined %}
  12.             <a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': pages.previous})) }}" class="page prev"></a>
  13.         {% endif %}
  14.         {# 1ページリンクが表示されない場合、「...」を表示 #}
  15.         {% if pages.firstPageInRange != 1 %}
  16.             <span>...</span>
  17.         {% endif %}
  18.         {% for page in pages.pagesInRange %}
  19.             {% if page == pages.current %}
  20.                 <a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': page})) }}" class="page active"><span>{{ page }}</span></a>
  21.             {% else %}
  22.                 <a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': page})) }}" class="page"><span>{{ page }}</span></a>
  23.             {% endif %}
  24.         {% endfor %}
  25.         {# 最終ページリンクが表示されない場合、「...」を表示 #}
  26.         {% if pages.last != pages.lastPageInRange %}
  27.             <span>...</span>
  28.         {% endif %}
  29.         {# 次へ #}
  30.         {% if pages.next is defined %}
  31.             <a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': pages.next})) }}" class="page next"></a>
  32.         {% endif %}
  33.     </div>
  34. {% endif %}