{% extends 'base.html.twig' %}
{% block title %}Bienvenue {% 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>
<span></span> {{ boutique.nom}}
</div>
</div>
</div>
<section>
<div class="row mt-20 ml-5">
<div class="col-lg-3 col-md-4 col-6 col-sm-6">
<div class="vendor-wrap style-2 mb-40">
<div class="product-badges product-badges-position product-badges-mrg">
</div>
<div class="vendor-img-action-wrap">
<div class="vendor-img">
<a href="#">
{% if boutique.logo != null %}
<img class="default-img" src="{{ asset('uploads/boutiques/'~ boutique.logo ) }}" alt="" />
{% else %}
<img class="default-img" src="assets/imgs/deals/shop.jpg" alt="" />
{% endif %}
</a>
</div>
<div class="mt-5 ">
<h4 class="mb-5"><a href="{{ path('app_home_boutique',{id: boutique.id} ) }}">{{boutique.nom}}</a></h4>
</div>
</div>
<div class="vendor-content-wrap">
<div class="mb-30">
<div class="product-category">
<span class="text-muted"></span>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-6 mt-50 ">
<div class="sidebar-widget-2 widget_search mb-50">
<div class="search-form">
<form action="#" method="POST">
<input type="text" name="searchText" placeholder="rechercher dans cette boutique ou agence.." />
<button type="submit" style="background-color: #006266; color: #FFFFFF;"><i class="fi-rs-search"></i></button>
</form>
</div>
</div>
</div>
</div>
</section>
{% if immeubles is not empty %}
<section class="section-padding pb-5">
<div class="container">
<div class="row">
<div class="col-xl-12 col-lg-12 mt-5 col-md-12 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">Récentes publications d'immeubles</h4>
<div class=" row product-list-small animated animated">
{% for immeuble in immeubles %}
<div class="col-md-3 col-lg-3 col-sm-1 mb-2 ">
<article class="row align-items-center hover-up mr-5 mb-1" style=" ; height: 120px">
<figure class="col-md-4 col-sm-6 mb-0">
{% if immeuble.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_immeubledetailslug',{slug: immeuble.slug} ) }}">
<img src="{{ asset('uploads/immeubles/'~ immeuble.code ~'/'~immeuble.photo) }}" alt="" />
</a>
</figure>
<div class="col-md-8 mb-0 col-sm-6 ">
<h6>
<a href="{{ path('app_immeubledetailslug',{slug: immeuble.slug} ) }}">{{ immeuble.libelle|length > 50 ? immeuble.libelle|slice(0, 50) ~ '...' : immeuble.libelle }}</a>
</h6>
<div class=" d-inline-block">
<i class="fi-rs-location-alt mr-5"></i>{{ immeuble.ville.nom }}
{% if immeuble.quartier is not null %}
- {{ immeuble.quartier.nom }}
{% endif %}
</div>
<div class="product-price">
<span>
{% if immeuble.prix > 0%}
{{ immeuble.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 {{ immeuble.pubDate| date('d/m/Y h:i') }}</span>
</div>
</div>
</article>
</div>
{% endfor %}
{% if immeubles is not null %}
<div class="pagination-area mt-20 mb-5">
{{ knp_pagination_render(immeubles, 'paginator.html.twig') }}
</div>
{% endif %}
</div>
</div>
</div>
</div>
</section>
{% endif %}
{% if articles is not empty %}
<section class="section-padding mb-5">
<div class="container">
<div class="row">
<div class="col-xl-12 col-lg-12 col-md-6 mb-sm-5 mb-md-0 wow animate__animated animate__fadeInUp" data-wow-delay="0">
<h4 class="section-title style-1 mb-10 animated animated">Récentes articles</h4>
<div class=" row product-list-small animated animated">
{% for article in articles %}
<div class="col-md-6 col-lg-3 mb-2 articles">
<article class="row align-items-center hover-up mr-5 mb-1" style="height: 120px">
<figure class="col-md-4 col-sm-6 mb-0">
{% if article.ispromo == true %}
<span class=" badge alert-success" style="background: #e1b12c; color: #FFFFFF" >PROMO </span>
{% endif %}
{% if article.IsSolde == true %}
<span class=" badge alert-success" style="background: #f87171; color: #FFFFFF" >Jusqu'à -{{ article.soldePourcentage}}% </span>
{% endif %}
<a href="{{ path('app_home_detail',{slug: article.slug} ) }}">
<img src="{{ asset('uploads/articles/'~ article.code ~'/'~article.imageprincipale) }}" alt="" />
</a>
</figure>
<div class="col-md-8 mb-0 col-sm-6 ">
<h6>
<a href="{{ path('app_home_detail',{slug: article.slug} ) }}">{{ article.libelle|length > 50 ? article.libelle|slice(0, 50) ~ '...' : article.libelle }}</a>
</h6>
<div class="product-price">
{% if article.ispromo==true %}
{% if article.isNoprice == true %}
<span>Prix à la demande</span>
{% else %}
<span>{{ article.prixpromo|number_format(0,'.',' ') }} FCFA</span>
<span class="old-price">{{ article.prix|number_format(0,'.',' ') }} FCFA</span>
{% endif %}
{% elseif article.IsSolde == true %}
{% if article.isNoprice == true %}
<span>Prix à la demande</span>
{% else %}
<span>{{ article.prix|number_format(0,'.',' ') }} FCFA</span>
{% endif %}
{% else %}
<span>
{% if article.prix > 0%}
{{ article.prix|number_format(0,'.',' ') }} FCFA
{% else %}
Prix à la demande
{% endif %}
</span>
{% endif %}
</div>
<div class="d-inline-block">
<span class="font-small text-muted">Publié le {{ article.pubDate| date('d/m/Y h:i') }}</span>
</div>
</div>
</article>
</div>
{% endfor %}
<div class="pagination-area mt-10 mb-5">
{{ knp_pagination_render(articles, 'paginator.html.twig') }}
</div>
</div>
</div>
</div>
</div>
</section>
{% endif %}
{% if vehicules is not empty %}
<section class="section-padding pb-5 mb-40">
<div class="container">
<div class="row">
<div class="col-xl-12 col-lg-12 col-md-12 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 de vehicules</h4>
<div class=" row product-list-small animated animated">
{% for v in vehicules %}
<div class="col-md-3 col-lg-3 col-sm-6 mb-2 ">
<article class="row align-items-center hover-up 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="" />
</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>
{% endif %}
</main>
{% endblock %}