Working state
This commit is contained in:
29
views/partials/_pagination.twig
Normal file
29
views/partials/_pagination.twig
Normal file
@@ -0,0 +1,29 @@
|
||||
{% if pagination.totalPages > 1 %}
|
||||
<nav class="pagination" aria-label="Pagination">
|
||||
{% if pagination.hasPrevious %}
|
||||
<a href="{{ pagination.previousUrl }}" class="btn btn--sm btn--secondary">← Précédent</a>
|
||||
{% else %}
|
||||
<span class="admin-table__muted">← Précédent</span>
|
||||
{% endif %}
|
||||
|
||||
<span class="pagination__summary">
|
||||
Page {{ pagination.currentPage }} sur {{ pagination.totalPages }}
|
||||
</span>
|
||||
|
||||
<span class="pagination__pages">
|
||||
{% for page in pagination.pages %}
|
||||
{% if page.current %}
|
||||
<strong>{{ page.number }}</strong>
|
||||
{% else %}
|
||||
<a href="{{ page.url }}">{{ page.number }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</span>
|
||||
|
||||
{% if pagination.hasNext %}
|
||||
<a href="{{ pagination.nextUrl }}" class="btn btn--sm btn--secondary">Suivant →</a>
|
||||
{% else %}
|
||||
<span class="admin-table__muted">Suivant →</span>
|
||||
{% endif %}
|
||||
</nav>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user