app/template/plugin/CustomerReview42/Block/customer_review4_pager.twig line 1

Open in your IDE?
  1. {% if pages.pageCount > 1 %}
  2.     <ul class="ec-pager">
  3.         {# 最初へ #}
  4.         {% if pages.firstPageInRange != 1 %}
  5.             <li class="ec-pager__item">
  6.                 <a href="{{ path(
  7.                 routes ? routes : app.request.attributes.get('_route'),
  8.                 query_params|merge({'pageno': pages.first})) }}">{{ '最初へ'|trans }}</a></li>
  9.         {% endif %}
  10.         {# 前へ #}
  11.         {% if pages.previous is defined %}
  12.             <li class="ec-pager__item">
  13.                 <a href="{{ path(
  14.                 routes ? routes : app.request.attributes.get('_route'),
  15.                 query_params|merge({'pageno': pages.previous})) }}">{{ '前へ'|trans }}</a></li>
  16.         {% endif %}
  17.         {# 1ページリンクが表示されない場合、「...」を表示 #}
  18.         {% if pages.firstPageInRange != 1 %}
  19.             <li class="ec-pager__item">...</li>
  20.         {% endif %}
  21.         {% for page in pages.pagesInRange %}
  22.             {% if page == pages.current %}
  23.                 <li class="ec-pager__item--active"><a href="{{ path(
  24.                     routes ? routes : app.request.attributes.get('_route'),
  25.                     query_params|merge({'pageno': page})) }}"> {{ page }} </a></li>
  26.             {% else %}
  27.                 <li class="ec-pager__item"><a href="{{ path(
  28.                     routes ? routes : app.request.attributes.get('_route'),
  29.                     query_params|merge({'pageno': page})) }}"> {{ page }} </a></li>
  30.             {% endif %}
  31.         {% endfor %}
  32.         {# 最終ページリンクが表示されない場合、「...」を表示 #}
  33.         {% if pages.last != pages.lastPageInRange %}
  34.             <li class="ec-pager__item">...</li>
  35.         {% endif %}
  36.         {# 次へ #}
  37.         {% if pages.next is defined %}
  38.             <li class="ec-pager__item">
  39.                 <a href="{{ path(
  40.                 routes ? routes : app.request.attributes.get('_route'),
  41.                 query_params|merge({'pageno': pages.next})) }}">{{ '次へ'|trans }}</a></li>
  42.         {% endif %}
  43.         {# 最後へ #}
  44.         {% if pages.last != pages.lastPageInRange %}
  45.             <li class="ec-pager__item">
  46.                 <a href="{{ path(
  47.                 routes ? routes : app.request.attributes.get('_route'),
  48.                 query_params|merge({'pageno': pages.last})) }}">{{ '最後へ'|trans }}</a></li>
  49.         {% endif %}
  50.     </ul>
  51. {% endif %}