<style>
@media screen and (max-width: 480px) {
.row .note-google .jq-star{
width: 30px !important;
height: 30px !important;
}
.note-google h2{
font-size: 24px !important;
}
}
@media screen and (max-width: 1700px) {
.note-google .jq-star{
width: 40px !important;
height: 40px !important;
}
}
.note-google h2{
font-size: 32px
}
</style>
<section class=" p-20"
style="background-color:{{centreGroupe.centregroupecss.bg1}};border-bottom: 1px solid rgba(120,130,140,0.13);">
<div class="row">
<div class={{centre.ctrparametrecentre.pcavisgoogle ? "col-lg-4" :"col-lg-6"}}>
<h2 class="PN-Black PN-color1">
Coordonnées
</h2>
{# <div id="map_{{key}}" style="height: 500px; width:100%"></div> #}
{% if array_centres[key]['avis']['result'] is defined %}
<iframe
src="https://maps.google.com/maps?&q={{array_centres[key].avis.result.name|replace({' ' : '+'})}},{{array_centres[key].avis.result.formatted_address|replace({' ' : '+'})}}&output=embed"
width="100%" height="500px"></iframe>
{% endif %}
</div>
<div class={% if centre.ctrparametrecentre.pcavisgoogle %} "col-lg-3 p-t-30" {% else %} "col-lg-6 p-t-30" {%
endif %}>
<h4 class="PN-Black PN-color1">Adresse</h4>
<p class=" PN-color1">
{{centre.ctradresse.adrrue}} <br>
{% if centre.ctradresse.adrcomplement %}
{{centre.ctradresse.adrcomplement}} <br>
{% endif %}
{{centre.ctradresse.adrcodepostal}} {{centre.ctradresse.adrville}}
</p>
<h4 class="PN-Black PN-color1 p-t-20">Contact</h4>
<a href="tel:{{centre.ctrtelephone}}">
<h4 class="PN-color1"><span class="mdi mdi-phone mdi-rotate-45"> </span>{{centre.ctrtelephone}}</h4>
</a>
<a href="mailto:{{centre.ctremail}}">
<h4 class="PN-color1"><span class="mdi mdi-email"> </span>{{centre.ctremail}}</h4>
</a>
<h4 class="PN-Black PN-color1 p-t-20">Horaires</h4>
{% set trans_day_hash = {
"Monday": "Lundi",
"Tuesday": "Mardi",
"Wednesday": "Mercredi",
"Thursday": "Jeudi",
"Friday": "Vendredi",
"Saturday": "Samedi",
"Sunday": "Dimanche"
}
%}
{% for key1,row in array_centres[key]['Horaires'] %}
{% if row.matin.ouvert or row.apres_midi.ouvert %}
<h4 class=" 0-0 {% if trans_day_hash[" now"|date('l')]==key1 %} text-info {% else %} PN-color1 {% endif %}">
{{key1}} : <span class=" ">
{% if row.matin.ouvert %}
{{row.matin.ouverture|date("H:i")}}
{% if row.apres_midi.ouverture|date("H:i") != row.matin.fermeture|date("H:i") or row.apres_midi.ouvert == false%}
- {{row.matin.fermeture|date("H:i")}}
{% endif %}
{% if row.apres_midi.ouvert and row.apres_midi.ouverture|date("H:i") != row.matin.fermeture|date("H:i") %}
et
{% endif %}
{% endif %}
{% if row.apres_midi.ouvert %}
{% if row.apres_midi.ouverture|date("H:i") != row.matin.fermeture|date("H:i") or row.matin.ouvert == false %}
{{row.apres_midi.ouverture|date("H:i")}}
{% endif %}
- {{row.apres_midi.fermeture|date("H:i")}}
{% endif %}
</span></h4>
{% endif %}
{% endfor %}
</div>
{% if centre.ctrparametrecentre.pcavisgoogle %}
<div class="col-lg-5 row">
<div class="col-lg-12">
<h2 class="PN-Black PN-color1 m-b-20">
Ce que pensent nos clients sur google
</h2>
</div>
<div class="col-lg-12">
<h4 class="PN-Black PN-color1">
{% if array_centres[key]['avis'] %}
{% if array_centres[key]['avis']['result'] is defined %}
{{array_centres[key]['avis']['result']['name']}}
{% endif %}
{% endif %}
</h4>
</div>
<div class="rating col-lg-8 d-flex align-items-center note-google">
<h2 class="PN-Black PN-color1 p-r-10">
{% if array_centres[key]['avis'] %}
{% if array_centres[key]['avis']['result'] is defined %}
{{array_centres[key]['avis']['result']['rating']}}</h2>
{% endif %}
{% endif %}
<div class="stars_{{key}} p-r-10"></div>
<div>
<h4 class=" PN-color1 p-r-20">
{% if array_centres[key]['avis'] %}
{% if array_centres[key]['avis']['result'] is defined %}
{{array_centres[key]['avis']['result']['user_ratings_total']}} Avis</h4>
{% endif %}
{% endif %}
</div>
</div>
<div class="col-lg-4">
{% if array_centres[key]['avis'] %}
{% if array_centres[key]['avis']['result'] is defined %}
<a href="{{array_centres[key]['avis']['result']['url']}}" target="_blank"
class="btn btn-outline-custom-bg2 PN-colorbg1 btn-rounded p-l-20 border-0"
style="font-size: 15px;background-color: white;color:{{centreGroupe.centregroupecss.bg1}}">
<span style="display: flex;align-items: center;"> Plus d'avis
<i class="mdi mdi-open-in-new mdi-24px"></i></span>
</a>
{% endif %}
{% endif %}
</div>
<div class="col-lg-12 row p-t-20" style="display: flex;justify-content: flex-end;">
{% set nb_reviews = 0 %}
{% if array_centres[key]['avis'] %}
{% if array_centres[key]['avis']['result'] is defined %}
{% for row in array_centres[key]['avis']['result']['reviews'] %}
{% set nb_reviews = nb_reviews + 1 %}
{% if nb_reviews < 5 %} <div class="col-lg-12 col-xl-6 row p-t-10 ">
<div class="btn-rounded row "
style="background-color:white;border-radius: 25px;margin-right: 25px;">
<div class="col-auto">
<img src="{{row.profile_photo_url}}" alt="" width="60px">
</div>
<div class="col-auto">
<p class="PN-Light PN-blue PN-Bold m-0" style="font-size: 12px;">
{{row.relative_time_description}}</p>
<p class="PN-Light PN-blue m-0" style="font-size: 12px;">{{row.author_name}}</p>
<div class="stars_{{key}}_{{nb_reviews}} p-r-10"></div>
</div>
<div class="col-lg-12">
<p class="PN-Light PN-blue m-0" style="font-size: 12px;">{{row.text}}</p>
</div>
</div>
</div>
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
</div>
{% endif %}
</div>
</section>
<script>
document.addEventListener('DOMContentLoaded', function () {
function afficheStar(rating, className, starSize) {
$("."+className).starRating({
initialRating: rating,
strokeColor: 'gold',
useGradient: false,
strokeWidth: 0,
starSize: starSize,
readOnly: true
});
}
for (let i = 0; i < $('#countCentre').data('countcentres'); i++) {
var lat = $('#infocentre_' + i).data('coordonneegps').split(',')[0]
var lng = $('#infocentre_' + i).data('coordonneegps').split(',')[1]
// initMap(i, lat, lng)
afficheStar($('#infocentre_' + i).data('rating'), 'stars_' + i, 50)
for (let x = 0; x < $('#infocentreavis_' + i).text().split('|').length; x++) {
afficheStar($('#infocentreavis_' + i).text().split('|')[x], 'stars_' + i + '_' + (x + 1), 20)
}
}
});
</script>