templates/public/index.html.twig line 1

Open in your IDE?
  1. {% extends 'public/base.html.twig' %}
  2. {% block body %}
  3. <style>
  4. @media screen and (min-width: 576px) {
  5.     .btn-outline-custom-bg1 span{
  6.         font-size: 20px;
  7.     }
  8.     .image_fond{
  9.         padding: 20px !important;
  10.     }
  11.     .mdi-car, .mdi-motorbike, .mdi-truck{
  12.         font-size: 36px !important;
  13.     }
  14. }
  15. @media screen and (max-width: 942px) {
  16.     .btn-outline-custom-bg1{
  17.         max-width: 80%;
  18.     }
  19. }
  20.     .mdi-car, .mdi-motorbike, .mdi-truck{
  21.         font-size: 24px;
  22.     }
  23.     .image_fond{
  24.         padding: 5px;
  25.     }
  26.     .btn-outline-custom-bg1 span{
  27.         overflow: hidden;
  28.         text-overflow: ellipsis;
  29.         margin-right: 35px;
  30.         margin-left: -5px;
  31.     }
  32.     .btn-outline-custom-bg1{
  33.         position: relative;
  34.         min-width: 320px;
  35.     }
  36.     .btn-outline-custom-bg1 .mdi-chevron-right-circle{
  37.         position: absolute;
  38.         right: 14px;
  39.     }
  40.     .prestation-div{
  41.         margin: 0;
  42.     }
  43. </style>
  44. <div class="col-lg-12 p-0 ">
  45.     {% if centreGroupe %}
  46.     <p hidden id="countCentre" data-countCentres={{countcentres}}></p>
  47.     <div class="col-lg-12 p-l-20  {% if countcentres == 1 %}d-none{% endif %}" style="display: flex;align-items: flex-end;background-color: #d6e8f6; ">
  48.         <ul class="nav nav-pills pl-lg-5">
  49.             {% for key,centre in centreGroupe.centres %}
  50.             {% if centre.ctrparametrecentreadmin.pcaactif %}
  51.             <p hidden id="infocentre_{{key}}"
  52.                 data-coordonneegps="{{array_centres[key]['avis'] ? array_centres[key]['avis']['result']['geometry']['location']['lat']:''}},{{array_centres[key]['avis'] ? array_centres[key]['avis']['result']['geometry']['location']['lng']:''}}"
  53.                 data-rating="{{array_centres[key]['avis'] ? array_centres[key]['avis']['result']['rating']:''}}" data-key={{key}}></p>
  54.             {% set avis = "" %}
  55.             {# prendre les 4 premier avis client #}
  56.             <p hidden id="infocentreavis_{{key}}">
  57.                 {% if array_centres[key]['avis'] %}
  58.                 {% set reviews = '' %}
  59.                 {% for row in array_centres[key]['avis']['result']['reviews'] %}
  60.                     {% set reviews = reviews ~ row['rating']~'|' %}
  61.                 {% endfor %}
  62.                 {{ reviews }}
  63.                     {# {{ array_centres[key]['avis']['result']['reviews'][0]['rating']}}|{{array_centres[key]['avis']['result']['reviews'][1]['rating']}}|{{array_centres[key]['avis']['result']['reviews'][2]['rating']}}|{{array_centres[key]['avis']['result']['reviews'][3]['rating']}} #}
  64.                 {% else %}
  65.                 
  66.                 {% endif %} 
  67.             </p>
  68.             <li class=" nav-item">
  69.                 <a href="#navpills-{{centre.id}}" style="display: flex;align-items: center;" class="nav-abs show p-r-20 {% if centre.centretype.id == firstType %}
  70.                             active
  71.                             {% endif %} " data-toggle="tab" aria-expanded="false">
  72.                     {% if centre.centretype.id == 1 %}
  73.                         <i class="mdi mdi-car pr-2" style="font-size: 25px;"></i>
  74.                         <span class="d-none d-sm-block">
  75.                             Centre Véhicules Légers
  76.                         </span>
  77.                     {% elseif centre.centretype.id == 4 %}
  78.                         <i class="mdi mdi-motorbike pr-2" style="font-size: 25px;"></i>
  79.                         <span class="d-none d-sm-block">
  80.                             Centre Motos, Quads, Voiturettes...
  81.                         </span>
  82.                     {% else %}
  83.                         <i class="mdi mdi-truck pr-2" style="font-size: 25px;"></i>
  84.                         <span class="d-none d-sm-block">
  85.                             Centre Poids Lourds
  86.                         </span>
  87.                     {% endif %}
  88.                 </a>
  89.             </li>
  90.             {% endif %}
  91.             {% endfor %}
  92.         </ul>
  93.     </div>
  94.     {% endif %}
  95.     <div class="tab-content br-n pn ">
  96.         {% set isVlExist = false %}
  97.         {% set vlId = null %}
  98.         {% set isPlExist = false %}
  99.         {% set plId = null %}
  100.         {% set isClExist = false %}
  101.         {% set clId = null %}
  102.         {% for centre in centreGroupe.centres %}
  103.             {% if centre.centretype.id == 1 and centre.ctrparametrecentreadmin.pcaactif %}
  104.                 {% set isVlExist = true %}
  105.                 {% set vlId = centre.id %}
  106.             {% elseif centre.centretype.id == 4 and centre.ctrparametrecentreadmin.pcaactif  %}
  107.                 {% set isClExist = true %}
  108.                 {% set clId = centre.id %}
  109.             {% else %}
  110.                 {% if centre.ctrparametrecentreadmin.pcaactif %}
  111.                     {% set isPlExist = true %}
  112.                     {% set plId = centre.id %}
  113.                 {%  endif %}
  114.             {% endif %}
  115.         {% endfor %}
  116.         {% for key,centre in centreGroupe.centres %}
  117.         {% if centre.ctrparametrecentreadmin.pcaactif %}
  118.         <div id="navpills-{{centre.id}}" class="tab-pane show {{centre.centretype.id}} {{countcentres}} {% if centre.centretype.id == firstType %}active{% endif %} ">
  119.             <div class="image_fond">
  120.                 <div class="row banner-text " style="min-height: 410px;">
  121.                     <div class="col-lg-6 m-t-20 pl-lg-5 p-sm-0 text-lg-left text-center">
  122.                         <h1 class="PN-Black PN-colorbg2 "style="font-size:40px;font-weight:bold">{{centre.ctrnom}}</h1>
  123.                         <br>
  124.                         <address class="PN-Bold PN-colorbg2" style="font-size:25px">{{centre.ctradresse.adrrue}},
  125.                             <br> {{centre.ctradresse.adrcodepostal}}
  126.                             {{centre.ctradresse.adrville}}
  127.                             <br> <i class="mdi mdi-phone mdi-rotate-45" style="font-size: 25px;"></i> <a
  128.                                 class="PN-Bold PN-colorbg2" href="tel:{{centre.ctrtelephone}}">{{centre.ctrtelephone}}</a>
  129.                         </address>
  130.                         <form id="FormCentre{{centre.id}}" action="{{path('prendre_rdv')}}" method="post">
  131.                             <input type="hidden" name="id" value="{{centre.id}}" />
  132.                         </form>
  133.                         <div class="text-lg-left text-center">
  134.                             {% if centre.centretype.id == 1 %}
  135.                                 <a class="btn btn-outline-custom-bg1 btn-rounded mb-2" id="btn_rdv"
  136.                                    href="#" onclick='document.getElementById("FormCentre{{centre.id}}").submit()'>
  137.                                     <span style="display: flex;align-items: center;">
  138.                                         <i class="mdi mdi-car pr-2"></i>
  139.                                             Réservation Véhicules Légers
  140.                                         <i class="mdi mdi-chevron-right-circle mdi-36px"></i>
  141.                                     </span>
  142.                                 </a>
  143.                                 {% if isClExist %}
  144.                                     <a class="btn btn-outline-custom-bg1 btn-rounded mb-2" id="btn_rdv"
  145.                                        href="#" onclick='document.getElementById("FormCentre{{clId}}").submit()'>
  146.                                         <span style="display: flex;align-items: center;">
  147.                                              <i class="mdi mdi-motorbike pr-2"></i>
  148.                                                 Réservation motos, quads, voiturettes...
  149.                                              <i class="mdi mdi-chevron-right-circle mdi-36px"></i>
  150.                                         </span>
  151.                                     </a>
  152.                                 {% endif%}
  153.                                 {%  if isPlExist %}
  154.                                     <a class="btn btn-outline-custom-bg1 btn-rounded mb-2" id="btn_rdv"
  155.                                        href="#" onclick='document.getElementById("FormCentre{{plId}}").submit()'>
  156.                                         <span style="display: flex;align-items: center;">
  157.                                             <i class="mdi mdi-truck pr-2"></i>
  158.                                                 Réservation Poids Lourds
  159.                                             <i class="mdi mdi-chevron-right-circle mdi-36px"></i>
  160.                                         </span>
  161.                                     </a>
  162.                                 {% endif %}
  163.                             {% endif %}
  164.                             {% if centre.centretype.id == 4 %}
  165.                                 <a class="btn btn-outline-custom-bg1 btn-rounded mb-2" id="btn_rdv"
  166.                                    href="#" onclick='document.getElementById("FormCentre{{centre.id}}").submit()'>
  167.                                         <span style="display: flex;align-items: center;">
  168.                                              <i class="mdi mdi-motorbike pr-2"></i>
  169.                                                 Réservation motos, quads, voiturettes...
  170.                                              <i class="mdi mdi-chevron-right-circle mdi-36px"></i>
  171.                                         </span>
  172.                                 </a>
  173.                                 {% if isVlExist %}
  174.                                     <a class="btn btn-outline-custom-bg1 btn-rounded mb-2" id="btn_rdv"
  175.                                        href="#" onclick='document.getElementById("FormCentre{{vlId}}").submit()'>
  176.                                             <span style="display: flex;align-items: center;">
  177.                                                  <i class="mdi mdi-car pr-2"></i>
  178.                                                     Réservation Véhicules Légers
  179.                                                  <i class="mdi mdi-chevron-right-circle mdi-36px"></i>
  180.                                             </span>
  181.                                     </a>
  182.                                 {% endif%}
  183.                                 {%  if isPlExist %}
  184.                                     <a class="btn btn-outline-custom-bg1 btn-rounded mb-2" id="btn_rdv"
  185.                                        href="#" onclick='document.getElementById("FormCentre{{plId}}").submit()'>
  186.                                         <span style="display: flex;align-items: center;">
  187.                                             <i class="mdi mdi-truck pr-2"></i>
  188.                                                 Réservation Poids Lourds
  189.                                             <i class="mdi mdi-chevron-right-circle mdi-36px"></i>
  190.                                         </span>
  191.                                     </a>
  192.                                 {% endif %}
  193.                             {% endif %}
  194.                             {% if centre.centretype.id == 2 %}
  195.                                 <a class="btn btn-outline-custom-bg1 btn-rounded mb-2" id="btn_rdv"
  196.                                    href="#" onclick='document.getElementById("FormCentre{{centre.id}}").submit()'>
  197.                                     <span style="display: flex;align-items: center;">
  198.                                          <i class="mdi mdi-truck pr-2"></i>
  199.                                             Réservation Poids Lourds
  200.                                          <i class="mdi mdi-chevron-right-circle mdi-36px"></i>
  201.                                     </span>
  202.                                 </a>
  203.                                 {% if isVlExist %}
  204.                                     <a class="btn btn-outline-custom-bg1 btn-rounded mb-2" id="btn_rdv"
  205.                                        href="#" onclick='document.getElementById("FormCentre{{vlId}}").submit()'>
  206.                                             <span style="display: flex;align-items: center;">
  207.                                                  <i class="mdi mdi-car pr-2"></i>
  208.                                                     Réservation Véhicules Légers
  209.                                                  <i class="mdi mdi-chevron-right-circle mdi-36px"></i>
  210.                                             </span>
  211.                                     </a>
  212.                                 {% endif%}
  213.                                 {% if isClExist %}
  214.                                     <a class="btn btn-outline-custom-bg1 btn-rounded mb-2" id="btn_rdv"
  215.                                        href="#" onclick='document.getElementById("FormCentre{{clId}}").submit()'>
  216.                                         <span style="display: flex;align-items: center;">
  217.                                              <i class="mdi mdi-motorbike pr-2"></i>
  218.                                                 Réservation motos, quads, voiturettes...
  219.                                              <i class="mdi mdi-chevron-right-circle mdi-36px"></i>
  220.                                         </span>
  221.                                     </a>
  222.                                 {% endif%}
  223.                             {% endif %}
  224.                         </div>
  225.                         <br>
  226.                         {% if parametreCentreGroupe.pcgcolorinfopaiementtext %}
  227.                             <div class="text-lg-left text-center">
  228.                                 <h3 style="font-weight: bold;color:{{parametreCentreGroupe.pcgcolorinfopaiementtext}}">{{parametreCentreGroupe.pcginfobandeau|raw}}</h3>
  229.                             </div>
  230.                         {% endif %}
  231.                         <br>
  232.                     </div>
  233.                     <div class="col-lg-6 p-10 text-center vm">
  234.                         <div>
  235.                             <img style="border-radius: 100px 0px;position:relative;" 
  236.                             src= 
  237.                             {% if centre.ctrparametrecentre.pccheminimgcentre %}
  238.                                     {% set logo = asset("/uploads/dataCentre/")~ centre.centregroupe.id ~"/"~ centre.id ~"/"~ centre.ctrparametrecentre.pccheminimgcentre %}
  239.                                     "{{logo}}"
  240.                                 {% else %}
  241.                                     "{{ asset("public/images/AdobeStock_383270670_Preview.jpeg")}}"
  242.                                 {% endif %}
  243.                             
  244.                             width="80%"
  245.                                 alt="{{centre.ctrnom}}" />
  246.                         </div>
  247.                     </div>
  248.                 </div>
  249.             </div>
  250.             {% if array_centres[key].Prestations %}
  251.                 {% set afficheprix = true %}
  252.                 {% if centre.ctrparametrecentre.isPaiementEnLigne == false and centre.ctrparametrecentre.isDisplayTarifFromFo == false %}
  253.                     {% set afficheprix = false %}
  254.                 {% endif %}
  255.             <section class=" p-20" style="background-color:{{centreGroupe.centregroupecss.bg1}}; opacity: 0.92">
  256.                 <div class="row">
  257.                     <div class="col-lg-12 ">
  258.                         <h2 class="PN-Black PN-color1 ">Nos prestations</h2>
  259.                     </div>
  260.                     <div class="row p-20 col-lg-12 prestation-div">
  261.                       
  262.                         {% for prestation in array_centres[key].Prestations %}
  263.                         <div class=" col-xs-6 col-md-6 col-lg-3 PN-color1 ">
  264.                             
  265.                             {% if prestation.MessageAppelCentre %}
  266.                                 <a href="#" onclick="message_appel_centre('{{centre.ctrtelephone}}')">
  267.                             {% else %}
  268.                                 <a href="#" onclick='document.getElementById("FormCentre{{centre.id}}_{{prestation.Id}}").submit()'>
  269.                             {% endif %}
  270.                             <div style="min-height:100px;display: flex;align-items: flex-end">
  271.                                 {% if centre.centretype.id == 2 %}
  272.                                     <p class="PN-Black PN-color1 p-l-20">{{prestation.TypeVisite}} ({{ prestation.typeVehicule }})</p>
  273.                                 {% else %}
  274.                                     <p class="PN-Black PN-color1 p-l-20">{{prestation.TypeVisite}}</p>
  275.                                 {% endif %}
  276.                             </div>
  277.                             
  278.                             <form id="FormCentre{{centre.id}}_{{prestation.Id}}" action="{{path('prendre_rdv')}}" method="post">
  279.                                 <input type="hidden" name="id" value="{{centre.id}}" />
  280.                                 <input type="hidden" name="prestation" value="{{prestation.TypeVisite}}|{{prestation.Id}}|{{prestation.PrixInitial}}|{{prestation.Duree}}|{{prestation.PaiementEnLigne}}" />
  281.                             </form>
  282.                             {% if prestation.Reduction %}
  283.                                 <div style="background: {{centreGroupe.centregroupecss.bg3}} 0% 0% no-repeat padding-box;border-radius: 35px;box-shadow: 10px 10px 10px #000000;opacity: 1;height: 150px;">
  284.                                     <div class="text-right p-t-20">
  285.                                         {% if afficheprix %}
  286.                                             <p class="PN-color3 font-bold"  style="font-size:16px;padding-right: 10px;">à partir de</p>
  287.                                         {%  endif %}
  288.                                         <h2 class="PN-Black PN-color3 p-r-10" style="font-size: 30px;">
  289.                                             <span
  290.                                             style="font-size:18px;padding-right: 10px;">
  291.                                             {% if centre.centretype.id == 2 %}
  292.                                                 </span>
  293.                                                 {{prestation.Duree}} Minutes
  294.                                             {% else %}
  295.                                                 {% if afficheprix %}
  296.                                                     {% if centre.ctrparametrecentre.pcaffpercent and centre.ctrparametrecentre.pcaffmontant == 0 %}
  297.                                                         <span>-{{((((prestation.PrixInitial|number_format(2)) - prestation.PrixFinal|number_format(0))/prestation.PrixInitial|number_format(2)) *100)|round(0)}} % </span> </span>
  298.                                                     {% elseif centre.ctrparametrecentre.pcaffpercent and centre.ctrparametrecentre.pcaffmontant %}
  299.                                                         <span>-{{((((prestation.PrixInitial|number_format(2)) - prestation.PrixFinal|number_format(0))/prestation.PrixInitial|number_format(2)) *100)|round(0)}} % </span>
  300.                                                         <s>{{prestation.PrixInitial|number_format(2)}}€ </s> </span>
  301.                                                     {% else %}
  302.                                                         <s>{{prestation.PrixInitial|number_format(2)}}€ </s> </span>
  303.                                                     {% endif%}
  304.                                                     {{prestation.PrixFinal|number_format(2)}}€ TTC
  305.                                                 {% endif %}
  306.                                             {% endif %}
  307.                                         </h2>
  308.                                         <p class="PN-color3 p-r-10 font-bold ">
  309.                                             Réserver
  310.                                             <i class="mdi mdi-chevron-right-circle" style="font-size: 18px;"></i>
  311.                                         </p>
  312.                                     </div>
  313.                                 </div>
  314.                             
  315.                             {% else %}
  316.                             <div style="background: {{centreGroupe.centregroupecss.bg2}} 0% 0% no-repeat padding-box;border-radius: 35px;box-shadow: 10px 10px 10px #000000;opacity: 1;height: 150px;">
  317.                                     <div class="text-right p-t-20">
  318.                                         <h2 class="PN-Black PN-color2 p-r-10 m-b-20" style="font-size: 30px;">
  319.                                             {% if centre.centretype.id == 2 %}
  320.                                                 {{prestation.Duree}} Minutes
  321.                                             {% else %}
  322.                                                 {% if afficheprix %}
  323.                                                     {{prestation.PrixInitial|number_format(2)}}€ TTC
  324.                                                 {% endif %}
  325.                                             {% endif %}
  326.                                         </h2>
  327.                                         <p class="PN-color2 p-r-10 font-bold">
  328.                                             Réserver
  329.                                             <i class="mdi mdi-chevron-right-circle " style="font-size: 18px;"></i>
  330.                                         </p>
  331.                                     </div>
  332.                             </div>
  333.                             {% endif %}
  334.                         </a>
  335.                         </div>
  336.                         {% endfor %}
  337.                     </div>
  338.                 </div>
  339.             </section>
  340.             {% endif %}
  341.             {% include 'components/google_avis.html.twig' %}
  342.             
  343.             {% include 'components/en_savoir_plus.html.twig' %}
  344.             {% if centreGroupeByGerant|length > 0 %}
  345.             <section class=" p-20" style="background-color:{{centreGroupe.centregroupecss.bg1}};border-bottom: 1px solid rgba(120,130,140,0.13);opacity: 0.92">
  346.                 <div class="row ">
  347.                     <div class="col-lg-12">
  348.                         <h2 class="PN-Black PN-color1">
  349.                             Nos autres centres
  350.                         </h2>
  351.                     </div>
  352.                     <div class="col-lg-12 m-2 text-center row justify-content-center" id=""
  353.                         name="">
  354.                         {% for centreGroupe in centreGroupeByGerant %}
  355.                             <a class="col-lg-3 d-block m-2" href="http://{{centreGroupe.Lien}}">
  356.                                 <div style="background: #fffefe 0% 0% no-repeat padding-box;
  357.                                                                         box-shadow: 0px 6px 6px #B2B2B2;
  358.                                                                         border-radius: 40px;
  359.                                                                         opacity: 1;">
  360.                                     <div class="col-lg-12 text-left p-20">
  361.                                         <h3 class="PN-Bold PN-colorbg1">{{centreGroupe.Nom}}</h3>
  362.                                     </div>
  363.                                     <div class="col-lg-12 text-left p-20">
  364.                                         <h4 class="PN-Bold PN-colorbg1">{{centreGroupe.Type}}</h4>
  365.                                         <h4 class="PN-Bold PN-colorbg1">{{centreGroupe.Ville}}</h4>
  366.                                     </div>
  367.                                     <div class="col-lg-12 text-left p-20">
  368.                                         <h4 style="font-weight: bold;display: flex;flex-direction: row-reverse;">
  369.                                             <span class="PN-colorbg1" ><i class="mdi mdi-link-variant mdi-36px "></i> Accéder au site</span>
  370.                                         </h4>
  371.                                     </div>
  372.                                 </div>
  373.                             </a>
  374.                         {% endfor %}
  375.                     </div>
  376.                 </div>
  377.             </section>
  378.             {% endif %}
  379.         </div>
  380.         {% endif %}
  381.         {% endfor %}
  382.     </div>
  383. </div>
  384. {% endblock %}
  385. {% block javascripts %}
  386. <script>
  387.     $(document).ready(function () {
  388.         {% for message in app.flashes('error') %}
  389.             toastr.error('{{ message|escape('js') }}', { timeOut: 9500 });
  390.         {% endfor %}
  391.     });
  392. </script>
  393. {% endblock %}