vendor/easycorp/easyadmin-bundle/src/Resources/views/crud/paginator.html.twig line 1

Open in your IDE?
  1. {# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
  2. {# @var paginator \EasyCorp\Bundle\EasyAdminBundle\Orm\EntityPaginator #}
  3. {% trans_default_domain 'EasyAdminBundle' %}
  4. <div class="list-pagination">
  5.     <div class="list-pagination-counter">
  6.         {% if render_detailed_pagination is defined ? render_detailed_pagination : true %}
  7.             {{ 'paginator.results'|trans({'%count%': paginator.numResults|format})|raw }}
  8.         {% endif %}
  9.     </div>
  10.     {% if paginator.hasPreviousPage or paginator.hasNextPage %}
  11.         <nav class="pager list-pagination-paginator {{ not paginator.hasPreviousPage ? 'first-page' }} {{ not paginator.hasNextPage ? 'last-page' }}">
  12.             <ul class="pagination">
  13.                 <li class="page-item {{ not paginator.hasPreviousPage ? 'disabled' }}">
  14.                     <a class="page-link" href="{{ not paginator.hasPreviousPage ? '#' : paginator.generateUrlForPage(paginator.previousPage) }}">
  15.                         <i class="fa fa-angle-left mx-1"></i> <span class="btn-label">{{ 'paginator.previous'|trans }}</span>
  16.                     </a>
  17.                 </li>
  18.     
  19.                 {% if render_detailed_pagination is defined ? render_detailed_pagination : true %}
  20.                     {% for page in paginator.pageRange %}
  21.                         <li class="page-item {{ page == paginator.currentPage ? 'active' }} {{ page is null ? 'disabled' }}">
  22.                             {% if page is null %}
  23.                                 <span class="page-link">&hellip;</span>
  24.                             {% else %}
  25.                                 <a class="page-link" href="{{ paginator.generateUrlForPage(page) }}">{{ page }}</a>
  26.                             {% endif %}
  27.                         </li>
  28.                     {% endfor %}
  29.                 {% else %}
  30.                     <li class="page-item active {{ paginator.currentPage is null ? 'disabled' }}">
  31.                         <a class="page-link" href="{{ paginator.generateUrlForPage(paginator.currentPage) }}">{{ paginator.currentPage }}</a>
  32.                     </li>
  33.                 {% endif %}
  34.     
  35.                 <li class="page-item {{ not paginator.hasNextPage ? 'disabled' }}">
  36.                     <a class="page-link" href="{{ not paginator.hasNextPage ? '#' : paginator.generateUrlForPage(paginator.nextPage) }}">
  37.                         <span class="btn-label">{{ 'paginator.next'|trans }}</span> <i class="fa fa-angle-right mx-1"></i>
  38.                     </a>
  39.                 </li>
  40.             </ul>
  41.         </nav>
  42.     {% endif %}
  43. </div>