{% set suffix = currentPage == 1 ? '' : '_with_page' %}
{% set title = ('city_companies' ~ suffix ~ '.title')|trans({'%city%': city.name, '%page%': currentPage}) %}
{% set description = ('city_companies' ~ suffix ~ '.description')|trans({'%city%': city.name, '%page%': currentPage}) %}
{% set keywords = ('city_companies' ~ suffix ~ '.keywords')|trans({'%city%': city.name, '%page%': currentPage}) %}
{% extends 'company/base_list.html.twig' %}
{% block search_title %}
<p class="city-title">{{ city.name }}</p>
{% endblock search_title %}
{% block items_description %}
<p>{{ 'company_list.items_description'|trans({'%city%': city.name})|raw }}</p>
{% endblock items_description %}
{% block pagination %}
<div class="toolbar-bottom-container">
<nav class="pagination-container">
{% if currentPage > 1 %}
<a href="{{ path('city_companies_list', {
'page': currentPage - 1,
'id': city.id,
'slug': city.slug,
}) }}" class="p-i-previous"></a>
{% else %}
<span class="p-i-previous p-i-disabled"></span>
{% endif %}
<span class="pagination-pages">
{% for p in pagination %}
{% if p == currentPage %}
<span class="pagination-item p-i p-i-disabled">{{ p }}</span>
{% elseif p == '...' %}
<span class="pagination-item p-i">…</span>
{% else %}
<a href="{{ path('city_companies_list', {
'page': p,
'id': city.id,
'slug': city.slug,
}) }}" class="pagination-item p-i">
{{ p }}
</a>
{% endif %}
{% endfor %}
</span>
{% if currentPage < pagination|last %}
<a href="{{ path('city_companies_list', {
'page': currentPage + 1,
'id': city.id,
'slug': city.slug,
}) }}" class="p-i-next"></a>
{% else %}
<span class="p-i-next p-i-disabled"></span>
{% endif %}
</nav>
</div>
{% endblock pagination %}