Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

paginator.html.twig 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. {# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
  2. {# @var paginator \EasyCorp\Bundle\EasyAdminBundle\Orm\EntityPaginator #}
  3. {% trans_default_domain 'EasyAdminBundle' %}
  4. <div class="col-sm-12 col-md-6">
  5. {# <div class="nb-results">
  6. {{ 'paginator.results'|trans({'%count%': paginator.numResults})|raw }}
  7. </div> #}
  8. <div class="items-per-page btn-group">
  9. {% set itemsPerPage = [15,30,50,100,200] %}
  10. {% for itemPerPage in itemsPerPage %}
  11. {% set url = ea_url({listMaxResults: itemPerPage, page : "1"}) %}
  12. <a href="{{ url }}"
  13. class="btn btn-sm {{ paginator.pageSize == itemPerPage ? 'btn-secondary' : 'btn-default' }}">{{ itemPerPage }}</a>
  14. {% endfor %}
  15. </div>
  16. </div>
  17. <div class="col-sm-12 col-md-6">
  18. <div class="float-sm-right">
  19. <ul class="pagination">
  20. <li class="page-item {{ not paginator.hasPreviousPage ? 'disabled' }}">
  21. <a class="page-link" href="{{ not paginator.hasPreviousPage ? '#' : paginator.generateUrlForPage(paginator.previousPage) }}" {{ not paginator.hasPreviousPage ? 'aria-disabled="true"' }}>
  22. <i class="ti ti-arrow-left"></i> <span class="btn-label">{{ 'paginator.previous'|trans }}</span>
  23. </a>
  24. </li>
  25. {% for page in paginator.pageRange %}
  26. <li class="page-item {{ page == paginator.currentPage ? 'active' }} {{ page is null ? 'disabled' }}">
  27. {% if page is null %}
  28. <span class="page-link">&hellip;</span>
  29. {% else %}
  30. <a class="page-link" href="{{ paginator.generateUrlForPage(page) }}">{{ page }}</a>
  31. {% endif %}
  32. </li>
  33. {% endfor %}
  34. <li class="page-item {{ not paginator.hasNextPage ? 'disabled' }}">
  35. <a class="page-link" href="{{ not paginator.hasNextPage ? '#' : paginator.generateUrlForPage(paginator.nextPage) }}" {{ not paginator.hasNextPage ? 'aria-disabled="true"' }}>
  36. <span class="btn-label">{{ 'paginator.next'|trans }}</span> <i class="ti ti-arrow-right"></i>
  37. </a>
  38. </li>
  39. </ul>
  40. </div>
  41. </div>