<div class="uk-grid-small" uk-grid>
<div class="uk-width-auto uk-text-small uk-text-muted">
{{ 'Results'|trans }}: {{ pagination.totalSearch }} / {{ pagination.total }}
</div>
<div class="uk-width-expand">
<ul class="uk-pagination uk-flex-center">
{% if pagination.totalPages > 1 %}
{% if pagination.page > 1 %}
<li><a title="{{ 'First'|trans }}" uk-tooltip="" href="{{ path(pagination.listURL, {page: 1, sort: ordering.sort, dir: ordering.dir}|merge(listParams)) }}"><span uk-icon="icon: arrow-left"></span></a></li>
<li><a title="{{ 'Previous'|trans }}" uk-tooltip="" href="{{ path(pagination.listURL, {page: pagination.page-1, sort: ordering.sort, dir: ordering.dir}|merge(listParams)) }}"><span uk-icon="icon: chevron-left"></span></a></li>
{% endif %}
{% if pagination.totalPages < 7 %}
{% for list in range(1,pagination.totalPages) %}
<li {% if list == pagination.page %}class="uk-active"{% endif %}><a title="{{ list }}" uk-tooltip="" href="{{ path(pagination.listURL, {page: list, sort: ordering.sort, dir: ordering.dir}|merge(listParams)) }}">{{ list }}</a></li>
{% endfor %}
{% else %}
{% if (pagination.page-3)>1 %}
<li class="uk-disabled"><span>...</span></li>
{% endif %}
{% for list in range((pagination.page-3)<=0?1:(pagination.page-3), (pagination.page+3>pagination.totalPages?pagination.totalPages:pagination.page+3)) %}
<li {% if list == pagination.page %}class="uk-active"{% endif %}><a title="{{ list }}" uk-tooltip="" href="{{ path(pagination.listURL, {page: list, sort: ordering.sort, dir: ordering.dir}|merge(listParams)) }}">{{ list }}</a></li>
{% endfor %}
{% if (pagination.page+3)<pagination.totalPages %}
<li class="uk-disabled"><span>...</span></li>
{% endif %}
{% endif %}
{% if pagination.page < pagination.totalPages %}
<li><a title="{{ 'Next'|trans }}" uk-tooltip="" href="{{ path(pagination.listURL, {page: pagination.page+1, sort: ordering.sort, dir: ordering.dir}|merge(listParams)) }}"><span uk-icon="icon: chevron-right"></span></a></li>
<li><a title="{{ 'Last'|trans }}" uk-tooltip="" href="{{ path(pagination.listURL, {page: pagination.totalPages, sort: ordering.sort, dir: ordering.dir}|merge(listParams)) }}"><span uk-icon="icon: arrow-right"></span></a></li>
{% endif %}
{% endif %}
</ul>
</div>
<div class="uk-width-auto uk-text-small uk-text-muted">
{{ 'Page'|trans }}: {{ pagination.page }} / {{ pagination.totalPages }}
</div>
</div>