templates/vehicule/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}228Deals Vehicules!{% endblock %}
  3. {% block stylesheets %}
  4.     <style>
  5.     .form-mobile-vh {
  6.             display: none;
  7.         }
  8.     @media (max-width: 480px) {
  9.       .form-mobile-vh {
  10.         display: block;
  11.     }
  12.       .form-common-vh {
  13.         display: none;
  14.     }
  15.     
  16. }
  17.     </style>
  18. {% endblock %}
  19. {% block body %}
  20.     <main class="main">
  21.         <div class="page-header breadcrumb-wrap">
  22.             <div class="container">
  23.                 <div class="breadcrumb">
  24.                     <a href="{{ path('app_home_index') }}" rel="nofollow"><i class="fi-rs-home mr-5"></i>Accueil</a>
  25.                     {% if searchCategorie is defined and searchCategorie is not null%}
  26.                         <span> {{ searchCategorie.libelle }} </span>
  27.                     {% else %}
  28.                     <span> Vehicules </span>
  29.                     {% endif %}
  30.                 </div>
  31.             </div>
  32.         </div>
  33.         <section class="section-padding pb-5">
  34.             <div class="container">
  35.                 <div class="row">
  36.                     <div class="col-lg-3 d-none d-lg-flex">
  37.                         <div class=" style-1" style="border-radius: 10px">
  38.                             {% if pubImages["Z-LF-IMG-VH"] is defined %}
  39.                                 <a href="#" ><img src="{{ asset('uploads/pubs/'~ pubImages["Z-LF-IMG-VH"]) }}"  alt=""   width="100%"  style="height: 350px ; border-radius: 15px"/></a>
  40.                             {% else %}
  41.                                 <a href="#" >
  42.                                     <img class="default-img" src="{{ asset('assets/imgs/deals/img-14.jpg') }}" width="100%"  style="height: 350px ; border-radius: 15px" alt="" />
  43.                                 </a>
  44.                             {% endif %}
  45.                         </div>
  46.                     </div>
  47.                     <div class="col-lg-9 col-md-12">
  48.                         <div class="tab-content" id="myTabContent-1">
  49.                             <div class="tab-pane fade show active" id="tab-one-1" role="tabpanel" aria-labelledby="tab-one-1">
  50.                                 <div class="carausel-4-columns-cover arrow-center position-relative">
  51.                                     <div class="slider-arrow slider-arrow-2 carausel-4-columns-arrow" id="carausel-4-columns-arrows"></div>
  52.                                     <div class="carausel-4-columns carausel-arrow-center" id="carausel-4-columns">
  53.                                         {% for i in lastVh %}
  54.                                             <div class="product-cart-wrap mr-20" style="height: 350px">
  55.                                                 <div class="">
  56.                                                     <div class="product-img-zoom">
  57.                                                         <a href="{{ path('app_vehiculedetailslug',{slug: i.slug} ) }}">
  58.                                                             <img class="default-img" src="{{ asset('uploads/vehicules/'~ i.code ~'/'~i.photoImage) }}" width="100%" height="200" alt="" />
  59.                                                         </a>
  60.                                                     </div>
  61.                                                     <div class="product-badges product-badges-position product-badges-mrg">
  62.                                                         {% if i.typeoperation == "LOCATION" %}
  63.                                                             <span class="hot" style="background: #e1b12c; color: #FFFFFF">    A LOUER </span>
  64.                                                         {%  else %}
  65.                                                             <span class="hot" style="background: #f87171; color: #FFFFFF"> EN VENTE</span>
  66.                                                         {%  endif %}
  67.                                                     </div>
  68.                                                 </div>
  69.                                                 <div class="product-content-wrap">
  70.                                                     <h2><a href="{{ path('app_vehiculedetailslug',{slug: i.slug} ) }}">{{ i.libelle }}</a></h2>
  71.                                                     <div class=" d-inline-block">
  72.                                                         <i class="fi-rs-location-alt mr-5"></i>{{ i.ville.nom }}
  73.                                                     </div>
  74.                                                     <div class="product-price mt-10">
  75.                                                         {% if i.isNoprice == false %}
  76.                                                             <span>{{ i.prix|number_format(0,'.',' ') }} FCFA </span>
  77.                                                         {% else %}
  78.                                                             <span>Prix à la demande </span>
  79.                                                         {% endif %}
  80.                                                     </div>
  81.                                                     <span class="font-small text-muted">Publié le {{ i.pubDate| date('d/m/Y h:i') }}</span>
  82.                                                 </div>
  83.                                             </div>
  84.                                         {% endfor %}
  85.                                         <!--End product Wrap-->
  86.                                     </div>
  87.                                 </div>
  88.                             </div>
  89.                         </div>
  90.                         <!--End tab-content-->
  91.                     </div>
  92.                     <!--End Col-lg-9-->
  93.                 </div>
  94.             </div>
  95.         </section>
  96.         <!--End Best Sales-->
  97.         <section class="section-padding pb-5">
  98.             <div class="container">
  99.                 <div class="row">
  100.                     <div class="col-xl-3 col-lg-3 col-md-3">
  101.                         <h5 class="section-title style-1 mb-30">Filtre de recherche</h5>
  102.                         <form method="post" class="form-mobile-vh">
  103.                             <div class="price-filter mb-20 bg-grey-9 pt-20 pl-10 pr-10" style="border-radius: 10px ; color: #404040">
  104.                                 <div class="price-filter-inner">
  105.                                     <div class="ml-10">
  106.                                                 <input class="form-check-input" type="checkbox" name="location" id="location" value="location" />
  107.                                                 <label class="form-check-label" for="location"><span>LOCATION</span></label>
  108.                                                 <br />
  109.                                         <input class="form-check-input" type="checkbox" name="vente" id="vente" value="vente" />
  110.                                         <label class="form-check-label" for="vente"><span>VENTE</span></label>
  111.                                         <br />
  112.                                     </div>
  113.                                     <div class=" form-group">
  114.                                         <input class="form-control bg-light" name="vh_search" placeholder=" rechercher par mot clé"/>
  115.                                     </div>
  116.                                     <div class="form-row row">
  117.                                         <div class="form-group col-lg-6">
  118.                                             <input  placeholder="Prix min" name="pmin" type="number">
  119.                                         </div>
  120.                                         <div class="form-group col-lg-6">
  121.                                             <input  placeholder="Prix max" name="pmax" type="number">
  122.                                         </div>
  123.                                     </div>
  124.                                     <hr/>
  125.                                 </div>
  126.                             </div>
  127.                             <button class="btn btn-sm btn-default "><i class="fi-rs-filter mr-5"></i> Rechercher</button>
  128.                             <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>
  129.                         </form>
  130.                         <form method="post" class="form-common-vh">
  131.                             <div class="price-filter mb-20 bg-grey-9 pt-20 pl-10 pr-10" style="border-radius: 10px ; color: #404040">
  132.                                 <div class="price-filter-inner">
  133.                                     <div class="ml-10">
  134.                                                 <input class="form-check-input" type="checkbox" name="location" id="location" value="location" />
  135.                                                 <label class="form-check-label" for="location"><span>LOCATION</span></label>
  136.                                                 <br />
  137.                                         <input class="form-check-input" type="checkbox" name="vente" id="vente" value="vente" />
  138.                                         <label class="form-check-label" for="vente"><span>VENTE</span></label>
  139.                                         <br />
  140.                                     </div>
  141.                                     <div class=" form-group">
  142.                                         <input class="form-control bg-light" name="vh_search" placeholder=" rechercher par mot clé"/>
  143.                                     </div>
  144.                                     <div class="form-row row">
  145.                                         <div class="form-group col-lg-6">
  146.                                             <input  placeholder="Prix min" name="pmin" type="number">
  147.                                         </div>
  148.                                         <div class="form-group col-lg-6">
  149.                                             <input  placeholder="Prix max" name="pmax" type="number">
  150.                                         </div>
  151.                                     </div>
  152.                                     <hr/>
  153.                                 
  154.                                    
  155.                                     <h6>Marques</h6>
  156.                                     <ul class="ml-10 accordion" id="accordionExample">
  157.                                         {% for q in marques %}
  158.                                             <li class="accordion-item">
  159.                                                 <input class="form-check-input" type="checkbox" name="marques[]" id="{{ q.code }}"  value="{{ q.id }}" />
  160.                                                 <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>
  161.                                                 <div id="v_{{ q.code }}" class="accordion-collapse collapse" aria-labelledby="headingOne" data-bs-parent="#accordionExample">
  162.                                                     <div class="accordion-body">
  163.                                                         <div class="box shadow-sm p-2">
  164.                                                             {% for m in modeles %}
  165.                                                                 {% if m.marque.id == q.id %}
  166.                                                                     <input class="form-check-input" type="checkbox" name="modeles[]" id="{{ m.code }}" value="{{ m.id }}" />
  167.                                                                     <label class="form-check-label" for="{{ m.code }}"><span>{{ m.libelle | upper }}</span></label>
  168.                                                                     <br />
  169.                                                                 {% endif %}
  170.                                                             {% endfor %}
  171.                                                         </div>
  172.                                                     </div>
  173.                                                 </div>
  174.                                             </li>
  175.                                         {% endfor %}
  176.                                     </ul>
  177.                                 </div>
  178.                             </div>
  179.                             <button class="btn btn-sm btn-default "><i class="fi-rs-filter mr-5"></i> Rechercher</button>
  180.                             <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>
  181.                         </form>
  182.                     </div>
  183.                     <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">
  184.                         <h4 class="section-title style-1 mb-30 animated animated">Les Récentes  publications</h4>
  185.                         <div class=" row product-list-small animated animated">
  186.                             {% for v in   vehicules  %}
  187.                                 <div class="col-md-4 col-lg-4 col-sm-6  mb-15">
  188.                                     <article class="row align-items-center hover-up mb-5 mr-5 mb-1" style=" ; height: 120px">
  189.                                         <figure class="col-md-4  col-sm-6 mb-0">
  190.                                             {% if v.typeoperation == "LOCATION" %}
  191.                                                 <span class=" badge alert-success"  style="background: #e1b12c; color: #FFFFFF" >A LOUER </span>
  192.                                             {% else  %}
  193.                                                 <span class=" badge alert-success"  style="background: #f87171; color: #FFFFFF" >A VENDRE </span>
  194.                                             {% endif %}
  195.                                             <a href="{{ path('app_vehiculedetailslug',{slug: v.slug} ) }}">
  196.                                                 <img src="{{ asset('uploads/vehicules/'~ v.code ~'/'~v.photoImage) }}" alt="" height="100px" />
  197.                                             </a>
  198.                                         </figure>
  199.                                         <div class="col-md-8 mb-0 col-sm-6 ">
  200.                                             <h6>
  201.                                                 <a href="{{ path('app_vehiculedetailslug',{slug: v.slug} ) }}">{{ v.libelle|length > 50 ?  v.libelle|slice(0, 50) ~ '...' : v.libelle  }}</a>
  202.                                             </h6>
  203.                                             <div class="product-price">
  204.                                                     <span>
  205.                                                 {% if v.prix > 0%}
  206.                                                     {{ v.prix|number_format(0,'.',' ') }} FCFA
  207.                                                 {% else %}
  208.                                                     Prix à la demande
  209.                                                 {% endif %}
  210.                                             </span>
  211.                                             </div>
  212.                                             <div class="d-inline-block">
  213.                                                 <span class="font-small text-muted">Publié le {{ v.pubDate| date('d/m/Y h:i') }}</span>
  214.                                             </div>
  215.                                         </div>
  216.                                     </article>
  217.                                     
  218.                                 </div>
  219.                             {% endfor %}
  220.                         </div>
  221.                     </div>
  222.                 </div>
  223.             </div>
  224.         </section>
  225.     </main>
  226. {% endblock %}