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:
adametz 2018-08-21 14:39:31 +00:00
parent 7117fc6201
commit a5eb342bd3
35 changed files with 5301 additions and 265 deletions

View file

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