app/template/ss4002/pager.twig line 1

Open in your IDE?
  1. {#
  2. This file is part of EC-CUBE
  3. Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
  4. http://www.lockon.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="c-pager">
  10.         <ul class="c-pager__list u-list-sanitize">
  11.             {# 最初へ
  12.             {% if pages.firstPageInRange != 1 %}
  13.                 <li class="c-pager__list-item">
  14.                     <a class="c-pager__link--text" href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': pages.first})) }}">
  15.                         {{ '最初へ'|trans }}
  16.                     </a>
  17.                 </li>
  18.             {% endif %}
  19.             #}
  20.             {# 前へ #}
  21.             {% if pages.previous is defined %}
  22.                 <li class="c-pager__list-item is-prev">
  23.                     <a class="c-pager__link--text" href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': pages.previous})) }}">
  24.                         {{ '前へ'|trans }}
  25.                     </a>
  26.                 </li>
  27.             {% endif %}
  28.             {# 1ページリンクが表示されない場合、「...」を表示 #}
  29.             {% if pages.firstPageInRange != 1 %}
  30.                 <li class="c-pager__list-item">...</li>
  31.             {% endif %}
  32.             {% for page in pages.pagesInRange %}
  33.                 {% if page == pages.current %}
  34.                     <li class="c-pager__list-item is-active">
  35.                         <a class="c-pager__link--number" href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': page})) }}">
  36.                             <span class="c-pager__link--number-text">{{ page }}</span>
  37.                         </a>
  38.                     </li>
  39.                 {% else %}
  40.                     <li class="c-pager__list-item">
  41.                         <a class="c-pager__link--number" href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': page})) }}">
  42.                             <span class="c-pager__link--number-text">{{ page }}</span>
  43.                         </a>
  44.                     </li>
  45.                 {% endif %}
  46.             {% endfor %}
  47.             {# 最終ページリンクが表示されない場合、「...」を表示 #}
  48.             {% if pages.last != pages.lastPageInRange %}
  49.                 <li class="c-pager__list-item">...</li>
  50.             {% endif %}
  51.             {# 次へ #}
  52.             {% if pages.next is defined %}
  53.                 <li class="c-pager__list-item is-next">
  54.                     <a class="c-pager__link--text" href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': pages.next})) }}">
  55.                         {{ '次へ'|trans }}
  56.                     </a>
  57.                 </li>
  58.             {% endif %}
  59.             {# 最後へ
  60.             {% if pages.last != pages.lastPageInRange %}
  61.                 <li class="c-pager__list-item">
  62.                     <a class="c-pager__link--text" href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': pages.last})) }}">
  63.                         {{ '最後へ'|trans }}
  64.                     </a>
  65.                 </li>
  66.             {% endif %}
  67.              #}
  68.         </ul>
  69.     </div>
  70. {% endif %}