Update new Calender in Admin
git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3451 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
parent
7117fc6201
commit
a5eb342bd3
35 changed files with 5301 additions and 265 deletions
|
|
@ -14,133 +14,6 @@
|
|||
|
||||
<div class="form-box">
|
||||
|
||||
{{ form_row(form.name, {'label': 'Name'}) }}
|
||||
{{ form_row(form.group, {'label': 'Gruppe'}) }}
|
||||
{{ form_row(form.type, {'label': 'Typ'}) }}
|
||||
{{ form_row(form.description, {'label': 'Beschreibung'}) }}
|
||||
{{ form_row(form.equipment, {'label': 'Ausstattung'}) }}
|
||||
{{ form_row(form.adress1, {'label': 'Adresse 1'}) }}
|
||||
{{ form_row(form.adress2, {'label': 'Adresse 2'}) }}
|
||||
{{ form_row(form.zipCode, {'label': 'PLZ'}) }}
|
||||
{{ form_row(form.city, {'label': 'Ort'}) }}
|
||||
{{ form_row(form.maximumPersons, {'label': 'Maximale Personenanzahl'}) }}
|
||||
{{ form_row(form.deposit, {'label': 'Kaution'}) }}
|
||||
|
||||
{#
|
||||
<div class="checkbox">
|
||||
{{ form_widget(form.calendarVisible) }}
|
||||
<label for="{{ form.calendarVisible.vars.id }}">
|
||||
Kalender sichtbar
|
||||
</label>
|
||||
{{ form_errors(form.calendarVisible) }}
|
||||
</div>
|
||||
#}
|
||||
|
||||
<br><br>
|
||||
|
||||
<h3>Bilder</h3>
|
||||
{% if lodging.images is not empty %}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Bild</th>
|
||||
<th>Pos</th>
|
||||
<th>Name</th>
|
||||
<th>Beschreibung</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for image in lodging.images %}
|
||||
<tr>
|
||||
<td><img src="{{ asset('uploads/images/' ~ image.file) }}" alt="{{ image.description }}" style="width:228px;height:75px;" ></td>
|
||||
<td>{{ image.pos }}</td>
|
||||
<td>{{ image.fileName }}</td>
|
||||
<td>{{ image.description }}</td>
|
||||
<td>
|
||||
<a href="{{ '/admin/fewo/lodgings/' ~ lodging.id ~ '/images/' ~ image.id }}"
|
||||
class="btn btn-primary"
|
||||
>
|
||||
Bearbeiten
|
||||
</a>
|
||||
<a href="{{ '/admin/fewo/lodgings/' ~ lodging.id ~ '/images/' ~ image.id ~ '/delete' }}"
|
||||
class="btn btn-primary"
|
||||
>
|
||||
Löschen
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<h4>Keine Bilder vorhanden</h4>
|
||||
{% endif %}
|
||||
|
||||
<a href="{{ '/admin/fewo/lodgings/' ~ lodging.id ~ '/images/new' }}" class="btn btn-primary">
|
||||
Hinzufügen
|
||||
</a>
|
||||
<a href="/admin/fewo/lodgings/{{ lodging.id }}/images/multi-upload" class="btn btn-primary">
|
||||
Mehrere Bilder hochladen
|
||||
</a>
|
||||
|
||||
<br><br>
|
||||
|
||||
<h3>Saisons (Preise)</h3>
|
||||
|
||||
{% if lodging.prices is not empty %}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Von</th>
|
||||
<th>Bis</th>
|
||||
<th>Mindestbelegung</th>
|
||||
<th>Preis pro Nacht</th>
|
||||
<th>Service-Gebühr</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for lodgingPrice in lodging.prices %}
|
||||
<tr>
|
||||
<td>{{ lodgingPrice.season.name }}</td>
|
||||
<td>{{ lodgingPrice.season.fromDate|date('d.m.y') }}</td>
|
||||
<td>{{ lodgingPrice.season.toDate|date('d.m.y') }}</td>
|
||||
<td>{{ lodgingPrice.season.minimumStay }}</td>
|
||||
<td>{{ lodgingPrice.perNight }}</td>
|
||||
<td>{{ lodgingPrice.flatPrice }}</td>
|
||||
<td>
|
||||
<a href="{{ '/admin/fewo/lodgings/' ~ lodging.id ~ '/prices/' ~ lodgingPrice.id }}"
|
||||
class="btn btn-primary"
|
||||
rel="nofollow"
|
||||
>
|
||||
Bearbeiten
|
||||
</a>
|
||||
<a href="{{ '/admin/fewo/lodgings/' ~ lodging.id ~ '/prices/' ~ lodgingPrice.id ~ '/delete' }}"
|
||||
class="btn btn-primary"
|
||||
rel="nofollow"
|
||||
>
|
||||
Löschen
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<h4>Keine Saisons vorhanden</h4>
|
||||
{% endif %}
|
||||
|
||||
<a href="/admin/fewo/lodgings/{{ lodging.id }}/prices/new"
|
||||
class="btn btn-primary"
|
||||
rel="nofollow"
|
||||
>
|
||||
Hinzufügen
|
||||
</a>
|
||||
|
||||
<br><br>
|
||||
|
||||
<h3>Reservierungen</h3>
|
||||
|
||||
{% if lodging.reservations is not empty %}
|
||||
|
|
@ -216,6 +89,11 @@
|
|||
|
||||
|
||||
<style>
|
||||
.table > tbody > tr > td.normal {
|
||||
background-color: #deebde;
|
||||
padding: 6px;
|
||||
|
||||
}
|
||||
.table > tbody > tr > td.calendar-day-non {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
|
@ -241,20 +119,50 @@
|
|||
background: linear-gradient(145deg, #f0bcbc 49%,#f2f2f2 50%,#C5DCC6 51%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f0bcbc', endColorstr='#C5DCC6',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
|
||||
}
|
||||
.table > tbody > tr > td.calendar-day-disabled-half-booked.active {
|
||||
/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#f0bcbc+49,f2f2f2+50,f0bcbc+51 */
|
||||
background: #f0bcbc; /* Old browsers */
|
||||
background: -moz-linear-gradient(-35deg, #f0bcbc 49%, #f2f2f2 50%, #b7ceb8 51%); /* FF3.6-15 */
|
||||
background: -webkit-linear-gradient(-35deg, #f0bcbc 49%,#f2f2f2 50%,#b7ceb8 51%); /* Chrome10-25,Safari5.1-6 */
|
||||
background: linear-gradient(145deg, #f0bcbc 49%,#f2f2f2 50%,#b7ceb8 51%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f0bcbc', endColorstr='#b7ceb8',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
|
||||
}
|
||||
.table > tbody > tr > .calendar-day-reservation-begin {
|
||||
background-color: #f0bcbc;
|
||||
background: -moz-linear-gradient(to bottom right, #deebde 0%, #deebde 49%, #f0bcbc 50%, #f0bcbc 100%);
|
||||
background: -webkit-gradient(linear, left top, right bottom, color-stop(0%, #deebde), color-stop(49%, #deebde), color-stop(50%, #f0bcbc), color-stop(100%, #f0bcbc));
|
||||
background: -webkit-linear-gradient(to bottom right, #deebde 0%, #deebde 49%, #f0bcbc 50%, #f0bcbc 100%);
|
||||
background: -o-linear-gradient(to bottom right, #deebde 0%, #deebde 49%, #f0bcbc 50%, #f0bcbc 100%);
|
||||
background: -ms-linear-gradient(to bottom right, #deebde 0%, #deebde 49%, #f0bcbc 50%, #f0bcbc 100%);
|
||||
background: linear-gradient(to bottom right, #deebde 0%, #deebde 49%, #f0bcbc 50%, #f0bcbc 100%);
|
||||
}
|
||||
.table > tbody > tr > .calendar-day-reservation-end {
|
||||
background-color: #f2f2f2;
|
||||
background: -moz-linear-gradient(to bottom right, #f0bcbc 0%, #f0bcbc 49%, #deebde 50%, #deebde 100%);
|
||||
background: -webkit-gradient(linear, left top, right bottom, color-stop(0%, #f0bcbc), color-stop(49%, #f0bcbc), color-stop(50%, #deebde), color-stop(100%, #deebde));
|
||||
background: -webkit-linear-gradient(to bottom right, #f0bcbc 0%, #f0bcbc 49%, #deebde 50%, #deebde 100%);
|
||||
background: -o-linear-gradient(to bottom right, #f0bcbc 0%, #f0bcbc 49%, #deebde 50%, #deebde 100%);
|
||||
background: -ms-linear-gradient(to bottom right, #f0bcbc 0%, #f0bcbc 49%, #deebde 50%, #deebde 100%);
|
||||
background: linear-gradient(to bottom right, #f0bcbc 0%, #f0bcbc 49%, #deebde 50%, #deebde 100%);
|
||||
}
|
||||
|
||||
.table > tbody > tr > td.active {
|
||||
background-color: rgba(88, 155, 92, 0.35);
|
||||
padding: 0;
|
||||
padding: 6px;
|
||||
|
||||
}
|
||||
.table > tbody > tr > td.active:hover {
|
||||
background-color: #648859;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td a.link {
|
||||
color: #5a5a5a;
|
||||
font-weight: 700;
|
||||
width: 100%;
|
||||
display: block;
|
||||
height: 100%;
|
||||
padding: 8px;
|
||||
// padding: 6px;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td:hover a.link {
|
||||
|
|
@ -264,21 +172,105 @@
|
|||
display: block;
|
||||
height: 100%;
|
||||
}
|
||||
.table > tbody > tr > td a {
|
||||
.table > tbody > tr > td a.link {
|
||||
font-weight: 700;
|
||||
width: 100%;
|
||||
display: block;
|
||||
height: 100%;
|
||||
padding: 8px;
|
||||
// padding: 6px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
{% include 'default/admin/lodgingsEditCalendar.html.twig' %}
|
||||
|
||||
<br>
|
||||
<br><br>
|
||||
|
||||
<h3>Saisons (Preise)</h3>
|
||||
|
||||
{% if lodging.prices is not empty %}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Von</th>
|
||||
<th>Bis</th>
|
||||
<th>Mindestbelegung</th>
|
||||
<th>Preis pro Nacht</th>
|
||||
<th>Service-Gebühr</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for lodgingPrice in lodging.prices %}
|
||||
{% if lodgingPrice.season is not empty %}
|
||||
|
||||
<tr>
|
||||
<td>{{ lodgingPrice.season.name }}</td>
|
||||
<td>{{ lodgingPrice.season.fromDate|date('d.m.y') }}</td>
|
||||
<td>{{ lodgingPrice.season.toDate|date('d.m.y') }}</td>
|
||||
<td>{{ lodgingPrice.season.minimumStay }}</td>
|
||||
<td>{{ lodgingPrice.perNight }}</td>
|
||||
<td>{{ lodgingPrice.flatPrice }}</td>
|
||||
<td>
|
||||
<a href="{{ '/admin/fewo/lodgings/' ~ lodging.id ~ '/prices/' ~ lodgingPrice.id }}"
|
||||
class="btn btn-primary"
|
||||
rel="nofollow"
|
||||
>
|
||||
Bearbeiten
|
||||
</a>
|
||||
<a href="{{ '/admin/fewo/lodgings/' ~ lodging.id ~ '/prices/' ~ lodgingPrice.id ~ '/delete' }}"
|
||||
class="btn btn-primary"
|
||||
rel="nofollow"
|
||||
>
|
||||
Löschen
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<h4>Keine Saisons vorhanden</h4>
|
||||
{% endif %}
|
||||
|
||||
<a href="/admin/fewo/lodgings/{{ lodging.id }}/prices/new"
|
||||
class="btn btn-primary"
|
||||
rel="nofollow"
|
||||
>
|
||||
Hinzufügen
|
||||
</a>
|
||||
<hr>
|
||||
|
||||
<br><br>
|
||||
|
||||
{{ form_row(form.name, {'label': 'Name'}) }}
|
||||
{{ form_row(form.group, {'label': 'Gruppe'}) }}
|
||||
{{ form_row(form.type, {'label': 'Typ'}) }}
|
||||
{{ form_row(form.description, {'label': 'Beschreibung'}) }}
|
||||
{{ form_row(form.equipment, {'label': 'Ausstattung'}) }}
|
||||
{{ form_row(form.adress1, {'label': 'Adresse 1'}) }}
|
||||
{{ form_row(form.adress2, {'label': 'Adresse 2'}) }}
|
||||
{{ form_row(form.zipCode, {'label': 'PLZ'}) }}
|
||||
{{ form_row(form.city, {'label': 'Ort'}) }}
|
||||
{{ form_row(form.maximumPersons, {'label': 'Maximale Personenanzahl'}) }}
|
||||
{{ form_row(form.deposit, {'label': 'Kaution'}) }}
|
||||
|
||||
{#
|
||||
<div class="checkbox">
|
||||
{{ form_widget(form.calendarVisible) }}
|
||||
<label for="{{ form.calendarVisible.vars.id }}">
|
||||
Kalender sichtbar
|
||||
</label>
|
||||
{{ form_errors(form.calendarVisible) }}
|
||||
</div>
|
||||
#}
|
||||
|
||||
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
<button type="submit" value="SEND" id="submit"
|
||||
|
|
@ -287,6 +279,60 @@
|
|||
Speichern
|
||||
</button>
|
||||
</div>
|
||||
<br><br>
|
||||
|
||||
|
||||
|
||||
<h3>Bilder</h3>
|
||||
{% if lodging.images is not empty %}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Bild</th>
|
||||
<th>Pos</th>
|
||||
<th>Name</th>
|
||||
<th>Beschreibung</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for image in lodging.images %}
|
||||
<tr>
|
||||
<td><img src="{{ asset('uploads/images/' ~ image.file) }}" alt="{{ image.description }}" style="width:228px;height:75px;" ></td>
|
||||
<td>{{ image.pos }}</td>
|
||||
<td>{{ image.fileName }}</td>
|
||||
<td>{{ image.description }}</td>
|
||||
<td>
|
||||
<a href="{{ '/admin/fewo/lodgings/' ~ lodging.id ~ '/images/' ~ image.id }}"
|
||||
class="btn btn-primary"
|
||||
>
|
||||
Bearbeiten
|
||||
</a>
|
||||
<a href="{{ '/admin/fewo/lodgings/' ~ lodging.id ~ '/images/' ~ image.id ~ '/delete' }}"
|
||||
class="btn btn-primary"
|
||||
>
|
||||
Löschen
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<h4>Keine Bilder vorhanden</h4>
|
||||
{% endif %}
|
||||
|
||||
<a href="{{ '/admin/fewo/lodgings/' ~ lodging.id ~ '/images/new' }}" class="btn btn-primary">
|
||||
Hinzufügen
|
||||
</a>
|
||||
<a href="/admin/fewo/lodgings/{{ lodging.id }}/images/multi-upload" class="btn btn-primary">
|
||||
Mehrere Bilder hochladen
|
||||
</a>
|
||||
|
||||
<br><br>
|
||||
|
||||
|
||||
|
||||
</div><!-- end form-box -->
|
||||
{{ form_rest(form) }}
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -1,61 +1,73 @@
|
|||
<table class="table">
|
||||
{% for calendar_month in calendar %}
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="7">
|
||||
{{ calendar_month['monthName'] }} {{ calendar_month['year'] }}
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Mo</th>
|
||||
<th>Di</th>
|
||||
<th>Mi</th>
|
||||
<th>Do</th>
|
||||
<th>Fr</th>
|
||||
<th>Sa</th>
|
||||
<th>So</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for weekIndex in 0..5 %}
|
||||
<tr>
|
||||
{% for dayIndex in 0..6 %}
|
||||
{# @var dayState \AppBundle\Util\CalendarDayState #}
|
||||
{% set dayState = calendar_month['data'][(weekIndex * 7) + dayIndex] %}
|
||||
|
||||
{% set is_past_date = dayState.date is not empty and date(dayState.date) < date('now') %}
|
||||
{% set counter = 0 %}
|
||||
{% for calendar_month in calendar %}
|
||||
{% set counter = counter + 1 %}
|
||||
{% if counter%2 != 0 %}
|
||||
<div class="row" style="">
|
||||
{% endif %}
|
||||
|
||||
{# Set cell class #}
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<table class="table calendar-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="7">
|
||||
{{ calendar_month['monthName'] }} {{ calendar_month['year'] }}
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Mo</th>
|
||||
<th>Di</th>
|
||||
<th>Mi</th>
|
||||
<th>Do</th>
|
||||
<th>Fr</th>
|
||||
<th>Sa</th>
|
||||
<th>So</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for weekIndex in 0..5 %}
|
||||
<tr>
|
||||
{% for dayIndex in 0..6 %}
|
||||
{# @var dayState \AppBundle\Util\CalendarDayState #}
|
||||
{% set dayState = calendar_month['data'][(weekIndex * 7) + dayIndex] %}
|
||||
|
||||
<td class="{{ dayState.getCssClass }} {% if dayState.isBookable %}active{% endif %}">
|
||||
{% if dayState.isReserved or dayState.isReservationBegin %}
|
||||
{% if dayState.reservation.id is defined %}
|
||||
<a class="link" href="/admin/fewo/lodgings/{{ lodging.id }}/reservations/{{ dayState.reservation.id }}">
|
||||
{{ dayState.day }}
|
||||
</a>
|
||||
{% else %}
|
||||
ID
|
||||
{% endif %}
|
||||
{% set is_past_date = dayState.date is not empty and date(dayState.date) < date('now') %}
|
||||
|
||||
{% elseif dayState.isBookable and not is_past_date %}
|
||||
<a class="link" href="/admin/fewo/lodgings/{{ lodging.id }}/reservations/new/{{ dayState.day < 10 ? '0':'' }}{{dayState.day}}{{ calendar_month['monthNumber'] < 10 ? '0':'' }}{{calendar_month['monthNumber']}}{{calendar_month['year']}}">
|
||||
{{ dayState.day }}
|
||||
</a>
|
||||
{% elseif dayState.day == 0 %}
|
||||
|
||||
{% else %}
|
||||
{% if dayState.isPastDate %}
|
||||
<del style="color:#989898;">{{ dayState.day }}</del>
|
||||
{% else %}
|
||||
{{ dayState.day }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
{# Set cell class #}
|
||||
|
||||
<td class="{{ dayState.getCssClass }} {% if dayState.isBookable %}active{% endif %}">
|
||||
{% if dayState.isReserved or dayState.isReservationBegin %}
|
||||
{% if dayState.reservation.id is defined %}
|
||||
<a class="link" href="/admin/fewo/lodgings/{{ lodging.id }}/reservations/{{ dayState.reservation.id }}">
|
||||
{{ dayState.day }}
|
||||
</a>
|
||||
{% else %}
|
||||
ID
|
||||
{% endif %}
|
||||
|
||||
{% elseif dayState.isBookable and not is_past_date %}
|
||||
<a class="link" href="/admin/fewo/lodgings/{{ lodging.id }}/reservations/new/{{ dayState.day < 10 ? '0':'' }}{{dayState.day}}{{ calendar_month['monthNumber'] < 10 ? '0':'' }}{{calendar_month['monthNumber']}}{{calendar_month['year']}}">
|
||||
{{ dayState.day }}
|
||||
</a>
|
||||
{% elseif dayState.day == 0 %}
|
||||
|
||||
{% else %}
|
||||
{% if dayState.isPastDate %}
|
||||
<del style="color:#989898;">{{ dayState.day }}</del>
|
||||
{% else %}
|
||||
{{ dayState.day }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% if counter%2 == 0 %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
|
|
|||
|
|
@ -6,31 +6,6 @@
|
|||
<div class="content-copy">
|
||||
<h1>Reservierung bearbeiten für {{ lodging.name }}</h1>
|
||||
|
||||
<h3>Mögliche Saisons</h3>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Von</th>
|
||||
<th>Bis</th>
|
||||
<th>Preis pro Nacht</th>
|
||||
<th>Service-Gebühr</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for lodgingPrice in lodging.prices %}
|
||||
<tr>
|
||||
<td>{{ lodgingPrice.season.name }}</td>
|
||||
<td>{{ lodgingPrice.season.fromDate|date('d-m-y') }}</td>
|
||||
<td>{{ lodgingPrice.season.toDate|date('d-m-y') }}</td>
|
||||
<td>{{ lodgingPrice.perNight }}</td>
|
||||
<td>{{ lodgingPrice.flatPrice }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3>Reservierung</h3>
|
||||
|
||||
<form class="st-booking-form" method="post">
|
||||
|
|
@ -41,8 +16,16 @@
|
|||
|
||||
<div class="form-box">
|
||||
{{ form_row(form.lodging, {label: 'Objekt'}) }}
|
||||
{{ form_row(form.fromDate , {label: 'Von'}) }}
|
||||
{{ form_row(form.toDate, {label: 'Bis'}) }}
|
||||
|
||||
<div class="form-group">
|
||||
<label class="st-required control-label required">Datum</label>
|
||||
<div class="input-daterange input-group" id="date-range">
|
||||
{{ form_widget(form.fromDate) }}
|
||||
<span class="input-group-addon bg-info b-0 text-white">bis</span>
|
||||
{{ form_widget(form.toDate) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ form_row(form.status, {label: 'Status'}) }}
|
||||
{#{{ form_row(form.type, {label: 'Typ'}) }}#}
|
||||
|
||||
|
|
@ -68,6 +51,127 @@
|
|||
>
|
||||
Löschen
|
||||
</a>
|
||||
|
||||
<hr>
|
||||
<h3>Mögliche Saisons</h3>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Von</th>
|
||||
<th>Bis</th>
|
||||
<th>Preis pro Nacht</th>
|
||||
<th>Service-Gebühr</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for lodgingPrice in lodging.prices %}
|
||||
{% if lodgingPrice.season is not empty %}
|
||||
<tr>
|
||||
<td>{{ lodgingPrice.season.name }}</td>
|
||||
<td>{{ lodgingPrice.season.fromDate|date('d-m-y') }}</td>
|
||||
<td>{{ lodgingPrice.season.toDate|date('d-m-y') }}</td>
|
||||
<td>{{ lodgingPrice.perNight }}</td>
|
||||
<td>{{ lodgingPrice.flatPrice }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</section><!-- end section -->
|
||||
{% endblock body %}
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var checkDates = function(date) {
|
||||
var formatted = date.format('DD.MM.YYYY');
|
||||
var reservationDays = "{{ reservationDays }}";
|
||||
return reservationDays.indexOf(formatted) > -1;
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
var currentDate = moment().format("DD.MM.YYYY");
|
||||
|
||||
var startDate = $('#appbundle_feworeservation_fromDate').val();
|
||||
var endDate = $('#appbundle_feworeservation_toDate').val();
|
||||
|
||||
var maxDate = "{{ lastSeason.toDate|date('d-m-y') }}";
|
||||
|
||||
$('#appbundle_feworeservation_fromDate, #appbundle_feworeservation_toDate').daterangepicker({
|
||||
isInvalidDate: checkDates,
|
||||
"minDate": moment(),
|
||||
"maxDate": maxDate,
|
||||
"timePickerSeconds": true,
|
||||
|
||||
|
||||
"locale": {
|
||||
"format": "DD.MM.YYYY",
|
||||
"separator": " - ",
|
||||
"applyLabel": "OK",
|
||||
"cancelLabel": "X",
|
||||
"fromLabel": "Von",
|
||||
"toLabel": "Bis",
|
||||
"customRangeLabel": "Custom",
|
||||
"weekLabel": "W",
|
||||
"daysOfWeek": [
|
||||
"So",
|
||||
"Mo",
|
||||
"Di",
|
||||
"Mi",
|
||||
"Do",
|
||||
"Fr",
|
||||
"Sa"
|
||||
],
|
||||
"monthNames": [
|
||||
"Januar",
|
||||
"Februar",
|
||||
"März",
|
||||
"April",
|
||||
"Kann",
|
||||
"Juni",
|
||||
"Juli",
|
||||
"August",
|
||||
"September",
|
||||
"Oktober",
|
||||
"November",
|
||||
"Dezember"
|
||||
],
|
||||
"firstDay": 1
|
||||
},
|
||||
autoApply: true,
|
||||
autoUpdateInput: false,
|
||||
"startDate": startDate,
|
||||
"endDate": endDate,
|
||||
}, function(start, end, label) {
|
||||
// console.log("New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')");
|
||||
// Lets update the fields manually this event fires on selection of range
|
||||
var selectedStartDate = start.format('DD.MM.YYYY'); // selected start
|
||||
var selectedEndDate = end.format('DD.MM.YYYY'); // selected end
|
||||
|
||||
$checkinInput = $('#appbundle_feworeservation_fromDate');
|
||||
$checkoutInput = $('#appbundle_feworeservation_toDate');
|
||||
|
||||
// Updating Fields with selected dates
|
||||
$checkinInput.val(selectedStartDate);
|
||||
$checkoutInput.val(selectedEndDate);
|
||||
|
||||
// Setting the Selection of dates on calender on CHECKOUT FIELD (To get this it must be binded by Ids not Calss)
|
||||
var checkOutPicker = $checkoutInput.data('daterangepicker');
|
||||
checkOutPicker.setStartDate(selectedStartDate);
|
||||
checkOutPicker.setEndDate(selectedEndDate);
|
||||
|
||||
// Setting the Selection of dates on calender on CHECKIN FIELD (To get this it must be binded by Ids not Calss)
|
||||
var checkInPicker = $checkinInput.data('daterangepicker');
|
||||
checkInPicker.setStartDate(selectedStartDate);
|
||||
checkInPicker.setEndDate(selectedEndDate);
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{% endblock body %}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,31 +6,6 @@
|
|||
<div class="content-copy">
|
||||
<h1>Neue Reservierung anlegen für {{ lodging.name }}</h1>
|
||||
|
||||
<h3>Mögliche Saisons</h3>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Von</th>
|
||||
<th>Bis</th>
|
||||
<th>Preis pro Nacht</th>
|
||||
<th>Service-Gebühr</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for lodgingPrice in lodging.prices %}
|
||||
<tr>
|
||||
<td>{{ lodgingPrice.season.name }}</td>
|
||||
<td>{{ lodgingPrice.season.fromDate|date('d-m-y') }}</td>
|
||||
<td>{{ lodgingPrice.season.toDate|date('d-m-y') }}</td>
|
||||
<td>{{ lodgingPrice.perNight }}</td>
|
||||
<td>{{ lodgingPrice.flatPrice }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3>Reservierung</h3>
|
||||
|
||||
<form class="st-booking-form" method="post">
|
||||
|
|
@ -41,8 +16,16 @@
|
|||
|
||||
<div class="form-box">
|
||||
{{ form_row(form.lodging, {label: 'Objekt'}) }}
|
||||
{{ form_row(form.fromDate , {label: 'Von'}) }}
|
||||
{{ form_row(form.toDate, {label: 'Bis'}) }}
|
||||
|
||||
<div class="form-group">
|
||||
<label class="st-required control-label required">Datum</label>
|
||||
<div class="input-daterange input-group" id="date-range">
|
||||
{{ form_widget(form.fromDate) }}
|
||||
<span class="input-group-addon bg-info b-0 text-white">bis</span>
|
||||
{{ form_widget(form.toDate) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ form_row(form.status, {label: 'Status'}) }}
|
||||
{#{{ form_row(form.type, {label: 'Typ'}) }}#}
|
||||
|
||||
|
|
@ -62,6 +45,126 @@
|
|||
>
|
||||
Zurück
|
||||
</a>
|
||||
<hr>
|
||||
<h3>Mögliche Saisons</h3>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Von</th>
|
||||
<th>Bis</th>
|
||||
<th>Preis pro Nacht</th>
|
||||
<th>Service-Gebühr</th>
|
||||
<th>Mindestbelegung</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for lodgingPrice in lodging.prices %}
|
||||
{% if lodgingPrice.season is not empty %}
|
||||
<tr>
|
||||
<td>{{ lodgingPrice.season.name }}</td>
|
||||
<td>{{ lodgingPrice.season.fromDate|date('d-m-y') }}</td>
|
||||
<td>{{ lodgingPrice.season.toDate|date('d-m-y') }}</td>
|
||||
<td>{{ lodgingPrice.perNight }}</td>
|
||||
<td>{{ lodgingPrice.flatPrice }}</td>
|
||||
<td>{{ lodgingPrice.season.minimumStay }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</section><!-- end section -->
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var checkDates = function(date) {
|
||||
var formatted = date.format('DD.MM.YYYY');
|
||||
var reservationDays = "{{ reservationDays }}";
|
||||
return reservationDays.indexOf(formatted) > -1;
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
var currentDate = moment().format("DD.MM.YYYY");
|
||||
|
||||
var startDate = $('#appbundle_feworeservation_fromDate').val();
|
||||
var endDate = $('#appbundle_feworeservation_toDate').val();
|
||||
|
||||
var maxDate = "{{ lastSeason.toDate|date('d-m-y') }}";
|
||||
|
||||
$('#appbundle_feworeservation_fromDate, #appbundle_feworeservation_toDate').daterangepicker({
|
||||
isInvalidDate: checkDates,
|
||||
"minDate": moment(),
|
||||
"maxDate": maxDate,
|
||||
"timePickerSeconds": true,
|
||||
|
||||
|
||||
"locale": {
|
||||
"format": "DD.MM.YYYY",
|
||||
"separator": " - ",
|
||||
"applyLabel": "OK",
|
||||
"cancelLabel": "X",
|
||||
"fromLabel": "Von",
|
||||
"toLabel": "Bis",
|
||||
"customRangeLabel": "Custom",
|
||||
"weekLabel": "W",
|
||||
"daysOfWeek": [
|
||||
"So",
|
||||
"Mo",
|
||||
"Di",
|
||||
"Mi",
|
||||
"Do",
|
||||
"Fr",
|
||||
"Sa"
|
||||
],
|
||||
"monthNames": [
|
||||
"Januar",
|
||||
"Februar",
|
||||
"März",
|
||||
"April",
|
||||
"Kann",
|
||||
"Juni",
|
||||
"Juli",
|
||||
"August",
|
||||
"September",
|
||||
"Oktober",
|
||||
"November",
|
||||
"Dezember"
|
||||
],
|
||||
"firstDay": 1
|
||||
},
|
||||
autoApply: true,
|
||||
autoUpdateInput: false,
|
||||
"startDate": startDate,
|
||||
"endDate": endDate,
|
||||
}, function(start, end, label) {
|
||||
// console.log("New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')");
|
||||
// Lets update the fields manually this event fires on selection of range
|
||||
var selectedStartDate = start.format('DD.MM.YYYY'); // selected start
|
||||
var selectedEndDate = end.format('DD.MM.YYYY'); // selected end
|
||||
|
||||
$checkinInput = $('#appbundle_feworeservation_fromDate');
|
||||
$checkoutInput = $('#appbundle_feworeservation_toDate');
|
||||
|
||||
// Updating Fields with selected dates
|
||||
$checkinInput.val(selectedStartDate);
|
||||
$checkoutInput.val(selectedEndDate);
|
||||
|
||||
// Setting the Selection of dates on calender on CHECKOUT FIELD (To get this it must be binded by Ids not Calss)
|
||||
var checkOutPicker = $checkoutInput.data('daterangepicker');
|
||||
checkOutPicker.setStartDate(selectedStartDate);
|
||||
checkOutPicker.setEndDate(selectedEndDate);
|
||||
|
||||
// Setting the Selection of dates on calender on CHECKIN FIELD (To get this it must be binded by Ids not Calss)
|
||||
var checkInPicker = $checkinInput.data('daterangepicker');
|
||||
checkInPicker.setStartDate(selectedStartDate);
|
||||
checkInPicker.setEndDate(selectedEndDate);
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock body %}
|
||||
|
|
@ -17,11 +17,22 @@
|
|||
{%- endblock %}
|
||||
|
||||
{% block date_widget -%}
|
||||
{% set range = 0 %}
|
||||
{% for attrname, attrvalue in attr %}
|
||||
{% if attrname == 'data-range' %}
|
||||
{% set range = 1 %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if range == 1 -%}
|
||||
{{- parent() -}}
|
||||
{%- else -%}
|
||||
{% set attr = attr|merge({class: (attr.class|default('') ~ ' datepicker')|trim}) -%}
|
||||
<div class="input-group">
|
||||
<div class="input-group">
|
||||
{{ parent() -}}
|
||||
<label for="{{ id }}" class="input-group-addon"><i class="fa fa-calendar"></i></label>
|
||||
</div>
|
||||
{%- endif -%}
|
||||
{%- endblock %}
|
||||
|
||||
{% block st_plain_date_widget -%}
|
||||
|
|
|
|||
|
|
@ -219,6 +219,11 @@
|
|||
<p>Bitte klicken Sie einen Anreisetermin (grüne Zahl), um zur Buchungsmaske zu gelagen.</p>
|
||||
|
||||
<style>
|
||||
.table > tbody > tr > td.normal {
|
||||
background-color: rgba(88, 155, 92, 0.20);
|
||||
padding: 8px;
|
||||
|
||||
}
|
||||
.table > tbody > tr > td.calendar-day-non {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
|
@ -244,6 +249,25 @@
|
|||
background: linear-gradient(145deg, #f0bcbc 49%,#f2f2f2 50%,#C5DCC6 51%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f0bcbc', endColorstr='#C5DCC6',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
|
||||
}
|
||||
.table > tbody > tr > .calendar-day-reservation-begin {
|
||||
background-color: #f0bcbc;
|
||||
background: -moz-linear-gradient(to bottom right, #deebde 0%, #deebde 49%, #f0bcbc 50%, #f0bcbc 100%);
|
||||
background: -webkit-gradient(linear, left top, right bottom, color-stop(0%, #deebde), color-stop(49%, #deebde), color-stop(50%, #f0bcbc), color-stop(100%, #f0bcbc));
|
||||
background: -webkit-linear-gradient(to bottom right, #deebde 0%, #deebde 49%, #f0bcbc 50%, #f0bcbc 100%);
|
||||
background: -o-linear-gradient(to bottom right, #deebde 0%, #deebde 49%, #f0bcbc 50%, #f0bcbc 100%);
|
||||
background: -ms-linear-gradient(to bottom right, #deebde 0%, #deebde 49%, #f0bcbc 50%, #f0bcbc 100%);
|
||||
background: linear-gradient(to bottom right, #deebde 0%, #deebde 49%, #f0bcbc 50%, #f0bcbc 100%);
|
||||
}
|
||||
.table > tbody > tr > .calendar-day-reservation-end {
|
||||
background-color: #f2f2f2;
|
||||
background: -moz-linear-gradient(to bottom right, #f0bcbc 0%, #f0bcbc 49%, #deebde 50%, #deebde 100%);
|
||||
background: -webkit-gradient(linear, left top, right bottom, color-stop(0%, #f0bcbc), color-stop(49%, #f0bcbc), color-stop(50%, #deebde), color-stop(100%, #deebde));
|
||||
background: -webkit-linear-gradient(to bottom right, #f0bcbc 0%, #f0bcbc 49%, #deebde 50%, #deebde 100%);
|
||||
background: -o-linear-gradient(to bottom right, #f0bcbc 0%, #f0bcbc 49%, #deebde 50%, #deebde 100%);
|
||||
background: -ms-linear-gradient(to bottom right, #f0bcbc 0%, #f0bcbc 49%, #deebde 50%, #deebde 100%);
|
||||
background: linear-gradient(to bottom right, #f0bcbc 0%, #f0bcbc 49%, #deebde 50%, #deebde 100%);
|
||||
}
|
||||
|
||||
.table > tbody > tr > td.active {
|
||||
background-color: rgba(88, 155, 92, 0.35);
|
||||
padding: 0;
|
||||
|
|
@ -251,6 +275,7 @@
|
|||
.table > tbody > tr > td.active:hover {
|
||||
background-color: #648859;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td a {
|
||||
color: #5a5a5a;
|
||||
font-weight: 700;
|
||||
|
|
@ -258,6 +283,7 @@
|
|||
display: block;
|
||||
height: 100%;
|
||||
padding: 8px;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td:hover a {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue