{# title string #} {# companies \App\CatalogBundle\Entity\Company[] #} {# paginator \Pagerfanta\Pagerfanta #} {# city \Notimeo\VoivodeshipBundle\Entity\PolishCity|null #} {# voivodeship \Notimeo\VoivodeshipBundle\Entity\Voivodeship|null #} {% extends ':default:subpage.html.twig' %} {% import 'macros.twig' as app_macros %} {% block sidebar %} {% include ':blocks:sidebar_sections.html.twig' with { clickable: true } %} {{ catalog_map_block() }} {% if app.request.get('_route') == 'companies_list_city' %} {{ ads_block_catalog('b', null, city) }} {% elseif app.request.get('_route') == 'companies_list_voivo' %} {{ ads_block_catalog('b', voivodeship) }} {{ catalog_cities_for_voivo(voivodeship) }} {% endif %} {% include ':blocks:sidebar_ads_text_block.html.twig' %} {{ sidebar_promoted_companies(3) }} {% include '@Catalog/frontend/blocks/sidebar_top_companies.html.twig' %} {{ sidebar_promoted_classifieds() }} {% include ':blocks:we_recommend.html.twig' %} {% if app.request.get('_route') == 'companies_list_city' %} {{ ads_block_catalog('c1', null, city) }} {% elseif app.request.get('_route') == 'companies_list_voivo' %} {{ ads_block_catalog('c1', voivodeship) }} {% endif %} {% endblock %} {% block subpage_content %} {{ app_macros.search_condition() }}
{% if companies|length > 0 %} {% for key,company in companies %} {% set companyLink = path('company', { section: sections.current.locale.slug, slug: company.user.slug }) %} {% set mainTitle = sections.currentSectionName ~ ' - ' ~ company.user.fullName %}
{% if company.user.image is not empty %} {% set image_src = vich_uploader_asset(company.user, 'imageFile') %} {% else %} {% set image_src = null %} {% endif %} {{- app_macros.image( image_src, 'simple_image', 'img-responsive catalog_list', mainTitle ) -}}

{{- company.user.fullName -}}

{{- company.locale.shortDescription -}}

{{- 'Kontakt' -}}

{% if company.hasActiveSubscription %}
{{- company.user.getAddressBasic.city -}} {% if company.user.getAddressBasic.postalCode is not empty %} {{- ', '~ company.user.getAddressBasic.postalCode -}} {% endif %} {% if company.user.getAddressBasic.street is not empty %}
{{- company.user.getAddressBasic.street -}} {% endif %}
{% if company.user.getAddressBasic.phone is not empty %}
{{- company.user.getAddressBasic.phone -}}
{% endif %} {% else %}
{{- company.user.getAddressBasic.city -}}
{% endif %}
{% if key == 1 %} {% if app.request.get('_route') == 'companies_list_city' %} {{ ads_block_catalog('ad', null, city) }} {% elseif app.request.get('_route') == 'companies_list_voivo' %} {{ ads_block_catalog('ad', voivodeship) }} {% endif %} {% endif %} {% endfor %} {% if companies|length < 2 %} {% if app.request.get('_route') == 'companies_list_city' %} {{ ads_block_catalog('ad', null, city) }} {% elseif app.request.get('_route') == 'companies_list_voivo' %} {{ ads_block_catalog('ad', voivodeship) }} {% endif %} {% endif %} {% include '@Core/frontend/blocks/paginator_numbers.html.twig' with { route_params: { section: app.request.attributes.get('section'), slug: app.request.attributes.get('slug'), } } %} {% else %}
{{- 'Lista firm dla tej kategorii jest pusta.' -}}
{% endif %}
{% endblock %} {% block javascripts %} {{ parent() }} {{ app_macros.google_maps_script() }} {% endblock %} {% block stylesheets %} {% endblock %}