{% extends 'public/base.html.twig' %}
{% block body %}
<style>
@media screen and (min-width: 576px) {
.btn-outline-custom-bg1 span{
font-size: 20px;
}
.image_fond{
padding: 20px !important;
}
.mdi-car, .mdi-motorbike, .mdi-truck{
font-size: 36px !important;
}
}
@media screen and (max-width: 942px) {
.btn-outline-custom-bg1{
max-width: 80%;
}
}
.mdi-car, .mdi-motorbike, .mdi-truck{
font-size: 24px;
}
.image_fond{
padding: 5px;
}
.btn-outline-custom-bg1 span{
overflow: hidden;
text-overflow: ellipsis;
margin-right: 35px;
margin-left: -5px;
}
.btn-outline-custom-bg1{
position: relative;
min-width: 320px;
}
.btn-outline-custom-bg1 .mdi-chevron-right-circle{
position: absolute;
right: 14px;
}
.prestation-div{
margin: 0;
}
</style>
<div class="col-lg-12 p-0 ">
{% if centreGroupe %}
<p hidden id="countCentre" data-countCentres={{countcentres}}></p>
<div class="col-lg-12 p-l-20 {% if countcentres == 1 %}d-none{% endif %}" style="display: flex;align-items: flex-end;background-color: #d6e8f6; ">
<ul class="nav nav-pills pl-lg-5">
{% for key,centre in centreGroupe.centres %}
{% if centre.ctrparametrecentreadmin.pcaactif %}
<p hidden id="infocentre_{{key}}"
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']:''}}"
data-rating="{{array_centres[key]['avis'] ? array_centres[key]['avis']['result']['rating']:''}}" data-key={{key}}></p>
{% set avis = "" %}
{# prendre les 4 premier avis client #}
<p hidden id="infocentreavis_{{key}}">
{% if array_centres[key]['avis'] %}
{% set reviews = '' %}
{% for row in array_centres[key]['avis']['result']['reviews'] %}
{% set reviews = reviews ~ row['rating']~'|' %}
{% endfor %}
{{ reviews }}
{# {{ 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']}} #}
{% else %}
{% endif %}
</p>
<li class=" nav-item">
<a href="#navpills-{{centre.id}}" style="display: flex;align-items: center;" class="nav-abs show p-r-20 {% if centre.centretype.id == firstType %}
active
{% endif %} " data-toggle="tab" aria-expanded="false">
{% if centre.centretype.id == 1 %}
<i class="mdi mdi-car pr-2" style="font-size: 25px;"></i>
<span class="d-none d-sm-block">
Centre Véhicules Légers
</span>
{% elseif centre.centretype.id == 4 %}
<i class="mdi mdi-motorbike pr-2" style="font-size: 25px;"></i>
<span class="d-none d-sm-block">
Centre Motos, Quads, Voiturettes...
</span>
{% else %}
<i class="mdi mdi-truck pr-2" style="font-size: 25px;"></i>
<span class="d-none d-sm-block">
Centre Poids Lourds
</span>
{% endif %}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
{% endif %}
<div class="tab-content br-n pn ">
{% set isVlExist = false %}
{% set vlId = null %}
{% set isPlExist = false %}
{% set plId = null %}
{% set isClExist = false %}
{% set clId = null %}
{% for centre in centreGroupe.centres %}
{% if centre.centretype.id == 1 and centre.ctrparametrecentreadmin.pcaactif %}
{% set isVlExist = true %}
{% set vlId = centre.id %}
{% elseif centre.centretype.id == 4 and centre.ctrparametrecentreadmin.pcaactif %}
{% set isClExist = true %}
{% set clId = centre.id %}
{% else %}
{% if centre.ctrparametrecentreadmin.pcaactif %}
{% set isPlExist = true %}
{% set plId = centre.id %}
{% endif %}
{% endif %}
{% endfor %}
{% for key,centre in centreGroupe.centres %}
{% if centre.ctrparametrecentreadmin.pcaactif %}
<div id="navpills-{{centre.id}}" class="tab-pane show {{centre.centretype.id}} {{countcentres}} {% if centre.centretype.id == firstType %}active{% endif %} ">
<div class="image_fond">
<div class="row banner-text " style="min-height: 410px;">
<div class="col-lg-6 m-t-20 pl-lg-5 p-sm-0 text-lg-left text-center">
<h1 class="PN-Black PN-colorbg2 "style="font-size:40px;font-weight:bold">{{centre.ctrnom}}</h1>
<br>
<address class="PN-Bold PN-colorbg2" style="font-size:25px">{{centre.ctradresse.adrrue}},
<br> {{centre.ctradresse.adrcodepostal}}
{{centre.ctradresse.adrville}}
<br> <i class="mdi mdi-phone mdi-rotate-45" style="font-size: 25px;"></i> <a
class="PN-Bold PN-colorbg2" href="tel:{{centre.ctrtelephone}}">{{centre.ctrtelephone}}</a>
</address>
<form id="FormCentre{{centre.id}}" action="{{path('prendre_rdv')}}" method="post">
<input type="hidden" name="id" value="{{centre.id}}" />
</form>
<div class="text-lg-left text-center">
{% if centre.centretype.id == 1 %}
<a class="btn btn-outline-custom-bg1 btn-rounded mb-2" id="btn_rdv"
href="#" onclick='document.getElementById("FormCentre{{centre.id}}").submit()'>
<span style="display: flex;align-items: center;">
<i class="mdi mdi-car pr-2"></i>
Réservation Véhicules Légers
<i class="mdi mdi-chevron-right-circle mdi-36px"></i>
</span>
</a>
{% if isClExist %}
<a class="btn btn-outline-custom-bg1 btn-rounded mb-2" id="btn_rdv"
href="#" onclick='document.getElementById("FormCentre{{clId}}").submit()'>
<span style="display: flex;align-items: center;">
<i class="mdi mdi-motorbike pr-2"></i>
Réservation motos, quads, voiturettes...
<i class="mdi mdi-chevron-right-circle mdi-36px"></i>
</span>
</a>
{% endif%}
{% if isPlExist %}
<a class="btn btn-outline-custom-bg1 btn-rounded mb-2" id="btn_rdv"
href="#" onclick='document.getElementById("FormCentre{{plId}}").submit()'>
<span style="display: flex;align-items: center;">
<i class="mdi mdi-truck pr-2"></i>
Réservation Poids Lourds
<i class="mdi mdi-chevron-right-circle mdi-36px"></i>
</span>
</a>
{% endif %}
{% endif %}
{% if centre.centretype.id == 4 %}
<a class="btn btn-outline-custom-bg1 btn-rounded mb-2" id="btn_rdv"
href="#" onclick='document.getElementById("FormCentre{{centre.id}}").submit()'>
<span style="display: flex;align-items: center;">
<i class="mdi mdi-motorbike pr-2"></i>
Réservation motos, quads, voiturettes...
<i class="mdi mdi-chevron-right-circle mdi-36px"></i>
</span>
</a>
{% if isVlExist %}
<a class="btn btn-outline-custom-bg1 btn-rounded mb-2" id="btn_rdv"
href="#" onclick='document.getElementById("FormCentre{{vlId}}").submit()'>
<span style="display: flex;align-items: center;">
<i class="mdi mdi-car pr-2"></i>
Réservation Véhicules Légers
<i class="mdi mdi-chevron-right-circle mdi-36px"></i>
</span>
</a>
{% endif%}
{% if isPlExist %}
<a class="btn btn-outline-custom-bg1 btn-rounded mb-2" id="btn_rdv"
href="#" onclick='document.getElementById("FormCentre{{plId}}").submit()'>
<span style="display: flex;align-items: center;">
<i class="mdi mdi-truck pr-2"></i>
Réservation Poids Lourds
<i class="mdi mdi-chevron-right-circle mdi-36px"></i>
</span>
</a>
{% endif %}
{% endif %}
{% if centre.centretype.id == 2 %}
<a class="btn btn-outline-custom-bg1 btn-rounded mb-2" id="btn_rdv"
href="#" onclick='document.getElementById("FormCentre{{centre.id}}").submit()'>
<span style="display: flex;align-items: center;">
<i class="mdi mdi-truck pr-2"></i>
Réservation Poids Lourds
<i class="mdi mdi-chevron-right-circle mdi-36px"></i>
</span>
</a>
{% if isVlExist %}
<a class="btn btn-outline-custom-bg1 btn-rounded mb-2" id="btn_rdv"
href="#" onclick='document.getElementById("FormCentre{{vlId}}").submit()'>
<span style="display: flex;align-items: center;">
<i class="mdi mdi-car pr-2"></i>
Réservation Véhicules Légers
<i class="mdi mdi-chevron-right-circle mdi-36px"></i>
</span>
</a>
{% endif%}
{% if isClExist %}
<a class="btn btn-outline-custom-bg1 btn-rounded mb-2" id="btn_rdv"
href="#" onclick='document.getElementById("FormCentre{{clId}}").submit()'>
<span style="display: flex;align-items: center;">
<i class="mdi mdi-motorbike pr-2"></i>
Réservation motos, quads, voiturettes...
<i class="mdi mdi-chevron-right-circle mdi-36px"></i>
</span>
</a>
{% endif%}
{% endif %}
</div>
<br>
{% if parametreCentreGroupe.pcgcolorinfopaiementtext %}
<div class="text-lg-left text-center">
<h3 style="font-weight: bold;color:{{parametreCentreGroupe.pcgcolorinfopaiementtext}}">{{parametreCentreGroupe.pcginfobandeau|raw}}</h3>
</div>
{% endif %}
<br>
</div>
<div class="col-lg-6 p-10 text-center vm">
<div>
<img style="border-radius: 100px 0px;position:relative;"
src=
{% if centre.ctrparametrecentre.pccheminimgcentre %}
{% set logo = asset("/uploads/dataCentre/")~ centre.centregroupe.id ~"/"~ centre.id ~"/"~ centre.ctrparametrecentre.pccheminimgcentre %}
"{{logo}}"
{% else %}
"{{ asset("public/images/AdobeStock_383270670_Preview.jpeg")}}"
{% endif %}
width="80%"
alt="{{centre.ctrnom}}" />
</div>
</div>
</div>
</div>
{% if array_centres[key].Prestations %}
{% set afficheprix = true %}
{% if centre.ctrparametrecentre.isPaiementEnLigne == false and centre.ctrparametrecentre.isDisplayTarifFromFo == false %}
{% set afficheprix = false %}
{% endif %}
<section class=" p-20" style="background-color:{{centreGroupe.centregroupecss.bg1}}; opacity: 0.92">
<div class="row">
<div class="col-lg-12 ">
<h2 class="PN-Black PN-color1 ">Nos prestations</h2>
</div>
<div class="row p-20 col-lg-12 prestation-div">
{% for prestation in array_centres[key].Prestations %}
<div class=" col-xs-6 col-md-6 col-lg-3 PN-color1 ">
{% if prestation.MessageAppelCentre %}
<a href="#" onclick="message_appel_centre('{{centre.ctrtelephone}}')">
{% else %}
<a href="#" onclick='document.getElementById("FormCentre{{centre.id}}_{{prestation.Id}}").submit()'>
{% endif %}
<div style="min-height:100px;display: flex;align-items: flex-end">
{% if centre.centretype.id == 2 %}
<p class="PN-Black PN-color1 p-l-20">{{prestation.TypeVisite}} ({{ prestation.typeVehicule }})</p>
{% else %}
<p class="PN-Black PN-color1 p-l-20">{{prestation.TypeVisite}}</p>
{% endif %}
</div>
<form id="FormCentre{{centre.id}}_{{prestation.Id}}" action="{{path('prendre_rdv')}}" method="post">
<input type="hidden" name="id" value="{{centre.id}}" />
<input type="hidden" name="prestation" value="{{prestation.TypeVisite}}|{{prestation.Id}}|{{prestation.PrixInitial}}|{{prestation.Duree}}|{{prestation.PaiementEnLigne}}" />
</form>
{% if prestation.Reduction %}
<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;">
<div class="text-right p-t-20">
{% if afficheprix %}
<p class="PN-color3 font-bold" style="font-size:16px;padding-right: 10px;">à partir de</p>
{% endif %}
<h2 class="PN-Black PN-color3 p-r-10" style="font-size: 30px;">
<span
style="font-size:18px;padding-right: 10px;">
{% if centre.centretype.id == 2 %}
</span>
{{prestation.Duree}} Minutes
{% else %}
{% if afficheprix %}
{% if centre.ctrparametrecentre.pcaffpercent and centre.ctrparametrecentre.pcaffmontant == 0 %}
<span>-{{((((prestation.PrixInitial|number_format(2)) - prestation.PrixFinal|number_format(0))/prestation.PrixInitial|number_format(2)) *100)|round(0)}} % </span> </span>
{% elseif centre.ctrparametrecentre.pcaffpercent and centre.ctrparametrecentre.pcaffmontant %}
<span>-{{((((prestation.PrixInitial|number_format(2)) - prestation.PrixFinal|number_format(0))/prestation.PrixInitial|number_format(2)) *100)|round(0)}} % </span>
<s>{{prestation.PrixInitial|number_format(2)}}€ </s> </span>
{% else %}
<s>{{prestation.PrixInitial|number_format(2)}}€ </s> </span>
{% endif%}
{{prestation.PrixFinal|number_format(2)}}€ TTC
{% endif %}
{% endif %}
</h2>
<p class="PN-color3 p-r-10 font-bold ">
Réserver
<i class="mdi mdi-chevron-right-circle" style="font-size: 18px;"></i>
</p>
</div>
</div>
{% else %}
<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;">
<div class="text-right p-t-20">
<h2 class="PN-Black PN-color2 p-r-10 m-b-20" style="font-size: 30px;">
{% if centre.centretype.id == 2 %}
{{prestation.Duree}} Minutes
{% else %}
{% if afficheprix %}
{{prestation.PrixInitial|number_format(2)}}€ TTC
{% endif %}
{% endif %}
</h2>
<p class="PN-color2 p-r-10 font-bold">
Réserver
<i class="mdi mdi-chevron-right-circle " style="font-size: 18px;"></i>
</p>
</div>
</div>
{% endif %}
</a>
</div>
{% endfor %}
</div>
</div>
</section>
{% endif %}
{% include 'components/google_avis.html.twig' %}
{% include 'components/en_savoir_plus.html.twig' %}
{% if centreGroupeByGerant|length > 0 %}
<section class=" p-20" style="background-color:{{centreGroupe.centregroupecss.bg1}};border-bottom: 1px solid rgba(120,130,140,0.13);opacity: 0.92">
<div class="row ">
<div class="col-lg-12">
<h2 class="PN-Black PN-color1">
Nos autres centres
</h2>
</div>
<div class="col-lg-12 m-2 text-center row justify-content-center" id=""
name="">
{% for centreGroupe in centreGroupeByGerant %}
<a class="col-lg-3 d-block m-2" href="http://{{centreGroupe.Lien}}">
<div style="background: #fffefe 0% 0% no-repeat padding-box;
box-shadow: 0px 6px 6px #B2B2B2;
border-radius: 40px;
opacity: 1;">
<div class="col-lg-12 text-left p-20">
<h3 class="PN-Bold PN-colorbg1">{{centreGroupe.Nom}}</h3>
</div>
<div class="col-lg-12 text-left p-20">
<h4 class="PN-Bold PN-colorbg1">{{centreGroupe.Type}}</h4>
<h4 class="PN-Bold PN-colorbg1">{{centreGroupe.Ville}}</h4>
</div>
<div class="col-lg-12 text-left p-20">
<h4 style="font-weight: bold;display: flex;flex-direction: row-reverse;">
<span class="PN-colorbg1" ><i class="mdi mdi-link-variant mdi-36px "></i> Accéder au site</span>
</h4>
</div>
</div>
</a>
{% endfor %}
</div>
</div>
</section>
{% endif %}
</div>
{% endif %}
{% endfor %}
</div>
</div>
{% endblock %}
{% block javascripts %}
<script>
$(document).ready(function () {
{% for message in app.flashes('error') %}
toastr.error('{{ message|escape('js') }}', { timeOut: 9500 });
{% endfor %}
});
</script>
{% endblock %}