templates/property-detail.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Détails - {{ property.reference }}{% endblock %}
  3. {% block metaDescription %}
  4.     <meta name="description" content="
  5.     {% if property.reference is defined %}
  6.         {{ property.reference }}
  7.     {% else %}
  8.          Tracol Immobilier propose une large offre en immobilier neuf (logements, bureaux, commerces), qui se caractérise par une architecture résolument contemporaine, des matériaux de qualité, et le soin apporté à chaque détail.
  9.     {% endif %}
  10.     ">
  11. {% endblock %}
  12. {% block body %}
  13.     <style>
  14.         .d-block {
  15.             background-size:cover;
  16.         }
  17.     </style>
  18.     {#<header  class="header-habiter slider-home slider-not-home who-is bottom-right-border position-relative to-right overflow-hidden">
  19.         <div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
  20.             <div class="carousel-inner">
  21.                 {% for picture in property.pictures %}
  22.                     <div class="carousel-item {% if loop.first %}active{% endif %}">
  23.                         <div class="d-block w-100" style="background: url({{ picture.url }})no-repeat center;"></div>
  24.                     </div>
  25.                 {% endfor %}
  26.             </div>
  27.             <a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
  28.                 <span class="carousel-control-prev-icon" aria-hidden="true"></span>
  29.                 <span class="sr-only">Previous</span>
  30.             </a>
  31.             <a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
  32.                 <span class="carousel-control-next-icon" aria-hidden="true"></span>
  33.                 <span class="sr-only">Next</span>
  34.             </a>
  35.         </div>
  36.     </header>#}
  37.     <section id="property-carousel">
  38.         <div class="col-lg-8 mx-auto">
  39.             {% if property.pictures|length == 1 %}
  40.                 {% for picture in property.pictures %}
  41.                 {% set url = 'http' in picture.url ? picture.url : asset('uploads/images/properties/'~property.id~'/'~picture.url) %}
  42.                 <div class="image-detail huge"><img src="{{ url }}" class="lightboxed" rel="property"></div>
  43.                 {% endfor %}
  44.             {% elseif property.pictures|length == 2 or property.pictures|length == 4 %}
  45.                 {% for picture in property.pictures %}
  46.                 {% set url = 'http' in picture.url ? picture.url : asset('uploads/images/properties/'~property.id~'/'~picture.url) %}
  47.                 <div class="image-detail half"><img src="{{ url }}" class="lightboxed" rel="property"></div>
  48.                 {% endfor %}
  49.             {% else %}
  50.                 {% for picture in property.pictures %}
  51.                 {% set url = 'http' in picture.url ? picture.url : asset('uploads/images/properties/'~property.id~'/'~picture.url) %}
  52.                 <div class="image-detail {% if loop.index > 1 and loop.index < 4 %}medium{% endif %}{% if loop.index > 3 and loop.index < 9 %}small{% endif %}{% if loop.index > 8 %}none{% endif %}"><img src="{{ url }}" class="lightboxed" rel="property"></div>
  53.                 {% endfor %}
  54.             {% endif %}
  55.         </div>
  56.     </section>
  57.     {#<div class="jquery-carousel-wrapper">
  58.         <div data-jcarousel="true" data-wrap="circular" class="jquery-carousel">
  59.             <ul>
  60.                 {% for picture in property.pictures %}
  61.                     <li><img src="{{ picture.url }}" width="600" height="400" alt=""></li>
  62.                 {% endfor %}
  63.             </ul>
  64.         </div>
  65.         <a data-jcarousel-control="true" data-target="-=1" href="#" class="carousel-control-prev">&lsaquo;</a> 
  66.         <a data-jcarousel-control="true" data-target="+=1" href="#" class="carousel-control-next">&rsaquo;</a> 
  67.     </div>#}
  68.     {#
  69.     <header class="header-habiter slider-home slider-not-home who-is bottom-right-border position-relative overflow-hidden to-right lightbox-on"
  70.     id="sliderHeader"
  71.     style="background: url({{property.pictures[0].url}}) center center no-repeat;background-size:cover; position: relative; height: 91vh; cursor: zoom-in;"
  72.     data-id="modul-ref">
  73.         <div class="container-fluid" style="padding: 0">
  74.             <div class="col-lg-4 mx-auto" style="display: none;">
  75.                 <div class="arrows-slides" style="display: flex; justify-content: space-between; margin-top: 20px; align-items: center; position: absolute">
  76.                     <div class="arrow-right" id="slideNextHeader"><a><i class="fas fa-arrow-left"></i></a></div>
  77.                     <div><span class="current-figure">01</span><span class="bar-figure">/</span><span class="last-figure">{{ property.pictures|length <= 9 ? '0' ~ property.pictures|length : property.pictures|length }}</span></div>
  78.                     <div class="arrow-left" id="slidePreviousHeader"><a><i class="fas fa-arrow-right"></i></a></div>
  79.                 </div>
  80.             </div>
  81.             {#
  82.             <div class="col-lg-12 property-detail-header" style="display: flex; position: absolute; bottom: 0px;">
  83.                <div class="col-lg-2 container-properties-header first"></div>
  84.                <div class="col-lg-5 container-properties-header" style="display: flex; align-items: center">
  85.                    <div class="col-lg-3">
  86.                        <p class="properties-city" >{{ property.city.name }}</p>
  87.                    </div>
  88.                    <div class="col-lg-3">
  89.                        <p class="properties-area" style="text-align: center">{{ property.area.value == null ? '' : property.area.value ~ areaConversion(property.area.unit) }} </p>
  90.                    </div>
  91.                    <div class="col-lg-3">
  92.                        <p class="properties-reference-detail">{{ property.reference }}</p>
  93.                    </div>
  94.                </div>
  95.                <div class="col-lg-1 price-detail-bien" style="background-color: #c48300; display: flex; align-items: center; justify-content: center">
  96.                    <p class="properties-price">
  97.                        {{ property.price.value == null ? '<span style="font-size: 14px !important;">sur demande</span>' : property.price.value ~  property.price.currency|number_format(2, '.', ',')|replace({"EUR": " €"})  }}
  98.                    </p>
  99.                </div>
  100.            </div>
  101.     </div>
  102.     <div class="sticky-text">Cliquer ici<br/>pour voir toutes les photos</div>
  103.     {% if property.pictures is not empty %}
  104.         <div class="lightbox" id="modul-ref">
  105.             <div class="closer"></div>
  106.             <div class="arrows left">&#8592;</div>
  107.             <div class="arrows right">&#8594;</div>
  108.             <div class="counter">1/1</div>
  109.             <ul class="items">
  110.                 {% for picture in property.pictures %}
  111.                     <li class="item">
  112.                         <img class="img" src="{{ picture.url }}">
  113.                     </li>
  114.                 {% endfor %}
  115.             </ul>
  116.         </div>
  117.     {% endif %}
  118.     {% if property.pictures is not empty %}
  119.         {% for picture in property.pictures %}
  120.             <div class="lightbox" id="modul-ref-{{ loop.index }}">
  121.                 <div class="closer"></div>
  122.                 <ul class="items">
  123.                     <li class="item">
  124.                         <img class="img" src="{{ picture.url }}">
  125.                     </li>
  126.                 </ul>
  127.             </div>
  128.         {% endfor %}
  129.     {% endif %}
  130.     </header>
  131.     #}
  132.     {#
  133.     <div class="col-lg-1 infos-person" style="display: flex; position: fixed; right: 274px;">
  134.         <div class="col-lg-12">
  135.             {% if property.user.picture is null %}
  136.                 <img id="img-card" src="{{ asset('build/367e841db1c2c356ba01f78a108a59cb0c18ade2.png') }}">
  137.             {% else %}
  138.                 <img id="img-card" width="161px" height="161px" src="{{ property.user.picture }}">
  139.             {% endif %}
  140.         </div>
  141.     </div>
  142.     #}
  143.     {#
  144.     <div class="col-lg-1 infos-person" style="position: fixed; width: 265px; display: flex; flex-direction: column">
  145.        <div class="col-lg-12 more-informations">
  146.            <p class="p-info-property">Pour plus d’informations concernant ce bien</p>
  147.            <p class="p-first-property">{{ property.user.firstname }}
  148.                {{ property.user.lastname }}
  149.        </div>
  150.        <div style="display: flex">
  151.            <div class="col-lg-2 p-mail-property">
  152.                <a href="mailto:{{ property.user.email }}">
  153.                    <svg id="SVGMail" width="41" height="34" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:avocode="https://avocode.com/" viewBox="0 0 41 34"><defs></defs><desc>Generated with Avocode.</desc><g><g><title>np_mail_91_000000</title><path d="M30.21872,22.58808l-6.13407,-5.78542l6.13407,-5.23238zM12.25999,22.93334l5.93459,-5.59678l2.63204,2.24505l2.63204,-2.24505l5.93459,5.59678zM11.4345,11.57018l6.13407,5.23239l-6.13407,5.78541zM29.54963,11.06668l-8.72302,7.44143l-8.72221,-7.44143zM10.6178,10.24829v13.50346h20.41763v-13.50346z" fill="#ffffff" fill-opacity="1"></path><path d="M30.21872,22.58808l-6.13407,-5.78542l6.13407,-5.23238zM12.25999,22.93334l5.93459,-5.59678l2.63204,2.24505l2.63204,-2.24505l5.93459,5.59678zM11.4345,11.57018l6.13407,5.23239l-6.13407,5.78541zM29.54963,11.06668l-8.72302,7.44143l-8.72221,-7.44143zM10.6178,10.24829v13.50346h20.41763v-13.50346z" fill-opacity="0" fill="#ffffff" stroke-dashoffset="0" stroke-linejoin="miter" stroke-linecap="butt" stroke-opacity="1" stroke="#ffffff" stroke-miterlimit="20" stroke-width="1"></path></g></g></svg>
  154.                </a>
  155.            </div>
  156.            <div class="col-lg-10 p-phone-property">
  157.                <a href="tel:{{ property.user.phone }}">
  158.                    <?xml version="1.0" encoding="UTF-8"?>
  159.                    <svg id="SVGPhone" width="28" height="24" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:avocode="https://avocode.com/" viewBox="0 0 28 24"><defs></defs><desc>Generated with Avocode.</desc><g><g><title>Tracé 116</title><path d="M6.29423,1.97623l1.55604,5.45095l-1.79468,1.83287l0.32457,0.62049c1.80183,3.46169 4.62861,6.28247 8.09518,8.07624l0.50593,0.25775l2.72065,-1.82334l4.58217,1.54648v4.08578c-5.2362,-0.22434 -10.19412,-2.41279 -13.8898,-6.12851c-3.73264,-3.69781 -5.93178,-8.66917 -6.15722,-13.9182zM23.23881,23.93248h0.95462v-1.90924h2.86386v-1.90924h-2.86386v-3.55119l-6.82561,-2.27199l-2.55838,1.70879c-2.68607,-1.50592 -4.91392,-3.7134 -6.44376,-6.38633l1.63241,-1.63242l-2.272,-7.91372h-7.39838v0.95462c-0.03222,6.08574 2.37461,11.93046 6.68234,16.22854c4.29808,4.30786 10.1428,6.71442 16.22854,6.68234z" fill="#ffffff" fill-opacity="1"></path></g></g></svg>
  160.                    {{ property.user.phone }}
  161.                </a>
  162.            </div>
  163.        </div>
  164.    </div>
  165.     #}
  166.     <section class="items-property-single mt-5 mb-5 pb-5">
  167.         <div class="row col-lg-8 mx-auto justify-content-center g-0">
  168.             {% if property.type and getTypeProperty(property.type) %}
  169.                 <div class="item-single">
  170.                     {# <img src="{{ asset('img/icons/surface.svg') }}" alt="Icone surface"> #}
  171.                     <span style="font-weight: bold;color:#F6A400;">{{ getTypeProperty(property.type) }}</span>
  172.                 </div>
  173.                 {% if property.construction.construction_year or property.available_at or property.bedrooms or property.area.value %}
  174.                         <div style="width:4px;height:25px;background:#5f5f5f"></div>
  175.                 {% endif %}
  176.             {% endif %}
  177.             {% if property.area.value %}
  178.                 <div class="item-single">
  179.                     {# <img src="{{ asset('img/icons/surface.svg') }}" alt="Icone surface"> #}
  180.                     <span>{{ property.area.value == null ? '' : property.area.value ~ areaConversion(property.area.unit) }}</span>
  181.                 </div>
  182.                 {% if property.construction.construction_year or property.available_at or property.bedrooms %}
  183.                         <div style="width:4px;height:25px;background:#5f5f5f"></div>
  184.                 {% endif %}
  185.             {% endif %}
  186.             {% if property.bedrooms %}
  187.                 <div class="item-single">
  188.                     {# <img src="{{ asset('img/icons/chambre.svg') }}" alt="Icone chambre"> #}
  189.                     <span>{{ property.bedrooms }} chambre{% if property.bedrooms > 1 %}s{% endif %}</span>
  190.                 </div>
  191.                 {% if property.construction.construction_year or property.available_at %}
  192.                         <div style="width:4px;height:25px;background:#5f5f5f"></div>
  193.                 {% endif %}
  194.             {% endif %}
  195.             {% for area in property.areas %}
  196.                 {% if area.type == 13 %}
  197.                     <div class="item-single">
  198.                         {# <img src="{{ asset('img/icons/salle_bain.svg') }}" alt="Icone salle de bain"> #}
  199.                         <span>{{ area.number }} {{ propertyArea(area.type) }}</span>
  200.                     </div>
  201.                         <div style="width:4px;height:25px;background:#5f5f5f"></div>
  202.                 {% endif %}
  203.             {% endfor %}
  204.             {% for area in property.areas %}
  205.                 {% if area.type == 4 %}
  206.                     <div class="item-single">
  207.                         {# <img src="{{ asset('img/icons/garage.svg') }}" alt="Icone garage"> #}
  208.                         <span>{{ area.number }} {{ propertyArea(area.type) }}</span>
  209.                     </div>
  210.                         <div style="width:4px;height:25px;background:#5f5f5f"></div>
  211.                 {% endif %}
  212.             {% endfor %}
  213.             {% for area in property.areas %}
  214.                 {% if area.type == 74 or area.type == 75 %}
  215.                     <div class="item-single">
  216.                         {# <img src="{{ asset('img/icons/parking.svg') }}" alt="Icone parking"> #}
  217.                         <span>{{ area.number }} {{ propertyArea(area.type) }}</span>
  218.                     </div>
  219.                         <div style="width:4px;height:25px;background:#5f5f5f"></div>
  220.                 {% endif %}
  221.             {% endfor %}
  222.             {% for area in property.areas %}
  223.                 {% if area.type == 18 %}
  224.                     <div class="item-single">
  225.                         {# <img src="{{ asset('img/icons/terasse.svg') }}" alt="Icone terasse"> #}
  226.                         <span>{{ area.number }} {{ propertyArea(area.type) }}</span>
  227.                     </div>
  228.                         <div style="width:4px;height:25px;background:#5f5f5f"></div>
  229.                 {% endif %}
  230.             {% endfor %}
  231.             {% if property.construction.construction_year %}
  232.                 <div class="item-single">
  233.                     {# <img src="{{ asset('img/icons/construction.svg') }}" alt="Icone date construction"> #}
  234.                     <span>Construction : {{ property.construction.construction_year }}</span>
  235.                 </div>
  236.                 {% if property.available_at %}
  237.                         <div style="width:4px;height:25px;background:#5f5f5f"></div>
  238.                 {% endif %}
  239.             {% endif %}
  240.             {% if property.available_at %}
  241.                 <div class="item-single availability">
  242.                     {# <img src="{{ asset('img/icons/dispo.svg') }}" alt="Icone disponibilité"> #}
  243.                     <span>Disponibilité {{ property.available_at == null ? '-' : property.available_at}}</span>
  244.                 </div>
  245.             {% endif %}
  246.         </div>
  247.     </section>
  248.     <section class="desc-property mt-5">
  249.         <div class="col-lg-8 mx-auto" style="overflow: hidden">
  250.             <div class="row reverse-mobil">
  251.                 <div class="col-md-4">
  252.                     <div class="col-lg-12 mt-4" style="display: flex;flex-direction: column;margin:0 10px;">
  253.                         <svg xmlns="http://www.w3.org/2000/svg" width="9.089" height="14.77" viewBox="0 0 9.089 14.77">
  254.                             <path id="Tracé_76" data-name="Tracé 76" d="M682.759,232.441h-9.089v14.77l9.089-1.931Z" transform="translate(-673.669 -232.441)" fill="#f6a400"/>
  255.                         </svg>
  256.                         <h1 class="project-title" style="font-size: 2.3em;font-weight: bold">Descriptif</h1>
  257.                         <p class="city">{{ property.city.name }}</p>
  258.                         <p class="project-name">{{ property.reference }}</p>
  259.                         {% if property.regulations and property.regulations is not empty %}
  260.                             <p class="project-name">DPE : <strong>{% for regulation in property.regulations %}{{ regulation.value }}{% endfor %}</strong>
  261.                         {% endif %}
  262.                         </p>
  263.                         <p class="price" style="color:#F6A400">
  264.                             {{ property.price.value == null ? '<span style="font-size: 14px !important;">sur demande</span>' : property.price.value|number_format(2, ',', ' ') ~  property.price.currency|replace({"EUR": " €"})  }}
  265.                         </p>
  266.                         {#<div class="col-md-10 row list-pictures">
  267.                             {% for picture in property.pictures %}
  268.                                 <div class="modal fade bd-example-modal-lg-{{ picture.id }}" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
  269.                                     <div class="modal-dialog modal-lg">
  270.                                         <div class="modal-content">
  271.                                             <img src="{{ picture.url }}">
  272.                                         </div>
  273.                                     </div>
  274.                                 </div>
  275.                                 <div class="col-6 col-md-4 lightbox-on-second"  data-toggle="modal" data-target=".bd-example-modal-lg-{{ picture.id }}" style="margin-bottom:10px;">
  276.                                     <img class="img"
  277.                                          src="{{ picture.url }}"
  278.                                          data-id="modul-ref-{{ loop.index }}">
  279.                                 </div>
  280.                             {% endfor %}
  281.                         </div>#}
  282.                         {% if property.user is defined and property.user is not empty %}
  283.                             <div class="contact-property col-md-10 mt-4 p-3">
  284.                                 <p>Pour plus d’informations sur ce bien, vous pouvez prendre contact avec</p>
  285.                                 {% if property.user.firstname is defined and property.user.lastname is defined %}
  286.                                     <h3>{{ property.user.firstname }} {{ property.user.lastname }}</h3>
  287.                                 {% endif %}
  288.                             </div>
  289.                             <div class="contacinfos col-md-10 p-3 d-flex justify-content-between">
  290.                                 {% if property.user.email is defined %}
  291.                                 <a href="mailto:{{ property.user.email }}" target="_blank">
  292.                                     <svg xmlns="http://www.w3.org/2000/svg" width="21.418" height="14.503" viewBox="0 0 21.418 14.503">
  293.                                         <path id="np_mail_91_000000" d="M0,17V30.5H20.418V17Zm18.932.818L10.209,25.26,1.487,17.818Zm-18.115.5,6.134,5.232L.817,29.34Zm.825,11.363,5.935-5.6,2.632,2.245,2.632-2.245,5.935,5.6ZM19.6,29.34l-6.134-5.785L19.6,18.322Z" transform="translate(0.5 -16.5)" fill="#fff" stroke="#fff" stroke-width="1"/>
  294.                                     </svg>
  295.                                 </a>
  296.                                 {% endif %}
  297.                                 {% if property.user.mobile is defined %}
  298.                                 <a href="tel:{{ property.user.mobile }}" style="text-decoration:none;color:#fff;">
  299.                                     <svg id="np_phone-call_3960627_000000" xmlns="http://www.w3.org/2000/svg" width="22.518" height="20.105" viewBox="0 0 22.518 20.105">
  300.                                         <path id="Tracé_116" data-name="Tracé 116" d="M25.549,35.73h.8V34.122h2.413V32.513H26.354V29.522L20.6,27.608l-2.155,1.44a14.328,14.328,0,0,1-5.428-5.38L14.4,22.292l-1.914-6.667H6.249v.8a19.22,19.22,0,0,0,19.3,19.3Zm-14.274-18.5,1.311,4.592L11.074,23.37l.273.523a15.953,15.953,0,0,0,6.82,6.8l.426.217,2.292-1.536,3.86,1.3v3.442A17.734,17.734,0,0,1,7.857,17.234Z" transform="translate(-6.248 -15.626)" fill="#fff"/>
  301.                                     </svg>
  302.                                     {{ property.user.mobile }}
  303.                                 </a>
  304.                                 {% endif %}
  305.                             </div>
  306.                         {% endif %}
  307.                     </div>
  308.                 </div>
  309.                 <div class="col-md-8 description-prop-container">
  310.                     <div class="description-prop pt-3">
  311.                         <p>{{ property.comments[0].comment|raw|nl2br }}</p>
  312.                     </div>
  313.                 </div>
  314.             </div>
  315.         </div>
  316.     </section>
  317.     {#
  318.     <section class="project" style="margin-bottom: 120px">
  319.         <div class="col-lg-8 mx-auto div-svg-header" style="display: flex; align-items: center; margin-top: 20px">
  320.         </div>
  321.         <div class="col-lg-8 mx-auto div-svg-header" style="display: flex; align-items: center; padding-left: 7px">
  322.             <button data-id="descriptif-div" class="btn btn-primary all border-radius projectButton"><span class="span-all">DESCRIPTIF</span></button>
  323.             <button data-id="practical-infos-div" class="btn btn-primary come border-radius projectButton"><span class="span-projects">INFOS PRATIQUES</span></button>
  324.             <button data-id="interior-div" class="btn btn-primary come border-radius projectButton"><span class="span-projects">INTERIEUR</span></button>
  325.             <button data-id="exterior-div" class="btn btn-primary come border-radius projectButton"><span class="span-projects">EXTERIEUR</span></button>
  326.             <button data-id="energy-div" class="btn btn-primary come border-radius projectButton"><span class="span-projects">ENERGIE</span></button>
  327.         </div>
  328.         <div id="descriptif-div" class="offset-lg-2 col-lg-4 property-comment display-flex">
  329.             <p>{{ property.comments[0].comment|raw|nl2br }}</p>
  330.         </div>
  331.         <div id="practical-infos-div" class="offset-lg-2 col-lg-8 display-none" style="flex-wrap: wrap;">
  332.             <table class="table">
  333.                 <tbody>
  334.                 <tr class="table-property-first" style="background-color: #f7e7cb;">
  335.                     {% if property.services is not null %}
  336.                     {% for service in property.services %}
  337.                     <td class="text-property-infos">{{ propertyServices(service) }}</td>
  338.                     {% endfor %}
  339.                     {% endif %}
  340.                 </tr>
  341.                 </tbody>
  342.             </table>
  343.         </div>
  344.         <div id="interior-div" class="offset-lg-2 col-lg-8 display-none">
  345.             <table class="table">
  346.                 <tbody>
  347.                 <tr class="table-property-first" style="background-color: #f7e7cb;">
  348.                     <td class="text-property">Surface</td>
  349.                     <td class="text-property-infos">{{ property.area.value == null ? '' : property.area.value ~ areaConversion(property.area.unit) }}</td>
  350.                     <td class="text-property">Eau</td>
  351.                     <td class="text-property-infos">{{ propertyHotWater(property.water.hot_device) == null ? '-' : propertyHotWater(property.water.hot_device) ~ " " ~ propertyHotWaterAccess(property.water.hot_access)  }}</td>
  352.                     <td class="text-property">An Construction</td>
  353.                     <td class="text-property-infos">{{ property.construction.construction_year == null ? '-' :  property.construction.construction_year }}</td>
  354.                 </tr>
  355.                {% if property.areas is empty %}
  356.                    <tr>
  357.                        <td class="text-property">Condition</td>
  358.                        <td class="text-property-infos">{{ property.condition == null ? '-' : propertyCondition(property.condition) }}</td>
  359.                    </tr>
  360.                    <tr class="table-property-first" style="background-color: #f7e7cb;">
  361.                        <td class="text-property">Etage</td>
  362.                        <td class="text-property-infos">{{ property.floor.type == null ? '-' : propertyFloor(property.floor.type) }}</td>
  363.                        <td class="text-property">Chauffage</td>
  364.                        <td class="text-property-infos">{{ propertyHeatingDevice(property.heating.device) == null ? '-' : propertyHeatingDevice(property.heating.device) ~ " " ~ propertyHeatingType(property.heating.type)  }}</td>
  365.                        <td class="text-property">Disponibilite</td>
  366.                        <td class="text-property-infos">{{ property.available_at == null ? '-' : property.available_at}}</td>
  367.                    </tr>
  368.                    {% else %}
  369.                        <tr>
  370.                            {% for area in property.areas %}
  371.                                {% if propertyArea(area.type) is not null %}
  372.                                    <td class="text-property-first">{{ propertyArea(area.type) }}</td>
  373.                                    <td class="text-property-infos">{{ area.number }}</td>
  374.                                {% endif %}
  375.                            {% endfor %}
  376.                        </tr>
  377.                        <tr class="table-property-first" style="background-color: #f7e7cb;">
  378.                            <td class="text-property">Etage</td>
  379.                            <td class="text-property-infos">{{ property.floor.type == null ? '-' : propertyFloor(property.floor.type) }}</td>
  380.                            <td class="text-property">Chauffage</td>
  381.                            <td class="text-property-infos">{{ propertyHeatingDevice(property.heating.device) == null ? '-' : propertyHeatingDevice(property.heating.device) ~ " " ~ propertyHeatingType(property.heating.type)  }}</td>
  382.                            <td class="text-property">Disponibilite</td>
  383.                            <td class="text-property-infos">{{ property.available_at == null ? '-' : property.available_at}}</td>
  384.                        </tr>
  385.                        <tr>
  386.                            <td class="text-property">Condition</td>
  387.                            <td class="text-property-infos">{{ property.condition == null ? '-' : propertyCondition(property.condition) }}</td>
  388.                        </tr>
  389.                 {% endif %}
  390.                 </tbody>
  391.             </table>
  392.         </div>
  393.         <div id="exterior-div" class="offset-lg-2 col-lg-8 display-none">
  394.             <table class="table">
  395.                 <tbody>
  396.                 {% if property.areas is not empty %}
  397.                     <tr class="table-property-first" style="background-color: #f7e7cb;">
  398.                         {% for area in property.areas %}
  399.                             {% if propertyExterior(area.type) is not null %}
  400.                             <td class="text-property-first">{{ propertyExterior(area.type) }}</td>
  401.                             <td class="text-property-infos">{{ area.number }}</td>
  402.                             {% endif %}
  403.                         {% endfor %}
  404.                     </tr>
  405.                 {% endif %}
  406.                 </tbody>
  407.             </table>
  408.         </div>
  409.         <div id="energy-div" class="offset-lg-2 col-lg-8 display-none">
  410.             <table class="table">
  411.                 <tbody>
  412.             {% if property.regulations is not empty %}
  413.                 <tr class="table-property-first" style="background-color: #f7e7cb;">
  414.                     {% for energy in property.regulations %}
  415.                         <td class="text-property-first">{{ propertyEnergy(energy.type) }}</td>
  416.                         <td class="text-property-infos">{{ energy.value }}</td>
  417.                     {% endfor %}
  418.                 </tr>
  419.             {% endif %}
  420.                 </tbody>
  421.             </table>
  422.         </div>
  423.     </section>
  424.     #}
  425.     <section class="similar-properties">
  426.         {% set sectionContent1 = content('Bien-detail', 'Section-1') %}
  427.         <div class="col-lg-8 mx-auto div-svg-header pre-section">
  428.             <div class="col-lg-5" style="font-size: 2.3em;display: flex;flex-direction: column;margin-left: 10px;">
  429.                 <svg xmlns="http://www.w3.org/2000/svg" width="9.089" height="14.77" viewBox="0 0 9.089 14.77">
  430.                     <path id="Tracé_76" data-name="Tracé 76" d="M682.759,232.441h-9.089v14.77l9.089-1.931Z" transform="translate(-673.669 -232.441)" fill="#f6a400"/>
  431.                 </svg>
  432.                 <h1 class="project-title" style="font-weight: bold">{% if sectionContent1.name is defined %}{{ sectionContent1.name }}{% else %}NOS BIENS SIMILAIRES{% endif %}</h1>
  433.             </div>
  434.             <div class="separator"></div>
  435.             <div class="col-lg-6 pre-section-content">
  436.                 {% if sectionContent1.content is defined %}{{ sectionContent1.content|raw }}{% endif %}
  437.             </div>
  438.         </div>
  439.         <div  class="col-lg-8 mx-auto">
  440.             <div id="propertiesOther" class="col-lg-12" style="display: flex; flex-wrap: wrap; flex-direction: row">
  441.                 {% for property in otherProperties %}
  442.                     <div class="other col-xl-4 col-lg-6 col-md-12 col-sm-12 div-img-hover-2" style="cursor: pointer">
  443.                         {#
  444.                         <div class="div-hover-2" id="div-hover-2" aria-haspopup="true" style="position: absolute; bottom: 8px; left: 9px; background-color: #242424; color: white; width: 291px; height: 70px">
  445.                                                         {% if property.comments[0].comment is not empty %}
  446.                                                             <p class="project-content">
  447.                                                                 {{ property.comments[0].comment|slice(0, 350) }}</p>
  448.                                                             <a href="{{ path('property-detail', {'id': property.id}) }}" class="project-arrow-2">
  449.                                                                 <span class="galerry-ref"></span><i class="fas fa-arrow-right project-svg-arrow-2"></i>
  450.                                                             </a>
  451.                                                         {% else %}
  452.                                                             <a style="margin-top: 180px" href="{{ path('property-detail', {'id': property.id}) }}" class="project-arrow-2">
  453.                                                                 <span class="galerry-ref"></span><i class="fas fa-arrow-right project-svg-arrow-2"></i>
  454.                                                             </a>
  455.                                                         {% endif %}
  456.                                                     </div>
  457.                                                     <div class="col-lg-3 properties-price-absolute" style="background-color: #c48300; height: 56px;">
  458.                                                         <p style="font-size: 20px;" class="properties-price">
  459.                                                             {{ property.price.value == null ? '<span style="font-size: 14px !important;">sur demande</span>' : property.price.value ~  property.price.currency|replace({"EUR": " €"})  }}
  460.                                                         </p>
  461.                                                     </div>
  462.                         #}
  463.                         {# <div class="tag-ref-projet-2"><span class="text-tag-ref">{{ specialPropertyCategory(property.category) }}</span></div> #}
  464.                         {% if property.pictures is not empty %}
  465.                             <div class="position-relative properties-slide slick-slide-single-{{ loop.index }}">
  466.                                 {% for picture in property.pictures|slice(0,3) %}
  467.                                     {#                                    <img class="img-100" src="{{ picture.url }}">#}
  468.                                     {% set url = 'http' in picture.url ? picture.url : asset('uploads/images/properties/'~property.id~'/'~picture.url) %}
  469.                                     <div class="img" style="background: url('{{ url }}')no-repeat center;background-size:cover;"  onclick="location.href='{{ path('property-detail', {'id': property.id}) }}'">
  470.                                     </div>
  471.                                 {% endfor %}
  472.                             </div>
  473.                         {% else %}
  474.                         <div class="position-relative properties-slide slick-slide-single-{{ loop.index }}">
  475.                             <div class="img" style="background-image: url('{{ asset('build/Hudson_Ontario2.png') }}')"></div>
  476.                         </div>
  477.                         {% endif %}
  478.                         <a href="{{ path('property-detail', {'id': property.id}) }}">
  479.                         <div class="row col-md-12 justify-content-between infos-list">
  480.                             <ul class="col-md-4 items">
  481.                                 {% if property.area.value %}
  482.                                     <li class="item surface">
  483.                                         {# <img src="{{ asset('img/surface.svg') }}" class="surface-logo">  #}
  484.                                         {{ property.area.value == null ? '' : property.area.value ~ areaConversion(property.area.unit) }}
  485.                                     </li>
  486.                                 {% endif %}
  487.                             </ul>
  488.                             <div class="col-md-8 properties-price d-flex justify-content-end">
  489.                                 {{ property.price.value == null ? '<span style="font-size: 21px !important;">sur demande</span>' : property.price.value|number_format(2, ',', ' ') ~  property.price.currency|replace({"EUR": " €"})  }}
  490.                             </div>
  491.                         </div>
  492.                         <p class="city" {% if not property.area.value %}style="margin-top:-30px;"{% endif %}>{{ property.city.name }}</p>
  493.                         <p class="project-name">{{ property.reference }}</p>
  494.                         </a>
  495.                     </div>
  496.                 {% endfor %}
  497.             </div>
  498.             {% set paramUrl = property.category %}
  499.             {% if paramUrl == 1 %}
  500.                 {% set paramUrl = 'vente' %}
  501.             {% elseif paramUrl == 2 %}
  502.                 {% set paramUrl = 'location' %}
  503.             {% endif %}
  504.             <div id="link-none" class="col-lg-12 mx-auto other-property-link div-svg-header d-flex justify-content-end" style="margin-top:0;">
  505.                 <div style="padding-bottom:40px;">
  506.                     <a id="link-none-a d-flex" class="property-span-arrow" href="{{ path('properties', {'keyword': paramUrl}) }}">Découvrir plus
  507.                         <svg class="svg-inline--fa fa-arrow-right fa-w-14 property-arrow" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="arrow-right" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" data-fa-i2svg=""><path fill="currentColor" d="M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"></path></svg><!-- <i class="fas fa-arrow-right property-arrow"></i> Font Awesome fontawesome.com -->
  508.                     </a>
  509.                 </div>
  510.             </div>
  511.         </div>
  512.     </section>
  513.     <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.min.js" integrity="sha384-+sLIOodYLS7CIrQpBjl+C7nPvqq+FbNUBDunl/OZv93DB7Ln/533i8e/mZXLi/P+" crossorigin="anonymous"></script>
  514.     <script>
  515.         const slideNextHeader = document.getElementById('slideNextHeader');
  516.         const slidePreviousHeader = document.getElementById('slidePreviousHeader');
  517.         const currentFigure = document.getElementsByClassName('current-figure')
  518.         const lastFigure = document.getElementsByClassName('last-figure')
  519.         let slideHeader = document.getElementById('sliderHeader');
  520.         let positionHeader = 0;
  521.         let positionThumbHeader = 1;
  522.         arraySlidesHeader = [
  523.             {% for key, picture in property.pictures %}
  524.             {% set url = 'http' in picture.url ? picture.url : asset('uploads/images/properties/'~property.id~'/'~picture.url) %}
  525.             {
  526.                 'position': {{ key }},
  527.                 'img': '{{ url }}',
  528.                 'dot': 'dot{{ key }}'
  529.             },
  530.             {% endfor %}
  531.         ];
  532.         {#
  533.         slidePreviousHeader.addEventListener('click', () => {
  534.                     if (arraySlidesHeader.length < (positionThumbHeader  + 1)) {
  535.                         positionHeader = 0;
  536.                         positionThumbHeader = 1;
  537.                     } else {
  538.                         positionHeader++;
  539.                         positionThumbHeader++;
  540.                     }
  541.                     slideHeader.style.background =  `url(${arraySlidesHeader[positionHeader].img})no-repeat center`;
  542.                     currentFigure[0].innerHTML = '0'+positionThumbHeader
  543.                     slideHeader.style.backgroundSize = `cover`;
  544.                 });
  545.                 slideNextHeader.addEventListener('click', () => {
  546.                     if (positionThumbHeader === 1) {
  547.                         positionHeader = (arraySlidesHeader.length - 1);
  548.                         positionThumbHeader = arraySlidesHeader.length;
  549.                     } else {
  550.                         positionHeader = positionHeader - 1;
  551.                         positionThumbHeader = positionThumbHeader - 1;
  552.                     }
  553.                     slideHeader.style.background =  `url(${arraySlidesHeader[positionHeader].img})no-repeat center`;
  554.                     currentFigure[0].innerHTML = '0'+positionThumbHeader
  555.                     slideHeader.style.backgroundSize = `cover`;
  556.                 });
  557.         #}
  558.         const descriptif = document.getElementById('descriptif-div')
  559.         const praticalInfos = document.getElementById('practical-infos-div')
  560.         const interior = document.getElementById('interior-div')
  561.         const exterior = document.getElementById('exterior-div')
  562.         const energy = document.getElementById('energy-div')
  563.         let buttons = document.getElementsByClassName('projectButton')
  564.         for (const eElement of buttons) {
  565.             eElement.addEventListener('click', function (e) {
  566.                 e.preventDefault()
  567.                 for (let button of buttons) {
  568.                     if (button.classList.contains('all')){
  569.                         button.classList.remove('all')
  570.                         button.classList.add('come')
  571.                         button.querySelector('span').classList.replace('span-all', 'span-projects')
  572.                     }
  573.                     if (document.getElementById(button.dataset.id)) {
  574.                         document.getElementById(button.dataset.id).classList.remove('display-flex')
  575.                         document.getElementById(button.dataset.id).classList.add('display-none')
  576.                     }
  577.                 }
  578.                 eElement.classList.remove('come')
  579.                 eElement.classList.add('all')
  580.                 eElement.querySelector('span').classList.replace('span-projects', 'span-all')
  581.                 document.getElementById(eElement.dataset.id).classList.add('display-flex');
  582.             })
  583.         }
  584.     </script>
  585.     <script>
  586.         const arrowPrev = `<svg xmlns="http://www.w3.org/2000/svg" width="7.985" height="13.211" viewBox="0 0 7.985 13.211">
  587.                                 <path id="np_arrow-up_888648_000000" d="M13.211,1.381l-6.606,6.6L0,1.381,1.381,0,6.606,5.022h0L11.83,0Z" transform="translate(7.985) rotate(90)" fill="#fff"/>
  588.                             </svg>`;
  589.         const arrowNext= `<svg xmlns="http://www.w3.org/2000/svg" width="7.985" height="13.211" viewBox="0 0 7.985 13.211">
  590.                             <path id="np_arrow-up_888648_000000" d="M13.211,1.381l-6.606,6.6L0,1.381,1.381,0,6.606,5.022h0L11.83,0Z" transform="translate(7.985) rotate(90)" fill="#fff"/>
  591.                         </svg>`;
  592.         var countProperties = '{{ otherProperties|length }}';
  593.         var loopProp = 1;
  594.         while (loopProp <= countProperties) {
  595.             $('.slick-slide-single-'+loopProp).slick({
  596.                 'slidesToShow': 1,
  597.                 'prevArrow': `<div class="arrow-left square-black d-flex justify-content-center align-items-center position-absolute">${arrowPrev}</div>`,
  598.                 'nextArrow': `<div class="arrow-right square-black d-flex justify-content-center align-items-center position-absolute">${arrowNext}</div>`
  599.             });
  600.             loopProp++;
  601.         }
  602.     </script>
  603. {% endblock %}