forked from Ruderverein-Donau-Linz/rowt
[TASK] style boat reservation
This commit is contained in:
@ -1,18 +1,25 @@
|
||||
{% macro boatreservation() %}
|
||||
{% if reservations %}
|
||||
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow grid gap-3"
|
||||
style="margin-top: 10px">
|
||||
<h2 class="h2">Bootsreservierungen</h2>
|
||||
<div class="p2 text-center" style="margin-bottom: 10px;">
|
||||
<ul style=" justify-content: space-around; padding: 0; list-style: none">
|
||||
{% for reservation in reservations %}
|
||||
<li>
|
||||
{{ reservation.boat.name }} • {{ reservation.start_date }}
|
||||
{% if reservation.end_date != reservation.start_date %}- {{ reservation.end_date }}{% endif %}
|
||||
• Uhrzeit: {{ reservation.time_desc }} • Zweck: {{ reservation.usage }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="bg-white dark:bg-primary-900 rounded-md shadow pb-2 mt-3">
|
||||
<h2 class="h2">Reservierungen ({{ reservations | length }})</h2>
|
||||
<div class="grid grid-cols-1 gap-3 mb-3 w-full">
|
||||
{% for reservation in reservations %}
|
||||
<div class="pt-2 px-3 border-t text-primary-900 dark:text-white">
|
||||
<strong class="block">
|
||||
{{ reservation.start_date | date(format="%d.%m.%Y") }}
|
||||
{% if reservation.end_date != reservation.start_date %}
|
||||
-
|
||||
{{ reservation.end_date | date(format="%d.%m.%Y") }}
|
||||
{% endif %}
|
||||
<small>({{ reservation.time_desc }})</small>
|
||||
</strong>
|
||||
<span class="block">
|
||||
{{ reservation.boat.name }}
|
||||
<small>({{ reservation.user_applicant.name }})</small>
|
||||
</span>
|
||||
<span class="text-sm italic">{{ reservation.usage }}</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
@ -75,6 +82,8 @@
|
||||
{% endif %}
|
||||
<a href="/boatdamage"
|
||||
class="block w-100 py-2 hover:text-primary-600 border-t">Bootsschaden</a>
|
||||
<a href="/boatreservation"
|
||||
class="block w-100 py-2 hover:text-primary-600 border-t">Bootsreservierung</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
@ -146,7 +155,7 @@
|
||||
{% if required %}required="required"{% endif %}>
|
||||
{% if default %}<option selected value>{{ default }}</option>{% endif %}
|
||||
{% for d in data %}
|
||||
<option value="{{ d.id }}" {% if d.id == selected_id %}selected{% endif %} {% if extras != '' %} {% for extra in extras %} {% if extra != 'on_water' and d[extra] %} data-{{ extra }}={{ d[extra] }} {% else %} {% if d[extra] %}disabled{% endif %} {% endif %} {% endfor %} {% endif %} {% if show_seats %} data-custom-properties='{"amount_seats": {{ d["amount_seats"] }}, "owner": "{{ d["owner"] }}", "default_destination": "{{ d["default_destination"] }}", "boat_in_ottensheim": {{ d["location_id"] == 2 }}, "boat_reserved_today": {{ d["reserved_today"] }}}'{% endif %}>
|
||||
<option value="{{ d.id }}" {% if d.id == selected_id %}selected{% endif %} {% if extras != '' %} {% for extra in extras %} {% if extra != 'on_water' and d[extra] %} data- {{ extra }}={{ d[extra] }} {% else %} {% if d[extra] %}disabled{% endif %} {% endif %} {% endfor %} {% endif %} {% if show_seats %} data-custom-properties='{"amount_seats": {{ d["amount_seats"] }}, "owner": "{{ d["owner"] }}", "default_destination": "{{ d["default_destination"] }}", "boat_in_ottensheim": {{ d["location_id"] == 2 }}, "boat_reserved_today": {{ d["reserved_today"] }}}' {% endif %}>
|
||||
{% for displa in display -%}
|
||||
{%- if d[displa] -%}
|
||||
{{- d[displa] -}}
|
||||
|
Reference in New Issue
Block a user