templates/company/city_companies_list.html.twig line 1

Open in your IDE?
  1. {% set suffix = currentPage == 1 ? '' : '_with_page' %}
  2. {% set title = ('city_companies' ~ suffix ~ '.title')|trans({'%city%': city.name, '%page%': currentPage}) %}
  3. {% set description = ('city_companies' ~ suffix ~ '.description')|trans({'%city%': city.name, '%page%': currentPage}) %}
  4. {% set keywords = ('city_companies' ~ suffix ~ '.keywords')|trans({'%city%': city.name, '%page%': currentPage}) %}
  5. {% extends 'company/base_list.html.twig' %}
  6. {% block search_title %}
  7.     <p class="city-title">{{ city.name }}</p>
  8. {% endblock search_title %}
  9. {% block items_description %}
  10.     <p>{{ 'company_list.items_description'|trans({'%city%': city.name})|raw }}</p>
  11. {% endblock items_description %}
  12. {% block pagination %}
  13.     <div class="toolbar-bottom-container">
  14.         <nav class="pagination-container">
  15.             {% if currentPage > 1 %}
  16.                 <a href="{{ path('city_companies_list', {
  17.                     'page': currentPage - 1,
  18.                     'id': city.id,
  19.                     'slug': city.slug,
  20.                 }) }}" class="p-i-previous"></a>
  21.             {% else %}
  22.                 <span class="p-i-previous p-i-disabled"></span>
  23.             {% endif %}
  24.             <span class="pagination-pages">
  25.                 {% for p in pagination %}
  26.                     {% if p == currentPage %}
  27.                         <span class="pagination-item p-i p-i-disabled">{{ p }}</span>
  28.                     {% elseif p == '...' %}
  29.                         <span class="pagination-item p-i">…</span>
  30.                     {% else %}
  31.                         <a href="{{ path('city_companies_list', {
  32.                             'page': p,
  33.                             'id': city.id,
  34.                             'slug': city.slug,
  35.                         }) }}" class="pagination-item p-i">
  36.                             {{ p }}
  37.                         </a>
  38.                     {% endif %}
  39.                 {% endfor %}
  40.             </span>
  41.             {% if currentPage < pagination|last %}
  42.                 <a href="{{ path('city_companies_list', {
  43.                     'page': currentPage + 1,
  44.                     'id': city.id,
  45.                     'slug': city.slug,
  46.                 }) }}" class="p-i-next"></a>
  47.             {% else %}
  48.                 <span class="p-i-next p-i-disabled"></span>
  49.             {% endif %}
  50.         </nav>
  51.     </div>
  52. {% endblock pagination %}