templates/Admin/counter.html.twig line 1
{% if offset is defined and count is defined %}{% if count > 0 %}<div class='flex row space counters-box middle'>{% set route = app.request.attributes.get('_route') %}{% if 'page' not in route %}{% set route = route~'-page' %}{% endif %}{% if table_limit is not defined %}{% set table_limit = 20 %}{% endif %}{% set limit = (offset+1)*table_limit %}{% set currentPath = path(app.request.attributes.get('_route'),app.request.attributes.get('_route_params')) %}{% if limit > count %} {% set limit = count %} {% endif %}{% if expanded is not defined %}<label>Résultats : </label><b class="">{{ (offset*table_limit)+1 }} - {{ limit }} sur {{ count }}</b>{% endif %}{% if (offset*table_limit)+1 > 1 %}{% set link = "" %}{% if params is defined and params|length %}{% set params = params|merge({'offset':offset}) %}{% set link = url(route,params) %}{% elseif cat is defined and cat %}{% set link = url(route,{'cat':cat,'offset':offset}) %}{% else %}{% set link = url(route,{'offset':offset}) %}{% endif %}<a href="{{link}}" class="{%if expanded is defined %}btn success small{%else%}square{%endif%}" title="Page précédente"><i class="fa fa-chevron-left"></i>{%if expanded is defined %}<span> | Précédent</span>{%endif%}</a>{% else %}<a class="{%if expanded is defined %}btn success small{%else%}square{%endif%} disable" title="Page précédente"><i class="fa fa-chevron-left"></i>{%if expanded is defined %}<span> | Précédent</span>{%endif%}</a>{% endif %}{% if expanded is defined %}<b class="btn success small trans">{{ (offset*table_limit)+1 }} - {{ limit }} sur {{ count }}</b>{% endif %}{% if limit < count %}{% set link = "" %}{% if params is defined and params|length %}{% set params = params|merge({'offset':offset+2}) %}{% set link = url(route,params) %}{% elseif cat is defined and cat %}{% set link = url(route,{'cat':cat,'offset':offset+2}) %}{% else %}{% set link = url(route,{'offset':offset+2}) %}{% endif %}<a href="{{link}}" class="{%if expanded is defined %}btn success small{%else%}square{%endif%}" title="Page suivante">{%if expanded is defined %}<span>Suivant | </span>{%endif%}<i class="fa fa-chevron-right"></i></a>{% else %}<a class="{%if expanded is defined %}btn success small{%else%}square{%endif%} disable" title="Page suivante">{%if expanded is defined %}<span>Suivant | </span>{%endif%}<i class="fa fa-chevron-right"></i></a>{% endif %}</div>{% else %}<label>Aucune donnée trouvée</label>{% endif %}{% endif %}