|
123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- {# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
- {# @var paginator \EasyCorp\Bundle\EasyAdminBundle\Orm\EntityPaginator #}
- {% trans_default_domain 'EasyAdminBundle' %}
-
- <div class="col-sm-12 col-md-6">
- {# <div class="nb-results">
- {{ 'paginator.results'|trans({'%count%': paginator.numResults})|raw }}
- </div> #}
- <div class="items-per-page btn-group">
- {% set itemsPerPage = [15,30,50,100,200] %}
- {% for itemPerPage in itemsPerPage %}
- {% set url = ea_url({listMaxResults: itemPerPage, page : "1"}) %}
- <a href="{{ url }}"
- class="btn btn-sm {{ paginator.pageSize == itemPerPage ? 'btn-secondary' : 'btn-default' }}">{{ itemPerPage }}</a>
- {% endfor %}
- </div>
- </div>
-
- <div class="col-sm-12 col-md-6">
- <div class="float-sm-right">
- <ul class="pagination">
- <li class="page-item {{ not paginator.hasPreviousPage ? 'disabled' }}">
- <a class="page-link" href="{{ not paginator.hasPreviousPage ? '#' : paginator.generateUrlForPage(paginator.previousPage) }}" {{ not paginator.hasPreviousPage ? 'aria-disabled="true"' }}>
- <i class="ti ti-arrow-left"></i> <span class="btn-label">{{ 'paginator.previous'|trans }}</span>
- </a>
- </li>
-
- {% for page in paginator.pageRange %}
- <li class="page-item {{ page == paginator.currentPage ? 'active' }} {{ page is null ? 'disabled' }}">
- {% if page is null %}
- <span class="page-link">…</span>
- {% else %}
- <a class="page-link" href="{{ paginator.generateUrlForPage(page) }}">{{ page }}</a>
- {% endif %}
- </li>
- {% endfor %}
-
- <li class="page-item {{ not paginator.hasNextPage ? 'disabled' }}">
- <a class="page-link" href="{{ not paginator.hasNextPage ? '#' : paginator.generateUrlForPage(paginator.nextPage) }}" {{ not paginator.hasNextPage ? 'aria-disabled="true"' }}>
- <span class="btn-label">{{ 'paginator.next'|trans }}</span> <i class="ti ti-arrow-right"></i>
- </a>
- </li>
- </ul>
- </div>
- </div>
|