templates/paginator.html.twig line 1
- {#
- /**
- * @file
- * Twitter Bootstrap v4 Sliding pagination control implementation.
- *
- * View that can be used with the pagination module
- * from the Twitter Bootstrap CSS Toolkit
- * https://getbootstrap.com/docs/4.5/components/pagination/
- *
- */
- #}
- {% if pageCount > 1 %}
- {% set classAlign = (align is not defined) ? '' : align=='center' ? ' justify-content-center' : (align=='right' ? ' justify-content-end' : '') %}
- {% set classSize = (size is not defined) ? '' : size=='large' ? ' pagination-lg' : (size=='small' ? ' pagination-sm' : '') %}
- {% if previous is defined %}
- « {{ 'label_previous'|trans({}, 'KnpPaginatorBundle') }}
- {% else %}
- « {{ 'label_previous'|trans({}, 'KnpPaginatorBundle') }}
- {% endif %}
- {% if startPage > 1 %}
- 1
- {% if startPage == 3 %}
- 2
- {% elseif startPage != 2 %}
- …
- {% endif %}
- {% endif %}
- {% for page in pagesInRange %}
- {% if page != current %}
- {{ page }}
- {% else %}
- {{ page }}
- {% endif %}
- {% endfor %}
- {% if pageCount > endPage %}
- {% if pageCount > (endPage + 1) %}
- {% if pageCount > (endPage + 2) %}
- …
- {% else %}
- {{ pageCount -1 }}
- {% endif %}
- {% endif %}
- {{ pageCount }}
- {% endif %}
- {% if next is defined %}
- {{ 'label_next'|trans({}, 'KnpPaginatorBundle') }} »
- {% else %}
- {{ 'label_next'|trans({}, 'KnpPaginatorBundle') }} »
- {% endif %}
- {% endif %}