{% extends 'base_front.html.twig' %}
{% block meta %}
<title>Les prestataires disponibles</title>
<meta name="description" content="Liste des prestataires disponibles pour votre mariage. Recherchez par département et par type de service">
{% endblock %}
{% block body %}
<div class="page-header" style="height: 100%;background: url({{ asset('images/background_presta_hobbiinn.jpg') }}) no-repeat center;background-size: cover">
<div class="container">
<div
class="row">
<!-- page caption -->
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 ">
<div class="page-caption">
<h1 class="page-title shadow">Prestataires</h1>
</div>
</div>
<!-- /.page caption -->
</div>
</div>
<!-- page caption -->
<div class="page-breadcrumb">
<div class="container">
<div class="row">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="{{ path('front_home') }}" class="breadcrumb-link">Accueil</a>
</li>
<li class="breadcrumb-item active text-white" aria-current="page">Tous les prestataires ({{ countCompanies }}
{% if countCompanies > 1 %}prestataires trouvés{% else %}prestataire trouvé
{% endif %})</li>
</ol>
</nav>
</div>
</div>
</div>
<!-- page breadcrumb -->
</div>
<!-- /.page-header -->
<!-- filter-form -->
<div class="filter-form">
<div class="container">
<div class="row">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<form
class="form-row" method="post" action="{{ path('front_company_search') }}" style="justify-content:center">
<!-- venue-type -->
<div class="col-xl-3 col-lg-3 col-md-3 col-sm-12 col-12">
<select class="form-control select2" style="width:100%;padding:5px 14px;height:50px!important" name="department_filter">
<option value="">Département</option>
{% for department in filter_service.getDepartments %}
<option value="{{ department.id }}" {% if app.session.get('department') == department.id %} selected {% endif %}>{{ department.numero }}
-
{{ department.name }}</option>
{% endfor %}
</select>
</div>
<!-- /.venue-type -->
<!-- distance km -->
<div class="col-xl-3 col-lg-3 col-md-3 col-sm-12 col-12">
<select class="wide" name="category_filter">
<option value="">Type de prestation</option>
{% for subCategory in filter_service.getSubcategories %}
<option value="{{ subCategory.id }}" {% if app.session.get('department') == subCategory.id %} selected {% endif %}>{{ subCategory.name }}</option>
{% endfor %}
</select>
</div>
<div
class="col-xl-3 col-lg-3 col-md-3 col-sm-12 col-12">
<!-- select -->
<div class="form-group">
<input id="user_weddingDate" name="date_filter" autocomplete="off" type="text" placeholder="Date souhaitée" class="form-control input-md" value="{{ app.session.get('date_evt') }}" required>
<div class="venue-form-calendar">
<i class="far fa-calendar-alt"></i>
</div>
</div>
</div>
<!-- /.price -->
<div class="col-xl-3 col-lg-3 col-md-3 col-sm-12 col-12 ">
<button class="btn btn-block" type="submit" style="background:#0de8c7 " >Rechercher</button>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- /.filter-form -->
<div class="content">
<div class="container">
<h1 class="d-none">My new carte</h1>
<div class="row containre-all-company">
{% for company in companies %}
{% set mananaProdActive = filter_service.getOtherProductsCompany(company) %}
{# {% if mananaProdActive %} #}
{# {% for produite in company.products %}
{% if produite.isActivated %} #}
<div class="col-xl-4 col-lg-4 col-md-6 col-sm-6 col-12">
<div class="container-block-companies">
<div class="container-slide-image">
{% if company.products is not empty %}
{% for product in filter_service.getOtherProductsCompany(company) %}
{% if product.photos is not empty %}
<img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR')) ~ product.photos.first.url }}" alt="{{ product.name }}" class="img-fluid" style="height: 213px;object-fit: cover; border-radius: .5rem .5rem 0 0;">
{% else %}
<img src="{{ asset('images/vecteezy_vector-gear-logo-design-with-multi-colors-range_6172776.jpg') }}" alt="default image" class="img-fluid" style="height: 213px;object-fit: cover; border-radius: .5rem .5rem 0 0;">
{% endif %}
{% endfor %}
{% else %}
<img src="{{ asset('images/vecteezy_vector-gear-logo-design-with-multi-colors-range_6172776.jpg') }}" alt="default image" class="img-fluid" style="height: 213px;object-fit: cover; border-radius: .5rem .5rem 0 0;">
{% endif %}
</div>
<div class="container-info-presta">
<h2 class="vendor-title">
<a href="{{ path('front_company_single', {'companySlug': company.companySlug, 'id': company.id}) }}" class="title">{{ company.companyName }}</a>
</h2>
<p>
<strong>{{ company.products|length }}</strong>
Service{% if company.products|length > 1 %}s
{% endif %}
</p>
<p class="vendor-address">
{% if company.category is not empty %}
{% for category in company.category %}
<span class="mr-2">{{ category.name }}
{% if not loop.last %},
{% endif %}
</span>
{% endfor %}
{% endif %}
</p>
<p class="vendor-address">{{ company.city }}</p>
<i class="fa fa-star rated"></i>
<strong>
4,9</strong>
Avis
</div>
<a href="{{ path('front_company_single', {'companySlug': company.companySlug, 'id': company.id}) }}" class="title">
<button class="btn btnVoirP" >Voir plus</button>
</a>
<div class="wishlist-sign">
<a href="#" class="btn-wishlist">
<i class="fa fa-heart"></i>
</a>
</div>
</div>
</div>
{# {% endif %}
{% endfor %} #}
{# {% endif %} #}
{% endfor %}
</div>
{# <div class="row d-none">
{% for company in companies %}
<div class="col-xl-4 col-lg-4 col-md-6 col-sm-6 col-12">
<div class="vendor-thumbnail">
<!-- Vendor thumbnail -->
<!-- Vendor img -->
<div class="row ml-0" style="width:100%"> {% for product in filter_service.getOtherProductsCompany(company) %}
<div class="vendor-img zoomimg" style="width:33%;{% if not loop.index %}border-left:2px solid white{% endif %}">
<a href="{{ path('front_product_single', {'slug': product.subCategories[0].categories[0].slug, 'subCategorySlug': product.subCategories[0].subCategorySlug, 'product_id': product.id, 'productSlug': product.productSlug}) }}">
{% if product.photos is not empty %}<img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR')) ~ product.photos.first.url }}" alt="{{ product.name }}" class="img-fluid" style="height: 113px;object-fit: cover;">
{% endif %}
</a>
</div>
{% endfor %}
</div>
<!-- /.Vendor img -->
<div
class="vendor-content">
<!-- Vendor Content -->
<h2 class="vendor-title">
<a href="{{ path('front_company_single', {'companySlug': company.companySlug, 'id': company.id}) }}" class="title">{{ company.companyName }}</a>
</h2>
<p class="vendor-address">
{% if company.category is not empty %}
{% for category in company.category %}
<span class="mr-2">{{ category.name }}
{% if not loop.last %},
{% endif %}
</span>
{% endfor %}
{% endif %}
</p>
<p class="vendor-address">{{ company.city }}</p>
</div>
<div class="vendor-meta">
<div class="vendor-meta-item vendor-meta-item-bordered">
<span class="vendor-price">
{{ company.products|length }}
</span>
<span class="vendor-text">Service
{% if company.products|length > 1 %}s
{% endif %}
</span>
</div>
<div class="vendor-meta-item vendor-meta-item-bordered">
<span class="vendor-guest"></span>
<span class="vendor-text"></span>
</div>
<div class="vendor-meta-item vendor-meta-item-bordered">
<span class="rating-star">
<i class="fa fa-star rated"></i>
<i class="fa fa-star rated"></i>
<i class="fa fa-star rated"></i>
<i class="fa fa-star rated"></i>
<i class="fa fa-star rate-mute"></i>
</span>
<span class="rating-count vendor-text">(20)</span>
</div>
</div>
<!-- /.Vendor Content -->
</div>
<!-- /.Vendor thumbnail -->
</div>
{% endfor %}
</div> #}
<div class="pagination mt-5">
<nav aria-label="Page navigation example">
{{ knp_pagination_render(companies) }}
</nav>
</div>
</div>
</div>
{% endblock %}