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:
adametz 2018-08-10 12:58:46 +00:00
parent 326f7f4f54
commit bdb24ccd09
12 changed files with 207 additions and 19 deletions

View file

@ -1,4 +1,11 @@
{# @var insurance \AppBundle\Entity\TravelInsurance #}
<style>
.c1.c1b li:before {
top:-20px;
}
</style>
<div class="radio">
{{ form_widget(form) }}
@ -7,13 +14,37 @@
(<a href="#" data-toggle="modal" data-target="#st-insurance-{{ insurance.id }}-modal">Details</a>)
</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 {
id: 'insurance-' ~ insurance.id,
title: insurance.name
} %}
{% block body %}
<h3>Leistungen & Preisliste</h3>
<ul>
<ul class="c1 c1b">
{% for item in insurance.included|split('\n') %}
<li>{{ item }}</li>
{% endfor %}
@ -43,3 +74,5 @@
{% endblock %}
{% endembed %}
</div>

View file

@ -10,6 +10,8 @@
</td>
</tr>
{% endfor %}
<tr class="st-total-tr">
<td class="st-position-price-col">
<span class="st-total-price">= {{ total_price|number_format(2) }} €</span>

View file

@ -158,7 +158,7 @@
{% endif %}
</td>
</tr>
<tr style="display:none">
<tr style="display:">
<td>Reiseversicherung</td>
<td>
<div class="radio">
@ -179,8 +179,7 @@
{{ form_errors(form.insurance) }}
</td>
</tr>
<tr>
<tr style="display: none">
<td>Reiseversicherung</td>
<td>
<p style="white-space: normal;">

View file

@ -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 }}
</a>
{% elseif dayState.day == 0 %}
-
&nbsp;
{% elseif cell_class == '' %}
{{ dayState.day }}
{% else %}
<del>{{ dayState.day }}</del>
{% if is_past_date %}
<del style="color:#989898;">{{ dayState.day }}</del>
{% else %}
{{ dayState.day }}
{% endif %}
{% endif %}
</td>
{% endfor %}

View file

@ -216,6 +216,14 @@
<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' %}
</div> <!-- END tabpanel -->

View file

@ -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() .') <strong>['. $this->calcNumTravelerLabel($adultCount) .' x '.
Util::formatPrice($insurancePriceValue) . ' pro Person]</strong>'
];
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'].'<strong>['.$item['count'].' x '.$item['label_last'].' ]</strong>',
];
}
}
if (isset($insuranceHtmlSummary))
{
$outHtmlSummary = array_merge($outHtmlSummary, $insuranceHtmlSummary);

View file

@ -50,6 +50,7 @@ class CmsController extends Controller
public function overviewAction(Page $page)
{
$settings = $page->getCmsSettings();
if (!is_array($settings))
{

View file

@ -54,6 +54,7 @@ class ComponentController extends Controller
if ($page->getLvl() == 0)
{
$view['nav_pages'] = $page->getChildren();
$view['nav_child_pages'] = [];
}
else

View file

@ -57,7 +57,7 @@ class Page
/**
* @ORM\OneToMany(targetEntity="AppBundle\Entity\Page", mappedBy="parent")
* @ORM\OrderBy({"lft" = "ASC"})
* @ORM\OrderBy({"order" = "ASC"})
*/
private $children;

View file

@ -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
*

View file

@ -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())

View file

@ -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;