diff --git a/trunk/app/Resources/views/default/components/booking/insurance.html.twig b/trunk/app/Resources/views/default/components/booking/insurance.html.twig
index 19003bac..58852930 100644
--- a/trunk/app/Resources/views/default/components/booking/insurance.html.twig
+++ b/trunk/app/Resources/views/default/components/booking/insurance.html.twig
@@ -1,4 +1,11 @@
{# @var insurance \AppBundle\Entity\TravelInsurance #}
+
+
+
{{ form_widget(form) }}
@@ -7,13 +14,37 @@
(
Details)
+
+
{% embed 'default/components/embed/modal.html.twig' with {
id: 'insurance-' ~ insurance.id,
title: insurance.name
} %}
{% block body %}
Leistungen & Preisliste
-
+
+
{% for item in insurance.included|split('\n') %}
- {{ item }}
{% endfor %}
@@ -42,4 +73,6 @@
{% endblock %}
{% endembed %}
-
\ No newline at end of file
+
+
+
diff --git a/trunk/app/Resources/views/default/components/booking/summary.html.twig b/trunk/app/Resources/views/default/components/booking/summary.html.twig
index 87f6809e..69741465 100644
--- a/trunk/app/Resources/views/default/components/booking/summary.html.twig
+++ b/trunk/app/Resources/views/default/components/booking/summary.html.twig
@@ -10,6 +10,8 @@
{% endfor %}
+
+
|
= {{ total_price|number_format(2) }} €
diff --git a/trunk/app/Resources/views/default/pages/booking.html.twig b/trunk/app/Resources/views/default/pages/booking.html.twig
index 6401b651..58f67b0b 100644
--- a/trunk/app/Resources/views/default/pages/booking.html.twig
+++ b/trunk/app/Resources/views/default/pages/booking.html.twig
@@ -158,7 +158,7 @@
{% endif %}
|
-
+
| Reiseversicherung |
@@ -178,9 +178,8 @@
{{ form_errors(form.insurance) }}
|
-
-
-
+
+
| Reiseversicherung |
diff --git a/trunk/app/Resources/views/default/pages/cms/calendarLodgingProgram.html.twig b/trunk/app/Resources/views/default/pages/cms/calendarLodgingProgram.html.twig
index f30354f2..914fccf7 100644
--- a/trunk/app/Resources/views/default/pages/cms/calendarLodgingProgram.html.twig
+++ b/trunk/app/Resources/views/default/pages/cms/calendarLodgingProgram.html.twig
@@ -28,11 +28,15 @@
{% set is_past_date = dayState.date is not empty and date(dayState.date) < date('now') %}
{# Set cell class #}
- {% if is_past_date or
- (dayState.isReserved and not dayState.isReservationBegin and not dayState.isReservationEnd) or
- not dayState.isInSeason
- %}
+
+ {% if dayState.isReserved and (not dayState.isReservationBegin and not dayState.isReservationEnd) %}
{% set cell_class = 'calendar-day-disabled' %}
+ {% elseif dayState.day == 0 %}
+ {% set cell_class = 'calendar-day-non' %}
+ {% elseif is_past_date %}
+ {% set cell_class = 'calendar-day-past' %}
+ {% elseif not dayState.isInSeason %}
+ {% set cell_class = 'calendar-day-non' %}
{% elseif dayState.isReservationBegin %}
{% set cell_class = 'calendar-day-reservation-begin' %}
{% elseif dayState.isReservationEnd %}
@@ -50,11 +54,15 @@
{{ dayState.day }}
{% elseif dayState.day == 0 %}
- -
+
{% elseif cell_class == '' %}
{{ dayState.day }}
{% else %}
- {{ dayState.day }}
+ {% if is_past_date %}
+ {{ dayState.day }}
+ {% else %}
+ {{ dayState.day }}
+ {% endif %}
{% endif %}
|
{% endfor %}
diff --git a/trunk/app/Resources/views/default/pages/cms/fewoTravelProgram.html.twig b/trunk/app/Resources/views/default/pages/cms/fewoTravelProgram.html.twig
index ee2696eb..390201c8 100644
--- a/trunk/app/Resources/views/default/pages/cms/fewoTravelProgram.html.twig
+++ b/trunk/app/Resources/views/default/pages/cms/fewoTravelProgram.html.twig
@@ -216,6 +216,14 @@
Bitte klicken Sie einen Anreisetermin, um zur Buchungsmaske zu gelagen.
+
{% include 'default/pages/cms/calendarLodgingProgram.html.twig' %}
diff --git a/trunk/src/AppBundle/Controller/BookingController.php b/trunk/src/AppBundle/Controller/BookingController.php
index 918249f1..ab8b25ab 100644
--- a/trunk/src/AppBundle/Controller/BookingController.php
+++ b/trunk/src/AppBundle/Controller/BookingController.php
@@ -318,6 +318,7 @@ class BookingController extends Controller
}
$insuranceTotal = 0;
+ $tempInsuranceHTML = array();
foreach ($possibleRooms as $room)
{
@@ -379,14 +380,21 @@ class BookingController extends Controller
$a = $adultCount * $insurancePriceValue;
$insuranceTotal += $a;
$ret += $a;
+
if (isset($insuranceHtmlSummary))
{
- $insuranceHtmlSummary[] = [
- 'value' => $a,
- 'label' => 'RV '. $bookingRequest->getInsurance()->getName() .' ('.
- $insurancePrice->getCode() .') ['. $this->calcNumTravelerLabel($adultCount) .' x '.
- Util::formatPrice($insurancePriceValue) . ' pro Person]'
- ];
+ if(!empty($tempInsuranceHTML[$a])){
+ $tempInsuranceHTML[$a]['count'] = intval($tempInsuranceHTML[$a]['count']) + $adultCount;
+ $tempInsuranceHTML[$a]['value'] = $tempInsuranceHTML[$a]['value'] + $insurancePriceValue;
+ }else{
+ $tempInsuranceHTML[$a] = array(
+ 'value' => $a,
+ 'label_first' => 'RV '. $bookingRequest->getInsurance()->getName() .' ('. $insurancePrice->getCode() .') ',
+ 'label_last' => Util::formatPrice($insurancePriceValue) . ' pro Person',
+ 'count' => $adultCount,
+
+ );
+ }
}
if (isset($outPriceInfo))
{
@@ -401,6 +409,16 @@ class BookingController extends Controller
}
}
+ if(count($tempInsuranceHTML) > 0 ){
+
+ foreach ($tempInsuranceHTML as $item) {
+ $insuranceHtmlSummary[] =[
+ 'value' => $item['value'],
+ 'label' => $item['label_first'].'['.$item['count'].' x '.$item['label_last'].' ]',
+ ];
+ }
+ }
+
if (isset($insuranceHtmlSummary))
{
$outHtmlSummary = array_merge($outHtmlSummary, $insuranceHtmlSummary);
diff --git a/trunk/src/AppBundle/Controller/CmsController.php b/trunk/src/AppBundle/Controller/CmsController.php
index f1a4f826..0a663507 100644
--- a/trunk/src/AppBundle/Controller/CmsController.php
+++ b/trunk/src/AppBundle/Controller/CmsController.php
@@ -50,6 +50,7 @@ class CmsController extends Controller
public function overviewAction(Page $page)
{
+
$settings = $page->getCmsSettings();
if (!is_array($settings))
{
diff --git a/trunk/src/AppBundle/Controller/ComponentController.php b/trunk/src/AppBundle/Controller/ComponentController.php
index 18650937..361b4dde 100644
--- a/trunk/src/AppBundle/Controller/ComponentController.php
+++ b/trunk/src/AppBundle/Controller/ComponentController.php
@@ -54,6 +54,7 @@ class ComponentController extends Controller
if ($page->getLvl() == 0)
{
$view['nav_pages'] = $page->getChildren();
+
$view['nav_child_pages'] = [];
}
else
diff --git a/trunk/src/AppBundle/Entity/Page.php b/trunk/src/AppBundle/Entity/Page.php
index 395d8b66..7e9b81ef 100644
--- a/trunk/src/AppBundle/Entity/Page.php
+++ b/trunk/src/AppBundle/Entity/Page.php
@@ -57,7 +57,7 @@ class Page
/**
* @ORM\OneToMany(targetEntity="AppBundle\Entity\Page", mappedBy="parent")
- * @ORM\OrderBy({"lft" = "ASC"})
+ * @ORM\OrderBy({"order" = "ASC"})
*/
private $children;
diff --git a/trunk/src/AppBundle/Entity/TravelInsurance.php b/trunk/src/AppBundle/Entity/TravelInsurance.php
index ed32ed13..3803961e 100644
--- a/trunk/src/AppBundle/Entity/TravelInsurance.php
+++ b/trunk/src/AppBundle/Entity/TravelInsurance.php
@@ -33,6 +33,28 @@ class TravelInsurance
*/
private $included;
+ /**
+ * @var string
+ *
+ * @ORM\Column(name="insurance_name", type="string", length=255, nullable=true)
+ */
+ private $insuranceName;
+
+ /**
+ * @var string
+ *
+ * @ORM\Column(name="text", type="string", length=255, nullable=true)
+ */
+ private $text;
+
+ /**
+ * @var string
+ *
+ * @ORM\Column(name="insurance_pdf", type="string", length=255, nullable=true)
+ */
+ private $insurancePdf;
+
+
/**
* @var integer
*
@@ -96,6 +118,79 @@ class TravelInsurance
return $this->internalName;
}
+ /**
+ * Set insuranceName
+ *
+ * @param string $insuranceName
+ *
+ * @return TravelInsurance
+ */
+ public function setInsuranceName($insuranceName)
+ {
+ $this->insuranceName = $insuranceName;
+
+ return $this;
+ }
+
+ /**
+ * Get insuranceName
+ *
+ * @return string
+ */
+ public function getInsuranceName()
+ {
+ return $this->insuranceName;
+ }
+
+ /**
+ * Set text
+ *
+ * @param string $text
+ *
+ * @return TravelInsurance
+ */
+ public function setText($text)
+ {
+ $this->text = $text;
+
+ return $this;
+ }
+
+ /**
+ * Get text
+ *
+ * @return string
+ */
+ public function getText()
+ {
+ return $this->text;
+ }
+
+
+ /**
+ * Set insurancePdf
+ *
+ * @param string $insurancePdf
+ *
+ * @return TravelInsurance
+ */
+ public function setInsurancePdf($insurancePdf)
+ {
+ $this->insurancePdf = $insurancePdf;
+
+ return $this;
+ }
+
+ /**
+ * Get insurancePdf
+ *
+ * @return string
+ */
+ public function getInsurancePdf()
+ {
+ return $this->insurancePdf;
+ }
+
/**
* Set included
*
diff --git a/trunk/src/AppBundle/Listener/KernelControllerListener.php b/trunk/src/AppBundle/Listener/KernelControllerListener.php
index c8397b00..038c7c11 100644
--- a/trunk/src/AppBundle/Listener/KernelControllerListener.php
+++ b/trunk/src/AppBundle/Listener/KernelControllerListener.php
@@ -68,6 +68,7 @@ class KernelControllerListener
$restOfPath = '/'. implode('/', $pathArray);
$slug = array_shift($pathArray);
+
$qb = $repo->createQueryBuilder('p');
$qb->where($qb->expr()->eq('p.lvl', $i));
$qb->andWhere($qb->expr()->eq('p.slug', ':slug'));
@@ -160,6 +161,7 @@ class KernelControllerListener
}
else
{
+
$handler = $node->getTemplate() ? ucfirst($node->getTemplate()) : 'Default';
$request->attributes->set('_controller', 'AppBundle:Cms:'. $handler);
if ($node->getTemplate())
diff --git a/trunk/src/AppBundle/Resources/public/js/booking.js b/trunk/src/AppBundle/Resources/public/js/booking.js
index 38b42d98..71b2f368 100644
--- a/trunk/src/AppBundle/Resources/public/js/booking.js
+++ b/trunk/src/AppBundle/Resources/public/js/booking.js
@@ -96,6 +96,27 @@ $(document).ready(function() {
$('.acc_nationality_panel').on('shown.bs.collapse', toggleUpdateChevron);
+ function toggleChevronIn(e) {
+ console.log(e);
+ var $i = $(e.target)
+ .parent('.panel-group')
+ .find("i.indicator");
+
+ $i.toggleClass('icon-minus icon-plus');
+
+ if($i.hasClass('icon-minus')){
+ $i.parent('h5').find('span').html('Leistungen ausblenden');
+ }
+ if($i.hasClass('icon-plus')){
+ $i.parent('h5').find('span').html('Leistungen einblenden');
+ }
+ }
+
+ $('.booking_insurance_toogle').on('hidden.bs.collapse', toggleChevronIn);
+ $('.booking_insurance_toogle').on('shown.bs.collapse', toggleChevronIn);
+
+
+
function updateTravelers()
{
var travelersIndex = 1;