Merge branch 'allow-reservation-edits' into staging
# Conflicts: # src/tera/boatreservation.rs
This commit is contained in:
@ -2,7 +2,8 @@
|
||||
<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 %}
|
||||
{% for _, reservations_for_event in reservations %}
|
||||
{% set reservation = reservations_for_event[0] %}
|
||||
<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") }}
|
||||
@ -13,7 +14,10 @@
|
||||
<small>({{ reservation.time_desc }})</small>
|
||||
</strong>
|
||||
<span class="block">
|
||||
{{ reservation.boat.name }}
|
||||
{% for reservation in reservations_for_event %}
|
||||
{{ reservation.boat.name }}
|
||||
{% if not loop.last %}+{% endif %}
|
||||
{% endfor %}
|
||||
<small>({{ reservation.user_applicant.name }})</small>
|
||||
</span>
|
||||
<span class="text-sm italic">{{ reservation.usage }}</span>
|
||||
@ -33,7 +37,24 @@
|
||||
{{ loggedin_user.name }}
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<div class="flex items-center">
|
||||
{% if loggedin_user.amount_unread_notifications > 0 %}
|
||||
<a href="/#notification"
|
||||
class="relative inline-flex items-end ms-2 me-3">
|
||||
<svg height="20"
|
||||
width="24"
|
||||
aria-hidden="true"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="currentColor"
|
||||
viewBox="0 0 20 24">
|
||||
<path d="M1.5 8.67v8.58a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3V8.67l-8.928 5.493a3 3 0 0 1-3.144 0L1.5 8.67Z" />
|
||||
<path d="M22.5 6.908V6.75a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3v.158l9.714 5.978a1.5 1.5 0 0 0 1.572 0L22.5 6.908Z" />
|
||||
</svg>
|
||||
<small class="bg-red-500 rounded-full w-3 h-3 inline-flex justify-center items-center absolute p-1 notification">
|
||||
{{ loggedin_user.amount_unread_notifications }}
|
||||
</small>
|
||||
</a>
|
||||
{% endif %}
|
||||
<a href="#"
|
||||
class="inline-flex justify-center rounded-md bg-primary-600 mx-1 px-3 py-2 text-sm font-semibold text-white hover:bg-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 cursor-pointer"
|
||||
data-sidebar="true"
|
||||
@ -163,18 +184,24 @@
|
||||
<div class="p-2 border border-t-0 border-{{ bg }} mb-4 rounded-b-md">
|
||||
{% if participants | length > 0 %}
|
||||
{% for rower in participants %}
|
||||
{{ rower.name }}
|
||||
{% if rower.is_guest %}<small class="text-gray-600 dark:text-gray-100">(Scheckbuch)</small>{% endif %}
|
||||
{% if rower.is_real_guest %}
|
||||
<small class="text-gray-600 dark:text-gray-100">(Gast)</small>
|
||||
{% if allow_removing %}
|
||||
<a href="/planned/remove/{{ trip_details_id }}/{{ rower.name }}"
|
||||
class="btn btn-attention btn-fw">Abmelden</a>
|
||||
<div class="relative">
|
||||
{{ rower.name }}
|
||||
{% if rower.is_guest %}<small class="text-gray-600 dark:text-gray-100">(Scheckbuch)</small>{% endif %}
|
||||
{% if rower.is_real_guest %}
|
||||
<small class="text-gray-600 dark:text-gray-100">(Gast)</small>
|
||||
{% if allow_removing %}
|
||||
<a href="/planned/remove/{{ trip_details_id }}/{{ rower.name }}"
|
||||
class="absolute r-0 bg-red-500 w-5 h-5 text-white rounded-full flex items-center justify-center transform rotate-45 top-0 right-0">
|
||||
<svg class="inline h-5 w-5" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
||||
<path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"></path>
|
||||
</svg>
|
||||
<span class="sr-only">Abmelden</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<span class="hidden">(angemeldet seit
|
||||
{{ rower.registered_at }})</span>
|
||||
<br />
|
||||
<span class="hidden">(angemeldet seit
|
||||
{{ rower.registered_at }})</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{{ text }}
|
||||
|
@ -2,7 +2,11 @@
|
||||
{% extends "base" %}
|
||||
{% block content %}
|
||||
<div class="max-w-screen-lg w-full">
|
||||
<h1 class="h1">Ruderassistent</h1>
|
||||
<h1 class="h1">
|
||||
Ruder
|
||||
<wbr />
|
||||
assistent
|
||||
</h1>
|
||||
<div class="grid gap-3 my-5">
|
||||
<div class="m-auto">
|
||||
<a href="/planned"
|
||||
@ -11,9 +15,15 @@
|
||||
<span class="text-xl px-3">Geplante Ausfahrten</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
|
||||
<div id="notification"
|
||||
class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
|
||||
role="alert">
|
||||
<h2 class="h2">Nachrichten</h2>
|
||||
{% if loggedin_user.amount_unread_notifications > 10 %}
|
||||
<div class="text-primary-950 dark:text-white bg-gray-200 dark:bg-primary-950 bg-opacity-80 text-center pb-3 px-3">
|
||||
Du hast viele ungelesene Benachrichtigungen. Um deine Oberfläche übersichtlich zu halten und wichtige Updates nicht zu verpassen, nimm dir bitte einen Moment Zeit sie zu überprüfen und als gelesen zu markieren (✓).
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="divide-y">
|
||||
{% for notification in notifications %}
|
||||
{% if not notification.read_at %}
|
||||
@ -38,8 +48,8 @@
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<details class="py-3 bg-gray-200 dark:bg-primary-950 rounded-b-md">
|
||||
<summary class="px-3">Vergangene Nachrichten (14 Tage)</summary>
|
||||
<details class="py-3 border-t rounded-b-md">
|
||||
<summary class="px-3 cursor-pointer">Vergangene Nachrichten (14 Tage)</summary>
|
||||
<div class="divide-y text-sm">
|
||||
{% for notification in notifications %}
|
||||
{% if notification.read_at %}
|
||||
|
Reference in New Issue
Block a user