custom/plugins/FuerstenbergPorzellan/src/Resources/views/storefront/component/pagination.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/component/pagination.html.twig' %}
  2. {% block component_pagination %}
  3.             <ul class="pagination"> 
  4.                 {% block component_pagination_first %}
  5.                     <li class="page-item page-first{% if currentPage == 1 %} disabled{% endif %} d-none">
  6.                         {% block component_pagination_first_input %}
  7.                             <input type="radio"
  8.                                    {% if currentPage == 1 %}disabled="disabled"{% endif %}
  9.                                    name="p"
  10.                                    id="p-first{{ paginationSuffix }}"
  11.                                    value="1"
  12.                                    class="d-none"
  13.                                    title="pagination">
  14.                         {% endblock %}
  15.                         {% block component_pagination_first_label %}
  16.                             <label class="page-link" for="p-first{{ paginationSuffix }}">
  17.                                 {% block component_pagination_first_link %}
  18.                                     {% sw_icon 'arrow-medium-double-left' style { 'size': 'fluid', 'pack': 'solid'} %}
  19.                                 {% endblock %}
  20.                             </label>
  21.                         {% endblock %}
  22.                     </li>
  23.                 {% endblock %}
  24.                 {% block component_pagination_prev %}
  25.                     <li class="page-item page-prev{% if currentPage == 1 %} disabled{% endif %}">
  26.                         {% block component_pagination_prev_input %}
  27.                             <input type="radio"
  28.                                    {% if currentPage == 1 %}disabled="disabled"{% endif %}
  29.                                    name="p"
  30.                                    id="p-prev{{ paginationSuffix }}"
  31.                                    value="{{ currentPage - 1 }}"
  32.                                    class="d-none"
  33.                                    title="pagination">
  34.                         {% endblock %}
  35.                         {% block component_pagination_prev_label %}
  36.                             <label class="page-link" for="p-prev{{ paginationSuffix }}">
  37.                                 {% block component_pagination_prev_link %}
  38.                                     {% block component_pagination_prev_icon %}
  39.                                         {% sw_icon 'arrow-left' %}
  40.                                     {% endblock %}
  41.                                 {% endblock %}
  42.                             </label>
  43.                         {% endblock %}
  44.                     </li>
  45.                 {% endblock %}
  46.                 {% block component_pagination_loop %}
  47.                     {% set start = currentPage - 2 %}
  48.                     {% if start <= 0 %}
  49.                         {% set start = currentPage - 1 %}
  50.                         {% if start <= 0 %}
  51.                             {% set start = currentPage %}
  52.                         {% endif %}
  53.                     {% endif %}
  54.                     {% set end = start + 5 %}
  55.                     {% if end > totalPages %}
  56.                         {% set end = totalPages %}
  57.                     {% endif %}
  58.                     {% for page in start..end %}
  59.                         {% set isActive = (currentPage == page) %}
  60.                         {% block component_pagination_item %}
  61.                             <li class="page-item{% if isActive %} active{% endif %}">
  62.                                 {% block component_pagination_item_input %}
  63.                                     <input type="radio"
  64.                                            name="p"
  65.                                            id="p{{ page }}{{ paginationSuffix }}"
  66.                                            value="{{ page }}"
  67.                                            class="d-none"
  68.                                            title="pagination"
  69.                                            {% if isActive %}checked="checked"{% endif %}>
  70.                                 {% endblock %}
  71.                                 {% block component_pagination_item_label %}
  72.                                     <label class="page-link"
  73.                                            for="p{{ page }}{{ paginationSuffix }}">
  74.                                         {% block component_pagination_item_link %}
  75.                                             {% block component_pagination_item_text %}
  76.                                                 {{ page }}
  77.                                             {% endblock %}
  78.                                         {% endblock %}
  79.                                     </label>
  80.                                 {% endblock %}
  81.                             </li>
  82.                         {% endblock %}
  83.                     {% endfor %}
  84.                 {% endblock %}
  85.                 {% block component_pagination_next %}
  86.                     <li class="page-item page-next{% if currentPage == totalPages %} disabled{% endif %}">
  87.                         {% block component_pagination_next_input %}
  88.                             <input type="radio"
  89.                                    {% if currentPage == totalPages %}disabled="disabled"{% endif %}
  90.                                    name="p"
  91.                                    id="p-next{{ paginationSuffix }}"
  92.                                    value="{{ currentPage + 1 }}"
  93.                                    class="d-none"
  94.                                    title="pagination">
  95.                         {% endblock %}
  96.                         {% block component_pagination_next_label %}
  97.                             <label class="page-link" for="p-next{{ paginationSuffix }}">
  98.                                 {% block component_pagination_next_link %}
  99.                                     {% block component_pagination_next_icon %}
  100.                                         {% sw_icon 'arrow-right' %}
  101.                                     {% endblock %}
  102.                                 {% endblock %}
  103.                             </label>
  104.                         {% endblock %}
  105.                     </li>
  106.                 {% endblock %}
  107.                 {% block component_pagination_last %}
  108.                     <li class="page-item page-last{% if currentPage == totalPages %} disabled{% endif %} d-none">
  109.                         {% block component_pagination_last_input %}
  110.                             <input type="radio"
  111.                                    {% if currentPage == totalPages %}disabled="disabled"{% endif %}
  112.                                    name="p"
  113.                                    id="p-last{{ paginationSuffix }}"
  114.                                    value="{{ totalPages }}"
  115.                                    class="d-none"
  116.                                    title="pagination">
  117.                         {% endblock %}
  118.                         {% block component_pagination_last_label %}
  119.                             <label class="page-link" for="p-last{{ paginationSuffix }}">
  120.                                 {% block component_pagination_last_link %}
  121.                                     {% block component_pagination_last_icon %}
  122.                                         {% sw_icon 'arrow-medium-double-right' style {
  123.                                             'size': 'fluid',
  124.                                             'pack': 'solid'
  125.                                         } %}
  126.                                     {% endblock %}
  127.                                 {% endblock %}
  128.                             </label>
  129.                         {% endblock %}
  130.                     </li>
  131.                 {% endblock %}
  132.             </ul>
  133.         {% endblock %}