{% import "includes/macros" as macros %} {% import "includes/forms/log" as log %} {% extends "base" %} {% block content %}

Hängerreservierungen

Neue Reservierung {% include "includes/plus-icon" %} Neue Reservierung eintragen

{% for reservation in trailerreservations %} {% set allowed_to_edit = false %} {% if loggedin_user %} {% if loggedin_user.id == reservation.user_applicant.id or "admin" in loggedin_user.roles %} {% set allowed_to_edit = true %} {% endif %} {% endif %}
Hänger: {{ reservation.trailer.name }}
Reservierung: {{ reservation.user_applicant.name }}
Datum: {{ reservation.start_date }} {% if reservation.end_date != reservation.start_date %} - {{ reservation.end_date }} {% endif %}
{% if not allowed_to_edit %} Uhrzeit: {{ reservation.time_desc }}
Zweck: {{ reservation.usage }} {% endif %} {% if allowed_to_edit %}
{{ macros::input(label='Uhrzeit', name='time_desc', id=loop.index, type="text", value=reservation.time_desc, readonly=false) }} {{ macros::input(label='Zweck', name='usage', id=loop.index, type="text", value=reservation.usage, readonly=false) }}
{% endif %}
{% endfor %}
{% endblock content %}