{% extends 'base.html.twig' %}
{% block title %}228Deals Vehicules!{% endblock %}
{% block stylesheets %}
<style>
.form-mobile-vh {
display: none;
}
@media (max-width: 480px) {
.form-mobile-vh {
display: block;
}
.form-common-vh {
display: none;
}
}
</style>
{% endblock %}
{% block body %}
<main class="main">
<div class="page-header breadcrumb-wrap">
<div class="container">
<div class="breadcrumb">
<a href="{{ path('app_home_index') }}" rel="nofollow"><i class="fi-rs-home mr-5"></i>Accueil</a>
{% if searchCategorie is defined and searchCategorie is not null%}
<span> {{ searchCategorie.libelle }} </span>
{% else %}
<span> Vehicules </span>
{% endif %}
</div>
</div>
</div>
<section class="section-padding pb-5">
<div class="container">
<div class="row">
<div class="col-lg-3 d-none d-lg-flex">
<div class=" style-1" style="border-radius: 10px">
{% if pubImages["Z-LF-IMG-VH"] is defined %}
<a href="#" ><img src="{{ asset('uploads/pubs/'~ pubImages["Z-LF-IMG-VH"]) }}" alt="" width="100%" style="height: 350px ; border-radius: 15px"/></a>
{% else %}
<a href="#" >
<img class="default-img" src="{{ asset('assets/imgs/deals/img-14.jpg') }}" width="100%" style="height: 350px ; border-radius: 15px" alt="" />
</a>
{% endif %}
</div>
</div>
<div class="col-lg-9 col-md-12">
<div class="tab-content" id="myTabContent-1">
<div class="tab-pane fade show active" id="tab-one-1" role="tabpanel" aria-labelledby="tab-one-1">
<div class="carausel-4-columns-cover arrow-center position-relative">
<div class="slider-arrow slider-arrow-2 carausel-4-columns-arrow" id="carausel-4-columns-arrows"></div>
<div class="carausel-4-columns carausel-arrow-center" id="carausel-4-columns">
{% for i in lastVh %}
<div class="product-cart-wrap mr-20" style="height: 350px">
<div class="">
<div class="product-img-zoom">
<a href="{{ path('app_vehiculedetailslug',{slug: i.slug} ) }}">
<img class="default-img" src="{{ asset('uploads/vehicules/'~ i.code ~'/'~i.photoImage) }}" width="100%" height="200" alt="" />
</a>
</div>
<div class="product-badges product-badges-position product-badges-mrg">
{% if i.typeoperation == "LOCATION" %}
<span class="hot" style="background: #e1b12c; color: #FFFFFF"> A LOUER </span>
{% else %}
<span class="hot" style="background: #f87171; color: #FFFFFF"> EN VENTE</span>
{% endif %}
</div>
</div>
<div class="product-content-wrap">
<h2><a href="{{ path('app_vehiculedetailslug',{slug: i.slug} ) }}">{{ i.libelle }}</a></h2>
<div class=" d-inline-block">
<i class="fi-rs-location-alt mr-5"></i>{{ i.ville.nom }}
</div>
<div class="product-price mt-10">
{% if i.isNoprice == false %}
<span>{{ i.prix|number_format(0,'.',' ') }} FCFA </span>
{% else %}
<span>Prix à la demande </span>
{% endif %}
</div>
<span class="font-small text-muted">Publié le {{ i.pubDate| date('d/m/Y h:i') }}</span>
</div>
</div>
{% endfor %}
<!--End product Wrap-->
</div>
</div>
</div>
</div>
<!--End tab-content-->
</div>
<!--End Col-lg-9-->
</div>
</div>
</section>
<!--End Best Sales-->
<section class="section-padding pb-5">
<div class="container">
<div class="row">
<div class="col-xl-3 col-lg-3 col-md-3">
<h5 class="section-title style-1 mb-30">Filtre de recherche</h5>
<form method="post" class="form-mobile-vh">
<div class="price-filter mb-20 bg-grey-9 pt-20 pl-10 pr-10" style="border-radius: 10px ; color: #404040">
<div class="price-filter-inner">
<div class="ml-10">
<input class="form-check-input" type="checkbox" name="location" id="location" value="location" />
<label class="form-check-label" for="location"><span>LOCATION</span></label>
<br />
<input class="form-check-input" type="checkbox" name="vente" id="vente" value="vente" />
<label class="form-check-label" for="vente"><span>VENTE</span></label>
<br />
</div>
<div class=" form-group">
<input class="form-control bg-light" name="vh_search" placeholder=" rechercher par mot clé"/>
</div>
<div class="form-row row">
<div class="form-group col-lg-6">
<input placeholder="Prix min" name="pmin" type="number">
</div>
<div class="form-group col-lg-6">
<input placeholder="Prix max" name="pmax" type="number">
</div>
</div>
<hr/>
</div>
</div>
<button class="btn btn-sm btn-default "><i class="fi-rs-filter mr-5"></i> Rechercher</button>
<button class="btn btn-sm btn-outline-secondary ml-15 " style="background: #D6D7D9; color: #006266"><i class="fi-rs-info mr-5"></i> Reinitialiser</button>
</form>
<form method="post" class="form-common-vh">
<div class="price-filter mb-20 bg-grey-9 pt-20 pl-10 pr-10" style="border-radius: 10px ; color: #404040">
<div class="price-filter-inner">
<div class="ml-10">
<input class="form-check-input" type="checkbox" name="location" id="location" value="location" />
<label class="form-check-label" for="location"><span>LOCATION</span></label>
<br />
<input class="form-check-input" type="checkbox" name="vente" id="vente" value="vente" />
<label class="form-check-label" for="vente"><span>VENTE</span></label>
<br />
</div>
<div class=" form-group">
<input class="form-control bg-light" name="vh_search" placeholder=" rechercher par mot clé"/>
</div>
<div class="form-row row">
<div class="form-group col-lg-6">
<input placeholder="Prix min" name="pmin" type="number">
</div>
<div class="form-group col-lg-6">
<input placeholder="Prix max" name="pmax" type="number">
</div>
</div>
<hr/>
<h6>Marques</h6>
<ul class="ml-10 accordion" id="accordionExample">
{% for q in marques %}
<li class="accordion-item">
<input class="form-check-input" type="checkbox" name="marques[]" id="{{ q.code }}" value="{{ q.id }}" />
<label class=" form-check-label" data-bs-toggle="collapse" data-bs-target="#v_{{ q.code }}" aria-expanded="true" aria-controls="v_{{ q.code }}" for="{{ q.code }}"><span>{{ q.libelle | upper }}</span></label>
<div id="v_{{ q.code }}" class="accordion-collapse collapse" aria-labelledby="headingOne" data-bs-parent="#accordionExample">
<div class="accordion-body">
<div class="box shadow-sm p-2">
{% for m in modeles %}
{% if m.marque.id == q.id %}
<input class="form-check-input" type="checkbox" name="modeles[]" id="{{ m.code }}" value="{{ m.id }}" />
<label class="form-check-label" for="{{ m.code }}"><span>{{ m.libelle | upper }}</span></label>
<br />
{% endif %}
{% endfor %}
</div>
</div>
</div>
</li>
{% endfor %}
</ul>
</div>
</div>
<button class="btn btn-sm btn-default "><i class="fi-rs-filter mr-5"></i> Rechercher</button>
<button class="btn btn-sm btn-outline-secondary ml-15 " style="background: #D6D7D9; color: #006266"><i class="fi-rs-info mr-5"></i> Reinitialiser</button>
</form>
</div>
<div class="col-xl-9 col-lg-9 col-md-9 mb-sm-5 mb-md-0 wow animate__animated animate__fadeInUp" data-wow-delay="0">
<h4 class="section-title style-1 mb-30 animated animated">Les Récentes publications</h4>
<div class=" row product-list-small animated animated">
{% for v in vehicules %}
<div class="col-md-4 col-lg-4 col-sm-6 mb-15">
<article class="row align-items-center hover-up mb-5 mr-5 mb-1" style=" ; height: 120px">
<figure class="col-md-4 col-sm-6 mb-0">
{% if v.typeoperation == "LOCATION" %}
<span class=" badge alert-success" style="background: #e1b12c; color: #FFFFFF" >A LOUER </span>
{% else %}
<span class=" badge alert-success" style="background: #f87171; color: #FFFFFF" >A VENDRE </span>
{% endif %}
<a href="{{ path('app_vehiculedetailslug',{slug: v.slug} ) }}">
<img src="{{ asset('uploads/vehicules/'~ v.code ~'/'~v.photoImage) }}" alt="" height="100px" />
</a>
</figure>
<div class="col-md-8 mb-0 col-sm-6 ">
<h6>
<a href="{{ path('app_vehiculedetailslug',{slug: v.slug} ) }}">{{ v.libelle|length > 50 ? v.libelle|slice(0, 50) ~ '...' : v.libelle }}</a>
</h6>
<div class="product-price">
<span>
{% if v.prix > 0%}
{{ v.prix|number_format(0,'.',' ') }} FCFA
{% else %}
Prix à la demande
{% endif %}
</span>
</div>
<div class="d-inline-block">
<span class="font-small text-muted">Publié le {{ v.pubDate| date('d/m/Y h:i') }}</span>
</div>
</div>
</article>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</section>
</main>
{% endblock %}