templates/_structure/pagination.html.twig line 1

Open in your IDE?
  1. {% if true or pageCount > 1 %}
  2.     <nav>
  3.         <ul class="pagination justify-content-center">
  4.             {% if previous is defined %}
  5.                 <li class="page-item">
  6.                     <a rel="prev" href="{{ path(app.request.attributes.get('_route'), query|merge({(pageParameterName): previous})) }}" class="page-link frivol-xhr">
  7.                         <span aria-hidden="true"><i class="fas fa-angle-double-left"></i></span>
  8.                     </a>
  9.                 </li>
  10.             {% else %}
  11.                 <li class="page-item disabled">
  12.                     <span class="page-link">
  13.                         <span aria-hidden="true">
  14.                             <i class="fas fa-angle-double-left"></i>
  15.                         </span>
  16.                     </span>
  17.                 </li>
  18.             {% endif %}
  19.             {% if startPage > 1 %}
  20.                 <li class="page-item">
  21.                     <a href="{{ path(app.request.attributes.get('_route'), query|merge({(pageParameterName): 1})) }}" class="page-link frivol-xhr">1</a>
  22.                 </li>
  23.                 {% if startPage == 3 %}
  24.                     <li class="page-item">
  25.                         <a href="{{ path(app.request.attributes.get('_route'), query|merge({(pageParameterName): 2})) }}" class="page-link frivol-xhr">2</a>
  26.                     </li>
  27.                 {% elseif startPage != 2 %}
  28.                     <li class="page-item disabled">
  29.                         <span class="page-link">&hellip;</span>
  30.                     </li>
  31.                 {% endif %}
  32.             {% endif %}
  33.             {% for page in pagesInRange %}
  34.                 {% if page != current %}
  35.                     <li class="page-item">
  36.                         <a href="{{ path(app.request.attributes.get('_route'), query|merge({(pageParameterName): page})) }}" class="page-link frivol-xhr">{{ page }}</a>
  37.                     </li>
  38.                 {% else %}
  39.                     <li class="active page-item">
  40.                         <span class="page-link">{{ page }}</span>
  41.                     </li>
  42.                 {% endif %}
  43.             {% endfor %}
  44.             {% if pageCount > endPage %}
  45.                 {% if pageCount > (endPage + 1) %}
  46.                     {% if pageCount > (endPage + 2) %}
  47.                         <li class="page-item disabled">
  48.                             <span class="page-link">&hellip;</span>
  49.                         </li>
  50.                     {% else %}
  51.                         <li class="page-item">
  52.                             <a href="{{ path(app.request.attributes.get('_route'), query|merge({(pageParameterName): (pageCount - 1)})) }}" class="page-link frivol-xhr">{{ pageCount -1 }}</a>
  53.                         </li>
  54.                     {% endif %}
  55.                 {% endif %}
  56.                 <li>
  57.                     <a href="{{ path(app.request.attributes.get('_route'), query|merge({(pageParameterName): pageCount})) }}" class="page-link frivol-xhr">{{ pageCount }}</a>
  58.                 </li>
  59.             {% endif %}
  60.             {% if next is defined %}
  61.                 <li class="page-item">
  62.                     <a rel="next" class="page-link frivol-xhr" href="{{ path(app.request.attributes.get('_route'), query|merge({(pageParameterName): next})) }}">
  63.                         <span aria-hidden="true"><i class="fas fa-angle-double-right"></i></span>
  64.                     </a>
  65.                 </li>
  66.             {% else %}
  67.                 <li class="page-item disabled">
  68.                     <span class="page-link"><span aria-hidden="true"><i class="fas fa-angle-double-right"></i></span></span>
  69.                 </li>
  70.             {% endif %}
  71.         </ul>
  72.         {% if incompletePages|default(false) and realPageCount|default(false)%}
  73.             <span class="pagination justify-content-center text-small">
  74.                 {{ (realPageCount - last)|number_format(null, null, '.') }} Seiten werden nicht angezeigt. Nutze die Filter um die Ergebnisse einzuschränken.
  75.             </span>
  76.         {% endif %}
  77.     </nav>
  78. {% endif %}