Startseiten-CMS-Anbindung abschließen
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
754aa699a1
commit
45150780de
22 changed files with 28191 additions and 2362 deletions
|
|
@ -88,6 +88,17 @@
|
|||
|
||||
gtag('config', 'G-Y1Y779PDME');
|
||||
</script>
|
||||
<script>
|
||||
(function (c, s, q, u, a, r, e) {
|
||||
c.hj=c.hj||function(){(c.hj.q=c.hj.q||[]).push(arguments)};
|
||||
c._hjSettings = { hjid: a };
|
||||
r = s.getElementsByTagName('head')[0];
|
||||
e = s.createElement('script');
|
||||
e.async = true;
|
||||
e.src = q + c._hjSettings.hjid + u;
|
||||
r.appendChild(e);
|
||||
})(window, document, 'https://static.hj.contentsquare.net/c/csq-', '.js', 5350061);
|
||||
</script>
|
||||
|
||||
{% block stylesheets %}
|
||||
{% endblock stylesheets %}
|
||||
|
|
@ -99,7 +110,12 @@
|
|||
|
||||
</head>
|
||||
<style>
|
||||
|
||||
@media (min-width: 992px) and (max-width: 1200px ) {
|
||||
.topMain.nav-pills>li>a {
|
||||
padding: .5rem .8rem;
|
||||
margin-right: .4rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<body class="no-js">
|
||||
<div id="wrapper">
|
||||
|
|
@ -116,7 +132,7 @@
|
|||
<div class="home-message text-center small">
|
||||
<div class="home-info-box">
|
||||
<div id="eKomiSeal_default" class="eKomi-header" style="padding-top: 5px;padding-left: 2px;">
|
||||
<img class="lozad" border="0" src="{{ asset('images/dummy.png') }}" data-src="{{ asset('images/logo-qualitaet-22.png') }}" alt="Top Kundenservice" height="78">
|
||||
<img class="lozad" border="0" src="{{ asset('images/dummy.png') }}" data-src="{{ asset('images/logo-qualitaet.png') }}" alt="Top Kundenservice" height="78">
|
||||
</div>
|
||||
<ul class="c4">
|
||||
<li>Spezialist für Kulturreisen </li>
|
||||
|
|
@ -152,7 +168,9 @@
|
|||
</div>
|
||||
<div id="sidebar" class="col-xs-12 col-sm-12 col-md-3 col-md-pull-9 order_first">
|
||||
|
||||
{% if site_loading is defined and page is defined %}
|
||||
{% if dev_home_sidebar is defined %}
|
||||
{% include 'default/components/sidebar/devHomeSidebar.html.twig' %}
|
||||
{% elseif site_loading is defined and page is defined %}
|
||||
{{ render(controller('AppBundle:Component:makeSidebarWidget', {'site_loading': site_loading, 'page': page})) }}
|
||||
{% elseif site_loading is defined and api is defined %}
|
||||
{{ render(controller('AppBundle:Component:makeSidebarWidget', {'site_loading': site_loading, 'page': null, 'api': api})) }}
|
||||
|
|
@ -164,13 +182,6 @@
|
|||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<div class="clearfix" style="margin-bottom: 10px; margin-top: 0;">
|
||||
<div id="auorg-bg">
|
||||
<a href="https://www.ausgezeichnet.org" target="_blank" title="Unabhängige Bewertungen, Kundenbewertungen und Gütesiegel von AUSGEZEICHNET.ORG" class="auorg-br">
|
||||
<span style="font-size:8px;font-weight:normal;text-transform:uppercase;">AUSGEZEICHNET.ORG</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div><!-- end row -->
|
||||
|
|
@ -184,7 +195,7 @@
|
|||
{{ render(controller('AppBundle:Component:footer')) }}
|
||||
|
||||
|
||||
<a class="js-go-to u-go-to-v1 animated" href="#!" data-type="fixed" data-offset-top="400" data-show-effect="zoomIn" data-hide-effect="zoomOut" data-position='{"bottom": 15, "right": 15 }'>
|
||||
<a class="js-go-to u-go-to-v1 animated" href="#!" data-type="fixed" data-offset-top="400" data-show-effect="zoomIn" data-hide-effect="zoomOut" data-position='{"bottom": 65, "left": 12 }'>
|
||||
<i class="icon-up-open-big"></i>
|
||||
</a>
|
||||
</div><!-- end wrapper -->
|
||||
|
|
@ -206,7 +217,6 @@
|
|||
});
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" src="https://siegel.ausgezeichnet.org/widgets/js/55b648290cf257aef3483d90/widget.js" data-cookieconsent="marketing"></script><!-- Ausgezeichnet.org-Siegel: End -->
|
||||
|
||||
{% endblock javascripts %}
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -39,12 +39,12 @@
|
|||
<footer class="footer clearfix">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-sm-6 col-xs-12">
|
||||
<div class="col-md-5 col-sm-6 col-xs-12">
|
||||
<p class="hl4">Ihre Vorteile bei STERN TOURS</p>
|
||||
<p>Unsere Produktauswahl ist vielfältig. Neben dem Pauschaltourismus und Jugendreisen sind wir auf individuelle Kulturreisen spezialisiert.</p>
|
||||
<p>Unsere Produktauswahl ist vielfältig. Neben dem Pauschaltourismus sind wir auf individuelle Kulturreisen spezialisiert.</p>
|
||||
|
||||
|
||||
<img class="left-img lozad" src="{{ asset('/images/dummy.png') }}" data-src="{{ asset('/images/STERN_22-Jahre.png') }}" alt="Stern Tours 20 Jahre">
|
||||
<img class="left-img lozad" src="{{ asset('/images/dummy.png') }}" data-src="{{ asset('/images/STERN_1998.png') }}" alt="Stern Tours seit 1998">
|
||||
<ul class="c4">
|
||||
<li>Spezialist seit 1998</li>
|
||||
<li>Top Service</li>
|
||||
|
|
@ -53,20 +53,25 @@
|
|||
</ul>
|
||||
</div><!-- end col -->
|
||||
|
||||
<div class="col-md-6 col-sm-6 col-xs-12">
|
||||
<div class="col-md-7 col-sm-6 col-xs-12">
|
||||
<div class="row">
|
||||
<div class="col-md-6" style="margin-bottom: 1rem;">
|
||||
<div class="col-md-6 col-xs-12" style="margin-bottom: 1rem;">
|
||||
<p class="hl4">Reiseversicherung</p>
|
||||
{% image '@AppBundle/Resources/public/images/logos/rundv.png' %}
|
||||
<img class="img-responsive lozad" src="{{ asset('/images/dummy.png') }}" data-src="{{ asset_url }}" alt="R + V">
|
||||
{% endimage %}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<p class="hl4">Sicherheit</p>
|
||||
{% image '@AppBundle/Resources/public/images/logos/ssl.png' %}
|
||||
<img class="left-img lozad" src="{{ asset('/images/dummy.png') }}" data-src="{{ asset_url }}" alt="SSL" style="margin-top: 0.3rem;">
|
||||
{% endimage %}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div style="padding: 20px 0 0 0;"> </div>
|
||||
<a href="/ueber-uns#atmosfair"><img class="img-responsive lozad" src="{{ asset('/images/dummy.png') }}" style="max-width: 300px;" data-src="/docs/images/logo_atmosfair_blue.png" alt="atmosfair"></a>
|
||||
<div style="padding: 20px 0 0 0;"> </div>
|
||||
<a href="/ueber-uns#atmosfair" style="color: #fff; text-decoration: none; font-size: 1.2rem;">> mehr erfahren</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -93,3 +98,9 @@
|
|||
</div><!-- end row -->
|
||||
</div><!-- end container -->
|
||||
</div><!-- end copyrights -->
|
||||
|
||||
|
||||
|
||||
<!-- Ausgezeichnet.org-Dynamic-Seal: Begin -->
|
||||
<div class="auorgDynamicSeal" auorg-data-type="rounded"></div>
|
||||
<script src="https://siegel.ausgezeichnet.org/widgets/55b648290cf257aef3483d90/dynamic-seal.js?lang=de_DE" defer> </script> <!-- Ausgezeichnet.org-Dynamic-Seal: End -->
|
||||
|
|
@ -187,7 +187,7 @@
|
|||
{# @var nav_page \AppBundle\Entity\Page #}
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" href="{{ nav_page.urlPath }}">
|
||||
<i class="fa fa-star"></i> {{ nav_page.title|replace({'Reisen': ''}) }} <span class="hidden-md">Reisen</span>
|
||||
<i class="fa fa-star"></i> {{ nav_page.title|replace({'Reisen': ''}) }} <span class="hidden-md hidden-lg">Reisen</span>
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu">
|
||||
|
|
@ -278,12 +278,6 @@
|
|||
<li role="menuitem" itemprop="name">
|
||||
<a itemprop="url" href="/tuerkei-reisen" title="Türkei Reisen"><i class="fa fa-star"></i> Türkei Reisen </a>
|
||||
</li>
|
||||
<li role="menuitem" itemprop="name">
|
||||
<a itemprop="url" href="/usbekistan-reisen" title="Usbekistan Reisen"><i class="fa fa-star"></i> Usbekistan Reisen </a>
|
||||
</li>
|
||||
<li role="menuitem" itemprop="name">
|
||||
<a itemprop="url" href="/marokko-urlaub" title="Marokko Reisen"><i class="fa fa-star"></i> Marokko Reisen</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
|
||||
<li role="menuitem" itemprop="name">
|
||||
|
|
@ -305,6 +299,11 @@
|
|||
<i class="fa fa-book"></i> Reisemagazin
|
||||
</a>
|
||||
</li>
|
||||
<li role="menuitem" itemprop="name">
|
||||
<a itemprop="url" href="/reisenews" title="Reisenews">
|
||||
<i class="fa fa-newspaper-o"></i> Reisenews
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,71 @@
|
|||
{% form_theme search_form 'default/form/theme.html.twig' %}
|
||||
|
||||
<style>
|
||||
.dev-start-slider {
|
||||
background: #e8dfd2;
|
||||
overflow: hidden;
|
||||
}
|
||||
.dev-start-slider .dev-start-slider-frame {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
max-width: 1280px;
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
background: #e8dfd2;
|
||||
}
|
||||
.dev-start-slider .carousel-inner > .item {
|
||||
overflow: hidden;
|
||||
}
|
||||
.dev-start-slider .dev-start-slider-blur {
|
||||
position: absolute;
|
||||
top: -24px;
|
||||
right: -24px;
|
||||
bottom: -24px;
|
||||
left: -24px;
|
||||
z-index: 1;
|
||||
background-color: #e8dfd2;
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
filter: blur(18px);
|
||||
opacity: 0.65;
|
||||
transform: scale(1.04);
|
||||
}
|
||||
.dev-start-slider .carousel-indicators {
|
||||
right: auto;
|
||||
bottom: 26px;
|
||||
left: 50%;
|
||||
z-index: 4;
|
||||
width: 100%;
|
||||
max-width: 1280px;
|
||||
margin-left: 0;
|
||||
padding-left: 24px;
|
||||
text-align: left;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
.dev-start-slider .carousel-indicators li,
|
||||
.dev-start-slider .carousel-indicators .active {
|
||||
width: auto;
|
||||
height: auto;
|
||||
margin: 0 6px 0 0;
|
||||
padding: 5px 10px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.85);
|
||||
border-radius: 14px;
|
||||
background: rgba(0, 0, 0, 0.35);
|
||||
color: #fff;
|
||||
text-indent: 0;
|
||||
line-height: 1;
|
||||
}
|
||||
.dev-start-slider .carousel-indicators .active {
|
||||
background: #d89a13;
|
||||
border-color: #d89a13;
|
||||
}
|
||||
.dev-start-slider .fill {
|
||||
background-color: #e8dfd2;
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
}
|
||||
</style>
|
||||
|
||||
<section class="section fullscreen background start-slider dev-start-slider">
|
||||
<div class="absolute-section">
|
||||
<div class="container-fluid">
|
||||
|
|
@ -22,14 +88,50 @@
|
|||
</div>
|
||||
</div>
|
||||
<div id="myCarousel" class="carousel slide">
|
||||
<ol class="carousel-indicators">
|
||||
<li data-target="#myCarousel" data-slide-to="0" class="active">1/4</li>
|
||||
<li data-target="#myCarousel" data-slide-to="1">2/4</li>
|
||||
<li data-target="#myCarousel" data-slide-to="2">3/4</li>
|
||||
<li data-target="#myCarousel" data-slide-to="3">4/4</li>
|
||||
</ol>
|
||||
<div class="carousel-inner">
|
||||
<div class="item active">
|
||||
<div class="fill lozad" style="background-image:url(images/placeholder-image.png)" data-background-image="{{ image('bundles/app/images/travel/slider_aegypten.jpg') }}"></div>
|
||||
<div class="dev-start-slider-blur" style="background-image:url({{ asset('img/slider/a1.jpg') }})"></div>
|
||||
<div class="dev-start-slider-frame">
|
||||
<div class="fill" style="background-image:url({{ asset('img/slider/a1.jpg') }})"></div>
|
||||
<noscript>
|
||||
<div class="fill" style="background-image:url({{ image('bundles/app/images/travel/slider_aegypten.jpg').cropResize(1024).guess(70) }})"></div>
|
||||
<div class="fill" style="background-image:url({{ asset('img/slider/a1.jpg') }})"></div>
|
||||
</noscript>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="dev-start-slider-blur" style="background-image:url({{ asset('img/slider/m1.jpg') }})"></div>
|
||||
<div class="dev-start-slider-frame">
|
||||
<div class="fill" style="background-image:url({{ asset('img/slider/m1.jpg') }})"></div>
|
||||
<noscript>
|
||||
<div class="fill" style="background-image:url({{ asset('img/slider/m1.jpg') }})"></div>
|
||||
</noscript>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="dev-start-slider-blur" style="background-image:url({{ asset('img/slider/s1.jpg') }})"></div>
|
||||
<div class="dev-start-slider-frame">
|
||||
<div class="fill" style="background-image:url({{ asset('img/slider/s1.jpg') }})"></div>
|
||||
<noscript>
|
||||
<div class="fill" style="background-image:url({{ asset('img/slider/s1.jpg') }})"></div>
|
||||
</noscript>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="dev-start-slider-blur" style="background-image:url({{ asset('img/slider/u1.jpg') }})"></div>
|
||||
<div class="dev-start-slider-frame">
|
||||
<div class="fill" style="background-image:url({{ asset('img/slider/u1.jpg') }})"></div>
|
||||
<noscript>
|
||||
<div class="fill" style="background-image:url({{ asset('img/slider/u1.jpg') }})"></div>
|
||||
</noscript>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
|
|
|||
|
|
@ -7,11 +7,21 @@
|
|||
|
||||
<div class="item-img">
|
||||
{% include 'default/components/pageBoxImage.html.twig' %}
|
||||
{% if show_item_counter is defined and show_item_counter %}
|
||||
<span class="homepage-card-counter">{{ loop.index }}/{{ pages|length }}</span>
|
||||
{% endif %}
|
||||
{% if new_page_ids is defined and page.id in new_page_ids %}
|
||||
<span class="homepage-card-new-badge">Neu</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="box_mid">
|
||||
|
||||
<div class="hl5">{{ page.title }}</div>
|
||||
|
||||
{% if page.homepageCountryName is not empty %}
|
||||
<div class="text-muted small">{{ page.homepageCountryName }}</div>
|
||||
{% endif %}
|
||||
|
||||
{% if (page.boxBody ?? page.description) is not empty %}
|
||||
<p>{{ page.boxBody|default(page.description) }}</p>
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
{# @var child_page \AppBundle\Entity\Page #}
|
||||
<div class="col-md-4 col-sm-6">
|
||||
<div class="travel-wrapper get-box-link">
|
||||
|
||||
|
||||
|
||||
<div class="item text-left">
|
||||
<div class="item-img">
|
||||
<div class="lb">
|
||||
|
|
@ -19,9 +22,11 @@
|
|||
</div>
|
||||
{% include 'default/components/pageBoxImage.html.twig' with {page: child_page} %}
|
||||
</div>
|
||||
|
||||
<div class="box_mid">
|
||||
<div class="hl5">{{ child_page.title }}</div>
|
||||
<p>{{ child_page.boxBody ?? child_page.description }}</p>
|
||||
|
||||
<p>{{ child_page.description }}</p>
|
||||
</div>
|
||||
<a class="item-button is-box-link dobble_line" href="{{ child_page.urlPath }}" title="{{ child_page.title }}">
|
||||
<span>{{ child_page.title }}</span>
|
||||
|
|
|
|||
|
|
@ -1,17 +1,27 @@
|
|||
{% if page.boxImageUrl is not empty %}
|
||||
{% if page.boxBody is not empty and page.boxBodyImage is defined and page.boxBodyImage %}
|
||||
{% set image_url = page.boxBodyImage['thumb_url'] %}
|
||||
{% set image_alt = page.boxBodyImage['title'] %}
|
||||
<div class="img-background lozad" data-background-image="{{ image_url }}" style="background-image:url({{ asset('images/placeholder-image.png') }});"></div>
|
||||
{% else %}
|
||||
{% if page.boxImageUrl is not empty %}
|
||||
{% set image_url = page.boxImageUrl %}
|
||||
{% set image_alt = page.travelProgram.title|default(page.title) %}
|
||||
{% elseif page.travelProgram is not empty and page.travelProgram.previewImage is not empty %}
|
||||
{% elseif page.travelProgram is not empty and page.travelProgram.previewImage is not empty %}
|
||||
{% set image_url = 'uploads/travel_program/' ~ page.travelProgram.previewImage.fileNameWithExtension %}
|
||||
{% set image_alt = page.title %}
|
||||
{% elseif page.fewoLodging is not empty and page.fewoLodging.images is not empty and page.fewoLodging.images[0] is not empty %}
|
||||
{% elseif page.fewoLodging is not empty and page.fewoLodging.images is not empty and page.fewoLodging.images[0] is not empty %}
|
||||
{% set image_url = '_uploads/images/' ~ page.fewoLodging.images[0].file %}
|
||||
{% set image_alt = page.title %}
|
||||
{% else %}
|
||||
{% elseif page.boxBody is not empty and page.boxBodyImage is defined and page.boxBodyImage %}
|
||||
{% set image_url = page.boxBodyImage['thumb_url'] %}
|
||||
{% set image_alt = page.boxBodyImage['title'] %}
|
||||
{% else %}
|
||||
{% set image_url = asset('/bundles/app/images/no-picture.png')%}
|
||||
{% set image_alt = 'Kein Vorschaubild vorhanden' %}
|
||||
{% endif %}
|
||||
<div class="img-background lozad" data-background-image="{{ image(image_url|trim('/')).cropResize(360).guess(70) }}" style="background-image:url({{ asset('images/placeholder-image.png') }})"></div>
|
||||
<noscript>
|
||||
{% endif %}
|
||||
|
||||
<div class="img-background lozad" data-background-image="{{ image(image_url|trim('/')).cropResize(360).guess(70) }}" style="background-image:url({{ asset('images/placeholder-image.png') }})"></div>
|
||||
<noscript>
|
||||
<img width="234" data-url="{{ image_url }}" height="180" src="{{ image(image_url|trim('/')).cropResize(360).guess(70) }}" class="img-responsiv img-responsiv-item" style="">
|
||||
</noscript>
|
||||
</noscript>
|
||||
{% endif %}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
{% if dev_home_sidebar_offer_pages is defined and dev_home_sidebar_offer_pages is not empty %}
|
||||
{% include 'default/components/sidebar/pageSliderSidebarWidget.html.twig' with {
|
||||
slider_title: dev_home_sidebar_offer_title|default('Aktuell planbare Reisen'),
|
||||
target_widget: 'dev-home-offers-widget',
|
||||
pages: dev_home_sidebar_offer_pages,
|
||||
new_badge_active: dev_home_sidebar_new_badge_active|default(false),
|
||||
show_item_counter: true,
|
||||
new_page_ids: dev_home_sidebar_new_page_ids|default([])
|
||||
} %}
|
||||
{% endif %}
|
||||
|
||||
{% if dev_home_sidebar_news_pages is defined and dev_home_sidebar_news_pages is not empty %}
|
||||
{% include 'default/components/sidebar/pageSliderSidebarWidget.html.twig' with {
|
||||
slider_title: dev_home_sidebar_news_title|default('Reisenews'),
|
||||
target_widget: 'dev-home-news-widget',
|
||||
pages: dev_home_sidebar_news_pages,
|
||||
show_item_counter: true
|
||||
} %}
|
||||
{% endif %}
|
||||
|
||||
<style>
|
||||
#dev-home-usedom-widget .box_mid {
|
||||
padding: 24px 20px;
|
||||
background: #f6f1e8;
|
||||
border: 1px solid #eadfcf;
|
||||
border-radius: 4px;
|
||||
}
|
||||
#dev-home-usedom-widget .hl5 {
|
||||
margin-bottom: 12px;
|
||||
color: #d89a13;
|
||||
}
|
||||
#dev-home-usedom-widget p {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
#dev-home-usedom-widget .dev-usedom-sidebar-button {
|
||||
display: inline-block;
|
||||
padding: 10px 24px;
|
||||
border-radius: 3px;
|
||||
background: #d89a13;
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
#dev-home-usedom-widget .dev-usedom-sidebar-button:hover {
|
||||
background: #b97f00;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="widget clearfix hidden-xs">
|
||||
<div class="widget-title">
|
||||
<a class="collapse-widget collapsed" href="#dev-home-usedom-widget" data-toggle="collapse" aria-expanded="true">Ferienwohnungen Usedom</a>
|
||||
</div>
|
||||
<div class="boxwidget collapse" id="dev-home-usedom-widget" aria-expanded="true">
|
||||
<div class="box_mid text-center">
|
||||
<div class="hl5">Urlaub an der Ostsee</div>
|
||||
<p>8 Ferienwohnungen in zwei Häusern auf Usedom - ideal als nahes, kurzfristig planbares zweites Standbein.</p>
|
||||
<a class="dev-usedom-sidebar-button" href="/ferienwohnungen" title="Ferienwohnungen auf Usedom">
|
||||
ansehen
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{{ render(controller('AppBundle:Component:newsSidebarWidget', {
|
||||
title: widget.name,
|
||||
limit: widget.configNewsLimit
|
||||
})) }}
|
||||
|
|
@ -2,36 +2,50 @@
|
|||
<div class="widget clearfix hidden-xs">
|
||||
|
||||
<div class="widget-title">
|
||||
<a class="collapse-widget collapsed" href="#{{ target_widget }}" data-toggle="collapse" aria-expanded="true">{{ slider_title }}</a>
|
||||
<a class="collapse-widget collapsed" href="#{{ target_widget }}" data-toggle="collapse" aria-expanded="true">
|
||||
{{ slider_title }}
|
||||
{% if new_badge_active is defined and new_badge_active %}
|
||||
<span class="label label-warning">Neu</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
</div><!-- end title -->
|
||||
<div class="boxwidget collapse" id="{{ target_widget }}" aria-expanded="true">
|
||||
|
||||
<div class="box-slider">
|
||||
{% for page in pages %}
|
||||
|
||||
<div class="travel-wrapper slide{{ loop.first ? ' active' }}">
|
||||
|
||||
<a href="{{ page.urlPath|default('javascript:void(0);') }}" class="item text-center">
|
||||
<div class="item-img">
|
||||
{% include 'default/components/pageBoxImage.html.twig' %}
|
||||
{% if show_item_counter is defined and show_item_counter %}
|
||||
<span class="homepage-card-counter">{{ loop.index }}/{{ pages|length }}</span>
|
||||
{% endif %}
|
||||
{% if new_page_ids is defined and page.id in new_page_ids %}
|
||||
<span class="homepage-card-new-badge">Neu</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="box_mid">
|
||||
<div class="hl5">{{ page.title }}</div>
|
||||
|
||||
<p>{{ page.boxBody ?? page.description }}</p>
|
||||
|
||||
{% if target_widget == 'news-widget' and page.date is not empty %}
|
||||
<div class="text-muted text-center">Vom: {{ page.date|date('d.m.Y') }}</div>
|
||||
{% endif %}
|
||||
<div class="hl5">{{ page.title }} </div>
|
||||
{% if page.homepageCountryName is not empty %}
|
||||
<div class="text-muted small">{{ page.homepageCountryName }}</div>
|
||||
{% endif %}
|
||||
<p>{{ page.description }}</p>
|
||||
{% if page.travelProgram is not empty and page.travelProgram.lowestPrice > 0 %}
|
||||
<div class="price">
|
||||
Für {{ page.travelProgram.lowestPrice|number_format }},- € p.P.
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</a>
|
||||
|
||||
</div><!-- end travel-wrapper -->
|
||||
{% endfor %}
|
||||
|
||||
<div class="item-switch clearfix">
|
||||
<a href="javascript:void(0);" class="item-button-prev">zurück</a>
|
||||
<a href="javascript:void(0);" class="item-button-next">weiter</a>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
{% for widget in widgets %}
|
||||
{% if widget.component is defined %}
|
||||
{% include 'default/components/sidebar/' ~ widget.component ~ '.html.twig' %}
|
||||
{% if(loop.index == loop_half ) %}
|
||||
{% if(loop.index == (loop_half|default((widgets|length / 2)|round(0, 'ceil'))) ) %}
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-12">
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,11 @@
|
|||
|
||||
{% block stylesheets %}
|
||||
{{ parent() }}
|
||||
<link rel="preload" as="image" href="{{ asset('img/slider/a1.jpg') }}">
|
||||
<link rel="preload" as="image" href="{{ asset('img/slider/m1.jpg') }}">
|
||||
<link rel="preload" as="image" href="{{ asset('img/slider/s1.jpg') }}">
|
||||
<link rel="preload" as="image" href="{{ asset('img/slider/u1.jpg') }}">
|
||||
<link rel="preload" as="image" href="{{ asset('img/usedom.jpg') }}">
|
||||
<style>
|
||||
.dev-home-note {
|
||||
margin-bottom: 25px;
|
||||
|
|
@ -36,6 +41,61 @@
|
|||
.dev-usedom-teaser .btn {
|
||||
margin-top: 5px;
|
||||
}
|
||||
.dev-usedom-teaser-image {
|
||||
overflow: hidden;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.dev-usedom-teaser-image .img-background {
|
||||
min-height: 190px;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
.dev-usedom-carousel-heading {
|
||||
margin: 8px 0 20px;
|
||||
padding: 0 15px 8px;
|
||||
border-bottom: 1px solid #d89a13;
|
||||
color: #5a5a5a;
|
||||
}
|
||||
.dev-destination-note {
|
||||
margin: 10px 0 18px;
|
||||
padding: 12px 16px;
|
||||
border-left: 4px solid #d89a13;
|
||||
background: #f8f3ea;
|
||||
}
|
||||
.dev-destination-note strong {
|
||||
display: block;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.travel-wrapper .item .item-img {
|
||||
position: relative;
|
||||
}
|
||||
.homepage-card-counter {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
z-index: 12;
|
||||
padding: 3px 8px;
|
||||
border-radius: 2px;
|
||||
background: rgb(100, 136, 89, 0.88);
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.homepage-card-new-badge {
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
top: 10px;
|
||||
z-index: 12;
|
||||
padding: 3px 8px;
|
||||
border-radius: 2px;
|
||||
background: #ffc926;
|
||||
color: #1a457c;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
line-height: 1.2;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
|
|
@ -52,11 +112,22 @@
|
|||
Diese Startseite ist nur unter dem Testlink sichtbar und nicht fuer Suchmaschinen freigegeben.
|
||||
</div>
|
||||
|
||||
<h1>Unsere beliebtesten Kulturreisen</h1>
|
||||
{% set homepage_offer_heading = homepage_offer_title|default('beliebtesten Kulturreisen') %}
|
||||
{% if '%count%' in homepage_offer_heading %}
|
||||
<h1>{{ homepage_offer_heading|replace({'%count%': homepage_offer_pages|length}) }}</h1>
|
||||
{% elseif homepage_offer_heading|slice(0, 6) == 'Unsere' %}
|
||||
<h1>{{ homepage_offer_heading }}</h1>
|
||||
{% else %}
|
||||
<h1>Unsere {{ homepage_offer_pages|length }} {{ homepage_offer_heading|replace({'Beliebte': 'beliebtesten', 'beliebte': 'beliebtesten'}) }}</h1>
|
||||
{% endif %}
|
||||
|
||||
<section id="dev-home-offers">
|
||||
{% if homepage_offer_pages is not empty %}
|
||||
{% include 'default/components/multiPageBoxCarousel.html.twig' with {pages: homepage_offer_pages} %}
|
||||
{% include 'default/components/multiPageBoxCarousel.html.twig' with {
|
||||
pages: homepage_offer_pages,
|
||||
show_item_counter: true,
|
||||
new_page_ids: homepage_offer_new_page_ids|default([])
|
||||
} %}
|
||||
{% else %}
|
||||
<p>Aktuell konnten keine kuratierten Reiseangebote geladen werden.</p>
|
||||
{% endif %}
|
||||
|
|
@ -64,28 +135,54 @@
|
|||
|
||||
<section class="clearfix dev-usedom-teaser" id="dev-home-usedom">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-7">
|
||||
<h2 class="h3 h3l">Lieber näher zuhause? Ferienwohnungen auf Usedom</h2>
|
||||
<p class="lead">
|
||||
Neben unseren Kulturreisen bieten wir acht Ferienwohnungen in zwei Häusern auf Usedom.
|
||||
Neben unseren Kulturreisen bieten wir <strong>8 Ferienwohnungen</strong> in zwei Häusern auf Usedom.
|
||||
Ideal für alle, die kurzfristig, individuell und nah an der Ostsee Urlaub machen möchten.
|
||||
</p>
|
||||
<a class="btn btn-primary" href="/ferienwohnungen" title="Ferienwohnungen auf Usedom ansehen">
|
||||
Ferienwohnungen ansehen
|
||||
</a>
|
||||
<br><br>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<p>
|
||||
Der Block macht Usedom als zweites Standbein sichtbar, ohne die Kulturreisen zu verdrängen.
|
||||
Bilder und Reihenfolge können nach Sichtung des vorhandenen Bildpools noch feinjustiert werden.
|
||||
</p>
|
||||
<div class="col-md-5">
|
||||
<div class="dev-usedom-teaser-image">
|
||||
<img class="img-responsive" src="{{ asset('img/usedom.jpg') }}" alt="Ferienwohnungen auf Usedom">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
</div>
|
||||
<h2 class="h4 h3l dev-usedom-carousel-heading">Unsere 8 Ferienwohnungen auf Usedom</h2>
|
||||
{% if fewo_lodgings is not empty %}
|
||||
<div class="owl-fullwidth owl-carousel owl-theme">
|
||||
{% for lodging in fewo_lodgings %}
|
||||
<div class="owl-item-full">
|
||||
<div class="travel-wrapper get-box-link">
|
||||
<div class="item text-left">
|
||||
<div class="item-img">
|
||||
<div class="lb">
|
||||
{% if lodging.page.boxStar is not empty %}
|
||||
<div class="cstar_left">{{ lodging.page.boxStar|raw }}</div>
|
||||
{% endif %}
|
||||
{% if lodging.page.boxDiscount is not empty %}
|
||||
<div class="cdiscount">{{ lodging.page.boxDiscount|raw }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if fewo_lodgings is not empty %}
|
||||
<div class="row">
|
||||
{% for lodging in fewo_lodgings %}
|
||||
{% include 'default/components/pageLodgingBox.html.twig' %}
|
||||
{% include 'default/components/pageBoxImage.html.twig' with {page: lodging.page} %}
|
||||
</div>
|
||||
<div class="box_mid">
|
||||
<div class="hl5">{{ lodging.page.title }}</div>
|
||||
<p>{{ lodging.page.boxBody ?? lodging.page.description }}</p>
|
||||
</div>
|
||||
<a class="item-button is-box-link dobble_line" href="{{ lodging.page.urlPath }}" title="{{ lodging.page.title }}">
|
||||
<span>{{ lodging.page.title }}</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
@ -104,16 +201,100 @@
|
|||
<h1>STERN TOURS - Ihr Kulturreise-Spezialist aus Berlin</h1>
|
||||
<p class="ft">
|
||||
Herzlich willkommen bei STERN TOURS, Ihrem Reiseveranstalter für ausgewählte Kulturreisen.
|
||||
In der aktuellen Startseitenfassung stehen besonders die Reiseziele im Vordergrund, die
|
||||
derzeit gut planbar und verkaufbar sind: Ägypten, Marokko, Usbekistan und Oman.
|
||||
Seit 1998 beraten wir Reisende zu den historischen Schätzen des Orients, Nordafrikas und
|
||||
Zentralasiens. In der aktuellen Startseitenfassung stehen besonders die Reiseziele im
|
||||
Vordergrund, die derzeit gut planbar und verkaufbar sind: Ägypten, Marokko, Usbekistan
|
||||
und Oman. Bei Destinationen mit angespannter Lage kommunizieren wir bewusst transparent
|
||||
und beraten persönlich, statt Reisen unkritisch in den Vordergrund zu stellen.
|
||||
</p>
|
||||
<h2 class="h3 h3l">Kulturreisen mit Erfahrung und persönlicher Beratung</h2>
|
||||
<hr>
|
||||
<h2 class="h3 h3l">Ägypten - Land der Pyramiden und Pharaonen</h2>
|
||||
<p class="ft">
|
||||
Seit 1998 beraten wir Reisende zu Kulturreisen in den Orient und angrenzende Regionen.
|
||||
Die neue Frontseite soll Orientierung geben, buchbare Reisen sichtbar machen und zugleich
|
||||
verantwortungsvoll mit Destinationen umgehen, bei denen die Lage eine vorsichtigere
|
||||
Kommunikation erfordert.
|
||||
Ägypten bleibt eines der klassischen STERN TOURS Ziele: Pyramiden, Luxor, das Tal der Könige,
|
||||
Kairo und der Nil verbinden große Geschichte mit gut planbaren Kulturreisen. Unsere Programme
|
||||
führen zu den wichtigsten Stätten des alten Ägypten und lassen sich je nach Reiseverlauf mit
|
||||
einer Nilkreuzfahrt oder erholsamen Tagen am Roten Meer verbinden.
|
||||
Hier finden Sie unsere <a href="/aegypten-reisen/aegypten-rundreisen" title="Ägypten Rundreisen">Ägypten Rundreisen</a>.
|
||||
</p>
|
||||
|
||||
<h2 class="h3 h3l">Marokko - Königsstädte, Wüste und lebendige Kultur</h2>
|
||||
<p class="ft">
|
||||
Marokko verbindet orientalische Atmosphäre mit einer guten Erreichbarkeit: Marrakesch, Fès,
|
||||
Rabat und Meknès stehen für Königsstädte, Handwerk, Märkte und eindrucksvolle Architektur.
|
||||
Ausflüge in den Atlas und in die Wüstenlandschaften machen Marokko zu einem vielseitigen Ziel
|
||||
für Kulturreisende, die derzeit eine gut planbare Alternative im nordafrikanischen Raum suchen.
|
||||
Hier finden Sie unsere <a href="/marokko-urlaub/marokko-rundreisen" title="Marokko Rundreisen">Marokko Rundreisen</a>.
|
||||
</p>
|
||||
|
||||
<h2 class="h3 h3l">Usbekistan - entlang der Seidenstraße nach Samarkand</h2>
|
||||
<p class="ft">
|
||||
Usbekistan ist ein junges Reiseland mit einer sehr alten Kultur. Samarkand, Buchara und Chiwa
|
||||
stehen für die Seidenstraße, prachtvolle Medresen, türkisfarbene Kuppeln und Oasenstädte, die
|
||||
bis heute von Handel, Handwerk und Geschichte erzählen. Für kulturinteressierte Gäste ist
|
||||
Usbekistan aktuell eines der spannendsten und zugleich gut vermittelbaren Ziele im Programm.
|
||||
Hier finden Sie unsere <a href="/usbekistan-reisen/usbekistan-rundreisen" title="Usbekistan Rundreisen">Usbekistan Rundreisen</a>.
|
||||
</p>
|
||||
|
||||
<h2 class="h3 h3l">Oman - Wüstenschlösser, Naturschauspiele und Badestrände</h2>
|
||||
<p class="ft">
|
||||
Der Oman bietet Wüsten, Gebirge, Oasen, Küsten und eine wohltuend ruhige Form orientalischer
|
||||
Gastfreundschaft. Maskat, Nizwa, traditionelle Souks, Forts und Fahrten durch eindrucksvolle
|
||||
Landschaften machen das Sultanat zu einem hochwertigen Kulturreiseziel. Wer eine planbare Reise
|
||||
mit Natur, Geschichte und Erholung verbinden möchte, findet im Oman eine starke Alternative.
|
||||
Hier finden Sie unsere <a href="/oman-reisen/oman-rundreisen" title="Oman Rundreisen">Oman Rundreisen</a>.
|
||||
</p>
|
||||
|
||||
<h2 class="h3 h3l">Türkei - Kultur zwischen Europa und Asien</h2>
|
||||
<p class="ft">
|
||||
Die Türkei bietet mit Istanbul, Ephesus, Kappadokien und vielen antiken Stätten ein großes
|
||||
kulturelles Spektrum. Auf der aktuellen Startseite bleibt sie bewusst im Hintergrund, da der
|
||||
Fokus auf den derzeit wichtigsten STERN TOURS Zielen liegt.
|
||||
Hier finden Sie unsere <a href="/tuerkei-reisen/tuerkei-rundreisen" title="Türkei Rundreisen">Türkei Rundreisen</a>.
|
||||
</p>
|
||||
|
||||
<h2 class="h3 h3l">Jordanien - Petra, Wadi Rum und persönliche Beratung</h2>
|
||||
<div class="dev-destination-note">
|
||||
<strong>Aktuelle Einordnung:</strong>
|
||||
Reisen nach Jordanien sind grundsätzlich weiterhin möglich. Aufgrund der angespannten Lage in
|
||||
der Region empfehlen wir eine persönliche Beratung und eine sorgfältige Prüfung von Reisezeitraum
|
||||
und Verfügbarkeit.
|
||||
</div>
|
||||
<p class="ft">
|
||||
Jordanien bleibt kulturell eines der eindrucksvollsten Ziele der Region: die Felsenstadt Petra,
|
||||
Wadi Rum, Amman, Jerash und das Tote Meer prägen viele Reiseverläufe. Auf der Startseite wird
|
||||
Jordanien derzeit bewusst weniger prominent beworben; Interessierte beraten wir gern individuell.
|
||||
Hier finden Sie unsere <a href="/jordanien-reisen/jordanien-rundreisen" title="Jordanien Rundreisen">Jordanien Rundreisen</a>.
|
||||
</p>
|
||||
|
||||
<h2 class="h3 h3l">Israel - große Religionsgeschichte mit aktueller Lageprüfung</h2>
|
||||
<div class="dev-destination-note">
|
||||
<strong>Aktuelle Einordnung:</strong>
|
||||
Die Lage in der Region ist angespannt. Wir empfehlen, geplante Reisen nach Israel sorgfältig zu
|
||||
prüfen und sich vor einer Buchung persönlich beraten zu lassen.
|
||||
</div>
|
||||
<p class="ft">
|
||||
Israel ist ein Land von herausragender religiöser und kultureller Bedeutung: Jerusalem, Galiläa,
|
||||
das Tote Meer, Haifa und Akko stehen für Geschichte, Begegnung und Vielfalt. Aufgrund der
|
||||
aktuellen Situation tritt Israel auf der Startseite nicht in den Vordergrund; Anfragen mit
|
||||
längerem Vorlauf behandeln wir individuell und verantwortungsvoll.
|
||||
Hier finden Sie unsere <a href="/israel-reisen/israel-rundreisen" title="Israel Rundreisen">Israel Rundreisen</a>.
|
||||
</p>
|
||||
|
||||
<h2 class="h3 h3l">Iran - Kulturschätze Persiens, derzeit nicht im Vordergrund</h2>
|
||||
<div class="dev-destination-note">
|
||||
<strong>Aktuelle Einordnung:</strong>
|
||||
Aufgrund der aktuellen Lage sind Iran-Reisen derzeit nicht als aktive Buchungsempfehlung auf der
|
||||
Startseite platziert. Interessierte können sich vormerken lassen und werden informiert, sobald
|
||||
Reisen wieder verantwortungsvoll planbar sind.
|
||||
</div>
|
||||
<p class="ft">
|
||||
Der Iran blickt auf Jahrtausende Kulturgeschichte zurück: Isfahan, Schiras, Yazd und Persepolis
|
||||
gehören zu den großen Namen persischer Geschichte. Diese Faszination bleibt bestehen, wird aber
|
||||
aktuell bewusst nicht verkaufsstark beworben. Der Schwerpunkt liegt auf transparenter Information
|
||||
und späterer Wiederaufnahme, sobald die Rahmenbedingungen es erlauben.
|
||||
Hier finden Sie unsere <a href="/iran-reisen/iran-rundreisen" title="Iran Rundreisen">Iran Rundreisen</a>.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @author Ulrich Hecht <ulrich.hecht@hecht-software.de>
|
||||
* @date 12/08/2016
|
||||
|
|
@ -37,7 +38,8 @@ class BookingController extends Controller
|
|||
* @throws \Exception
|
||||
*/
|
||||
|
||||
private function getErrorMessages(\Symfony\Component\Form\Form $form) {
|
||||
private function getErrorMessages(\Symfony\Component\Form\Form $form)
|
||||
{
|
||||
$errors = array();
|
||||
|
||||
foreach ($form->getErrors() as $key => $error) {
|
||||
|
|
@ -64,27 +66,26 @@ class BookingController extends Controller
|
|||
public function indexAction(Page $travelProgramPage, $action, Request $request)
|
||||
{
|
||||
|
||||
if($action == '/show_nationality_country_text')
|
||||
{
|
||||
if ($action == '/show_nationality_country_text') {
|
||||
|
||||
$ret = "";
|
||||
$nationality_id = $request->request->get('nationality_id');
|
||||
$country_ids = $request->request->get('country_ids');
|
||||
|
||||
|
||||
foreach ($country_ids as $country_id){
|
||||
foreach ($country_ids as $country_id) {
|
||||
|
||||
$country = $this->getEntityManager()->getRepository('AppBundle:TravelCountry')->findOneBy(['id' => $country_id]);
|
||||
|
||||
$req = $this->getDoctrine()->getRepository('AppBundle:TravelNationalityRequirement')->findOneByCountryAndNationality($country_id, $nationality_id);
|
||||
|
||||
|
||||
if($req && $country){
|
||||
if ($req && $country) {
|
||||
|
||||
$setC = !empty($country->getName()) ? $country->getName() : "Einreiseland";
|
||||
$setT = !empty($req->getText()) ? $req->getText() : "Die Einreisebestimmungen erhalten Sie nach der Bestätigung Ihrer Anfrage.";
|
||||
$ret .= "<h2>".$setC."</h2>";
|
||||
$ret .= "<p>".$setT."</p>";
|
||||
$ret .= "<h2>" . $setC . "</h2>";
|
||||
$ret .= "<p>" . $setT . "</p>";
|
||||
$ret .= "<hr>";
|
||||
}
|
||||
}
|
||||
|
|
@ -93,8 +94,7 @@ class BookingController extends Controller
|
|||
}
|
||||
|
||||
$travelProgram = $travelProgramPage->getTravelProgram();
|
||||
if (!$request->query->has('nr'))
|
||||
{
|
||||
if (!$request->query->has('nr')) {
|
||||
return $this->redirect($travelProgramPage->getUrlPath());
|
||||
}
|
||||
$this->getDoctrine()->getRepository('AppBundle:TravelPeriod')->getTrueTravelPeriods($travelProgram);
|
||||
|
|
@ -102,24 +102,20 @@ class BookingController extends Controller
|
|||
$this->priceTypeById = $this->getDoctrine()->getRepository('AppBundle:TravelPeriodPriceType')->findAllIndexedById();
|
||||
|
||||
// #TODO Consider changing key of travel dates
|
||||
foreach ($travelProgram->getTravelDates() as $curTravelDate)
|
||||
{
|
||||
if($curTravelDate->getStatus() != 0){
|
||||
if ($curTravelDate->getName() == $request->query->get('nr'))
|
||||
{
|
||||
foreach ($travelProgram->getTravelDates() as $curTravelDate) {
|
||||
if ($curTravelDate->getStatus() != 0) {
|
||||
if ($curTravelDate->getName() == $request->query->get('nr')) {
|
||||
$travelDate = $curTravelDate;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($travelDate))
|
||||
{
|
||||
if (!isset($travelDate)) {
|
||||
throw $this->createNotFoundException();
|
||||
}
|
||||
$now = new \DateTime();
|
||||
if ($travelDate->getStart() <= $now)
|
||||
{
|
||||
if ($travelDate->getStart() <= $now) {
|
||||
throw $this->createNotFoundException();
|
||||
}
|
||||
|
||||
|
|
@ -132,8 +128,7 @@ class BookingController extends Controller
|
|||
|
||||
/** @var BookingRequest $bookingRequest */
|
||||
$bookingRequest = new BookingRequest();
|
||||
if ($request->getMethod() != 'POST')
|
||||
{
|
||||
if ($request->getMethod() != 'POST') {
|
||||
$bookingRequest->setRoomCount(0);
|
||||
}
|
||||
$form = $this->createForm(BookingRequestType::class, $bookingRequest, [
|
||||
|
|
@ -141,8 +136,7 @@ class BookingController extends Controller
|
|||
'travel_program' => $travelProgram,
|
||||
'nationalities' => $nationalities
|
||||
]);
|
||||
if ($request->getMethod() == 'POST')
|
||||
{
|
||||
if ($request->getMethod() == 'POST') {
|
||||
$form->handleRequest($request);
|
||||
$bookingRequest = $form->getData();
|
||||
}
|
||||
|
|
@ -151,37 +145,44 @@ class BookingController extends Controller
|
|||
$bookingPriceInfo = [];
|
||||
$totalPrice = $this->calculatePrice($travelDate, $bookingRequest, $travelProgram->getCategory()->getId(), $travelProgram->getDepositPercent(), $htmlSummary, $bookingPriceInfo);
|
||||
|
||||
if ($action == '/buchen')
|
||||
{
|
||||
if ($action == '/buchen') {
|
||||
$breadcrumbEntries = Util::createBreadcrumb($travelProgramPage);
|
||||
$breadcrumbEntries[] = new BreadcrumbEntry('Buchen');
|
||||
$errors = [];
|
||||
|
||||
if ($request->getMethod() === 'POST' && $form->isValid())
|
||||
{
|
||||
$errors = array();
|
||||
if ($request->getMethod() === 'POST') {
|
||||
foreach ($form as $fieldName => $formField) {
|
||||
foreach ($formField->getErrors(true) as $error) {
|
||||
$errors[$fieldName] = $error->getMessage();
|
||||
}
|
||||
}
|
||||
if (!$bookingRequest->checkIsRoomSelected()) {
|
||||
$errors['room'] = 'Bitte wählen Sie mindestens ein Zimmer aus.';
|
||||
}
|
||||
}
|
||||
|
||||
if ($request->getMethod() === 'POST' && $form->isValid() && count($errors) == 0) {
|
||||
$booking = $this->getDoctrine()->getRepository('AppBundle:TravelBooking')->createFromBookingRequest(
|
||||
$bookingRequest, $travelDate, $bookingPriceInfo);
|
||||
$bookingRequest,
|
||||
$travelDate,
|
||||
$bookingPriceInfo
|
||||
);
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em->persist($booking);
|
||||
$em->flush();
|
||||
|
||||
$ret = Util::loadFromApi('booking/import', ['travel_booking_id' => $booking->getId()]);
|
||||
$error_crm = 'CRM Fehler: | interne travel_booking ID: '.$booking->getId();
|
||||
$error_crm = 'CRM Fehler: | interne travel_booking ID: ' . $booking->getId();
|
||||
|
||||
$this->get('mailer')->send(\Swift_Message::newInstance()
|
||||
$this->get('mailer')->send(
|
||||
\Swift_Message::newInstance()
|
||||
->setSubject('Ihr Buchungsauftrag bei STERN TOURS')
|
||||
->setFrom('stern@stern-tours.de', 'STERN TOURS')
|
||||
->setTo($bookingRequest->getEmail()) //
|
||||
->setBody(
|
||||
$this->renderView('default/email/bookingConfirmationEmail.txt.twig', [
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir') . '/..') . DIRECTORY_SEPARATOR,
|
||||
'booking_request' => $bookingRequest,
|
||||
'booking_price_info' => $bookingPriceInfo,
|
||||
'travel_date' => $travelDate,
|
||||
|
|
@ -190,17 +191,19 @@ class BookingController extends Controller
|
|||
'summary' => $htmlSummary,
|
||||
|
||||
]),
|
||||
'text/plain', 'utf-8'
|
||||
'text/plain',
|
||||
'utf-8'
|
||||
)
|
||||
);
|
||||
|
||||
$this->get('mailer')->send(\Swift_Message::newInstance()
|
||||
->setSubject('BUCHUNG: '. $travelProgram->getTitle() .'('. $travelDate->getName() .')')
|
||||
$this->get('mailer')->send(
|
||||
\Swift_Message::newInstance()
|
||||
->setSubject('BUCHUNG: ' . $travelProgram->getTitle() . '(' . $travelDate->getName() . ')')
|
||||
->setFrom('stern@stern-tours.de', 'STERN TOURS')
|
||||
->setTo("stern@stern-tours.de")
|
||||
->setBody(
|
||||
$this->renderView('default/email/bookingServiceEmail.txt.twig', [
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir') . '/..') . DIRECTORY_SEPARATOR,
|
||||
'crm_v1_url' => isset($ret->url_v1) ? $ret->url_v1 : $error_crm,
|
||||
'crm_v3_url' => isset($ret->url_v3) ? $ret->url_v3 : $error_crm,
|
||||
'lead_id' => isset($ret->lead_id) ? $ret->lead_id : '',
|
||||
|
|
@ -213,13 +216,14 @@ class BookingController extends Controller
|
|||
'summary' => $htmlSummary,
|
||||
|
||||
]),
|
||||
'text/plain', 'utf-8'
|
||||
'text/plain',
|
||||
'utf-8'
|
||||
)
|
||||
);
|
||||
|
||||
// #TODO This will lead to multiple bookings due to multiple form submission. Redirect instead!
|
||||
return $this->render('default/pages/bookingConfirmation.html.twig', [
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir') . '/..') . DIRECTORY_SEPARATOR,
|
||||
'site_loading' => 'bookingconfirm',
|
||||
'page' => $travelProgramPage,
|
||||
'booking_request' => $bookingRequest,
|
||||
|
|
@ -243,7 +247,7 @@ class BookingController extends Controller
|
|||
}
|
||||
|
||||
return $this->render('default/pages/booking.html.twig', [
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir') . '/..') . DIRECTORY_SEPARATOR,
|
||||
'site_loading' => 'booking',
|
||||
'page' => $travelProgramPage,
|
||||
'breadcrumb_entries' => $breadcrumbEntries,
|
||||
|
|
@ -263,17 +267,15 @@ class BookingController extends Controller
|
|||
'total_price' => $totalPrice,
|
||||
'nationalities' => $nationalities,
|
||||
'booking_price_info' => $bookingPriceInfo,
|
||||
'errors' => count($errors) ? $errors : null,
|
||||
'mediator_terms_filename' => $travelProgram->getIsMediated()
|
||||
? $this->getDoctrine()->getRepository('AppBundle:TravelOrganizer')->find(1)->getFileName()
|
||||
: null
|
||||
]);
|
||||
}
|
||||
|
||||
elseif ($action == '/berechne-gesamtpreis')
|
||||
{
|
||||
} elseif ($action == '/berechne-gesamtpreis') {
|
||||
|
||||
return $this->render('default/components/booking/summary.html.twig', [
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir') . '/..') . DIRECTORY_SEPARATOR,
|
||||
'summary' => $htmlSummary,
|
||||
'total_price' => $totalPrice,
|
||||
'booking_price_info' => $bookingPriceInfo,
|
||||
|
|
@ -281,13 +283,13 @@ class BookingController extends Controller
|
|||
|
||||
]);
|
||||
}
|
||||
throw new \Exception('Unknow BookingController action: '. $action);
|
||||
throw new \Exception('Unknow BookingController action: ' . $action);
|
||||
}
|
||||
|
||||
private function calcNumTravelerLabel($number)
|
||||
{
|
||||
$ret = 0;
|
||||
if($number > 0)
|
||||
if ($number > 0)
|
||||
$ret = 1;
|
||||
|
||||
return $ret;
|
||||
|
|
@ -311,13 +313,11 @@ class BookingController extends Controller
|
|||
|
||||
$childrenCount = $bookingRequest->getChildrenCount();
|
||||
|
||||
if (isset($outHtmlSummary))
|
||||
{
|
||||
if (isset($outHtmlSummary)) {
|
||||
$insuranceHtmlSummary = [];
|
||||
}
|
||||
|
||||
if (isset($outPriceInfo))
|
||||
{
|
||||
if (isset($outPriceInfo)) {
|
||||
$outPriceInfo['rooms'] = [];
|
||||
$outPriceInfo['insurances'] = [];
|
||||
$outPriceInfo['insurancesOut'] = [];
|
||||
|
|
@ -331,38 +331,35 @@ class BookingController extends Controller
|
|||
$outPriceInfo['discount'] = [];
|
||||
$outPriceInfo['booking_before'] = [];
|
||||
$outPriceInfo['booking_after'] = [];
|
||||
|
||||
}
|
||||
|
||||
$tempDepartureHTML = array();
|
||||
//ABFLUG
|
||||
if($bookingRequest->getDeparture() != null)
|
||||
{
|
||||
$departure = Util\DepartureUtil::limitIndividualArrivalPrice($bookingRequest->getDeparture(),
|
||||
$travelDate->getFlightPrice());
|
||||
if (isset($outPriceInfo))
|
||||
{
|
||||
if ($bookingRequest->getDeparture() != null) {
|
||||
$departure = Util\DepartureUtil::limitIndividualArrivalPrice(
|
||||
$bookingRequest->getDeparture(),
|
||||
$travelDate->getFlightPrice()
|
||||
);
|
||||
if (isset($outPriceInfo)) {
|
||||
$outPriceInfo['departure'] = $departure;
|
||||
}
|
||||
|
||||
if ($departure->getExtraCharge() != 0)
|
||||
{
|
||||
if ($departure->getExtraCharge() != 0) {
|
||||
$insuranceAssessmentBasis += $departure->getExtraCharge();
|
||||
$insuranceAssessmentChildBasis += $departure->getExtraCharge();
|
||||
$a = ($travelerCount + $childrenCount) * $departure->getExtraCharge();
|
||||
$ret += $a;
|
||||
$outPriceInfo['departure_extra'] += $a;
|
||||
|
||||
if (isset($outHtmlSummary))
|
||||
{
|
||||
if (isset($outHtmlSummary)) {
|
||||
$key = $departure->getExtraCharge();
|
||||
if(!empty($tempDepartureHTML[$key])) {
|
||||
if (!empty($tempDepartureHTML[$key])) {
|
||||
$tempDepartureHTML[$key]['count'] = $tempDepartureHTML[$key]['count'] + ($travelerCount + $childrenCount);
|
||||
$tempDepartureHTML[$key]['value'] = $tempDepartureHTML[$key]['value'] + $a;
|
||||
}else{
|
||||
} else {
|
||||
$tempDepartureHTML[$key] = array(
|
||||
'value' => $a,
|
||||
'label_first' => ($departure->getExtraCharge() > 0 ? 'Aufschlag' : 'Abzug') . ' für Abfahrts-/Abflugort "'. $departure->getName(),
|
||||
'label_first' => ($departure->getExtraCharge() > 0 ? 'Aufschlag' : 'Abzug') . ' für Abfahrts-/Abflugort "' . $departure->getName(),
|
||||
'label_last' => Util::formatPrice($departure->getExtraCharge()) . ' pro Person',
|
||||
'count' => ($travelerCount + $childrenCount),
|
||||
);
|
||||
|
|
@ -373,21 +370,19 @@ class BookingController extends Controller
|
|||
|
||||
//OPTIONEN
|
||||
$tempOptionHTML = array();
|
||||
foreach ($bookingRequest->getTravelOptions() as $travelOption)
|
||||
{
|
||||
foreach ($bookingRequest->getTravelOptions() as $travelOption) {
|
||||
$insuranceAssessmentBasis += $travelOption->getPrice();
|
||||
$insuranceAssessmentChildBasis += $travelOption->getPriceChildren();
|
||||
$a = $travelerCount * $travelOption->getPrice();
|
||||
$a += $childrenCount * $travelOption->getPriceChildren();
|
||||
$ret += $a;
|
||||
//OPTIONS
|
||||
if (isset($outHtmlSummary))
|
||||
{
|
||||
if (isset($outHtmlSummary)) {
|
||||
$key = $travelOption->getId();
|
||||
if(!empty($tempOptionHTML[$key])) {
|
||||
if (!empty($tempOptionHTML[$key])) {
|
||||
// $tempOptionHTML[$key]['count'] = $tempOptionHTML[$key]['count'] + $travelerCount;
|
||||
$tempOptionHTML[$key]['value'] = $tempOptionHTML[$key]['value'] + $a;
|
||||
}else{
|
||||
} else {
|
||||
$tempOptionHTML[$key] = array(
|
||||
'value' => $a,
|
||||
'label_first' => $travelOption->getName(),
|
||||
|
|
@ -398,8 +393,7 @@ class BookingController extends Controller
|
|||
);
|
||||
}
|
||||
}
|
||||
if (isset($outPriceInfo))
|
||||
{
|
||||
if (isset($outPriceInfo)) {
|
||||
$outPriceInfo['options'][] = $travelOption;
|
||||
}
|
||||
}
|
||||
|
|
@ -432,10 +426,8 @@ class BookingController extends Controller
|
|||
$possibleRooms = $this->getRooms($travelDate->getPrices(), $persons);
|
||||
$tempComfortHTML = array();
|
||||
|
||||
if ($bookingRequest->getComfort())
|
||||
{
|
||||
foreach ($possibleRooms as $room)
|
||||
{
|
||||
if ($bookingRequest->getComfort()) {
|
||||
foreach ($possibleRooms as $room) {
|
||||
$insuranceAssessmentBasis += $room['price']->getEffectiveComfortPrice();
|
||||
$insuranceAssessmentChildBasis += $room['price']->getEffectiveComfortPrice();
|
||||
|
||||
|
|
@ -446,13 +438,12 @@ class BookingController extends Controller
|
|||
$b = $childrenCount * $room['price']->getEffectiveComfortPrice();
|
||||
$ret += $a + $b;
|
||||
|
||||
if (isset($outHtmlSummary))
|
||||
{
|
||||
if (isset($outHtmlSummary)) {
|
||||
$key = intval($room['price']->getEffectiveComfortPrice());
|
||||
if(!empty($tempComfortHTML[$key])) {
|
||||
if (!empty($tempComfortHTML[$key])) {
|
||||
$tempComfortHTML[$key]['count'] = $tempComfortHTML[$key]['count'] + $adultCount + $childrenCount;
|
||||
$tempComfortHTML[$key]['value'] = $tempComfortHTML[$key]['value'] + $a + $b;
|
||||
}else{
|
||||
} else {
|
||||
$tempComfortHTML[$key] = array(
|
||||
'value' => $a + $b,
|
||||
'label_first' => 'Komfort-Kategorie',
|
||||
|
|
@ -461,8 +452,7 @@ class BookingController extends Controller
|
|||
);
|
||||
}
|
||||
}
|
||||
if (isset($outPriceInfo))
|
||||
{
|
||||
if (isset($outPriceInfo)) {
|
||||
$outPriceInfo['classOptions'][] = [
|
||||
'count' => $room['persons']['total'],
|
||||
'name' => 'Komfort (4 Sterne)',
|
||||
|
|
@ -473,10 +463,10 @@ class BookingController extends Controller
|
|||
}
|
||||
|
||||
//days before
|
||||
if($bookingRequest->getExtraBookingDaysBefore()){
|
||||
if ($bookingRequest->getExtraBookingDaysBefore()) {
|
||||
|
||||
$newDay = clone $travelDate->getStart();
|
||||
$newDay->modify('-'.$bookingRequest->getExtraBookingDaysBefore().' day');
|
||||
$newDay->modify('-' . $bookingRequest->getExtraBookingDaysBefore() . ' day');
|
||||
$newExtraDaysTravelDate['change'] = 1;
|
||||
$newExtraDaysTravelDate['start'] = $newDay->format('d.m.Y');
|
||||
|
||||
|
|
@ -486,9 +476,9 @@ class BookingController extends Controller
|
|||
$adultCount = $room['persons']['adults'];
|
||||
$childrenCount = $room['persons']['children'];
|
||||
|
||||
if ($bookingRequest->getComfort()){
|
||||
if ($bookingRequest->getComfort()) {
|
||||
$singleExtraFullPrice = $room['price']->getEffectiveExtraComfortPrice();
|
||||
}else{
|
||||
} else {
|
||||
$singleExtraFullPrice = $room['price']->getEffectiveExtraPrice();
|
||||
}
|
||||
$childExtraPrice = $room['price']->getEffectiveExtraChildPrice();
|
||||
|
|
@ -527,16 +517,14 @@ class BookingController extends Controller
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
$tempExtraDaysAfterHTML = array();
|
||||
//days after
|
||||
if($bookingRequest->getExtraBookingDaysAfter()){
|
||||
if ($bookingRequest->getExtraBookingDaysAfter()) {
|
||||
|
||||
$newDay = clone $travelDate->getEnd();
|
||||
$newDay->modify('+'.$bookingRequest->getExtraBookingDaysAfter().' day');
|
||||
$newDay->modify('+' . $bookingRequest->getExtraBookingDaysAfter() . ' day');
|
||||
$newExtraDaysTravelDate['change'] = 1;
|
||||
$newExtraDaysTravelDate['end'] = $newDay->format('d.m.Y');
|
||||
|
||||
|
|
@ -546,9 +534,9 @@ class BookingController extends Controller
|
|||
$adultCount = $room['persons']['adults'];
|
||||
$childrenCount = $room['persons']['children'];
|
||||
|
||||
if ($bookingRequest->getComfort()){
|
||||
if ($bookingRequest->getComfort()) {
|
||||
$singleExtraFullPrice = $room['price']->getEffectiveExtraComfortPrice();
|
||||
}else{
|
||||
} else {
|
||||
$singleExtraFullPrice = $room['price']->getEffectiveExtraPrice();
|
||||
}
|
||||
$childExtraPrice = $room['price']->getEffectiveExtraChildPrice();
|
||||
|
|
@ -587,14 +575,11 @@ class BookingController extends Controller
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//ROOMS DISCOUNT Versicherungen
|
||||
foreach ($possibleRooms as $room)
|
||||
{
|
||||
foreach ($possibleRooms as $room) {
|
||||
$adultCount = $room['persons']['adults'];
|
||||
$childrenCount = $room['persons']['children'];
|
||||
|
||||
|
|
@ -615,8 +600,7 @@ class BookingController extends Controller
|
|||
$outPriceInfo['flight_price'] += (($singel_flight_price * $adultCount) + ($singel_flight_price * $room['persons']['children']));
|
||||
|
||||
//Room price
|
||||
if (isset($outPriceInfo))
|
||||
{
|
||||
if (isset($outPriceInfo)) {
|
||||
$price = $singleDiscountPrice ?? $singleFullPrice;
|
||||
$price += $singleChildDiscountPrice ?? $childPrice;
|
||||
|
||||
|
|
@ -635,14 +619,13 @@ class BookingController extends Controller
|
|||
|
||||
|
||||
//Room html
|
||||
if (isset($outHtmlSummary))
|
||||
{
|
||||
if (isset($outHtmlSummary)) {
|
||||
//ROOMS
|
||||
$key = $room['priceType']->getId();
|
||||
if(!empty($tempRoomHTML[$key])) {
|
||||
if (!empty($tempRoomHTML[$key])) {
|
||||
$tempRoomHTML[$key]['count'] = $tempRoomHTML[$key]['count'] + 1;
|
||||
$tempRoomHTML[$key]['value'] = $tempRoomHTML[$key]['value'] + $roomPrice;
|
||||
}else{
|
||||
} else {
|
||||
$tempRoomHTML[$key] = array(
|
||||
'value' => $roomPrice,
|
||||
'label_first' => $room['priceType']->getName(),
|
||||
|
|
@ -654,13 +637,12 @@ class BookingController extends Controller
|
|||
}
|
||||
|
||||
//DISCOUNT
|
||||
if ($singleDiscountPrice !== null)
|
||||
{
|
||||
$key = intval(($singleFullPrice - $singleDiscountPrice)*100);
|
||||
if(!empty($tempDiscountHTML[$key])) {
|
||||
if ($singleDiscountPrice !== null) {
|
||||
$key = intval(($singleFullPrice - $singleDiscountPrice) * 100);
|
||||
if (!empty($tempDiscountHTML[$key])) {
|
||||
$tempDiscountHTML[$key]['count'] = $tempDiscountHTML[$key]['count'] + $adultCount;
|
||||
$tempDiscountHTML[$key]['value'] = $tempDiscountHTML[$key]['value'] + $discount;
|
||||
}else{
|
||||
} else {
|
||||
$tempDiscountHTML[$key] = array(
|
||||
'value' => $discount,
|
||||
'label_first' => 'Rabatt',
|
||||
|
|
@ -668,12 +650,12 @@ class BookingController extends Controller
|
|||
'count' => $adultCount,
|
||||
);
|
||||
}
|
||||
if($childDiscount > 0){
|
||||
$key = intval(($childPrice - $singleChildDiscountPrice)*100);
|
||||
if(!empty($tempDiscountHTML[$key])) {
|
||||
if ($childDiscount > 0) {
|
||||
$key = intval(($childPrice - $singleChildDiscountPrice) * 100);
|
||||
if (!empty($tempDiscountHTML[$key])) {
|
||||
$tempDiscountHTML[$key]['count'] = $tempDiscountHTML[$key]['count'] + $childrenCount;
|
||||
$tempDiscountHTML[$key]['value'] = $tempDiscountHTML[$key]['value'] + $childDiscount;
|
||||
}else{
|
||||
} else {
|
||||
$tempDiscountHTML[$key] = array(
|
||||
'value' => $childDiscount,
|
||||
'label_first' => 'Rabatt',
|
||||
|
|
@ -682,13 +664,12 @@ class BookingController extends Controller
|
|||
);
|
||||
}
|
||||
}
|
||||
if (isset($outPriceInfo))
|
||||
{
|
||||
$key = intval(($singleFullPrice - $singleDiscountPrice)*100);
|
||||
if(!empty($outPriceInfo['discount'][$key])) {
|
||||
if (isset($outPriceInfo)) {
|
||||
$key = intval(($singleFullPrice - $singleDiscountPrice) * 100);
|
||||
if (!empty($outPriceInfo['discount'][$key])) {
|
||||
$outPriceInfo['discount'][$key]['count'] = $outPriceInfo['discount'][$key]['count'] + $adultCount;
|
||||
$outPriceInfo['discount'][$key]['value'] = $outPriceInfo['discount'][$key]['value'] + $discount;
|
||||
}else{
|
||||
} else {
|
||||
$outPriceInfo['discount'][$key] = array(
|
||||
'value' => $discount,
|
||||
'price_discount' => ($singleFullPrice - $singleDiscountPrice),
|
||||
|
|
@ -697,12 +678,12 @@ class BookingController extends Controller
|
|||
'count' => $adultCount,
|
||||
);
|
||||
}
|
||||
if($childDiscount > 0){
|
||||
$key = intval(($childPrice - $singleChildDiscountPrice)*100);
|
||||
if(!empty($outPriceInfo['discount'][$key])) {
|
||||
if ($childDiscount > 0) {
|
||||
$key = intval(($childPrice - $singleChildDiscountPrice) * 100);
|
||||
if (!empty($outPriceInfo['discount'][$key])) {
|
||||
$outPriceInfo['discount'][$key]['count'] = $outPriceInfo['discount'][$key]['count'] + $childrenCount;
|
||||
$outPriceInfo['discount'][$key]['value'] = $outPriceInfo['discount'][$key]['value'] + $childDiscount;
|
||||
}else{
|
||||
} else {
|
||||
$outPriceInfo['discount'][$key] = array(
|
||||
'value' => $childDiscount,
|
||||
'label_first' => 'Rabatt',
|
||||
|
|
@ -712,12 +693,10 @@ class BookingController extends Controller
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Versicherung price + html
|
||||
if ($bookingRequest->getInsurance() && $adultCount > 0)
|
||||
{
|
||||
if ($bookingRequest->getInsurance() && $adultCount > 0) {
|
||||
|
||||
$curAssessmentBasis = $insuranceAssessmentBasis + ($singleDiscountPrice ?? $singleFullPrice);
|
||||
$curAssessmentChildBasis = $insuranceAssessmentChildBasis + ($singleChildDiscountPrice ?? $childPrice);
|
||||
|
|
@ -736,28 +715,27 @@ class BookingController extends Controller
|
|||
$insuranceTotal += $a + $b;
|
||||
$ret += $a + $b;
|
||||
|
||||
if (isset($insuranceHtmlSummary))
|
||||
{
|
||||
if(!empty($tempInsuranceHTML[$insurancePriceValue])){
|
||||
if (isset($insuranceHtmlSummary)) {
|
||||
if (!empty($tempInsuranceHTML[$insurancePriceValue])) {
|
||||
$tempInsuranceHTML[$insurancePriceValue]['count'] = intval($tempInsuranceHTML[$insurancePriceValue]['count']) + $adultCount;
|
||||
$tempInsuranceHTML[$insurancePriceValue]['value'] = $tempInsuranceHTML[$insurancePriceValue]['value'] + $a;
|
||||
}else{
|
||||
} else {
|
||||
$tempInsuranceHTML[$insurancePriceValue] = array(
|
||||
'value' => $a,
|
||||
'label_first' => 'RV '. $bookingRequest->getInsurance()->getName() .' ('. $insurancePrice->getCode() .') ',
|
||||
'label_first' => 'RV ' . $bookingRequest->getInsurance()->getName() . ' (' . $insurancePrice->getCode() . ') ',
|
||||
'label_last' => Util::formatPrice($insurancePriceValue) . ' pro Person',
|
||||
'count' => $adultCount,
|
||||
|
||||
);
|
||||
}
|
||||
if($b > 0){
|
||||
if(!empty($tempInsuranceHTML[$insuranceChildPriceValue])){
|
||||
if ($b > 0) {
|
||||
if (!empty($tempInsuranceHTML[$insuranceChildPriceValue])) {
|
||||
$tempInsuranceHTML[$insuranceChildPriceValue]['count'] = intval($tempInsuranceHTML[$insuranceChildPriceValue]['count']) + $childrenCount;
|
||||
$tempInsuranceHTML[$insuranceChildPriceValue]['value'] = $tempInsuranceHTML[$insuranceChildPriceValue]['value'] + $b;
|
||||
}else{
|
||||
} else {
|
||||
$tempInsuranceHTML[$insuranceChildPriceValue] = array(
|
||||
'value' => $b,
|
||||
'label_first' => 'RV '. $bookingRequest->getInsurance()->getName() .' ('. $insuranceChildPrice->getCode() .') ',
|
||||
'label_first' => 'RV ' . $bookingRequest->getInsurance()->getName() . ' (' . $insuranceChildPrice->getCode() . ') ',
|
||||
'label_last' => Util::formatPrice($insuranceChildPriceValue) . ' pro Kind',
|
||||
'count' => $childrenCount,
|
||||
|
||||
|
|
@ -765,27 +743,26 @@ class BookingController extends Controller
|
|||
}
|
||||
}
|
||||
}
|
||||
if (isset($outPriceInfo))
|
||||
{
|
||||
if(!empty($outPriceInfo['insurancesOut'][$insurancePriceValue])){
|
||||
if (isset($outPriceInfo)) {
|
||||
if (!empty($outPriceInfo['insurancesOut'][$insurancePriceValue])) {
|
||||
$outPriceInfo['insurancesOut'][$insurancePriceValue]['count'] = intval($outPriceInfo['insurancesOut'][$insurancePriceValue]['count']) + $childrenCount;
|
||||
$outPriceInfo['insurancesOut'][$insurancePriceValue]['value'] = $outPriceInfo['insurancesOut'][$insurancePriceValue]['value'] + $b;
|
||||
}else{
|
||||
} else {
|
||||
$outPriceInfo['insurancesOut'][$insurancePriceValue] = [
|
||||
'value' => $a,
|
||||
'label_first' => 'RV '. $bookingRequest->getInsurance()->getName() .' ('. $insurancePrice->getCode() .') ',
|
||||
'label_first' => 'RV ' . $bookingRequest->getInsurance()->getName() . ' (' . $insurancePrice->getCode() . ') ',
|
||||
'label_last' => Util::formatPrice($insurancePriceValue) . ' pro Person',
|
||||
'count' => $adultCount,
|
||||
];
|
||||
}
|
||||
if($b > 0){
|
||||
if(!empty($outPriceInfo['insurancesOut'][$insuranceChildPriceValue])){
|
||||
if ($b > 0) {
|
||||
if (!empty($outPriceInfo['insurancesOut'][$insuranceChildPriceValue])) {
|
||||
$outPriceInfo['insurancesOut'][$insuranceChildPriceValue]['count'] = intval($outPriceInfo['insurancesOut'][$insuranceChildPriceValue]['count']) + $childrenCount;
|
||||
$outPriceInfo['insurancesOut'][$insuranceChildPriceValue]['value'] = $outPriceInfo['insurancesOut'][$insuranceChildPriceValue]['value'] + $b;
|
||||
}else{
|
||||
} else {
|
||||
$outPriceInfo['insurancesOut'][$insuranceChildPriceValue] = [
|
||||
'value' => $b,
|
||||
'label_first' => 'RV '. $bookingRequest->getInsurance()->getName() .' ('. $insuranceChildPrice->getCode() .') ',
|
||||
'label_first' => 'RV ' . $bookingRequest->getInsurance()->getName() . ' (' . $insuranceChildPrice->getCode() . ') ',
|
||||
'label_last' => Util::formatPrice($insuranceChildPriceValue) . ' pro Kind',
|
||||
'count' => $childrenCount,
|
||||
];
|
||||
|
|
@ -808,14 +785,14 @@ class BookingController extends Controller
|
|||
|
||||
|
||||
//ROOMS
|
||||
if(count($tempRoomHTML) > 0){
|
||||
if (count($tempRoomHTML) > 0) {
|
||||
foreach ($tempRoomHTML as $item) {
|
||||
$label = '<strong>'.$item['count'].'</strong> x '.$item['label_first'].'<strong> ['.$item['label_last'].']</strong>';
|
||||
if($item['childCount'] > 0){
|
||||
$label .= ' <strong>[ + Kind: '.$item['price_child'];
|
||||
$label = '<strong>' . $item['count'] . '</strong> x ' . $item['label_first'] . '<strong> [' . $item['label_last'] . ']</strong>';
|
||||
if ($item['childCount'] > 0) {
|
||||
$label .= ' <strong>[ + Kind: ' . $item['price_child'];
|
||||
}
|
||||
$label .= ']</strong>';
|
||||
$outHtmlSummary[] =[
|
||||
$outHtmlSummary[] = [
|
||||
'value' => $item['value'],
|
||||
'label' => $label,
|
||||
];
|
||||
|
|
@ -823,42 +800,42 @@ class BookingController extends Controller
|
|||
}
|
||||
|
||||
//Comfort
|
||||
if(count($tempComfortHTML) > 0){
|
||||
if (count($tempComfortHTML) > 0) {
|
||||
foreach ($tempComfortHTML as $item) {
|
||||
$outHtmlSummary[] =[
|
||||
$outHtmlSummary[] = [
|
||||
'value' => $item['value'],
|
||||
'label' => '<strong>'.$item['count'].'</strong> x '.$item['label_first'].'<strong> ['.$item['label_last'].' ]</strong>',
|
||||
'label' => '<strong>' . $item['count'] . '</strong> x ' . $item['label_first'] . '<strong> [' . $item['label_last'] . ' ]</strong>',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
//Departure
|
||||
if(count($tempDepartureHTML) > 0){
|
||||
if (count($tempDepartureHTML) > 0) {
|
||||
foreach ($tempDepartureHTML as $item) {
|
||||
$outHtmlSummary[] =[
|
||||
$outHtmlSummary[] = [
|
||||
'value' => $item['value'],
|
||||
'label' => '<strong>'.$item['count'].'</strong> x '.$item['label_first'].'<strong> ['.$item['label_last'].' ]</strong>',
|
||||
'label' => '<strong>' . $item['count'] . '</strong> x ' . $item['label_first'] . '<strong> [' . $item['label_last'] . ' ]</strong>',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
//DISCOUNT
|
||||
if(count($tempDiscountHTML) > 0){
|
||||
if (count($tempDiscountHTML) > 0) {
|
||||
foreach ($tempDiscountHTML as $item) {
|
||||
$insuranceHtmlSummary[] =[
|
||||
$insuranceHtmlSummary[] = [
|
||||
'value' => $item['value'],
|
||||
'label' => '<strong>'.$item['count'].'</strong> x '.$item['label_first'].'<strong> ['.$item['label_last'].' ]</strong>',
|
||||
'label' => '<strong>' . $item['count'] . '</strong> x ' . $item['label_first'] . '<strong> [' . $item['label_last'] . ' ]</strong>',
|
||||
];
|
||||
}
|
||||
}
|
||||
//options
|
||||
if(count($tempOptionHTML) > 0){
|
||||
if (count($tempOptionHTML) > 0) {
|
||||
foreach ($tempOptionHTML as $item) {
|
||||
$label = '<strong>'.$item['count'].'</strong> x '.$item['label_first'].'<strong> ['.$item['label_last'].']</strong>';
|
||||
if($item['childCount'] > 0){
|
||||
$label .= ' <strong>['.$item['price_child'].']</strong>';
|
||||
$label = '<strong>' . $item['count'] . '</strong> x ' . $item['label_first'] . '<strong> [' . $item['label_last'] . ']</strong>';
|
||||
if ($item['childCount'] > 0) {
|
||||
$label .= ' <strong>[' . $item['price_child'] . ']</strong>';
|
||||
}
|
||||
$outHtmlSummary[] =[
|
||||
$outHtmlSummary[] = [
|
||||
'value' => $item['value'],
|
||||
'label' => $label,
|
||||
];
|
||||
|
|
@ -866,14 +843,14 @@ class BookingController extends Controller
|
|||
}
|
||||
|
||||
//extra days before
|
||||
if(count($tempExtraDaysBeforeHTML) > 0){
|
||||
if (count($tempExtraDaysBeforeHTML) > 0) {
|
||||
foreach ($tempExtraDaysBeforeHTML as $item) {
|
||||
$setDays = $item['days'] . ($item['days'] == 1 ? ' Tag' : ' Tage');
|
||||
$label = '<strong>'.$item['count'].'</strong> x '.$setDays.' '.$item['label_first'].'<strong> ['.$item['label_last'].']</strong>';
|
||||
if($item['childCount'] > 0){
|
||||
$label .= ' <strong>[+ Kind: '.$item['price_child'].']</strong>';
|
||||
$label = '<strong>' . $item['count'] . '</strong> x ' . $setDays . ' ' . $item['label_first'] . '<strong> [' . $item['label_last'] . ']</strong>';
|
||||
if ($item['childCount'] > 0) {
|
||||
$label .= ' <strong>[+ Kind: ' . $item['price_child'] . ']</strong>';
|
||||
}
|
||||
$outHtmlSummary[] =[
|
||||
$outHtmlSummary[] = [
|
||||
'value' => $item['value'],
|
||||
'label' => $label,
|
||||
];
|
||||
|
|
@ -881,14 +858,14 @@ class BookingController extends Controller
|
|||
}
|
||||
|
||||
//extra days after
|
||||
if(count($tempExtraDaysAfterHTML) > 0){
|
||||
if (count($tempExtraDaysAfterHTML) > 0) {
|
||||
foreach ($tempExtraDaysAfterHTML as $item) {
|
||||
$setDays = $item['days'] . ($item['days'] == 1 ? ' Tag' : ' Tage');
|
||||
$label = '<strong>'.$item['count'].'</strong> x '.$setDays.' '.$item['label_first'].'<strong> ['.$item['label_last'].']</strong>';
|
||||
if($item['childCount'] > 0){
|
||||
$label .= ' <strong>[+ Kind: '.$item['price_child'].']</strong>';
|
||||
$label = '<strong>' . $item['count'] . '</strong> x ' . $setDays . ' ' . $item['label_first'] . '<strong> [' . $item['label_last'] . ']</strong>';
|
||||
if ($item['childCount'] > 0) {
|
||||
$label .= ' <strong>[+ Kind: ' . $item['price_child'] . ']</strong>';
|
||||
}
|
||||
$outHtmlSummary[] =[
|
||||
$outHtmlSummary[] = [
|
||||
'value' => $item['value'],
|
||||
'label' => $label,
|
||||
];
|
||||
|
|
@ -897,11 +874,11 @@ class BookingController extends Controller
|
|||
|
||||
|
||||
//Versicherungen
|
||||
if(count($tempInsuranceHTML) > 0 ){
|
||||
if (count($tempInsuranceHTML) > 0) {
|
||||
foreach ($tempInsuranceHTML as $item) {
|
||||
$insuranceHtmlSummary[] =[
|
||||
$insuranceHtmlSummary[] = [
|
||||
'value' => $item['value'],
|
||||
'label' => '<strong>'.$item['count'].'</strong> x '.$item['label_first'].'<strong> ['.$item['label_last'].' ]</strong>',
|
||||
'label' => '<strong>' . $item['count'] . '</strong> x ' . $item['label_first'] . '<strong> [' . $item['label_last'] . ' ]</strong>',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -909,38 +886,36 @@ class BookingController extends Controller
|
|||
|
||||
|
||||
|
||||
if (isset($insuranceHtmlSummary))
|
||||
{
|
||||
if (isset($insuranceHtmlSummary)) {
|
||||
$outHtmlSummary = array_merge($outHtmlSummary, $insuranceHtmlSummary);
|
||||
}
|
||||
if($newExtraDaysTravelDate['change'] == 1){
|
||||
if ($newExtraDaysTravelDate['change'] == 1) {
|
||||
$outHtmlSummary[] = [
|
||||
'value' => '!',
|
||||
'label' => "Geänderter Reisezeitraum: ".$newExtraDaysTravelDate['start']." - ".$newExtraDaysTravelDate['end'],
|
||||
'label' => "Geänderter Reisezeitraum: " . $newExtraDaysTravelDate['start'] . " - " . $newExtraDaysTravelDate['end'],
|
||||
];
|
||||
}
|
||||
|
||||
if (isset($outPriceInfo))
|
||||
{
|
||||
if (isset($outPriceInfo)) {
|
||||
$outPriceInfo['total'] = $ret;
|
||||
$outPriceInfo['totalWithoutInsurance'] = $ret - $insuranceTotal;
|
||||
$outPriceInfo['totalInsurance'] = $insuranceTotal;
|
||||
|
||||
if($outPriceInfo['departure_extra'] >= 0){
|
||||
if ($outPriceInfo['departure_extra'] >= 0) {
|
||||
$outPriceInfo['flight_price'] = $outPriceInfo['flight_price'] + $outPriceInfo['departure_extra'];
|
||||
}else{
|
||||
} else {
|
||||
$outPriceInfo['flight_price'] = 0;
|
||||
}
|
||||
|
||||
if($depositPercent === null) {
|
||||
if ($depositPercent === null) {
|
||||
$depositPercent = 20;
|
||||
}
|
||||
//Aeqypten (20% from price)
|
||||
if($categoryId == 1){
|
||||
if ($categoryId == 1) {
|
||||
$deposit = ($outPriceInfo['totalWithoutInsurance'] / 100 * $depositPercent);
|
||||
$outPriceInfo['deposit_total'] = $deposit;
|
||||
$outPriceInfo['final_payment'] = ($outPriceInfo['totalWithoutInsurance'] - $outPriceInfo['deposit_total']);
|
||||
}else{
|
||||
} else {
|
||||
//all 100% vom Flugpreis und 20% von der Landleistung.
|
||||
$deposit = (($outPriceInfo['totalWithoutInsurance'] - $outPriceInfo['flight_price']) / 100 * $depositPercent);
|
||||
$outPriceInfo['deposit_total'] = ($deposit + $outPriceInfo['flight_price']);
|
||||
|
|
@ -961,16 +936,13 @@ class BookingController extends Controller
|
|||
{
|
||||
$ret = [];
|
||||
|
||||
foreach($prices as $price)
|
||||
{
|
||||
foreach ($prices as $price) {
|
||||
$priceTypeId = $price->getPriceTypeId();
|
||||
//with children
|
||||
$priceType = $this->priceTypeById[$priceTypeId];
|
||||
|
||||
if($priceTypeId == 1 && $persons['singleRoomPersons'] > 0)
|
||||
{
|
||||
for($i = 0; $i < $persons['singleRoomPersons']; $i++)
|
||||
{
|
||||
if ($priceTypeId == 1 && $persons['singleRoomPersons'] > 0) {
|
||||
for ($i = 0; $i < $persons['singleRoomPersons']; $i++) {
|
||||
$currentPersons = [
|
||||
'total' => 1,
|
||||
'adults' => 1,
|
||||
|
|
@ -985,13 +957,11 @@ class BookingController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
if($priceTypeId == 1 && $persons['singleRoomChildPersons'] > 0)
|
||||
{
|
||||
if ($priceTypeId == 1 && $persons['singleRoomChildPersons'] > 0) {
|
||||
$priceTypeId = 2;
|
||||
$priceType = $this->priceTypeById[$priceTypeId];
|
||||
|
||||
for($i = 0; $i < $persons['singleRoomChildPersons']; $i++)
|
||||
{
|
||||
for ($i = 0; $i < $persons['singleRoomChildPersons']; $i++) {
|
||||
$currentPersons = [
|
||||
'total' => 1,
|
||||
'adults' => 1,
|
||||
|
|
@ -1006,10 +976,8 @@ class BookingController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
if($priceTypeId == 3 && $persons['doubleRoomPersons'] > 0)
|
||||
{
|
||||
for($j = 0; $j < ($persons['doubleRoomPersons'] / 2); $j++)
|
||||
{
|
||||
if ($priceTypeId == 3 && $persons['doubleRoomPersons'] > 0) {
|
||||
for ($j = 0; $j < ($persons['doubleRoomPersons'] / 2); $j++) {
|
||||
$currentPersons = [
|
||||
'total' => 2,
|
||||
'adults' => 2,
|
||||
|
|
@ -1024,13 +992,11 @@ class BookingController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
if($priceTypeId == 3 && $persons['doubleRoomChildPersons'] > 0)
|
||||
{
|
||||
if ($priceTypeId == 3 && $persons['doubleRoomChildPersons'] > 0) {
|
||||
$priceTypeId = 4;
|
||||
$priceType = $this->priceTypeById[$priceTypeId];
|
||||
|
||||
for($j = 0; $j < ($persons['doubleRoomChildPersons'] / 2); $j++)
|
||||
{
|
||||
for ($j = 0; $j < ($persons['doubleRoomChildPersons'] / 2); $j++) {
|
||||
$currentPersons = [
|
||||
'total' => 2,
|
||||
'adults' => 2,
|
||||
|
|
@ -1045,10 +1011,8 @@ class BookingController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
if($priceTypeId == 5 && $persons['tripleRoomPersons'] > 0)
|
||||
{
|
||||
for($k = 0; $k < ($persons['tripleRoomPersons'] / 3); $k++)
|
||||
{
|
||||
if ($priceTypeId == 5 && $persons['tripleRoomPersons'] > 0) {
|
||||
for ($k = 0; $k < ($persons['tripleRoomPersons'] / 3); $k++) {
|
||||
$currentPersons = [
|
||||
'total' => 3,
|
||||
'adults' => 3,
|
||||
|
|
@ -1063,13 +1027,11 @@ class BookingController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
if($priceTypeId == 5 && $persons['tripleRoomChildPersons'] > 0)
|
||||
{
|
||||
if ($priceTypeId == 5 && $persons['tripleRoomChildPersons'] > 0) {
|
||||
$priceTypeId = 7;
|
||||
$priceType = $this->priceTypeById[$priceTypeId];
|
||||
|
||||
for($k = 0; $k < ($persons['tripleRoomChildPersons'] / 3); $k++)
|
||||
{
|
||||
for ($k = 0; $k < ($persons['tripleRoomChildPersons'] / 3); $k++) {
|
||||
$currentPersons = [
|
||||
'total' => 3,
|
||||
'adults' => 3,
|
||||
|
|
|
|||
|
|
@ -32,10 +32,32 @@ class ComponentController extends Controller
|
|||
if(!$this->headerContent){
|
||||
$this->headerContent = Util::loadFromApi('cms/header/info', ['url'=>""]);
|
||||
}
|
||||
if (!$this->headerContent) {
|
||||
$this->headerContent = $this->getEmptyHeaderContent();
|
||||
}
|
||||
return $this->headerContent;
|
||||
|
||||
}
|
||||
|
||||
private function getEmptyHeaderContent()
|
||||
{
|
||||
$inactive = (object) ['active' => 0, 'content' => ''];
|
||||
|
||||
return (object) [
|
||||
'info' => (object) [
|
||||
'office_important_note_active' => 0,
|
||||
'office_important_note' => '',
|
||||
'office_appointment' => '',
|
||||
],
|
||||
'available' => (object) [
|
||||
'phone' => $inactive,
|
||||
'local' => $inactive,
|
||||
],
|
||||
'local' => (object) [],
|
||||
'phone' => (object) [],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
public function getHeaderTravelProgram($page){
|
||||
$programmes = [
|
||||
|
|
@ -344,6 +366,18 @@ class ComponentController extends Controller
|
|||
]);
|
||||
}
|
||||
|
||||
public function newsSidebarWidgetAction($title = 'News', $limit = 3)
|
||||
{
|
||||
$limit = max(1, min(12, (int) $limit));
|
||||
|
||||
return $this->render('default/components/sidebar/pageSliderSidebarWidget.html.twig', [
|
||||
'slider_title' => $title,
|
||||
'target_widget' => 'news-widget',
|
||||
'pages' => $this->getEntityManager()->getRepository('AppBundle:Page')->findHomepageNews($limit),
|
||||
'theme' => 'gray-box',
|
||||
]);
|
||||
}
|
||||
|
||||
public function makeSidebarWidgetAction($site_loading = 'default', Page $page = null, $api=null, $search_form = null){
|
||||
|
||||
$show_seal_of_approval = false;
|
||||
|
|
|
|||
|
|
@ -99,12 +99,30 @@ class DefaultController extends Controller
|
|||
}
|
||||
|
||||
$pageRepo = $this->getEntityManager()->getRepository('AppBundle:Page');
|
||||
$sidebarWidgetRepo = $this->getEntityManager()->getRepository('AppBundle:SidebarWidget');
|
||||
$plannableTripsWidget = $sidebarWidgetRepo->findActiveWidgetByComponent('homepagePlannableTrips');
|
||||
$popularTripsWidget = $sidebarWidgetRepo->findActiveWidgetByComponent('homepagePopularTrips');
|
||||
$newsWidget = $sidebarWidgetRepo->findActiveWidgetByComponent('newsSidebarWidget', 'home');
|
||||
$homepageOfferPages = $popularTripsWidget
|
||||
? $pageRepo->findActiveTravelPagesByIds($popularTripsWidget->getConfigPageIds())
|
||||
: [];
|
||||
$devHomeSidebarOfferPages = $plannableTripsWidget
|
||||
? $pageRepo->findActiveTravelPagesByIds($plannableTripsWidget->getConfigPageIds())
|
||||
: [];
|
||||
|
||||
if (empty($homepageOfferPages)) {
|
||||
$homepageOfferPages = $pageRepo->findHomepageOffers();
|
||||
}
|
||||
if (empty($devHomeSidebarOfferPages)) {
|
||||
$devHomeSidebarOfferPages = $pageRepo->findHomepageOffers(4);
|
||||
}
|
||||
|
||||
$fewoLodgings = [];
|
||||
$lodgingGroups = $this->getEntityManager()->getRepository('AppBundle:FewoLodgingGroup')->findAll();
|
||||
foreach ($lodgingGroups as $lodgingGroup) {
|
||||
foreach ($lodgingGroup->getLodgings() as $lodging) {
|
||||
$fewoLodgings[] = $lodging;
|
||||
if (count($fewoLodgings) >= 3) {
|
||||
if (count($fewoLodgings) >= 8) {
|
||||
break 2;
|
||||
}
|
||||
}
|
||||
|
|
@ -121,9 +139,18 @@ class DefaultController extends Controller
|
|||
'e' => $search_request_e ? $search_request_e : null,
|
||||
])->createView(),
|
||||
'tt_search_form' => $this->createForm(TtSearchRequestType::class)->createView(),
|
||||
'homepage_offer_pages' => $pageRepo->findHomepageOffers(),
|
||||
'homepage_offer_pages' => $homepageOfferPages,
|
||||
'homepage_offer_title' => $popularTripsWidget && $popularTripsWidget->getName() ? $popularTripsWidget->getName() : 'beliebtesten Kulturreisen',
|
||||
'homepage_offer_new_page_ids' => $popularTripsWidget ? $popularTripsWidget->getConfigNewPageIds() : [],
|
||||
'country_pages' => $pageRepo->findHomepageCountryPages(),
|
||||
'fewo_lodgings' => $fewoLodgings,
|
||||
'dev_home_sidebar' => true,
|
||||
'dev_home_sidebar_offer_title' => $plannableTripsWidget && $plannableTripsWidget->getName() ? $plannableTripsWidget->getName() : 'Aktuell planbare Reisen',
|
||||
'dev_home_sidebar_offer_pages' => $devHomeSidebarOfferPages,
|
||||
'dev_home_sidebar_new_badge_active' => $plannableTripsWidget ? $plannableTripsWidget->getConfigNewBadgeActive() : false,
|
||||
'dev_home_sidebar_new_page_ids' => $plannableTripsWidget ? $plannableTripsWidget->getConfigNewPageIds() : [],
|
||||
'dev_home_sidebar_news_title' => $newsWidget && $newsWidget->getName() ? $newsWidget->getName() : 'Reisenews',
|
||||
'dev_home_sidebar_news_pages' => $pageRepo->findHomepageNews($newsWidget ? $newsWidget->getConfigNewsLimit() : 3),
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -965,4 +965,27 @@ class BookingRequest
|
|||
{
|
||||
//$context->
|
||||
}
|
||||
|
||||
public function checkIsRoomSelected()
|
||||
{
|
||||
if ($this->singleRoomCount > 0) {
|
||||
return true;
|
||||
}
|
||||
if ($this->doubleRoomCount > 0) {
|
||||
return true;
|
||||
}
|
||||
if ($this->tripleRoomCount > 0) {
|
||||
return true;
|
||||
}
|
||||
if ($this->singleRoomChildCount > 0) {
|
||||
return true;
|
||||
}
|
||||
if ($this->doubleRoomChildCount > 0) {
|
||||
return true;
|
||||
}
|
||||
if ($this->tripleRoomChildCount > 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -996,6 +996,22 @@ class Page
|
|||
{
|
||||
return $this->country;
|
||||
}
|
||||
|
||||
public function getHomepageCountryName()
|
||||
{
|
||||
if ($this->country) {
|
||||
return $this->country->getName();
|
||||
}
|
||||
|
||||
if ($this->travelProgram) {
|
||||
foreach ($this->travelProgram->getCountries() as $country) {
|
||||
return $country->getName();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
|
|
@ -1286,6 +1302,20 @@ class Page
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get boxBody / Image USED for Box Image by v3 CMS
|
||||
*
|
||||
* @return array|false
|
||||
*/
|
||||
public function getBoxBodyImage()
|
||||
{
|
||||
if($this->boxBody != ""){
|
||||
$boxBodyImage = json_decode($this->boxBody, true);
|
||||
return $boxBodyImage;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get boxBody
|
||||
*
|
||||
|
|
|
|||
|
|
@ -134,6 +134,42 @@ class PageRepository extends NestedTreeRepository
|
|||
return array_slice($pages, 0, $limit);
|
||||
}
|
||||
|
||||
public function findActiveTravelPagesByIds(array $ids)
|
||||
{
|
||||
$ids = array_values(array_filter(array_map('intval', $ids)));
|
||||
|
||||
if (empty($ids)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$pages = $this->createQueryBuilder('node')
|
||||
->distinct()
|
||||
->innerJoin('node.travelProgram', 'tp')
|
||||
->addSelect('tp')
|
||||
->leftJoin('tp.countries', 'c')
|
||||
->addSelect('c')
|
||||
->where('node.id IN (:ids)')
|
||||
->andWhere('node.status = 1')
|
||||
->andWhere('tp.status = 1')
|
||||
->setParameter('ids', $ids)
|
||||
->getQuery()
|
||||
->execute();
|
||||
|
||||
$pagesById = [];
|
||||
foreach ($pages as $page) {
|
||||
$pagesById[$page->getId()] = $page;
|
||||
}
|
||||
|
||||
$ret = [];
|
||||
foreach ($ids as $id) {
|
||||
if (isset($pagesById[$id])) {
|
||||
$ret[] = $pagesById[$id];
|
||||
}
|
||||
}
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Page[]
|
||||
*/
|
||||
|
|
@ -155,6 +191,28 @@ class PageRepository extends NestedTreeRepository
|
|||
return $pages;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Page[]
|
||||
*/
|
||||
public function findHomepageNews($limit = 3)
|
||||
{
|
||||
$rootPage = $this->find(3153);
|
||||
if (!$rootPage) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return $this->createQueryBuilder('node')
|
||||
->where('node.parent = :rootPage')
|
||||
->andWhere('node.showInNavi = 1')
|
||||
->andWhere('node.status = 1')
|
||||
->orderBy('node.date', 'DESC')
|
||||
->addOrderBy('node.order', 'ASC')
|
||||
->setParameter('rootPage', $rootPage)
|
||||
->setMaxResults($limit)
|
||||
->getQuery()
|
||||
->execute();
|
||||
}
|
||||
|
||||
private function getHomepagePriority(Page $page)
|
||||
{
|
||||
$haystack = $this->buildHomepageSortHaystack($page);
|
||||
|
|
@ -220,7 +278,7 @@ class PageRepository extends NestedTreeRepository
|
|||
|
||||
public function findTopCountryNavPages()
|
||||
{
|
||||
return $this->createQueryBuilder('node')
|
||||
$pages = $this->createQueryBuilder('node')
|
||||
->innerJoin('node.country', 'country')
|
||||
->leftJoin('node.children', 'childPage', Expr\Join::WITH, 'childPage.status > 0')
|
||||
->addSelect('childPage')
|
||||
|
|
@ -232,6 +290,25 @@ class PageRepository extends NestedTreeRepository
|
|||
->getQuery()
|
||||
->execute()
|
||||
;
|
||||
|
||||
usort($pages, function (Page $a, Page $b) {
|
||||
$priorityA = $this->getHomepagePriority($a);
|
||||
$priorityB = $this->getHomepagePriority($b);
|
||||
|
||||
if ($priorityA !== $priorityB) {
|
||||
return $priorityA - $priorityB;
|
||||
}
|
||||
|
||||
$orderA = $a->getOrder() ?: 9999;
|
||||
$orderB = $b->getOrder() ?: 9999;
|
||||
if ($orderA !== $orderB) {
|
||||
return $orderA - $orderB;
|
||||
}
|
||||
|
||||
return strcasecmp($a->getTitle(), $b->getTitle());
|
||||
});
|
||||
|
||||
return $pages;
|
||||
}
|
||||
|
||||
public function findFeedbacks($rootPageId)
|
||||
|
|
|
|||
|
|
@ -146,6 +146,57 @@ class SidebarWidget
|
|||
return $this->html;
|
||||
}
|
||||
|
||||
public function getConfig()
|
||||
{
|
||||
$config = json_decode($this->html, true);
|
||||
|
||||
if (!is_array($config)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
public function getConfigPageIds()
|
||||
{
|
||||
$config = $this->getConfig();
|
||||
|
||||
if (!isset($config['page_ids']) || !is_array($config['page_ids'])) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return array_values(array_filter($config['page_ids']));
|
||||
}
|
||||
|
||||
public function getConfigNewBadgeActive()
|
||||
{
|
||||
$config = $this->getConfig();
|
||||
|
||||
return !empty($config['new_badge_active']);
|
||||
}
|
||||
|
||||
public function getConfigNewPageIds()
|
||||
{
|
||||
$config = $this->getConfig();
|
||||
|
||||
if (!isset($config['new_page_ids']) || !is_array($config['new_page_ids'])) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return array_values(array_filter(array_map('intval', $config['new_page_ids'])));
|
||||
}
|
||||
|
||||
public function getConfigNewsLimit()
|
||||
{
|
||||
$config = $this->getConfig();
|
||||
|
||||
if (!isset($config['news_limit'])) {
|
||||
return 3;
|
||||
}
|
||||
|
||||
return max(1, min(12, (int) $config['news_limit']));
|
||||
}
|
||||
|
||||
/**
|
||||
* Set showAt
|
||||
*
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ class SidebarWidgetRepository extends \Doctrine\ORM\EntityRepository
|
|||
{
|
||||
$qb = $this->createQueryBuilder('sidebar_widget');
|
||||
$qb->where('sidebar_widget.active = 1')
|
||||
->andWhere('sidebar_widget.component NOT IN (:configComponents)')
|
||||
->setParameter('configComponents', ['homepagePlannableTrips', 'homepagePopularTrips'])
|
||||
->addOrderBy('sidebar_widget.pos', 'ASC');
|
||||
$results = $qb->getQuery()->getResult();
|
||||
|
||||
|
|
@ -27,4 +29,23 @@ class SidebarWidgetRepository extends \Doctrine\ORM\EntityRepository
|
|||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
public function findActiveWidgetByComponent($component, $site = null)
|
||||
{
|
||||
$qb = $this->createQueryBuilder('sidebar_widget');
|
||||
$results = $qb->where('sidebar_widget.active = 1')
|
||||
->andWhere('sidebar_widget.component = :component')
|
||||
->setParameter('component', $component)
|
||||
->addOrderBy('sidebar_widget.pos', 'ASC')
|
||||
->getQuery()
|
||||
->getResult();
|
||||
|
||||
foreach ($results as $result) {
|
||||
if ($site === null || $result->getIsShowAt($site)) {
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -379,7 +379,23 @@ jQuery(document).ready(function($) {
|
|||
/* ==============================================
|
||||
OWL CAROUSEL -->
|
||||
=============================================== */
|
||||
var owl = $('.owl-fullwidth').owlCarousel({
|
||||
function loadOwlCarouselBackgrounds(ctx$) {
|
||||
$('.lozad[data-background-image]', ctx$).each(function () {
|
||||
var image$ = $(this);
|
||||
var backgroundImage = image$.attr('data-background-image');
|
||||
|
||||
if (backgroundImage) {
|
||||
image$.css('background-image', 'url("' + backgroundImage + '")');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var owlFullwidth$ = $('.owl-fullwidth');
|
||||
owlFullwidth$.on('initialized.owl.carousel translated.owl.carousel refreshed.owl.carousel', function () {
|
||||
loadOwlCarouselBackgrounds($(this));
|
||||
});
|
||||
|
||||
var owl = owlFullwidth$.owlCarousel({
|
||||
loop:true,
|
||||
margin:0,
|
||||
nav:true,
|
||||
|
|
@ -399,6 +415,7 @@ jQuery(document).ready(function($) {
|
|||
}
|
||||
},
|
||||
});
|
||||
loadOwlCarouselBackgrounds(owlFullwidth$);
|
||||
|
||||
/* ==============================================
|
||||
BOX LINK -->
|
||||
|
|
@ -613,14 +630,31 @@ initGoTo();
|
|||
$(document).ready(function() {
|
||||
$('.st-booking-form').validator().on('submit', function (e) {
|
||||
if (e.isDefaultPrevented()) {
|
||||
// handle the invalid form...
|
||||
} else {
|
||||
$(".btn-booking-form").attr("disabled", true);
|
||||
$(".btn-booking-form .alert-danger").removeClass("hide");
|
||||
$(".btn-booking-form .alert-danger").addClass("show");
|
||||
|
||||
} else {
|
||||
$(".btn-booking-form .alert-danger").removeClass("hide");
|
||||
$(".btn-booking-form .alert-danger").addClass("show");
|
||||
|
||||
$(".btn-booking-form").attr("disabled", true);
|
||||
$(".btn-booking-form .btn-booking-submit").addClass("hide");
|
||||
$(".btn-booking-form .btn-booking-loading").removeClass("hide");
|
||||
}
|
||||
});
|
||||
|
||||
$(".st-booking-form")
|
||||
.validator()
|
||||
.on("submit", function (t) {
|
||||
(t.isDefaultPrevented(),
|
||||
$(".btn-booking-form .alert-danger").removeClass("hide"),
|
||||
$(".btn-booking-form .alert-danger").addClass("show")) ||
|
||||
($(".btn-booking-form .alert-danger").removeClass("show"),
|
||||
$(".btn-booking-form .alert-danger").addClass(""),
|
||||
$(".btn-booking-form").attr("disabled", !0),
|
||||
$(".btn-booking-form .btn-booking-submit").addClass("hide"),
|
||||
$(".btn-booking-form .btn-booking-loading").removeClass("hide"));
|
||||
});
|
||||
var $topNavAccordion = $('#topNavAccordion');
|
||||
$topNavAccordion.on('show.bs.collapse','.collapse', function() {
|
||||
$topNavAccordion.find('.collapse.in').collapse('hide');
|
||||
|
|
|
|||
25192
web/js/custom-min.js
vendored
25192
web/js/custom-min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue