vendor/knplabs/knp-paginator-bundle/templates/Pagination/sliding.html.twig line 1

Open in your IDE?
  1. {# default Sliding pagination control implementation #}
  2. {% if pageCount > 1 %}
  3.     {% if first is defined and current == first %}
  4.         <li class="page-item">
  5.             <a class="page-link" href="#" aria-label="Previous">
  6.                 <span aria-hidden="true"><i class="fa fa-chevron-left"></i></span>
  7.                 <span class="sr-only">Anterior</span>
  8.             </a>
  9.         </li>
  10.     {% endif %}
  11.     {% if first is defined and current != first %}
  12.         <li class="page-item">
  13.             <a class="page-link" href="{{ path(route, query|merge({(pageParameterName): previous})) }}" aria-label="Anterior">
  14.                 <span aria-hidden="true"><i class="fa fa-chevron-left"></i></span>
  15.                 <span class="sr-only">Anterior</span>
  16.             </a>
  17.         </li>
  18.     {% endif %}
  19.     {% for page in pagesInRange %}
  20.         {% if page == current %}
  21.             <li class="page-item">
  22.                 <a class="page-link active" href="#">{{ page }}</a>
  23.             </li>
  24.         {% else %}
  25.             <li class="page-item">
  26.                 <a class="page-link" href="{{ path(route, query|merge({(pageParameterName): page})) }}">{{ page }}</a>
  27.             </li>
  28.         {% endif %}
  29.     {% endfor %}
  30.     {#
  31.     {% set temp =  current + 1 %}
  32.     {% if  temp < pageCount and pagesInRange |length == 6 and pageCount > 6 %}
  33.         <p class="puntos-paginador">...</p>
  34.         <li class="page-item">
  35.             <a class="page-link"
  36.                href="{{ path(route, query|merge({(pageParameterName): pageCount})) }}">{{ pageCount }}</a>
  37.         </li>
  38.     {% endif %}
  39.     #}
  40.     {% if last is defined and current == last %}
  41.         <li class="page-item">
  42.             <a class="page-link" href="#" aria-label="Siguiente">
  43.                 <span aria-hidden="true"><i class="fa fa-chevron-right"></i></span>
  44.                 <span class="sr-only">Siguiente</span>
  45.             </a>
  46.         </li>
  47.     {% endif %}
  48.     {% if last is defined and current != last %}
  49.         <li class="page-item">
  50.             <a class="page-link" href="{{ path(route, query|merge({(pageParameterName): next})) }}" aria-label="Siguiente">
  51.                 <span aria-hidden="true"><i class="fa fa-chevron-right"></i></span>
  52.                 <span class="sr-only">Siguiente</span>
  53.             </a>
  54.         </li>
  55.     {% endif %}
  56. {% endif %}
  57. {# vista original#}
  58. {#
  59. {% if pageCount > 1 %}
  60.     <div class="pagination">
  61.         {% if first is defined and current != first %}
  62.             <span class="first">
  63.                 <a href="{{ path(route, query|merge({(pageParameterName): first})) }}">&lt;&lt;</a>
  64.             </span>
  65.         {% endif %}
  66.         {% if previous is defined %}
  67.             <span class="previous">
  68.                 <a href="{{ path(route, query|merge({(pageParameterName): previous})) }}">&lt;</a>
  69.             </span>
  70.         {% endif %}
  71.         {% for page in pagesInRange %}
  72.             {% if page != current %}
  73.                 <span class="page">
  74.                     <a href="{{ path(route, query|merge({(pageParameterName): page})) }}">{{ page }}</a>
  75.                 </span>
  76.             {% else %}
  77.                 <span class="current">{{ page }}</span>
  78.             {% endif %}
  79.         {% endfor %}
  80.         {% if next is defined %}
  81.             <span class="next">
  82.                 <a href="{{ path(route, query|merge({(pageParameterName): next})) }}">&gt;</a>
  83.             </span>
  84.         {% endif %}
  85.         {% if last is defined and current != last %}
  86.             <span class="last">
  87.                 <a href="{{ path(route, query|merge({(pageParameterName): last})) }}">&gt;&gt;</a>
  88.             </span>
  89.         {% endif %}
  90.     </div>
  91. {% endif %}
  92. #}