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="pagination">
  10.     <ul>
  11.         {% if pages.previous is defined %}
  12.             <li class="ec-pager__item">
  13.                 <a class="prev" href="{{ path(
  14.                     app.request.attributes.get('_route'),
  15.                     app.request.query.all|merge({'pageno': pages.previous})) }}">
  16.                 </a>
  17.             </li>
  18.         {% endif %}
  19.         {% for page in pages.pagesInRange %}
  20.             {% if page == pages.current %}
  21.                 <li class="ec-pager__item">
  22.                     <a class="active" href="{{ path(
  23.                     app.request.attributes.get('_route'),
  24.                     app.request.query.all|merge({'pageno': page})) }}">{{ page }}</a>
  25.                 </li>
  26.             {% else %}
  27.                 <li class="ec-pager__item">
  28.                     <a href="{{ path(
  29.                     app.request.attributes.get('_route'),
  30.                     app.request.query.all|merge({'pageno': page})) }}">{{ page }}</a>
  31.                 </li>
  32.             {% endif %}
  33.         {% endfor %}
  34.         {% if pages.next is defined %}
  35.             <li class="ec-pager__item">
  36.                 <a class="next" href="{{ path(
  37.                 app.request.attributes.get('_route'),
  38.                 app.request.query.all|merge({'pageno': pages.next})) }}"></a>
  39.             </li>
  40.         {% endif %}
  41.         {% if pages.last != pages.lastPageInRange %}
  42.             <li class="ec-pager__item">
  43.                 <a class="next_end" href="{{ path(
  44.                 app.request.attributes.get('_route'),
  45.                 app.request.query.all|merge({'pageno': pages.last})) }}"></a>
  46.             </li>
  47.         {% endif %}
  48.     </ul>
  49. </div>
  50. {% endif %}