Formatierungen Kalenderansicht Sortierung FEWO git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3438 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
parent
326f7f4f54
commit
bdb24ccd09
12 changed files with 207 additions and 19 deletions
|
|
@ -1,4 +1,11 @@
|
||||||
{# @var insurance \AppBundle\Entity\TravelInsurance #}
|
{# @var insurance \AppBundle\Entity\TravelInsurance #}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.c1.c1b li:before {
|
||||||
|
top:-20px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
{{ form_widget(form) }}
|
{{ form_widget(form) }}
|
||||||
|
|
||||||
|
|
@ -7,13 +14,37 @@
|
||||||
(<a href="#" data-toggle="modal" data-target="#st-insurance-{{ insurance.id }}-modal">Details</a>)
|
(<a href="#" data-toggle="modal" data-target="#st-insurance-{{ insurance.id }}-modal">Details</a>)
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="accordion-toggle-2">
|
||||||
|
<div class="panel-group booking_insurance_toogle" id="accordion_in_{{ form.vars.id }}" style="margin-left: 5px;margin-top: 5px;">
|
||||||
|
<a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#accordion_in_{{ form.vars.id }}" href="#collapse_in_{{ form.vars.id }}" aria-expanded="false">
|
||||||
|
<h5 style="font-size: 0.9em;font-weight: 600;"><span>Leistungen einblenden</span><i class="indicator pull-right icon-plus"></i></h5>
|
||||||
|
</a>
|
||||||
|
<div id="collapse_in_{{ form.vars.id }}" class="panel-collapse collapse" aria-expanded="false" style="height: 0px;">
|
||||||
|
<div class="panel-body">
|
||||||
|
|
||||||
|
<p><strong>Versicherung:</strong> {{ insurance.insuranceName }} </p>
|
||||||
|
|
||||||
|
<ul class="c1 c1b">
|
||||||
|
{% for textli in insurance.text|split('\n') %}
|
||||||
|
<li>{{ textli|raw }}</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
<br>
|
||||||
|
<p><a href="/uploads/{{ insurance.insurancePdf }} " target="_blank"> Informationsblatt zur Versicherung <i class="fa fa-file-pdf-o"></i></a> </p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% embed 'default/components/embed/modal.html.twig' with {
|
{% embed 'default/components/embed/modal.html.twig' with {
|
||||||
id: 'insurance-' ~ insurance.id,
|
id: 'insurance-' ~ insurance.id,
|
||||||
title: insurance.name
|
title: insurance.name
|
||||||
} %}
|
} %}
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<h3>Leistungen & Preisliste</h3>
|
<h3>Leistungen & Preisliste</h3>
|
||||||
<ul>
|
|
||||||
|
<ul class="c1 c1b">
|
||||||
{% for item in insurance.included|split('\n') %}
|
{% for item in insurance.included|split('\n') %}
|
||||||
<li>{{ item }}</li>
|
<li>{{ item }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
@ -42,4 +73,6 @@
|
||||||
</table>
|
</table>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endembed %}
|
{% endembed %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
<tr class="st-total-tr">
|
<tr class="st-total-tr">
|
||||||
<td class="st-position-price-col">
|
<td class="st-position-price-col">
|
||||||
<span class="st-total-price">= {{ total_price|number_format(2) }} €</span>
|
<span class="st-total-price">= {{ total_price|number_format(2) }} €</span>
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="display:none">
|
<tr style="display:">
|
||||||
<td>Reiseversicherung</td>
|
<td>Reiseversicherung</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
|
|
@ -178,9 +178,8 @@
|
||||||
|
|
||||||
{{ form_errors(form.insurance) }}
|
{{ form_errors(form.insurance) }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr style="display: none">
|
||||||
<tr>
|
|
||||||
<td>Reiseversicherung</td>
|
<td>Reiseversicherung</td>
|
||||||
<td>
|
<td>
|
||||||
<p style="white-space: normal;">
|
<p style="white-space: normal;">
|
||||||
|
|
|
||||||
|
|
@ -28,11 +28,15 @@
|
||||||
{% set is_past_date = dayState.date is not empty and date(dayState.date) < date('now') %}
|
{% set is_past_date = dayState.date is not empty and date(dayState.date) < date('now') %}
|
||||||
|
|
||||||
{# Set cell class #}
|
{# Set cell class #}
|
||||||
{% if is_past_date or
|
|
||||||
(dayState.isReserved and not dayState.isReservationBegin and not dayState.isReservationEnd) or
|
{% if dayState.isReserved and (not dayState.isReservationBegin and not dayState.isReservationEnd) %}
|
||||||
not dayState.isInSeason
|
|
||||||
%}
|
|
||||||
{% set cell_class = 'calendar-day-disabled' %}
|
{% 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 %}
|
{% elseif dayState.isReservationBegin %}
|
||||||
{% set cell_class = 'calendar-day-reservation-begin' %}
|
{% set cell_class = 'calendar-day-reservation-begin' %}
|
||||||
{% elseif dayState.isReservationEnd %}
|
{% elseif dayState.isReservationEnd %}
|
||||||
|
|
@ -50,11 +54,15 @@
|
||||||
{{ dayState.day }}
|
{{ dayState.day }}
|
||||||
</a>
|
</a>
|
||||||
{% elseif dayState.day == 0 %}
|
{% elseif dayState.day == 0 %}
|
||||||
-
|
|
||||||
{% elseif cell_class == '' %}
|
{% elseif cell_class == '' %}
|
||||||
{{ dayState.day }}
|
{{ dayState.day }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<del>{{ dayState.day }}</del>
|
{% if is_past_date %}
|
||||||
|
<del style="color:#989898;">{{ dayState.day }}</del>
|
||||||
|
{% else %}
|
||||||
|
{{ dayState.day }}
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
||||||
|
|
@ -216,6 +216,14 @@
|
||||||
|
|
||||||
<p>Bitte klicken Sie einen Anreisetermin, um zur Buchungsmaske zu gelagen.</p>
|
<p>Bitte klicken Sie einen Anreisetermin, um zur Buchungsmaske zu gelagen.</p>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.table > tbody > tr > td.calendar-day-non {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
.table > tbody > tr > td.calendar-day-past {
|
||||||
|
background-color: rgba(242, 242, 242, 0.5);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
{% include 'default/pages/cms/calendarLodgingProgram.html.twig' %}
|
{% include 'default/pages/cms/calendarLodgingProgram.html.twig' %}
|
||||||
|
|
||||||
</div> <!-- END tabpanel -->
|
</div> <!-- END tabpanel -->
|
||||||
|
|
|
||||||
|
|
@ -318,6 +318,7 @@ class BookingController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
$insuranceTotal = 0;
|
$insuranceTotal = 0;
|
||||||
|
$tempInsuranceHTML = array();
|
||||||
|
|
||||||
foreach ($possibleRooms as $room)
|
foreach ($possibleRooms as $room)
|
||||||
{
|
{
|
||||||
|
|
@ -379,14 +380,21 @@ class BookingController extends Controller
|
||||||
$a = $adultCount * $insurancePriceValue;
|
$a = $adultCount * $insurancePriceValue;
|
||||||
$insuranceTotal += $a;
|
$insuranceTotal += $a;
|
||||||
$ret += $a;
|
$ret += $a;
|
||||||
|
|
||||||
if (isset($insuranceHtmlSummary))
|
if (isset($insuranceHtmlSummary))
|
||||||
{
|
{
|
||||||
$insuranceHtmlSummary[] = [
|
if(!empty($tempInsuranceHTML[$a])){
|
||||||
'value' => $a,
|
$tempInsuranceHTML[$a]['count'] = intval($tempInsuranceHTML[$a]['count']) + $adultCount;
|
||||||
'label' => 'RV '. $bookingRequest->getInsurance()->getName() .' ('.
|
$tempInsuranceHTML[$a]['value'] = $tempInsuranceHTML[$a]['value'] + $insurancePriceValue;
|
||||||
$insurancePrice->getCode() .') <strong>['. $this->calcNumTravelerLabel($adultCount) .' x '.
|
}else{
|
||||||
Util::formatPrice($insurancePriceValue) . ' pro Person]</strong>'
|
$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))
|
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'].'<strong>['.$item['count'].' x '.$item['label_last'].' ]</strong>',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($insuranceHtmlSummary))
|
if (isset($insuranceHtmlSummary))
|
||||||
{
|
{
|
||||||
$outHtmlSummary = array_merge($outHtmlSummary, $insuranceHtmlSummary);
|
$outHtmlSummary = array_merge($outHtmlSummary, $insuranceHtmlSummary);
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,7 @@ class CmsController extends Controller
|
||||||
|
|
||||||
public function overviewAction(Page $page)
|
public function overviewAction(Page $page)
|
||||||
{
|
{
|
||||||
|
|
||||||
$settings = $page->getCmsSettings();
|
$settings = $page->getCmsSettings();
|
||||||
if (!is_array($settings))
|
if (!is_array($settings))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ class ComponentController extends Controller
|
||||||
if ($page->getLvl() == 0)
|
if ($page->getLvl() == 0)
|
||||||
{
|
{
|
||||||
$view['nav_pages'] = $page->getChildren();
|
$view['nav_pages'] = $page->getChildren();
|
||||||
|
|
||||||
$view['nav_child_pages'] = [];
|
$view['nav_child_pages'] = [];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ class Page
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\OneToMany(targetEntity="AppBundle\Entity\Page", mappedBy="parent")
|
* @ORM\OneToMany(targetEntity="AppBundle\Entity\Page", mappedBy="parent")
|
||||||
* @ORM\OrderBy({"lft" = "ASC"})
|
* @ORM\OrderBy({"order" = "ASC"})
|
||||||
*/
|
*/
|
||||||
private $children;
|
private $children;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,28 @@ class TravelInsurance
|
||||||
*/
|
*/
|
||||||
private $included;
|
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
|
* @var integer
|
||||||
*
|
*
|
||||||
|
|
@ -96,6 +118,79 @@ class TravelInsurance
|
||||||
return $this->internalName;
|
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
|
* Set included
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,7 @@ class KernelControllerListener
|
||||||
$restOfPath = '/'. implode('/', $pathArray);
|
$restOfPath = '/'. implode('/', $pathArray);
|
||||||
$slug = array_shift($pathArray);
|
$slug = array_shift($pathArray);
|
||||||
|
|
||||||
|
|
||||||
$qb = $repo->createQueryBuilder('p');
|
$qb = $repo->createQueryBuilder('p');
|
||||||
$qb->where($qb->expr()->eq('p.lvl', $i));
|
$qb->where($qb->expr()->eq('p.lvl', $i));
|
||||||
$qb->andWhere($qb->expr()->eq('p.slug', ':slug'));
|
$qb->andWhere($qb->expr()->eq('p.slug', ':slug'));
|
||||||
|
|
@ -160,6 +161,7 @@ class KernelControllerListener
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
$handler = $node->getTemplate() ? ucfirst($node->getTemplate()) : 'Default';
|
$handler = $node->getTemplate() ? ucfirst($node->getTemplate()) : 'Default';
|
||||||
$request->attributes->set('_controller', 'AppBundle:Cms:'. $handler);
|
$request->attributes->set('_controller', 'AppBundle:Cms:'. $handler);
|
||||||
if ($node->getTemplate())
|
if ($node->getTemplate())
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,27 @@ $(document).ready(function() {
|
||||||
$('.acc_nationality_panel').on('shown.bs.collapse', toggleUpdateChevron);
|
$('.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()
|
function updateTravelers()
|
||||||
{
|
{
|
||||||
var travelersIndex = 1;
|
var travelersIndex = 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue