{# {% for venue in venues %}
{% if venue.id == 80 %}
{{ dump(venue.title|e('js')) }}
{% endif %}
{% endfor %} #}
<section class="calendar">
<div class="title">{{ 'reservation_title'|tr(tr)|raw }}</div>
<a href="/front/deroulement-spectacle.pdf" target="_blank" class="download">{{ 'btn_deroulement'|tr(tr)|raw }}
<svg width="26px" height="26px" version="1.1" id="Composant_6_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="26px" y="26px" viewBox="0 0 26 26" style="enable-background:new 0 0 26 26;" xml:space="preserve">
<style type="text/css">
.st0{fill:none;}
.st1{fill:#ffffff;stroke:#ffffff;}
.st2{fill:none;stroke:#000000;stroke-linecap:round;}
</style>
<g id="Ellipse_29">
<circle class="st0" cx="13" cy="13" r="13"></circle>
<circle class="st1" cx="13" cy="13" r="12.5"></circle>
</g>
<g id="Groupe_322" transform="translate(880 -1705.565) rotate(90)">
<line id="Ligne_66" class="st2" x1="1712.9" y1="867" x2="1724.2" y2="867"></line>
<line id="Ligne_67" class="st2" x1="1720.7" y1="864" x2="1724.2" y2="867"></line>
<line id="Ligne_68" class="st2" x1="1720.7" y1="870" x2="1724.2" y2="867"></line>
</g>
</svg>
</a>
<div id='calendar'><span class="calendar-close"><img alt="close" src="/front/img/calendar-cross.svg"></span></div>
</section>
{% block stylesheets %}
<link href="/front/css/calendar.min.css" rel="stylesheet">
<style>
tr.isfull,
a.isfull{
color: lightgrey !important;
opacity: 20% !important;
pointer-events: none !important;
}
.download {
background-color: transparent;
border: 1px solid #FFFFFF;
color: #FFFFFF;
padding: 2px 3px 2px 22px;
font-size: 13px;
float: left;
border-radius: 20px;
text-decoration: none;
}
.download:hover {
color: #FFFFFF;
}
.download svg {
margin-left: 10px;
}
.co span.description,
span.description {
display: none;
}
@media (max-width: 430px)
{
.download {
margin-top: 20px;
}
}
.fc-h-event {
background-color: transparent;
border-color: transparent;
}
@media screen and (min-width: 1023px) {
.fc-list-event-title .fc-event-time,
.fc-list-event-title .fc-daygrid-event-dot {
display: none;
}
}
@media screen and (max-width: 1023px) {
.co span.description {
display: initial;
}
}
</style>
{% endblock %}
{% block javascripts %}
<script src="/front/js/calendar.min.js"></script>
<script>
var contentHeight = 600;
if( window.innerWidth <= 1200 ){
contentHeight = window.innerHeight - 200;
// if( $('body').hasClass('page_reservation') ){
// contentHeight = window.innerHeight - 160;
// }
}
var initialView = 'dayGridMonth';
if( window.innerWidth <= 1023 ){
initialView = 'listMonth';
}
var calendar;
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
calendar = new FullCalendar.Calendar(calendarEl, {
initialView: initialView,
views: {
timeGrid: {
eventLimit: 6 // adjust to 6 only for timeGridWeek/timeGridDay
}
},
moreLinkText: 'de plus',
eventLimit: false,
// contentHeight: 580,
contentHeight: contentHeight,
locale: '{{app.request.locale}}',
headerToolbar: {
center: 'prev title next',
left: null,
// right: 'dayGridMonth,timeGridWeek,timeGridDay,listMonth'
right: null
},
firstDay: 1,
dayHeaderFormat: { weekday: 'short', omitCommas: true },
// initialDate: '2020-09-12',
weekNumbers: false,
navLinks: false, // can click day/week names to navigate views
editable: false,
selectable: true,
nowIndicator: true,
dayMaxEvents: true, // allow "more" link when too many events
// showNonCurrentDates: false,
events: [
{% for venue in venues %}
{% set title = venue.title|replace({" (avec goûter)": "", "Grand Amour Spécial Saint-Valentin": "Grand Amour ♥", "Grand Amour Spécial Pâques": "Grand Amour 🔔", "Saint-Sylvestre Formule 1": "Saint-Sylvestre", "Saint-Sylvestre Formule 2": "Saint-Sylvestre"})|e("js") %}
{% set title_save = title %}
{% if venue.venuetype.id in [3, 8, 23, 24] %}
{% set title = 'menu_concerts'|tr(tr)|raw|slice(0,-1) %}
{% endif %}
{
id: '{{ venue.id }}',
title: '{{ title }}',
description: '{{ title_save }}',
venuetype: '{{ venue.venuetype.slug }}',
start: '{{ venue.start|date('Y-m-d#H:i:s')|replace({'#': 'T'}) }}',
end: '{{ venue.end|date('Y-m-d#H:i:s')|replace({'#': 'T'}) }}',
className: '{{ venue.className }} {{ (venue.isfull) ? 'isfull' : '' }}'
},
{% endfor %}
// {
// id: 999,
// title: 'FLASH2211',
// description: '',
// start: '2023-11-22',
// end: '2023-11-22',
// className: ''
// },
/* {
id: 999,
title: 'Vente flash (Femmes)',
description: '',
start: '2024-03-08',
end: '2024-03-08',
className: ''
},*/
// {
// title: 'All Day Event',
// start: '2020-09-01'
// },
// {
// title: 'Long Event',
// start: '2020-09-07',
// end: '2020-09-10'
// },
// {
// groupId: 999,
// title: 'Repeating Event',
// start: '2020-09-09T16:00:00'
// },
// {
// groupId: 999,
// title: 'Repeating Event',
// start: '2020-09-16T16:00:00'
// },
// {
// title: 'Conference',
// start: '2020-09-11',
// end: '2020-09-13'
// },
// {
// title: 'Meeting',
// start: '2020-09-12T10:30:00',
// end: '2020-09-12T12:30:00'
// },
// {
// title: 'Lunch',
// start: '2020-09-12T12:00:00'
// },
// {
// title: 'Meeting',
// start: '2020-09-12T14:30:00'
// },
// {
// title: 'Happy Hour',
// start: '2020-09-12T17:30:00'
// },
// {
// title: 'Dinner',
// start: '2020-09-12T20:00:00'
// },
// {
// title: 'Frénésie',
// start: '2020-09-13T14:30:00'
// },
// {
// title: 'Frénésie',
// start: '2020-09-13T22:15:00'
// },
// {
// title: 'Frénésie',
// start: '2020-09-27T14:30:00'
// },
// {
// title: 'Frénésie',
// start: '2020-09-27T22:15:00'
// },
// {
// title: 'Click for Google',
// url: 'http://google.com/',
// start: '2020-09-28'
// }
],
// eventClick: function(info) {
// alert('Event: ' + info.event.title);
// alert('Coordinates: ' + info.jsEvent.pageX + ',' + info.jsEvent.pageY);
// alert('View: ' + info.view.type);
// // change the border color just for fun
// info.el.style.borderColor = 'red';
// }
eventClick: function(info) {
// console.log('Event: ' + info.event.title);
// console.log('id: ' + info.event.id);
loadEvent(info.event.id);
},
// eventDidMount: function() {
// console.log('eventAfterRender');
// if( $( window ).width() <= 1200 ){
// $('.fc.fc-media-screen').css('scale', '0.75');
// }
// }
eventContent: function( info ) {
if(info.event.start.getMinutes() == 0){
var minutes = '00';
} else {
var minutes = info.event.start.getMinutes();
}
return {html: '<div class="fc-daygrid-event-dot"></div><div class="fc-event-time" >'+info.event.start.getHours()+':'+minutes+'</div><div class="fc-event-title tooltiper '+info.event.extendedProps.venuetype+'" data-desc="'+info.event.extendedProps.description+'">'+info.event.title+'<span class="description"> : '+info.event.extendedProps.description+'</span></div>'};
},
});
calendar.render();
tooltiping();
$('.fc-button').on('click', function(){
tooltiping();
});
});
function tooltiping(){
console.log('tooltiping');
$('.tooltiper.co').each(function(index, value) {
$(this).tooltipster({
content: $(this).data('desc'),
//delay: 200,
contentAsHTML: true,
//trigger: 'click'
});
});
//FIX NOEL D'OR
$('.tooltiper[data-desc="Noël d’Or"]').each(function(index, value) {
var no_desc = "Spectacle Parfum d'étoiles avec final de Noël";
if($('html').attr('lang') == 'de'){
no_desc = "Show Parfum d'étoiles mit weihnachtlichem Finale";
}
if($('html').attr('lang') == 'en'){
no_desc = "Parfum d'étoiles show with Christmas finale";
}
$(this).tooltipster({
content: no_desc,
//delay: 200,
contentAsHTML: true,
//trigger: 'click'
});
});
//END FIX NOEL D'OR`
}
function loadEvent(id){
console.log('loadevent'+id);
// MISS ALSACE
if(id == 1951){
window.location.href = "/{{app.request.locale }}/miss-alsace";
return 0;
}
// END MISS ALSACE
// AFTERWORK 2023
if(id > 339 && id < 345){
window.location.href = "/{{app.request.locale }}/afterwork?v="+id;
return 0;
}
// END AFTERWORK 2023
// // FLASH2211 2023
// if(id == 999){
// window.location.href = "/{{app.request.locale }}/flash";
// return 0;
// }
// // END FLASH2211 2023
// AFTERWORK 2023
if(id >= 351 && id <= 355){
window.location.href = "/{{app.request.locale }}/housh-ma-housh";
return 0;
}
// END AFTERWORK 2023
// ROBIN LEON
if(id >= 1673 && id <= 1674){
window.location.href = "/{{app.request.locale }}/robin-leon-show";
return 0;
}
// ROBIN LEON
// elixir-magique
if(id == 1563 || id == 1570 || id == 1597 || id == 1604){
window.location.href = "/{{app.request.locale }}/elixir-magique";
return 0;
}
// elixir-magique
// carnaval-de-venise
if(id == 358){
window.location.href = "/{{app.request.locale }}/carnaval-de-venise";
return 0;
}
// carnaval-de-venise
// FLASH droits-de-la-femme
if(id == 999){
window.location.href = "/{{app.request.locale }}/droits-de-la-femme";
return 0;
}
// END FLASH droits-de-la-femme
{#
// FLASH black-friday
const ids = [
'1546',
'1555',
'1577',
'1583',
'1594',
'1601'
];
if (ids.includes(id)) {
window.location.href = `/{{ app.request.locale }}/black-friday?v=${id}`;
return 0;
}
// END FLASH black-friday
#}
$.ajax({
type: "POST",
url: "/tunnel/calendar/load",
data: {
id: id,
lang: '{{app.request.locale }}'
},
dataType: "json",
success: function(response) {
if(response.success == false){
console.log('Erreur de chargement');
} else {
console.log(response);
//BUILD RESA
var formula = 'sansrepas';
if( response.form.typeSlug == 'main' ){
var step1 = {
group: 'individuel',
participants: 1,
formula: null,
gift: false,
};
var step2 = {
resto: null,
// resto: 'majestic',
selection: [],
};
} else if( response.form.typeSlug == 'sv' ){ //SAINT VALENTIN
var step1 = {
group: 'individuel',
participants: 1,
formula: null,
gift: false,
};
var step2 = {
resto: null,
// resto: 'majestic',
selection: [],
};
} else if( response.form.typeSlug == 'pa' ){ //PAQUES
var step1 = {
group: 'individuel',
participants: 1,
formula: null,
gift: false,
};
var step2 = {
resto: null,
// resto: 'majestic',
selection: [],
};
} else if( response.form.typeSlug == 'ss' ){ //SAINT SYLVESTRE
var ss_formula = 'sansrepas';
if(response.form.title == 'Gala Saint-Sylvestre'){
var ss_formula = 'avecrepas';
}
var step1 = {
group: 'individuel',
participants: 1,
formula: ss_formula,
gift: false,
};
var step2 = {
resto: null,
// resto: 'majestic',
selection: [],
};
} else if( response.form.typeSlug == 'no' ){ // NOEL
var no_formula = null;
if( response.form.food == 'false' ){
no_formula = 'sansrepas';
}
var step1 = {
group: 'individuel',
participants: 1,
formula: no_formula,
gift: false,
};
var step2 = {
// resto: null,
resto: 'majestic',
selection: [],
};
} else if( response.form.typeSlug == 'ok' ){ // OKTOBERFEST
var step1 = {
group: 'individuel',
participants: 1,
formula: 'avecrepas',
gift: false,
};
var step2 = {
// resto: null,
resto: 'majestic',
selection: [],
};
} else if( response.form.typeSlug == 'af' ){ // AFTERWORK
var step1 = {
group: 'individuel',
participants: 1,
formula: formula,
gift: false,
};
var step2 = {
resto: null,
// resto: 'majestic',
selection: [],
};
} else if( response.form.typeSlug == 'co' ){ // CONCERT
var co_formula = null;
if( response.form.food == 'false' ){
co_formula = 'sansrepas';
}
var step1 = {
group: 'individuel',
participants: 1,
formula: co_formula,
gift: false,
};
var step2 = {
resto: null,
// resto: 'majestic',
selection: [],
};
}
var step3 = {
pn: 0,
ph: 0,
vip: 0,
};
var palace_resa = {
resume: true,
show: {
id: response.form.id,
type: response.form.typeSlug,
season: response.form.season,
title: response.form.title,
desc: response.form.description,
desc_venue: response.form.description_venue,
img: response.form.thumbnail,
date: response.form.date,
hour: response.form.hour,
day: response.form.day,
dateStr: response.form.dateStr,
food: response.form.food.toString(),
pn: response.form.pn,
ph: response.form.ph,
vip: response.form.vip,
},
step1: step1,
step2: step2,
step3: step3,
};
//END BUILD RESA
localStorage.setItem('palace_resa', JSON.stringify(palace_resa));
setTimeout(function(){ window.location.href = "/{{app.request.locale }}/reservation/tunnel?show_id="+palace_resa.show.id; }, 250);
// //FAKE RESA
// const palace_resa = {
// resume: true,
// show: {
// type: 'main',
// title: 'Frénésie',
// desc: 'Depuis des générations, l’énigmatique rêverie hôtel est le lieu où se croisent les plus prestigieux artistes et voyageurs du monde.',
// img: '/front/img/frenesie-min.jpg',
// date: '2022-09-13',
// hour: '22:50',
// day: 'd2',
// dateStr: 'Vendredi 15 juillet 22h15',
// },
// step1: {
// group: 'individuel',
// formula: 'avecrepas',
// },
// step2: {
// // resto: null,
// resto: 'majestic',
// selection: [
// {
// ref: 'mj-m1',
// qty: 1,
// option: null,
// },
// // {
// // ref: 'mj-m3',
// // qty: 1,
// // option: 'm4',
// // },
// // {
// // ref: 'mj-me',
// // qty: 1,
// // option: null,
// // },
// // {
// // ref: 'tk10',
// // qty: 1,
// // option: null,
// // },
// {
// ref: 'in-b1',
// qty: 1,
// option: null,
// },
// ],
// },
// step3: {
// pn: 1,
// ph: 1,
// },
// };
// //END FAKE RESA
// //FAKE RESA NOEL
// const palace_resa = {
// resume: true,
// show: {
// type: 'no',
// title: 'Noël des enfants',
// desc: 'Depuis des générations, l’énigmatique rêverie hôtel est le lieu où se croisent les plus prestigieux artistes et voyageurs du monde.',
// img: '/front/img/frenesie-min.jpg',
// date: '2022-09-13',
// hour: '22:50',
// day: 'd2',
// dateStr: 'Vendredi 15 juillet 22h15',
// },
// step1: {
// group: null,
// formula: 'avecrepas',
// gift: false,
// },
// step2: {
// // resto: null,
// resto: 'majestic',
// selection: [
// // {
// // ref: 'in-b1',
// // qty: 1,
// // option: null,
// // },
// ],
// },
// step3: {
// pn: 0,
// ph: 0,
// },
// };
// //FAKE RESA NOEL
// //FAKE RESA OKTOBER
// const palace_resa = {
// resume: true,
// show: {
// type: 'ok',
// title: 'Oktoberfest',
// desc: 'Depuis des générations, l’énigmatique rêverie hôtel est le lieu où se croisent les plus prestigieux artistes et voyageurs du monde.',
// img: '/front/img/frenesie-min.jpg',
// date: '2022-09-13',
// hour: '22:50',
// day: 'd2',
// dateStr: 'Vendredi 15 juillet 22h15',
// },
// step1: {
// group: 'individuel',
// formula: 'avecrepas',
// gift: false,
// },
// step2: {
// // resto: null,
// resto: 'majestic',
// selection: [
// {
// ref: 'okm',
// qty: 2,
// option: null,
// },
// {
// ref: 'ok',
// qty: 3,
// option: null,
// },
// {
// ref: 'ms',
// qty: 3,
// option: null,
// },
// ],
// },
// step3: {
// pn: 0,
// ph: 0,
// },
// };
// //FAKE RESA OKTOBER
// //FAKE RESA AFTERWORK
// const palace_resa = {
// resume: true,
// show: {
// type: 'af',
// title: 'Afterwork',
// desc: 'Depuis des générations, l’énigmatique rêverie hôtel est le lieu où se croisent les plus prestigieux artistes et voyageurs du monde.',
// img: '/front/img/frenesie-min.jpg',
// date: '2022-09-13',
// hour: '22:50',
// day: 'd2',
// dateStr: 'Vendredi 15 juillet 22h15',
// },
// step1: {
// group: 'individuel',
// formula: 'sansrepas',
// gift: false,
// },
// step2: {
// resto: null,
// selection: [
// // {
// // ref: 'af',
// // qty: 5,
// // option: null,
// // },
// ],
// },
// step3: {
// pn: 0,
// ph: 0,
// },
// };
// //FAKE RESA AFTERWORK
}
}
});
}
</script>
{% endblock %}