Group FEWO | Upload Image FEWO | POS

Gruppen für die FEWO
Upload Images bei den Gruppen + vor und nach
Pos Sortierungen bei den Images
Einbau in den Frontend
Silder Bilder zuweisen  pre + page + post

git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3367 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
adametz 2018-02-03 20:36:35 +00:00
parent ff986cd437
commit 1293c19bc6
25 changed files with 1249 additions and 37 deletions

View file

@ -0,0 +1,45 @@
{% extends 'admin.html.twig' %}
{% form_theme form 'default/form/theme.html.twig' %}
{% block body %}
<section class="clearfix">
<div class="content-copy">
<h1>Bild für Gruppe "{{ lodgingGroup.name }}" anlegen / bearbeiten</h1>
<form class="st-booking-form" method="post" enctype="multipart/form-data">
{{ form_errors(form) }}
<div class="form-box">
{% if is_new %}
{{ form_row(form.file, {label: 'Bild'}) }}
{% else %}
<div>
<img src="{{ asset('uploads/images/' ~ image_file_name) }}" alt="{{ image.description }}" style="width:456px;height:151px;" >
</div>
{% endif %}
{{ form_row(form.fileName, {label: 'Name'}) }}
{{ form_row(form.pos, {label: 'Position'}) }}
{{ form_row(form.comp, {label: 'Comnp'}) }}
{{ form_row(form.description, {label: 'Beschreibung'}) }}
<div class="col-md-12 col-sm-12 col-xs-12">
<button type="submit" value="SEND" id="submit"
class="btn btn-primary btn-lg border-radius"
>
Speichern
</button>
</div>
</div><!-- end form-box -->
{{ form_widget(form._token) }}
</form>
<a href="{{ '/admin/fewo/lodging/group/' ~ lodgingGroup.id }}"
class="btn btn-primary"
rel="nofollow"
>
Zurück
</a>
</div>
</section><!-- end section -->
{% endblock body %}

View file

@ -0,0 +1,35 @@
{% extends 'admin.html.twig' %}
{% form_theme form 'default/form/theme.html.twig' %}
{% block body %}
<section class="clearfix">
<div class="content-copy">
<h1>Mehrere Bilder für Gruppe "{{ lodgingGroup.name }}" hochladen</h1>
<form class="st-booking-form" method="post" enctype="multipart/form-data">
{{ form_errors(form) }}
<div class="form-box">
{{ form(form) }}
<br/>
<div class="col-md-12 col-sm-12 col-xs-12">
<button type="submit" value="SEND" id="submit"
class="btn btn-primary btn-lg border-radius"
>
Speichern
</button>
</div>
</div>
</form>
<a href="{{ '/admin/fewo/lodging/group/' ~ lodgingGroup.id }}"
class="btn btn-primary"
rel="nofollow"
>
Zurück
</a>
</div>
</section>
{% endblock body %}

View file

@ -19,6 +19,7 @@
</div>
{% endif %}
{{ form_row(form.fileName, {label: 'Name'}) }}
{{ form_row(form.pos, {label: 'Position'}) }}
{{ form_row(form.description, {label: 'Beschreibung'}) }}
<div class="col-md-12 col-sm-12 col-xs-12">

View file

@ -0,0 +1,140 @@
{% extends 'admin.html.twig' %}
{% form_theme form 'default/form/theme.html.twig' %}
{% block body %}
<section class="clearfix">
<div class="content-copy">
<h1>Gruppe {{ lodgingGroup.name }} bearbeiten</h1>
<form class="st-booking-form" method="post">
{{ form_errors(form) }}
<div id="message"></div>
<div class="form-box">
{{ form_row(form.name, {'label': 'Name'}) }}
<br><br>
<h3>Bilder vor</h3>
{% if lodgingGroup.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 lodgingGroup.images %}
{% if image.comp == 'pre' %}
<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/group/' ~ lodgingGroup.id ~ '/images/' ~ image.id }}"
class="btn btn-primary"
>
Bearbeiten
</a>
<a href="{{ '/admin/fewo/lodgings/group/' ~ lodgingGroup.id ~ '/images/' ~ image.id ~ '/delete' }}"
class="btn btn-primary"
>
Löschen
</a>
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
{% else %}
<h4>Keine Bilder vorhanden</h4>
{% endif %}
<a href="{{ '/admin/fewo/lodgings/group/pre/' ~ lodgingGroup.id ~ '/images/new' }}" class="btn btn-primary">
Hinzufügen
</a>
<a href="/admin/fewo/lodgings/group/pre/{{ lodgingGroup.id }}/images/multi-upload" class="btn btn-primary">
Mehrere Bilder hochladen
</a>
<br><br>
<h3>Bilder nach</h3>
{% if lodgingGroup.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 lodgingGroup.images %}
{% if image.comp == 'post' %}
<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/group/' ~ lodgingGroup.id ~ '/images/' ~ image.id }}"
class="btn btn-primary"
>
Bearbeiten
</a>
<a href="{{ '/admin/fewo/lodgings/group/' ~ lodgingGroup.id ~ '/images/' ~ image.id ~ '/delete' }}"
class="btn btn-primary"
>
Löschen
</a>
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
{% else %}
<h4>Keine Bilder vorhanden</h4>
{% endif %}
<a href="{{ '/admin/fewo/lodgings/group/post/' ~ lodgingGroup.id ~ '/images/new' }}" class="btn btn-primary">
Hinzufügen
</a>
<a href="/admin/fewo/lodgings/group/post/{{ lodgingGroup.id }}/images/multi-upload" class="btn btn-primary">
Mehrere Bilder hochladen
</a>
<br><br>
<div class="col-md-12 col-sm-12 col-xs-12">
<button type="submit" value="SEND" id="submit"
class="btn btn-primary btn-lg border-radius"
>
Speichern
</button>
</div>
</div><!-- end form-box -->
{{ form_rest(form) }}
</form>
<a href="/admin/fewo/lodgings"
class="btn btn-primary"
rel="nofollow"
>
Zurück
</a>
</div>
</section><!-- end section -->
{% endblock body %}

View file

@ -18,20 +18,20 @@
</thead>
<tbody>
{% if lodgings is not empty %}
{% for lodging in lodgings %}
{% if lodgingGroups is not empty %}
{% for lodgingGroup in lodgingGroups %}
<tr>
<td>{{ lodging.id }}</td>
<td>{{ lodging.name }}</td>
<td>{{ lodging.type }}</td>
<td>- ({{ lodgingGroup.id }}) -</td>
<td>{{ lodgingGroup.name }}</td>
<td>Gruppe</td>
<td>
<a href="{{ '/admin/fewo/lodgings/' ~ lodging.id }}"
<a href="{{ '/admin/fewo/lodging/group/' ~ lodgingGroup.id }}"
class="btn btn-primary"
rel="nofollow"
>
Bearbeiten
</a>
<a href="{{ '/admin/fewo/lodgings/' ~ lodging.id ~ '/delete' }}"
<a href="{{ '/admin/fewo/lodging/group/' ~ lodgingGroup.id ~ '/delete' }}"
class="btn btn-primary"
rel="nofollow"
>
@ -39,6 +39,31 @@
</a>
</td>
</tr>
{% if lodgingGroup.lodgings is not empty %}
{% for lodging in lodgingGroup.lodgings %}
<tr>
<td>{{ lodging.id }}</td>
<td>{{ lodging.name }}</td>
<td>{{ lodging.type }}</td>
<td>
<a href="{{ '/admin/fewo/lodgings/' ~ lodging.id }}"
class="btn btn-primary"
rel="nofollow"
>
Bearbeiten
</a>
<a href="{{ '/admin/fewo/lodgings/' ~ lodging.id ~ '/delete' }}"
class="btn btn-primary"
rel="nofollow"
>
Löschen
</a>
</td>
</tr>
{% endfor %}
{% endif %}
{% endfor %}
{% else %}
<h2>Keine Objekte verfügbar</h2>
@ -55,6 +80,17 @@
</td>
</tr>
<tr>
<td>
<a href="/admin/fewo/lodgings/group/new"
class="btn btn-primary"
rel="nofollow"
>
Gruppe hinzufügen
</a>
</td>
</tr>
</tbody>
</table>
</div>

View file

@ -15,6 +15,7 @@
<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'}) }}
@ -43,6 +44,7 @@
<thead>
<tr>
<th>Bild</th>
<th>Pos</th>
<th>Name</th>
<th>Beschreibung</th>
<th></th>
@ -52,6 +54,7 @@
{% 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>

View file

@ -43,9 +43,16 @@
<td class="{{ cell_class }}">
{% if dayState.isReserved and not dayState.isReservationEnd %}
<a href="{{ '/admin/fewo/lodgings/' ~ lodging.id ~ '/reservations/' ~ dayState.reservation.id }}">
{{ dayState.day }}
</a>
{% if dayState.reservation.id is defined %}
<a 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 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 }}

View file

@ -0,0 +1,39 @@
{% extends 'admin.html.twig' %}
{% form_theme form 'default/form/theme.html.twig' %}
{% block body %}
<section class="clearfix">
<div class="content-copy">
<h1>Neue Gruppe anlegen</h1>
<form class="st-booking-form" method="post">
{{ form_errors(form) }}
<div id="message"></div>
<div class="form-box">
{{ form_row(form.name, {label: 'Name'}) }}
<div class="col-md-12 col-sm-12 col-xs-12">
<button type="submit" value="SEND" id="submit"
class="btn btn-primary btn-lg border-radius"
>
Speichern
</button>
</div>
</div><!-- end form-box -->
{{ form_rest(form) }}
</form>
<a href="/admin/fewo/lodgings"
class="btn btn-primary"
rel="nofollow"
>
Zurück
</a>
</div>
</section><!-- end section -->
{% endblock body %}