{% extends 'base.html.twig' %}
{% block stylesheets %}
<link href="{{ asset('front/plugins/colorbox/colorbox.css') }}" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="{{ asset('front/style/blog_style.css') }}">
<link rel="stylesheet" type="text/css" href="{{ asset('front/style/blog_responsive.css') }}">
<link rel="stylesheet" type="text/css" href="{{ asset('front/style/single_listing_style.css') }}">
<link rel="stylesheet" type="text/css" href="{{ asset('front/style/single_listing_responsive.css') }}">
<link rel="stylesheet" type="text/css" href="{{ asset('front/style/about_style.css') }}">
<link rel="stylesheet" type="text/css" href="{{ asset('front/style/about_responsive.css') }}">
<link rel="stylesheet" href="{{ asset('slider/css/owl.carousel.min.css') }}">
<link rel="stylesheet" href="{{ asset('slider/css/owl.theme.default.min.css') }}">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/4.5.6/css/ionicons.min.css">
<link rel="stylesheet" href="{{ asset('slider/css/style.css') }}">
<style>
.container {
max-width: 1440px!important;
}
.hotel_info_text
{
width: 1400px;
}
.carousel {
position: relative;
}
.carousel-item img {
object-fit: cover;
}
#carousel-thumbs {
background: rgba(255,255,255,.3);
bottom: 0;
left: 0;
padding: 0 50px;
right: 0;
}
#carousel-thumbs img {
border: 5px solid transparent;
cursor: pointer;
}
#carousel-thumbs img:hover {
border-color: rgba(255,255,255,.3);
}
#carousel-thumbs .selected img {
border-color: #fff;
}
.carousel-control-prev,
.carousel-control-next {
width: 50px;
}
@media all and (max-width: 767px) {
.carousel-container #carousel-thumbs img {
border-width: 3px;
}
}
@media all and (min-width: 576px) {
.carousel-container #carousel-thumbs {
position: absolute;
}
}
@media all and (max-width: 576px) {
.carousel-container #carousel-thumbs {
background: #ccccce;
}
}
.offers_item{
position: relative;
width: 205%;
overflow: hidden;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
transition: all 300ms;
margin-bottom: 30px;
border-radius: 20px;
color: rgba(0, 0, 0, 0.87);
background: #fff;
}
.latest_posts_container {
margin: 35px;
}
.hotel_location {
font-size: 24px;
color: #929191;
margin-top: 9px;
font-weight: 700;
}
.main_nav_item a {
font-family: 'Open Sans', sans-serif;
font-size: 15px;
font-weight: 700;
color: #0093a9!important;
text-transform: uppercase;
padding-bottom: 10px;
padding-top: 10px;
}
/*price style*/
.pricing-content{}
.single-pricing{
background:transparent;
margin-top: 25px;
width: 255%;
padding:40px 20px;
border-radius:5px;
position:relative;
z-index:2;
/*border:1px solid #d8d5d5;*/
/*box-shadow: 0 10px 40px -10px rgba(0,64,128,.09);*/
transition:0.3s;
}
@media only screen and (max-width:480px) {
.single-pricing {margin-bottom:30px;}
}
/*.single-pricing:hover{*/
/* box-shadow:0px 60px 60px rgba(0,0,0,0.1);*/
/* z-index:100;*/
/* transform: translate(0, -10px);*/
/*}*/
.price-label {
color: #fff;
background: #ff9100;
font-size: 16px;
width: 100px;
margin-bottom: 15px;
display: block;
-webkit-clip-path: polygon(100% 0%, 90% 50%, 100% 100%, 0% 100%, 0 50%, 0% 0%);
clip-path: polygon(100% 0%, 90% 50%, 100% 100%, 0% 100%, 0 50%, 0% 0%);
margin-left: -20px;
position: absolute;
}
.price-head h2 {
font-weight: 600;
margin-bottom: 0px;
text-transform: capitalize;
font-size: 35px;
}
.price-head span {
display: inline-block;
background:#ff9100;
width: 6px;
height: 6px;
border-radius: 30px;
margin-bottom: 20px;
margin-top: 15px;
}
.price {
font-weight: 500;
font-size: 50px;
margin-bottom: 0px;
}
.single-pricing{}
.single-pricing h5 {
font-size: 14px;
margin-bottom: 0px;
text-transform: uppercase;
}
.single-pricing ul{
list-style: none;
margin-bottom: 20px;
margin-top: 30px;
}
.single-pricing ul li{line-height: 35px;}
.single-pricing button {
background:#ff9100;
border: 2px solid #ff9100;
border-radius: 0.25rem;
color: white;
display: inline-block;
font-size: 16px;
width: -webkit-fill-available;
overflow: hidden;
padding:10px 45px;
text-transform: capitalize;
transition: all 0.3s ease 0s;
}
.single-pricing button:hover, .single-pricing a:focus{
background:#ff9100;
color: #ffffff;
border: 2px solid #ff9100;
}
.single-pricing-white{background: #5b0909
}
.single-pricing-white ul li{color:#fff;}
.single-pricing-white h2{color:#fff;}
.single-pricing-white h1{color:#fff;}
.single-pricing-white h5{color:#fff;}
/*breadcrumb style*/
.hm-gradient {
background-image: linear-gradient(to top, #f3e7e9 0%, #e3eeff 99%, #e3eeff 100%);
}
.darken-grey-text {
color: #2E2E2E;
}
.bc-icons .breadcrumb-item + .breadcrumb-item::before {
content: none; }
.bc-icons .breadcrumb-item.active {
color: #eeeeee; }
.bc-icons-2 .breadcrumb-item + .breadcrumb-item::before {
content: none; }
.bc-icons-2 .breadcrumb-item.active {
color: #455a64; }
.light-font .breadcrumb-item + .breadcrumb-item::before {
color: #fff; }
.light-font .breadcrumb-item.active {
color: #cfd8dc; }
.dark-font .breadcrumb-item + .breadcrumb-item::before {
color: #000; }
.dark-font .breadcrumb-item.active {
color: #455a64; }
.breadcrumb{
background-color: transparent;
}
.work-wrap .img
{
height: auto;
width: auto;
}
@media (min-width: 992px) {
.owl-carousel .owl-dots {
position: absolute;
top: 0;
right: 50px!important;
margin-top: 0;
margin-right: -40px; }
.owl-carousel .owl-dots .owl-dot {
display: block; }
}
.table-bordered {
border: 1px solid #232022;
background: #f3f6f9;
border-radius: 18px;
}
@media screen and (max-width: 768px)
{
.hotel_info_text {
width: 106% !important;
margin-left:-10px!important;
}
table{
max-width: 340px !important;
margin-left: 11px !important;
}
.tablenavire
{
max-width: 350px !important;
margin-left: 2px !important;
margin-top: 12px !important;
}
.testimage
{
height: 350px!important;
margin-left: -21px!important;
margin-top: 10px!important;
max-width: 350px !important;
}
.card-block
{
width: 358px!important;
height: 50px!important;
margin-left: -35px!important;
}
.form-control
{
margin-left:2px!important;
}
.offers_price1
{
margin-top: -70px!important;
margin-left: 68px!important;
}
.img3
{
height: 260px !important;
margin-top: 22px !important;
width: 350px !important;
margin-left: -26px !important;
}
.img1
{
width: 350px !important;
margin-left: 4px !important;
}
.ftco-section {
padding: 1em 0!important;
margin-top: -100px;
}
.owl-carousel
{
margin-left: -25px!important;
}
}
.owl-carousel .owl-dots
{
text-align: justify;
margin-top: 15px;
}
.ftco-section
{
padding: 5em 0;
margin-top: -35px;
}
.owl-carousel .owl-nav {
position: absolute;
bottom: 0;
left: 0;
right: 0;
display: none;
}
.badge
{
border: 1px solid white;
background: white;
color: #ff9600;
width: 100%;
height: 50px;
}
.badges{
font-size: 95%;
height: 26px;
line-height: normal;
font-weight: 600;
background-color: #b29b63;
}
/* Ajoutez ces styles dans votre fichier CSS ou entre les balises <style> dans l'en-tête HTML */
/* Pour rendre les images réactives */
.featured-carousel img {
max-width: 100%;
height: auto;
}
.offers_price span{
color: #ff9600;
}
button {
margin: 20px;
}
.custom-btn {
width: 130px;
height: 40px;
color: #fff;
border-radius: 5px;
padding: 10px 25px;
font-family: 'Lato', sans-serif;
font-weight: 500;
background: transparent;
cursor: pointer;
transition: all 0.3s ease;
position: relative;
display: inline-block;
box-shadow:inset 2px 2px 2px 0px rgba(255,255,255,.5),
7px 7px 20px 0px rgba(0,0,0,.1),
4px 4px 5px 0px rgba(0,0,0,.1);
outline: none;
}
/* 3 */
.reserveButton
{
background: #ff9600;
width: 200px;
height: 39px;
line-height: 40px;
margin-left: 30px;
padding: 0;
border: none;
border-radius: 5px;
}
.btn-3 {
background: #ff9600;
width: 200px;
height: 50px;
line-height: 52px;
margin-left: 30px;
padding: 0;
border: none;
border-radius: 5px;
}
.btn-3 span {
position: relative;
display: block;
width: 100%;
height: 100%;
}
.btn-3:before,
.btn-3:after {
position: absolute;
content: "";
right: 0;
top: 0;
background: #ff9600;
border-radius: 5px;
transition: all 0.3s ease;
}
.btn-3:before {
height: 0%;
width: 2px;
}
.btn-3:after {
width: 0%;
height: 2px;
}
/*.btn-3:hover{*/
/* background: transparent;*/
/* box-shadow: none;*/
/*}*/
/*.btn-3:hover:before {*/
/* height: 100%;*/
/*}*/
/*.btn-3:hover:after {*/
/* width: 100%;*/
/*}*/
/*.btn-3 span:hover{*/
/* color: #ff9600;*/
/* border-radius: 5px;*/
/*}*/
.btn-3 span:before,
.btn-3 span:after {
position: absolute;
content: "";
left: 0;
bottom: 0;
background: #ff9600;
border-radius: 5px;
transition: all 0.3s ease;
}
.btn-3 span:before {
width: 2px;
height: 0%;
}
.btn-3 span:after {
width: 0%;
height: 2px;
}
/*.btn-3 span:hover:before {*/
/* height: 100%;*/
/*}*/
/*.btn-3 span:hover:after {*/
/* width: 100%;*/
/*}*/
/*a:hover{*/
/* color: #ff9600!important;*/
/* font-size: 16px;*/
/* font-weight: 500;*/
/*}*/
.text-xs
{
font-size: 10px;
line-height: 1rem;
}
</style>
{% endblock %}
{% block body %}
<!-- Home -->
<div class="home" style="height: 100px"></div>
<!-- Blog -->
<div class="blog">
<div class="container">
<div class="row">
<!-- Grid column -->
<div class="col-md-12">
<div class="card p-3" style="border: none;">
<div class="card-block" style="width: 500px;height: 50px;margin-left: -35px">
<div class="bc-icons-2">
<ol class="breadcrumb blue-grey lighten-4">
<li class="breadcrumb-item"><a class="black-text" href="#" style="font-weight: 600;font-size: 16px;color:#d7000e"><i class="fa fa-home" aria-hidden="true"></i></a><i class="fa fa-angle-double-right mx-2" aria-hidden="true"></i></li>
<li class="breadcrumb-item"><a class="black-text" href="#" style="font-weight: 600;font-size: 16px;color:#d7000e">Croisière</a><i class="fa fa-angle-double-right mx-2" aria-hidden="true"></i></li>
<li class="breadcrumb-item active" style="font-weight: 600;font-size: 16px">{{ sousCroisiere.name }}</li>
</ol>
</div>
</div>
</div>
</div>
<!-- Grid column -->
</div>
<div class="row">
<div class="col-lg-8">
<div class="blog_post_container">
<div class="blog_post">
<div class="hotel_info_text">
<div class="container mt-5">
<section class="ftco-section">
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="featured-carousel owl-carousel">
{% if sousCroisiere.imagessouscroisieres is not empty %}
{% for photo in sousCroisiere.imagessouscroisieres %}
<div class="item">
<div class="work-wrap">
<div class="img order-md-last">
<img src="{{ asset('./rusticav/public/uploads/souscroisieres/' ~ photo.name) }}" alt="" width="90%" height="90%" style="margin: 15px"/>
</div>
</div>
</div>
{% endfor %}
{% endif %}
</div>
</div>
<div class="col-md-6">
<h5 style="margin-top: 17px;color: #0093a9;font-weight: 600;font-size: 28px"><i class="fa fa-map-marker"></i> {{ sousCroisiere.name }}</h5>
<h6 style="margin-top: 15px;color: black;font-weight: 300;"><i class="fa fa-anchor" aria-hidden="true"></i>{{ sousCroisiere.destination }}</h6>
<h6 style="margin-top: 15px;color: black;font-weight: 300;">
<i class="fa fa-ship" aria-hidden="true"></i>
{{ sousCroisiere.navire.titre }}
</h6>
<h6 style="margin-top: 15px;color: black;font-weight: 600;">
<i class="fa fa-clock-o" aria-hidden="true" style="color: black"></i>
{{sousCroisiere.duree}} jours / {{sousCroisiere.duree-1}} Nuits
</h6>
<p style="margin-top: 15px;margin-left:1px;color: red;font-weight: 600" >Avantages durant la croisière</p>
<h6 style="margin-top: -20px;color: black;font-weight: 300;">
<ul>
{% for a in sousCroisiere.avantages %}
<li>
<span class="badges badge-danger">
{% for img in a.imagesavantages %}
<img src="{{ asset('./rusticav/public/uploads/avantages/' ~ img.name) }}" alt="" style="width:25px;height:19px;margin-top:-4px;"/>
{% endfor %}
<span>{{ a.name }}</span>
</span></li><br>
{% endfor %}
</ul>
</h6>
</div>
{# <div class="col-md-2">
<div class="offers_price" style="margin-top: 60px">
{% set totalprix = 0 %}
{% if sousCroisiere.souscroisiererooms is defined and sousCroisiere.souscroisiererooms|length > 0 %}
{% set firstSouscroisierecabine = sousCroisiere.souscroisiererooms[0] %}
{% if firstSouscroisierecabine.souscroisierepricerooms is defined and firstSouscroisierecabine.souscroisierepricerooms|length > 0 %}
{% set firstSouscroisierepricecabine = firstSouscroisierecabine.souscroisierepricerooms[0] %}
{% if firstSouscroisierepricecabine.price is defined %}
{% set totalprix = totalprix + firstSouscroisierepricecabine.price %}
{% endif %}
{% endif %}
{% endif %}
<div class="offers_price1">
<span class="text-center" style="margin-left: 30px;font-size: 15px;color: black;font-weight: 300" >A partir de:</span><br><br>
<span class="badge badge-danger" style="font-size: 41px;font-weight: 600;margin-left: -22px;color: red">
{{ totalprix }} TND
</span>
</div>
</div>
</div> #}
<div class="col-md-2">
<div class="offers_price" style="margin-top: 60px">
{% set minPrix = null %}
{% if sousCroisiere.souscroisiererooms is defined and sousCroisiere.souscroisiererooms|length > 0 %}
{% for cabine in sousCroisiere.souscroisiererooms %}
{% if cabine.souscroisierepricerooms is defined and cabine.souscroisierepricerooms|length > 0 %}
{% for priceCabine in cabine.souscroisierepricerooms %}
{% if priceCabine.price is defined %}
{% if minPrix is null or priceCabine.price < minPrix %}
{% set minPrix = priceCabine.price %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
<div class="offers_price1">
<span class="text-center" style="margin-left: 30px;font-size: 15px;color: black;font-weight: 300">A partir de:</span><br><br>
<span class="badge badge-danger" style="font-size: 41px;font-weight: 600;margin-left: -22px;color: #5586c2">
{{ minPrix is not null ? minPrix : 'N/A' }} TND
</span>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
<div class="hotel_info_text">
<p style="margin-left: 10px">
{{ sousCroisiere.itineraire|raw }}
</p>
</div>
<div class="hotel_info_text">
<br>
<div class="row">
<div class="col-md-5">
{% for img in sousCroisiere.navire.imagesnavires %}
{% if loop.first %}
<img class="img1" src="{{ asset('./rusticav/public/uploads/navires/'~img.name) }}" alt="" width="90%" height="90%" style="margin-left: 30px" />
{% endif %}
{% endfor %}
</div>
<div class="col-md-7">
<h4 style="font-weight: 700">Fiche technique</h4>
{{ sousCroisiere.navire.technique|raw}}
</div>
</div>
</div>
<div class="hotel_info_text">
<div class="container">
<div class="row">
<div class="col-md-5">
<div class="packs-container">
<br><br>
<!-- Boucle pour itérer sur toutes les plages de dates disponibles -->
<select id="dateRangesDropdown" class="form-control" style="margin-left:400px;">
<option value="all">Toutes les dates</option>
{% for pack, packData in dataByPack %}
{% for dateRange in packData.dateRanges %}
<option
value="{{ dateRange.dated }} - {{ dateRange.datef }}"
data-roomdata="{{ dateRange.roomData | json_encode }}"
data-monthyear="{{ dateRange.dated | date("F Y") }}"
>
{{ dateRange.dated | date("F Y") }}
</option>
{% endfor %}
{% endfor %}
</select>
</div>
</div>
</div><br><br>
<div class="row">
<div class="col-md-12">
<div id="selectedData" class="selected-data">
<section id="pricing" class="pricing-content section-padding">
<div class="container">
<div class="row text-center" id="chambreInfo"></div>
</div>
</section>
</div>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script>
$(document).ready(function () {
$('#dateRangesDropdown').change(function () {
displaySelectedData();
});
// Affichez les informations sélectionnées du premier date de la première pack lors du chargement
displaySelectedData();
});
var souscroisiereId = {{ sousCroisiere.id }}; // Assurez-vous que cette variable est correctement définie
// Fonction pour afficher les informations sélectionnées
function displaySelectedData() {
var selectedOption = $('#dateRangesDropdown option:selected');
var value = selectedOption.val();
var monthYear = selectedOption.data('monthyear');
var groupedOptions = $('#dateRangesDropdown option').filter(function() {
return $(this).data('monthyear') === monthYear;
});
var chambreInfoDiv = $('#chambreInfo');
chambreInfoDiv.empty(); // Clear existing data
if (value === "all") {
// Stocker la date sélectionnée pour une utilisation ultérieure
selectedAllDate = $('#dateRangesDropdown').val();
// Afficher toutes les données disponibles
$('#dateRangesDropdown option').each(function() {
if ($(this).val() !== "all") {
var roomData = $(this).data('roomdata');
var table = $('<table class="table table-bordered"></table>');
var tbody = $('<tbody></tbody>');
var dates = $(this).val().split(' - ');
var formattedDates = 'Du ' + formatDate(dates[0]) + ' au ' + formatDate(dates[1]);
var dateRange = $('<tr style="background: #2980b9;color: white;"><td colspan="4" style="font-weight:700;font-size:16px;">' + formattedDates + '</td></tr>');
tbody.append(dateRange);
var row = $('<tr></tr>');
$.each(roomData, function(cabineName, room) {
var cell = '<td>' + cabineName + ' <br/><span style="font-size:15px;font-weight:700"> ' + room.price + 'TND</span> <span class="text-xs">/pers.</span></td>';
row.append(cell);
});
tbody.append(row);
table.append(tbody);
// Ajouter le tableau au div chambreInfo
chambreInfoDiv.append(table);
// Ajouter le bouton "Obtenir un devis gratuit"
addReservationButton(table, $(this).val(), roomData);
}
});
} else {
groupedOptions.each(function() {
var roomData = $(this).data('roomdata');
var table = $('<table class="table table-bordered"></table>');
var tbody = $('<tbody></tbody>');
var dates = $(this).val().split(' - ');
var formattedDates = 'Du ' + formatDate(dates[0]) + ' au ' + formatDate(dates[1]);
var dateRange = $('<tr><td colspan="' + Object.keys(roomData).length + '">' + formattedDates + '</td></tr>');
tbody.append(dateRange);
var row = $('<tr></tr>');
$.each(roomData, function(cabineName, room) {
var cell = '<td>' + cabineName + ' <br/> ' + room.price + 'TND <span class="text-xs">/pers.</span></td>';
row.append(cell);
});
tbody.append(row);
table.append(tbody);
chambreInfoDiv.append(table);
// Ajouter le bouton "Obtenir un devis gratuit"
addReservationButton(table, $(this).val(), roomData);
});
}
}
// Fonction pour formater la date
function formatDate(dateString) {
var date = new Date(dateString);
var day = date.getDate();
var month = date.toLocaleString('default', { month: 'long' });
var year = date.getFullYear();
return day + ' ' + month + ' ' + year;
}
// Fonction pour ajouter un bouton "Obtenir un devis gratuit" à un tableau de données de chambre existant
function addReservationButton(table, selectedDate, roomData) {
// Créer une nouvelle ligne pour le bouton "Obtenir un devis gratuit"
var buttonRow = $('<tr></tr>');
var buttonCell = $('<td colspan="' + Object.keys(roomData).length + '"></td>');
var button = $('<button class="reserveButton"><span style="color: white;font-size: 16px;font-weight: 500">Obtenir un devis gratuit</span></button>');
// Ajouter l'attribut data-selecteddate au bouton "Obtenir un devis gratuit"
button.attr('data-selecteddate', selectedDate);
// Ajouter l'attribut data-roomdata au bouton "Obtenir un devis gratuit" pour stocker les types de chambre
button.attr('data-roomdata', JSON.stringify(roomData));
buttonCell.append(button);
buttonRow.append(buttonCell);
table.append(buttonRow);
}
// Ajouter un écouteur d'événements pour le clic sur le bouton "Obtenir un devis gratuit"
$(document).on('click', '.reserveButton', function () {
// Récupérer la date sélectionnée à partir de l'attribut data-selecteddate
var selectedDate = $(this).data('selecteddate');
// Rediriger vers la nouvelle page avec la date sélectionnée
redirectToNewPage(selectedDate);
});
// Fonction pour rediriger vers la nouvelle page avec la date sélectionnée et les types de chambre
function redirectToNewPage(selectedDate) {
// Récupérer les types de chambre à partir de l'attribut de données du bouton "Obtenir un devis gratuit"
var roomData = $('.reserveButton[data-selecteddate="' + selectedDate + '"]').data('roomdata');
// Créer un formulaire dynamique
var form = $('<form method="post" action="/page_suivante/' + souscroisiereId + '"></form>');
// Ajouter un champ pour la date sélectionnée
var selectedDateInput = $('<input type="hidden" name="selectedDate" value="' + selectedDate + '">');
form.append(selectedDateInput);
// Ajouter un champ pour les types de chambre
var roomDataInput = $('<input type="hidden" name="roomData" value=\'' + JSON.stringify(roomData) + '\'>');
form.append(roomDataInput);
// Ajouter le formulaire à la page et le soumettre
$('body').append(form);
form.submit();
}
</script>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="{{ asset('slider/js/popper.js') }}"></script>
<script src="{{ asset('slider/js/bootstrap.min.js') }}"></script>
<script src="{{ asset('slider/js/owl.carousel.min.js') }}"></script>
<script src="{{ asset('slider/js/main.js') }}"></script>
{% endblock %}