vendor/easycorp/easyadmin-bundle/templates/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 page-item-previous {{ not paginator.hasPreviousPage ? 'disabled' }}">
  14.                     <a class="page-link" href="{{ not paginator.hasPreviousPage ? '#' : paginator.generateUrlForPage(paginator.previousPage) }}">
  15.                         {% if 'rtl' == ea.i18n.textDirection %}
  16.                             <i class="fa fa-angle-right mx-1" aria-label="{{ 'paginator.previous'|trans }}"></i>
  17.                         {% else %}
  18.                             <i class="fa fa-angle-left mx-1" aria-label="{{ 'paginator.previous'|trans }}"></i>
  19.                         {% endif %}
  20.                         <span class="btn-label">{{ 'paginator.previous'|trans }}</span>
  21.                     </a>
  22.                 </li>
  23.                 {% if render_detailed_pagination is defined ? render_detailed_pagination : true %}
  24.                     {% for page in paginator.pageRange %}
  25.                         <li class="page-item {{ page == paginator.currentPage ? 'active' }} {{ page is null ? 'disabled' }}">
  26.                             {% if page is null %}
  27.                                 <span class="page-link">&hellip;</span>
  28.                             {% else %}
  29.                                 <a class="page-link" href="{{ paginator.generateUrlForPage(page) }}">{{ page }}</a>
  30.                             {% endif %}
  31.                         </li>
  32.                     {% endfor %}
  33.                 {% else %}
  34.                     <li class="page-item active {{ paginator.currentPage is null ? 'disabled' }}">
  35.                         <a class="page-link" href="{{ paginator.generateUrlForPage(paginator.currentPage) }}">{{ paginator.currentPage }}</a>
  36.                     </li>
  37.                 {% endif %}
  38.                 <li class="page-item page-item-next {{ not paginator.hasNextPage ? 'disabled' }}">
  39.                     <a class="page-link" href="{{ not paginator.hasNextPage ? '#' : paginator.generateUrlForPage(paginator.nextPage) }}">
  40.                         <span class="btn-label">{{ 'paginator.next'|trans }}</span>
  41.                         {% if 'rtl' == ea.i18n.textDirection %}
  42.                             <i class="fa fa-angle-left mx-1" aria-label="{{ 'paginator.next'|trans }}"></i>
  43.                         {% else %}
  44.                             <i class="fa fa-angle-right mx-1" aria-label="{{ 'paginator.next'|trans }}"></i>
  45.                         {% endif %}
  46.                     </a>
  47.                 </li>
  48.             </ul>
  49.         </nav>
  50.     {% endif %}
  51. </div>