templates/public/lot.html.twig line 1

Open in your IDE?
  1. {% extends './public/layout.html.twig' %}
  2. {% block title %}{{ prospect.emprunteurPrenom|lower|capitalize }} {{ prospect.emprunteurNom }} {{ lot.programme ? '| ' ~ lot.programme }} {% endblock %}
  3. {% block detail_lot %}
  4.     <div class="title-description">
  5.         <h2 class="lot-name text-bold">{{lot.programme|upper}}</h2>
  6.         <h3 class="lot-size mb-0">{{ lot.type|upper }}  {% if lot.reference is not empty %}- {{ lot.reference }}{% endif %}</h3>
  7.     </div>
  8.     <ul class="criteres-description">
  9.         {% if lot.etage is not empty %} <li>Etage :<span class="critere-description"> {{ lot.etage|upper }} </span></li> {% endif %}
  10.         {% if lot.superficie is not empty %} <li>Superficie :<span class="critere-description"> {{ lot.superficie }}m²</span></li> {% endif %}
  11.         {% if lot.jardin is not empty %} <li>Jardin :<span class="critere-description"> {{ lot.jardin }}m²</span></li> {% endif %}
  12.         {% if lot.terrasse is not empty %} <li>Terrasse :<span class="critere-description"> {{ lot.terrasse }}m²</span></li> {% endif %}
  13.         {% if lot.terrasse2 is not empty %} <li>2<sup>ème</sup> terrasse :<span class="critere-description"> {{ lot.terrasse2 }}m²</span></li> {% endif %}
  14.         {% if lot.orientation is not empty %} <li>Orientation :<span class="critere-description"> {{ lot.orientation|upper }}</span></li> {% endif %}
  15.         {% if lot.prix is not empty %} <li>Prix :<span class="critere-description"> {{lot.prix|number_format(0, '', '.')}}&nbsp;&euro;</span></li> {% endif %}
  16.         {% if lot.annexes is not empty %} <li>Annexe(s) incluse(s) :<span class="critere-description"> {{ lot.annexes|upper }}</span></li> {% endif %}
  17.         {% if lot.fraisNotaireInclus is not empty %} <li>Frais de notaire {% if lot.fraisNotaireType is null or lot.fraisNotaireType == 'reduits' %} réduits{% endif %} :<span class="critere-description"> {{ lot.fraisNotaireInclus|number_format(0, '', '.')}}&nbsp;&euro;</span></li>{% endif %}
  18.         {% if lot.programmeParent.visuLivraison %}
  19.             {% if lot.livraison is not empty %} <li>Livraison :<span class="critere-description"> {{ lot.livraison|upper }}</span></li> {% endif %}
  20.         {% endif %}
  21.         {% if lot.description is not empty %} <li><span class="critere-description"><p class="notes-lot"> {{ (lot.description|striptags)|raw }}</p></span></li> {% endif %}
  22.         {% if lot.programmeParent.noteGlobale is not empty %} <li><hr class="my-2"><span class="critere-description"><p class="notes-lot">{{ (lot.programmeParent.noteGlobale|striptags)|raw }}</p></span></li> {% endif %}
  23.     </ul>
  24.     {% if lot.brochure %}
  25.         <div class="download-brochure shadow mt-2">
  26.             <a class="download-brochure-a" download target="_blank" href="{{ asset('uploads/brochures/' ~ lot.brochure) }}">
  27.                 <span class="download-brochure-content download-brochure-content-invisible">
  28.                     {# <img class="download-arrow" src="{{ asset('build/images/download-icon.svg') }}"/> #}
  29.                     <span>{{ lot.programmeParent.libelleBrochure is not empty ? lot.programmeParent.libelleBrochure : 'Télécharger la brochure' }}</span>
  30.                 </span>
  31.                 <span class="download-brochure-content download-brochure-content-absolute">
  32.                     <span>{{ lot.programmeParent.libelleBrochure is not empty ? lot.programmeParent.libelleBrochure : 'Télécharger la brochure' }}</span>
  33.                 </span>
  34.             </a>
  35.         </div>
  36.     {% endif %}
  37. {% endblock %}
  38. {% block dropdownLotsNav %}
  39.     {% set nblot = 0 %}
  40.     {% set actualProp = "" %}
  41.     {% for key, proposition in propositions %}
  42.         {% if proposition.lot.id == lot.id %}
  43.             {% set nblot = key %}
  44.             {% set actualProp = proposition %}
  45.         {% endif %}
  46.     {% endfor %}
  47.     {% set nbItemMenu = 1 %}
  48.     {% if actualProp != "" %}
  49.         <div class="dropdown opacity-0 lot-{{ (nblot%6)+1 }}">
  50.             <span class="before"></span>
  51.             <a class="btn dropdown-toggle navbar-lot-menu d-flex align-items-center " href="#" role="button" id="dropdownMenuLink" data-bs-toggle="dropdown" aria-expanded="false">
  52.             <span class="text-center">
  53.                 {{actualProp.lot.reference}}
  54.             </span>
  55.                 <div class="down">
  56.                 <span class="down-icon">
  57.                     <i class="fas fa-caret-down"></i>
  58.                 </span>
  59.                 </div>
  60.             </a>
  61.             <span class="after"></span>
  62.         </div>
  63.     {% endif %}
  64. {% endblock %}
  65. {# {% block recapNav %}
  66.         <div class="dropdown recap opacity-0 lot-1">
  67.             <span class="before"></span>
  68.             <a class="btn navbar-lot-menu d-flex align-items-center " href="{{ path('public_prospect_short', {token: prospect.token, recap: true}) }}">
  69.                 <span class="text-center">
  70.                     RECAP'
  71.                 </span>
  72.             </a>
  73.             <span class="after"></span>
  74.         </div>
  75. {% endblock %} #}
  76. {% block main %}
  77.     {% set lastProp = false %}
  78.     {% set nextProp = {
  79.         'num' : 0,
  80.         'prop' : null
  81.      } %}
  82.     <div class="lot-page">
  83.         <ul class="dropdown-menu" aria-labelledby="dropdownMenuLink">
  84.             {% for key, proposition in propositions %}
  85.                 <li class="lot-{{ (key%6)+1 }}">
  86.                     <a class="dropdown-item" href="{{ path('public_lot', {token: prospect.token, id: proposition.lot.id}) }}">
  87.                         <span class="text-center">{{proposition.lot.type|slice(0,6)}} {{proposition.lot.reference }}</span>
  88.                     </a>
  89.                 </li>
  90.                 {% if proposition.lot.id == lot.id and (key + 1) < propositions|length %}
  91.                     {% set nextProp = {
  92.                             'num' : key + 2,
  93.                             'prop' : propositions[key + 1]
  94.                         }
  95.                     %}
  96.                 {% endif %}
  97.             {% endfor %}
  98.             {# <li class="lot-6"><a class="dropdown-item" href="{{ path('public_prospect_short', {token: prospect.token, recap: true}) }}"><span class="text-center">RECAP'</span></a></li> #}
  99.         </ul>
  100.         <div class="container-fluid p-0 content-lot slider " >
  101.             <div class="progress-container">
  102.                 <div class="progress">
  103.                     <div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
  104.                 </div>
  105.             </div>
  106.                 {% set combinedPjs = (programmePjs|merge(lot.pjs))|filter(pj => pj.showPublic) %}
  107.                 {% set NB_SLIDES = 2 + combinedPjs|length %}
  108.                 <script type="text/javascript">
  109.                     var NB_SLIDES = {{ NB_SLIDES }};
  110.                 </script>
  111.             <div class="owl-carousel owl-carousel-lot">
  112.                 <div class="slide slide-localisation" data-slide-title="Localisation">
  113.                     <div class="container-fluid-content">
  114.                         <div class="col-3 map-buttons d-flex flex-column align-items-end justify-content-end">
  115.                             <a class="btn-rounded-white download-pdf map my-2" id="map_switch" href="#"><i id="satellite_logo" class="fa fa-globe" style="display:none;"></i><i id="roadmap_logo" class="fa fa-map"></i></a>
  116.                             <a class="btn-rounded-white download-pdf resize my-2" id="map_minus" href="#"><i id="btn-moins" class="fa fa-minus"></i></a>
  117.                             <a class="btn-rounded-white pdf-btn-resize resize my-2" id="map_plus" href="#"><i id="btn-plus" class="fa fa-plus"></i></a>
  118.                         </div>
  119.                         <div class="content-map" id="map"></div>
  120.                         <div class="lot-content d-flex close">
  121.                             <div role="button" class="drag-btn d-flex align-items-center justify-content-center shadow">
  122.                                 <img class="drag-icon-arrow ml-4" src="{{ asset('build/images/drag-icon-right-arrow.png') }}"/>
  123.                             </div>
  124.                             <div class="detail-content d-flex flex-column">
  125.                                 {{ block('detail_lot') }}
  126.                             </div>
  127.                         </div>
  128.                     </div>
  129.                     {% if nextProp['prop'] != null %}
  130.                         <a class="owl-next-proposition" href="{{ path('public_lot', {token: nextProp.prop.prospect.token, id: nextProp.prop.lot.id}) }}"></a>
  131.                     {% else %}
  132.                         {% if prospect.id is null %}
  133.                             <a class="owl-next-proposition" href="{{ path('public_prospect_short', {token: app.session.get('propositions')[0].prospect.token, recap: true}) }}"></a>
  134.                         {% else %}
  135.                             <a class="owl-next-proposition" href="{{ path('public_prospect_short', {token: prospect.token, recap: true}) }}"></a>
  136.                         {% endif %}
  137.                     {% endif %}
  138.                 </div>
  139.                 {% for n,pj in combinedPjs %}
  140.                     <div class="slide slide-pdf slide-plan-lot" data-slide-title="{{pj.descriptionCourte}}">
  141.                         <div class="container-fluid-content">
  142.                             <div class="col-3 pdf-buttons d-flex flex-column align-items-end justify-content-end justify-content-end">
  143.                                {% if pj.filename is not null and pj.filename|unserialize is not null %}
  144.                                     {% if (pj.filename|unserialize)[0]|replace({'-0.png': '.pdf'})|file_exists %}
  145.                                         <a class="btn-rounded-white my-2 download-pdf-image download-pdf" download href="{{ asset((pj.filename|unserialize)[0]|replace({'-0.png': '.pdf'})) }}">
  146.                                             <svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
  147.                                                 viewBox="0 0 227.14 334.2" style="enable-background:new 0 0 227.14 334.2;" xml:space="preserve">
  148.                                                 <style type="text/css">
  149.                                                     .st0{fill:#2D3642;}
  150.                                                     .st1{fill:#2E3743;}
  151.                                                 </style>
  152.                                                 <g>
  153.                                                     <path class="st0" d="M165.54,67.27c0,19.09,0.09,38.18-0.08,57.27c-0.03,3.59,0.68,4.79,4.55,4.72
  154.                                                         c15.09-0.26,30.18-0.05,45.28-0.14c3.59-0.02,6.43,0.81,8.2,4.26c1.89,3.69,0.01,6.52-2.18,8.94
  155.                                                         c-12.21,13.48-24.62,26.78-36.87,40.23c-14.89,16.36-29.68,32.81-44.53,49.2c-6.99,7.71-13.98,15.43-21.11,23.03
  156.                                                         c-3.49,3.72-8.06,3.54-11.62-0.38c-18.76-20.65-37.43-41.39-56.2-62.03c-12.46-13.7-25.05-27.28-37.57-40.93
  157.                                                         c-3.12-3.41-6.21-6.85-9.3-10.28c-2.08-2.31-2.84-5.05-1.36-7.78c1.45-2.66,3.58-4.35,7.16-4.3c14.76,0.2,29.52-0.09,44.28,0.19
  158.                                                         c4.31,0.08,5.56-0.92,5.53-5.41c-0.2-37.02-0.12-74.04-0.1-111.05c0-1.82-0.04-3.68,0.35-5.44c0.78-3.6,2.88-5.74,6.88-5.74
  159.                                                         c30.68,0.04,61.37,0,92.05,0.04c4.46,0.01,6.64,2.66,6.64,7.83C165.55,28.76,165.54,48.01,165.54,67.27z"/>
  160.                                                     <path class="st1" d="M113.33,331.39c-34.51,0-69.02,0-103.53,0c-5.98,0-7.18-1.22-7.19-7.29c-0.02-11.13-0.04-22.25,0.01-33.38
  161.                                                         c0.02-5.46,1.69-7.15,7.14-7.15c69.02-0.02,138.04-0.03,207.07,0c5.2,0,6.62,1.54,6.64,6.94c0.03,11.46,0.03,22.92,0,34.38
  162.                                                         c-0.01,5.97-0.55,6.5-6.6,6.5C182.35,331.4,147.84,331.39,113.33,331.39z"/>
  163.                                                 </g>
  164.                                             </svg>
  165.                                         </a>
  166.                                     {% else %}
  167.                                         <a class="btn-rounded-white my-2 download-pdf-image download-pdf" download href="{{ asset((pj.filename|unserialize)[0]) }}">
  168.                                             <svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
  169.                                                 viewBox="0 0 227.14 334.2" style="enable-background:new 0 0 227.14 334.2;" xml:space="preserve">
  170.                                                 <g>
  171.                                                     <path class="st0" d="M165.54,67.27c0,19.09,0.09,38.18-0.08,57.27c-0.03,3.59,0.68,4.79,4.55,4.72
  172.                                                         c15.09-0.26,30.18-0.05,45.28-0.14c3.59-0.02,6.43,0.81,8.2,4.26c1.89,3.69,0.01,6.52-2.18,8.94
  173.                                                         c-12.21,13.48-24.62,26.78-36.87,40.23c-14.89,16.36-29.68,32.81-44.53,49.2c-6.99,7.71-13.98,15.43-21.11,23.03
  174.                                                         c-3.49,3.72-8.06,3.54-11.62-0.38c-18.76-20.65-37.43-41.39-56.2-62.03c-12.46-13.7-25.05-27.28-37.57-40.93
  175.                                                         c-3.12-3.41-6.21-6.85-9.3-10.28c-2.08-2.31-2.84-5.05-1.36-7.78c1.45-2.66,3.58-4.35,7.16-4.3c14.76,0.2,29.52-0.09,44.28,0.19
  176.                                                         c4.31,0.08,5.56-0.92,5.53-5.41c-0.2-37.02-0.12-74.04-0.1-111.05c0-1.82-0.04-3.68,0.35-5.44c0.78-3.6,2.88-5.74,6.88-5.74
  177.                                                         c30.68,0.04,61.37,0,92.05,0.04c4.46,0.01,6.64,2.66,6.64,7.83C165.55,28.76,165.54,48.01,165.54,67.27z"/>
  178.                                                     <path class="st1" d="M113.33,331.39c-34.51,0-69.02,0-103.53,0c-5.98,0-7.18-1.22-7.19-7.29c-0.02-11.13-0.04-22.25,0.01-33.38
  179.                                                         c0.02-5.46,1.69-7.15,7.14-7.15c69.02-0.02,138.04-0.03,207.07,0c5.2,0,6.62,1.54,6.64,6.94c0.03,11.46,0.03,22.92,0,34.38
  180.                                                         c-0.01,5.97-0.55,6.5-6.6,6.5C182.35,331.4,147.84,331.39,113.33,331.39z"/>
  181.                                                 </g>
  182.                                             </svg>
  183.                                         </a>
  184.                                     {% endif %}
  185.                                 {% else %}
  186.                                     <a class="btn-rounded-white my-2 download-pdf-image download-pdf" download href="{{ asset('uploads/pieces_jointes/' ~ pj.filename) }}">
  187.                                         <svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
  188.                                             viewBox="0 0 227.14 334.2" style="enable-background:new 0 0 227.14 334.2;" xml:space="preserve">
  189.                                             <g>
  190.                                                 <path class="st0" d="M165.54,67.27c0,19.09,0.09,38.18-0.08,57.27c-0.03,3.59,0.68,4.79,4.55,4.72
  191.                                                     c15.09-0.26,30.18-0.05,45.28-0.14c3.59-0.02,6.43,0.81,8.2,4.26c1.89,3.69,0.01,6.52-2.18,8.94
  192.                                                     c-12.21,13.48-24.62,26.78-36.87,40.23c-14.89,16.36-29.68,32.81-44.53,49.2c-6.99,7.71-13.98,15.43-21.11,23.03
  193.                                                     c-3.49,3.72-8.06,3.54-11.62-0.38c-18.76-20.65-37.43-41.39-56.2-62.03c-12.46-13.7-25.05-27.28-37.57-40.93
  194.                                                     c-3.12-3.41-6.21-6.85-9.3-10.28c-2.08-2.31-2.84-5.05-1.36-7.78c1.45-2.66,3.58-4.35,7.16-4.3c14.76,0.2,29.52-0.09,44.28,0.19
  195.                                                     c4.31,0.08,5.56-0.92,5.53-5.41c-0.2-37.02-0.12-74.04-0.1-111.05c0-1.82-0.04-3.68,0.35-5.44c0.78-3.6,2.88-5.74,6.88-5.74
  196.                                                     c30.68,0.04,61.37,0,92.05,0.04c4.46,0.01,6.64,2.66,6.64,7.83C165.55,28.76,165.54,48.01,165.54,67.27z"/>
  197.                                                 <path class="st1" d="M113.33,331.39c-34.51,0-69.02,0-103.53,0c-5.98,0-7.18-1.22-7.19-7.29c-0.02-11.13-0.04-22.25,0.01-33.38
  198.                                                     c0.02-5.46,1.69-7.15,7.14-7.15c69.02-0.02,138.04-0.03,207.07,0c5.2,0,6.62,1.54,6.64,6.94c0.03,11.46,0.03,22.92,0,34.38
  199.                                                     c-0.01,5.97-0.55,6.5-6.6,6.5C182.35,331.4,147.84,331.39,113.33,331.39z"/>
  200.                                             </g>
  201.                                         </svg>
  202.                                     </a>
  203.                                 {% endif %}
  204.                                 <a class="btn-rounded-white my-2 download-pdf resize resize-moins" id="img_minus" href="#"><i id="btn-moins" class="fa fa-minus"></i></a>
  205.                                 <a class="btn-rounded-white my-2 resize resize-plus" id="img_plus" href="#"><i id="btn-plus" class="fa fa-plus"></i></a>
  206.                             </div>
  207.                             <div class="viewer-pdf">
  208.                                 <div id="viewer_n{{ n }}" class="pdf-viewer-iframe">
  209.                                     {% if pj.filename|unserialize is not null %}
  210.                                         {% for img in pj.filename|unserialize %}
  211.                                             <img class="img-download" loading="lazy" src="{{ asset(img) }}" /><br/>
  212.                                         {% else %}
  213.                                             <img class="img-download" loading="lazy" src="{{ asset('uploads/pieces_jointes/' ~ pj.filename) }}" />
  214.                                         {% endfor %}
  215.                                     {% else %}
  216.                                         <img class="img-download" loading="lazy" src="{{ asset('uploads/pieces_jointes/' ~ pj.filename) }}" />
  217.                                     {% endif %}
  218.                                 </div>
  219.                             </div>
  220.                             <div class="lot-content d-flex">
  221.                                 <div role="button" class="drag-btn d-flex align-items-center justify-content-center shadow">
  222.                                     <img class="drag-icon-arrow ml-4" src="{{ asset('build/images/drag-icon-right-arrow.png') }}"/>
  223.                                 </div>
  224.                                 <div class="detail-content d-flex flex-column">
  225.                                     {{ block('detail_lot') }}
  226.                                 </div>
  227.                             </div>
  228.                         </div>
  229.                         {% if nextProp['prop'] != null %}
  230.                             <a class="owl-next-proposition" href="{{ path('public_lot', {token: nextProp.prop.prospect.token, id: nextProp.prop.lot.id}) }}"></a>
  231.                         {% else %}
  232.                             {% if prospect.id is null %}
  233.                                 <a class="owl-next-proposition" href="{{ path('public_prospect_short', {token: app.session.get('propositions')[0].prospect.token, recap: true}) }}"></a>
  234.                             {% else %}
  235.                                 <a class="owl-next-proposition" href="{{ path('public_prospect_short', {token: prospect.token, recap: true}) }}"></a>
  236.                             {% endif %}
  237.                         {% endif %}
  238.                     </div>
  239.                 {% endfor %}
  240.                 {% if lot.planMasse != null %}
  241.                     <div class="slide{% if nextProp['prop'] != null%} slide-next-proposition {% endif %} slide-pdf slide-plan-lot" data-hash="planMasse" data-slide-title="Plan masse">
  242.                         <div class="container-fluid-content">
  243.                             <div class="col-3 pdf-buttons d-flex flex-column align-items-end justify-content-end">
  244.                             {% set pathDownload = ''%}
  245.                                 {% if lot.planMasse|unserialize is not null %}
  246.                                     {% if (lot.planMasse|unserialize)[0] != null %}
  247.                                         {% set pathDownload = (lot.planMasse|unserialize)[0]|replace({'-0.png': '.pdf'})  %}
  248.                                     {% endif %}
  249.                                 {% else %}
  250.                                     <a class="btn-rounded-white my-2 download-pdf-image download-pdf" download href="{{ asset('uploads/pieces_jointes/' ~ lot.planMasse) }}">
  251.                                         <svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
  252.                                             viewBox="0 0 227.14 334.2" style="enable-background:new 0 0 227.14 334.2;" xml:space="preserve">
  253.                                             <g>
  254.                                                 <path class="st0" d="M165.54,67.27c0,19.09,0.09,38.18-0.08,57.27c-0.03,3.59,0.68,4.79,4.55,4.72
  255.                                                     c15.09-0.26,30.18-0.05,45.28-0.14c3.59-0.02,6.43,0.81,8.2,4.26c1.89,3.69,0.01,6.52-2.18,8.94
  256.                                                     c-12.21,13.48-24.62,26.78-36.87,40.23c-14.89,16.36-29.68,32.81-44.53,49.2c-6.99,7.71-13.98,15.43-21.11,23.03
  257.                                                     c-3.49,3.72-8.06,3.54-11.62-0.38c-18.76-20.65-37.43-41.39-56.2-62.03c-12.46-13.7-25.05-27.28-37.57-40.93
  258.                                                     c-3.12-3.41-6.21-6.85-9.3-10.28c-2.08-2.31-2.84-5.05-1.36-7.78c1.45-2.66,3.58-4.35,7.16-4.3c14.76,0.2,29.52-0.09,44.28,0.19
  259.                                                     c4.31,0.08,5.56-0.92,5.53-5.41c-0.2-37.02-0.12-74.04-0.1-111.05c0-1.82-0.04-3.68,0.35-5.44c0.78-3.6,2.88-5.74,6.88-5.74
  260.                                                     c30.68,0.04,61.37,0,92.05,0.04c4.46,0.01,6.64,2.66,6.64,7.83C165.55,28.76,165.54,48.01,165.54,67.27z"/>
  261.                                                 <path class="st1" d="M113.33,331.39c-34.51,0-69.02,0-103.53,0c-5.98,0-7.18-1.22-7.19-7.29c-0.02-11.13-0.04-22.25,0.01-33.38
  262.                                                     c0.02-5.46,1.69-7.15,7.14-7.15c69.02-0.02,138.04-0.03,207.07,0c5.2,0,6.62,1.54,6.64,6.94c0.03,11.46,0.03,22.92,0,34.38
  263.                                                     c-0.01,5.97-0.55,6.5-6.6,6.5C182.35,331.4,147.84,331.39,113.33,331.39z"/>
  264.                                             </g>
  265.                                         </svg>
  266.                                     </a>
  267.                                 {% endif %}
  268.                                 <a class="btn-rounded-white my-2 download-pdf resize resize-moins" id="img_minus" href="#"><i id="btn-moins" class="fa fa-minus"></i></a>
  269.                                 <a class="btn-rounded-white my-2 resize resize-plus" id="img_plus" href="#"><i id="btn-plus" class="fa fa-plus"></i></a>
  270.                             </div>
  271.                             <div class="viewer-pdf">
  272.                                 <div id="viewer_n{{ lot.pjs|length }}" class="pdf-viewer-iframe">
  273.                                     {% if lot.planMasse|unserialize is not null %}
  274.                                         {% for img in lot.planMasse|unserialize %}
  275.                                             <img class="img-download" loading="lazy" src="{{ asset(img) }}"/><br/>
  276.                                         {% endfor %}
  277.                                     {% else %}
  278.                                         <img class="img-download" loading="lazy" src="{{ asset('uploads/plans_masse/' ~ lot.planMasse) }}"/>
  279.                                     {% endif %}
  280.                                 </div>
  281.                             </div>
  282.                             <div class="lot-content d-flex">
  283.                                 <div role="button" class="drag-btn d-flex align-items-center justify-content-center shadow">
  284.                                     <img class="drag-icon-arrow ml-4" src="{{ asset('build/images/drag-icon-right-arrow.png') }}"/>
  285.                                 </div>
  286.                                 <div class="detail-content d-flex flex-column">
  287.                                     {{ block('detail_lot') }}
  288.                                 </div>
  289.                             </div>
  290.                         </div>
  291.                     </div>
  292.                 {% endif %}
  293.                 {% if nextProp['prop'] != null %}
  294.                     <div class="slide slide-next-proposition" id="slideNextProp" data-slide-title="Proposition n°{{ nextProp.num }}">
  295.                         <div class="container-fluid-content container-fluid p-0" style="background-image:url({{ asset('uploads/lots_images/' ~ nextProp.prop.lot.image) }});">
  296.                             <div class="d-flex flex-column" style="justify-content:space-evenly;height:calc(100vh - calc(4.8vh + 2px + 2px + 17vh));">
  297.                                 <div class="container-next-prop mx-auto">
  298.                                     <div class="lot-item active-loading">
  299.                                         <a href="{{ path('public_lot', {token: nextProp.prop.prospect.token, id: nextProp.prop.lot.id}) }}" class="noAnim link-card-item active-loading">
  300.                                             <div class="hide-zoom-in d-flex flex-column justify-content-end card-lot-item">
  301.                                                 <div class="noAnim bg-img-lot" style="background-image: url({{ asset('uploads/lots_images/' ~ nextProp.prop.lot.image) }});"></div>
  302.                                                 <div class="d-flex justify-content-between align-items-end mb-1">
  303.                                                     <div class="text-white text-right col-10">
  304.                                                         <h3 class="lot-name mb-0">{{nextProp.prop.lot.reference}} - {{nextProp.prop.lot.ville|upper}}</h3>
  305.                                                         <h2 class="lot-size text-bold">{{nextProp.prop.lot.type|upper}} - {{ nextProp.prop.lot.Superficie }}m²</h2>
  306.                                                     </div>
  307.                                                     <div class="num num-{{ (nextProp.num-1) % 6 }} col-2">{{ nextProp.num }}</div>
  308.                                                 </div>
  309.                                             </div>
  310.                                         </a>
  311.                                         <div><h5 class="lot-realisation"><span class="lot-prix">{% if nextProp.prop.lot.prix is not empty %}{{ nextProp.prop.lot.prix|number_format(0, ',', ' ') }}€ </span><span class="text-white">-</span>{% endif %}<span class="lot-livraison"> {% if nextProp.prop.lot.livraison is not empty %}{{ nextProp.prop.lot.Livraison }}{% endif %}</span></h5></div>
  312.                                     </div>
  313.                                 </div>
  314.                             </div>
  315.                         </div>
  316.                         <a class="owl-next-proposition" href="{{ path('public_lot', {token: nextProp.prop.prospect.token, id: nextProp.prop.lot.id}) }}"></a>
  317.                     </div>
  318.                 {% endif %}
  319.             </div>
  320.             <div class="tooltip-next" style="display:none !important;">
  321.                 Étape suivante
  322.                 <span class="triangle"></span>
  323.             </div>
  324.         </div>
  325.     </div>
  326. {% endblock %}
  327. {% block javascripts %}
  328.     {{ parent() }}
  329.     <script type="text/javascript">
  330.         // patch owl loading
  331.         if(window.innerHeight > window.innerWidth){
  332.             window.location.href = '{{ path('public_prospect_short', {token: prospect.token}) }}';
  333.             document.querySelector('#main_loader').style.display = 'flex';
  334.         }
  335.     </script>
  336.     <script type="text/javascript">
  337.         function initMap() {
  338.             map = new google.maps.Map(document.getElementById("map"), {
  339.                 center: new google.maps.LatLng({{ lot.latitude is not null ? lot.latitude : 45.899247 }}, {{ lot.longitude is not null ? lot.longitude : 6.129384 }}),
  340.                 zoom: {{lot.programmeParent.zoomMap is not null ? lot.programmeParent.zoomMap : 14}},
  341.                 fullscreenControl: true,
  342.                 streetViewControl: false,
  343.                 rotateControl: false,
  344.                 scrollwheel: false,
  345.                 mapTypeControl: false,
  346.                 clickableIcons: false,
  347.                 mapTypeId: '{{lot.programmeParent.typePlan is not null ? lot.programmeParent.typePlan : satellite }}'
  348.             });
  349.             document.getElementById('map_switch').onclick = function() {
  350.                 if(map.mapTypeId == 'roadmap') {
  351.                     document.getElementById('roadmap_logo').style.display = 'block';
  352.                     document.getElementById('satellite_logo').style.display = 'none';
  353.                     map.setMapTypeId("satellite");
  354.                 } else {
  355.                     document.getElementById('satellite_logo').style.display = 'block';
  356.                     document.getElementById('roadmap_logo').style.display = 'none';
  357.                     map.setMapTypeId("roadmap");
  358.                 }
  359.             };
  360.             document.getElementById('map_minus').onclick = function() {
  361.                 map.setZoom(map.getZoom() - 1);
  362.             };
  363.             document.getElementById('map_plus').onclick = function() {
  364.                 map.setZoom(map.getZoom() + 1);
  365.             };
  366.             const infowindow = new google.maps.InfoWindow({
  367.                 content: '<div id="infobox_content">{{ lot.programme }}</br>{{ lot.adresse }}</br>{{ lot.codePostal }} {{ lot.ville }}</div>',
  368.             });
  369.             {% if lot.latitude is not null and lot.longitude is not null %}
  370.                 var marker = new google.maps.Marker({
  371.                     position: new google.maps.LatLng({{ lot.latitude }}, {{ lot.longitude }}),
  372.                     map: map,
  373.                     icon: {
  374.                         url: "{{ absolute_url(asset('build/images/marker.png')) }}",
  375.                         scaledSize: new google.maps.Size(100, 100),
  376.                     },
  377.                     title: 'Votre programme'
  378.                 });
  379.                 infowindow.open({
  380.                     anchor: marker,
  381.                     map,
  382.                 });
  383.             {% endif %}
  384.         }
  385.     </script>
  386. {% endblock %}
  387. {% block body %}
  388.     {{ parent() }}
  389.     <script src='https://unpkg.com/panzoom@9.4.0/dist/panzoom.min.js'></script>
  390.     <script
  391.       src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDjoLfbKLLFbXm0rCgQQPfBbihIFj8_T1Q&callback=initMap&v=weekly"
  392.       async></script>
  393. {% endblock %}
  394. {% block footer %}
  395. {% endblock %}