format tera files
@ -5,15 +5,16 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="max-w-screen-lg w-full">
|
||||
<h1 class="h1">Boats</h1>
|
||||
{{ boat::new() }}
|
||||
<div class="max-w-screen-lg w-full">
|
||||
<h1 class="h1">Boats</h1>
|
||||
{{ boat::new() }}
|
||||
|
||||
<div class="bg-primary-100 p-3 rounded-b-md grid gap-4">
|
||||
{% for boat in boats %}
|
||||
{{ boat::edit(boat=boat, uuid=loop.index) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-primary-100 p-3 rounded-b-md grid gap-4">
|
||||
{% for boat in boats %}
|
||||
{{ boat::edit(boat=boat, uuid=loop.index) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
|
@ -3,69 +3,71 @@
|
||||
{% extends "base" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="max-w-screen-lg w-full">
|
||||
{% if flash %}
|
||||
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
||||
{% endif %}
|
||||
<div class="max-w-screen-lg w-full">
|
||||
{% if flash %}
|
||||
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
||||
{% endif %}
|
||||
|
||||
<h1 class="h1">Users</h1>
|
||||
<h1 class="h1">Users</h1>
|
||||
|
||||
<form action="/admin/user/new" method="post" class="mt-4 bg-primary-900 rounded-md text-white px-3 pb-3 pt-2 sm:flex items-end justify-between">
|
||||
<div class="w-full">
|
||||
<h2 class="text-md font-bold mb-2 uppercase tracking-wide">Neuen User hinzufügen</h2>
|
||||
<div class="grid md:grid-cols-3">
|
||||
<div>
|
||||
<label for="name" class="sr-only">Name</label>
|
||||
<input type="text" name="name" class="relative block rounded-md border-0 py-1.5 px-2 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:z-10 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6 mb-2 md:mb-0" placeholder="Name"/>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<label for="is_guest" class="flex items-center cursor-pointer hover:text-gray-100"><input type="checkbox" id="is_guest" name="is_guest" class="h-4 w-4 accent-gray-200 mr-2" checked="true"/> Gast</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<input value="Hinzufügen" type="submit" class="w-28 mt-2 sm:mt-0 rounded-md bg-primary-500 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"/>
|
||||
</div>
|
||||
</form>
|
||||
<form action="/admin/user/new" method="post" class="mt-4 bg-primary-900 rounded-md text-white px-3 pb-3 pt-2 sm:flex items-end justify-between">
|
||||
<div class="w-full">
|
||||
<h2 class="text-md font-bold mb-2 uppercase tracking-wide">Neuen User hinzufügen</h2>
|
||||
<div class="grid md:grid-cols-3">
|
||||
<div>
|
||||
<label for="name" class="sr-only">Name</label>
|
||||
<input type="text" name="name" class="relative block rounded-md border-0 py-1.5 px-2 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:z-10 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6 mb-2 md:mb-0" placeholder="Name"/>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<label for="is_guest" class="flex items-center cursor-pointer hover:text-gray-100"><input type="checkbox" id="is_guest" name="is_guest" class="h-4 w-4 accent-gray-200 mr-2" checked="true"/>
|
||||
Gast</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<input value="Hinzufügen" type="submit" class="w-28 mt-2 sm:mt-0 rounded-md bg-primary-500 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"/>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- START filterBar -->
|
||||
<div class="bg-primary-200 p-3 mt-4 rounded-t-md">
|
||||
<label for="name" class="sr-only">Suche</label>
|
||||
<input type="search" name="name" id="filter-js" class="w-full relative block rounded-md border-0 py-1.5 px-2 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:z-10 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6 mb-2 md:mb-0" placeholder="Suchen nach..."/>
|
||||
</div>
|
||||
<!-- END filterBar -->
|
||||
<!-- START filterBar -->
|
||||
<div class="bg-primary-200 p-3 mt-4 rounded-t-md">
|
||||
<label for="name" class="sr-only">Suche</label>
|
||||
<input type="search" name="name" id="filter-js" class="w-full relative block rounded-md border-0 py-1.5 px-2 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:z-10 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6 mb-2 md:mb-0" placeholder="Suchen nach..."/>
|
||||
</div>
|
||||
<!-- END filterBar -->
|
||||
|
||||
<div class="bg-primary-100 p-3 rounded-b-md grid gap-4">
|
||||
<div id="filter-result-js" class="text-primary-950"></div>
|
||||
{% for user in users %}
|
||||
<form action="/admin/user" data-filterable="true" data-filter="{{ user.name }}" method="post" class="bg-white p-3 rounded-md flex items-end md:items-center justify-between">
|
||||
<div class="w-full">
|
||||
<input type="hidden" name="id" value="{{ user.id }}" />
|
||||
<div class="font-bold mb-1">{{ user.name }}
|
||||
{% if user.last_access %}
|
||||
(last access: {{ user.last_access | date }})
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid md:grid-cols-3">
|
||||
{{ macros::checkbox(label='Gast', name='is_guest', id=loop.index , checked=user.is_guest) }}
|
||||
{{ macros::checkbox(label='Steuerberechtigter', name='is_cox', id=loop.index , checked=user.is_cox) }}
|
||||
{{ macros::checkbox(label='Admin', name='is_admin', id=loop.index , checked=user.is_admin) }}
|
||||
</div>
|
||||
{% if user.pw %}
|
||||
<a class="inline-block mt-1 text-primary-600 hover:text-primary-900 underline" href="/admin/user/{{ user.id }}/reset-pw">Passwort zurücksetzen</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid gap-3">
|
||||
<a href="/admin/user/{{ user.id }}/delete" class="inline-block btn btn-alert" onclick="return confirm('Wirklich löschen?');">
|
||||
{% include "includes/delete-icon" %}
|
||||
Löschen
|
||||
</a>
|
||||
<input value="Ändern" type="submit" class="w-28 btn btn-primary"/>
|
||||
</div>
|
||||
</form>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="bg-primary-100 p-3 rounded-b-md grid gap-4">
|
||||
<div id="filter-result-js" class="text-primary-950"></div>
|
||||
{% for user in users %}
|
||||
<form action="/admin/user" data-filterable="true" data-filter="{{ user.name }}" method="post" class="bg-white p-3 rounded-md flex items-end md:items-center justify-between">
|
||||
<div class="w-full">
|
||||
<input type="hidden" name="id" value="{{ user.id }}"/>
|
||||
<div class="font-bold mb-1">{{ user.name }}
|
||||
{% if user.last_access %}
|
||||
(last access:
|
||||
{{ user.last_access | date }})
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid md:grid-cols-3">
|
||||
{{ macros::checkbox(label='Gast', name='is_guest', id=loop.index , checked=user.is_guest) }}
|
||||
{{ macros::checkbox(label='Steuerberechtigter', name='is_cox', id=loop.index , checked=user.is_cox) }}
|
||||
{{ macros::checkbox(label='Admin', name='is_admin', id=loop.index , checked=user.is_admin) }}
|
||||
</div>
|
||||
{% if user.pw %}
|
||||
<a class="inline-block mt-1 text-primary-600 hover:text-primary-900 underline" href="/admin/user/{{ user.id }}/reset-pw">Passwort zurücksetzen</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid gap-3">
|
||||
<a href="/admin/user/{{ user.id }}/delete" class="inline-block btn btn-alert" onclick="return confirm('Wirklich löschen?');">
|
||||
{% include "includes/delete-icon" %}
|
||||
Löschen
|
||||
</a>
|
||||
<input value="Ändern" type="submit" class="w-28 btn btn-primary"/>
|
||||
</div>
|
||||
</form>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
|
@ -1,39 +1,39 @@
|
||||
{% extends "base" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="w-full max-w-md space-y-8">
|
||||
<div>
|
||||
<img class="mx-auto h-16 w-auto" src="https://rudernlinz.at/wp-content/uploads/2021/02/cropped-logo.png" alt="Logo Ruderassistent">
|
||||
<h1 class="mt-6 h1">Ruderassistent</h1>
|
||||
</div>
|
||||
<div class="w-full max-w-md space-y-8">
|
||||
<div>
|
||||
<img class="mx-auto h-16 w-auto" src="https://rudernlinz.at/wp-content/uploads/2021/02/cropped-logo.png" alt="Logo Ruderassistent">
|
||||
<h1 class="mt-6 h1">Ruderassistent</h1>
|
||||
</div>
|
||||
|
||||
{% if flash %}
|
||||
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
||||
{% endif %}
|
||||
<form class="mt-8 space-y-6" method="post" action="/auth">
|
||||
<input type="hidden" name="remember" value="true">
|
||||
<div class="-space-y-px rounded-md shadow-sm">
|
||||
<div>
|
||||
{% if name %}
|
||||
{{ macros::input(label='Name', name='name', type='input', required=true, class='rounded-t-md',hide_label=true,value=name, autofocus=true) }}
|
||||
{% else %}
|
||||
{{ macros::input(label='Name', name='name', type='input', required=true, class='rounded-t-md',hide_label=true, autofocus=true) }}
|
||||
{% if flash %}
|
||||
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
||||
{% endif %}
|
||||
<form class="mt-8 space-y-6" method="post" action="/auth">
|
||||
<input type="hidden" name="remember" value="true">
|
||||
<div class="-space-y-px rounded-md shadow-sm">
|
||||
<div>
|
||||
{% if name %}
|
||||
{{ macros::input(label='Name', name='name', type='input', required=true, class='rounded-t-md',hide_label=true,value=name, autofocus=true) }}
|
||||
{% else %}
|
||||
{{ macros::input(label='Name', name='name', type='input', required=true, class='rounded-t-md',hide_label=true, autofocus=true) }}
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
{{ macros::input(label='Passwort', name='password', type='password', class='rounded-b-md',hide_label=true) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
{{ macros::input(label='Passwort', name='password', type='password', class='rounded-b-md',hide_label=true) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button type="submit" class="group relative flex w-full justify-center btn btn-primary">
|
||||
<span class="absolute inset-y-0 left-0 flex items-center pl-3">
|
||||
{% include "includes/lock-icon" %}
|
||||
</span>
|
||||
Einloggen
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div>
|
||||
<button type="submit" class="group relative flex w-full justify-center btn btn-primary">
|
||||
<span class="absolute inset-y-0 left-0 flex items-center pl-3">
|
||||
{% include "includes/lock-icon" %}
|
||||
</span>
|
||||
Einloggen
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
@ -1,30 +1,30 @@
|
||||
{% extends "base" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="w-full max-w-md space-y-8">
|
||||
<h1 class="mt-6 h1">Passwort setzen</h1>
|
||||
<div class="w-full max-w-md space-y-8">
|
||||
<h1 class="mt-6 h1">Passwort setzen</h1>
|
||||
|
||||
<form class="mt-8 space-y-6" action="/auth/set-pw" method="post">
|
||||
<input type="hidden" name="remember" value="true">
|
||||
<input type="hidden" name="userid" value="{{ userid }}" />
|
||||
<div class="-space-y-px rounded-md shadow-sm">
|
||||
<div>
|
||||
{{ macros::input(label='Passwort', name='password', type='password', required=true, class='rounded-t-md',hide_label=true) }}
|
||||
</div>
|
||||
<div>
|
||||
{{ macros::input(label='Passwort bestätigen', name='password_confirm', type='password', required=true, class='rounded-b-md',hide_label=true) }}
|
||||
</div>
|
||||
</div>
|
||||
<form class="mt-8 space-y-6" action="/auth/set-pw" method="post">
|
||||
<input type="hidden" name="remember" value="true">
|
||||
<input type="hidden" name="userid" value="{{ userid }}"/>
|
||||
<div class="-space-y-px rounded-md shadow-sm">
|
||||
<div>
|
||||
{{ macros::input(label='Passwort', name='password', type='password', required=true, class='rounded-t-md',hide_label=true) }}
|
||||
</div>
|
||||
<div>
|
||||
{{ macros::input(label='Passwort bestätigen', name='password_confirm', type='password', required=true, class='rounded-b-md',hide_label=true) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button type="submit" class="group relative flex w-full justify-center btn btn-primary">
|
||||
<span class="absolute inset-y-0 left-0 flex items-center pl-3">
|
||||
{% include "includes/lock-icon" %}
|
||||
</span>
|
||||
Bestätigen
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div>
|
||||
<button type="submit" class="group relative flex w-full justify-center btn btn-primary">
|
||||
<span class="absolute inset-y-0 left-0 flex items-center pl-3">
|
||||
{% include "includes/lock-icon" %}
|
||||
</span>
|
||||
Bestätigen
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
|
@ -2,29 +2,27 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<link rel="manifest" href="public/manifest.json" />
|
||||
<link rel="stylesheet" href="/public/main.css" />
|
||||
<link rel="icon" type="image/x-icon" href="/public/images/favicon.ico">
|
||||
<title>Ruderassistent - ASKÖ Ruderverein Donau Linz</title>
|
||||
</head>
|
||||
<body class="bg-gray-100">
|
||||
{%if loggedin_user %}
|
||||
{{ macros::header(loggedin_user=loggedin_user) }}
|
||||
{%endif%}
|
||||
|
||||
<div class="flex min-h-screen {%if not loggedin_user %} items-center {% else %} items-start {% endif %} justify-center px-4 py-12 sm:px-6 lg:px-8">
|
||||
{% block content %}{% endblock content %}
|
||||
</div>
|
||||
|
||||
{%if loggedin_user %}
|
||||
{% include "includes/footer" %}
|
||||
{%endif%}
|
||||
|
||||
<script src="/public/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<link rel="manifest" href="public/manifest.json"/>
|
||||
<link rel="stylesheet" href="/public/main.css"/>
|
||||
<link rel="icon" type="image/x-icon" href="/public/images/favicon.ico">
|
||||
<title>Ruderassistent - ASKÖ Ruderverein Donau Linz</title>
|
||||
</head>
|
||||
<body class="bg-gray-100">
|
||||
{%if loggedin_user %}
|
||||
{{ macros::header(loggedin_user=loggedin_user) }}
|
||||
{%endif%}
|
||||
|
||||
<div class="flex min-h-screen {%if not loggedin_user %} items-center {% else %} items-start {% endif %} justify-center px-4 py-12 sm:px-6 lg:px-8"> {% block content %}{% endblock content %}
|
||||
</div>
|
||||
|
||||
{%if loggedin_user %}
|
||||
{% include "includes/footer" %}
|
||||
{%endif%}
|
||||
|
||||
<script src="/public/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,17 +1,16 @@
|
||||
<div class="sidebar slide-in from-right" id="sidebar" aria-modal="false">
|
||||
<div class="bg-primary-900 text-white px-2 py-3 flex justify-between sidebar-header">
|
||||
<div>
|
||||
<span class="ps-1 header-js">
|
||||
Überschrift (wird ersetzt)
|
||||
</span>
|
||||
</div>
|
||||
<button type="button" title="Ausfahrt erstellen schließen" class="sidebar-close border-0 bg-primary-100 focus:bg-primary-50 text-black flex items-center justify-center transform rotate-45"
|
||||
data-trigger="sidebar">
|
||||
{% include "includes/plus-icon" %}
|
||||
</button>
|
||||
</div>
|
||||
<div class="body-js px-2 pt-2">
|
||||
Formular wird ersetzt
|
||||
</div>
|
||||
<div class="bg-primary-900 text-white px-2 py-3 flex justify-between sidebar-header">
|
||||
<div>
|
||||
<span class="ps-1 header-js">
|
||||
Überschrift (wird ersetzt)
|
||||
</span>
|
||||
</div>
|
||||
<button type="button" title="Ausfahrt erstellen schließen" class="sidebar-close border-0 bg-primary-100 focus:bg-primary-50 text-black flex items-center justify-center transform rotate-45" data-trigger="sidebar">
|
||||
{% include "includes/plus-icon" %}
|
||||
</button>
|
||||
</div>
|
||||
<div class="body-js px-2 pt-2">
|
||||
Formular wird ersetzt
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar-overlay" data-trigger="sidebar"></div>
|
@ -3,21 +3,21 @@
|
||||
{% extends "base" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="max-w-screen-lg w-full">
|
||||
<h1 class="h1">Infrequently asked questions</h1>
|
||||
<div class="max-w-screen-lg w-full">
|
||||
<h1 class="h1">Infrequently asked questions</h1>
|
||||
|
||||
<div class="grid pt-8 text-left gap-10">
|
||||
{% if loggedin_user.is_cox %}
|
||||
{{ macros::faq(
|
||||
<div class="grid pt-8 text-left gap-10">
|
||||
{% if loggedin_user.is_cox %}
|
||||
{{ macros::faq(
|
||||
question='Was bedeutet "Immer anzeigen"?',
|
||||
answer='Nicht-Steuerleute sehen normale Ausfahrten 6 Tage im vorhinein. Wenn du "immer anzeigen" aktivierst, sehen Nicht-Steuerleute die Ausfahrt sofort. Die Funktion sollte nur sehr gezielt aktiviert werden (zB bei Fetzenfahrt-Anmeldung).')
|
||||
}}
|
||||
{{ macros::faq(
|
||||
{{ macros::faq(
|
||||
question='Wie kann ich eine erstellte Ausfahrt absagen?',
|
||||
answer='Du kannst bei deinen selbst angelegten Ausfahrten auf Details klicken und hier unter Ausfahrt bearbeiten die <strong>Anzahl der Ruderer auf 0 setzen</strong>. Danach wird die Ausfahrt als abgesagt markiert. Bedenke allerdings, dass dadurch nicht automatisch alle Mitruderer informiert werden. Bitte zusätzlich in die Signal Gruppe schreiben oder den Betroffenen persönlich Bescheid geben.')
|
||||
}}
|
||||
|
||||
{{ macros::faq(
|
||||
{{ macros::faq(
|
||||
question='Wie kann eine Veranstaltung angelegt werden, bei der sich nicht nur Ruderer anmelden können, sondern auch Steuerleute?',
|
||||
answer='Im Moment können nur Admins eine geplante Veranstaltung anlegen. Bitte bei <strong>Marie oder Philipp</strong> mit folgenden Angaben melden, dann wird eine Veranstaltung erstellt.
|
||||
<ul class="list-disc text-primary-950 ml-4 mt-1">
|
||||
@ -28,42 +28,42 @@
|
||||
</ul>')
|
||||
}}
|
||||
|
||||
{{ macros::faq(
|
||||
{{ macros::faq(
|
||||
question='Wie kann ich eine Ausfahrt anlegen, bei der nicht alle Ruderer teilnehmen sollen, z.B. Tagesausflug nach Aschach?',
|
||||
answer='Du kannst beim Anlegen definieren, welchen Typ deine Ausfahrt hat. Standardmäßig wird "Reguläre Ausfahrt" verwendet, es gibt aber auch z.B. <strong>"Lange Ausfahrt"</strong>. Wenn du das für deine Ausfahrt auswählst, wird der User in einem Popup noch einmal extra gefragt, ob er wirklich daran teilnehmen möchte. Bitte führe zusätzlich die Kilometer oder die Anforderungen im Anmerkungen Feld der Ausfahrt an.')
|
||||
}}
|
||||
|
||||
{{ macros::faq(
|
||||
{{ macros::faq(
|
||||
question='Wann sollte ich bei einer Ausfahrt "Gäste erlauben" einstellen?',
|
||||
answer='Wenn du Ruderer mitnehmen möchtest, die einen <strong>5er-Block</strong> besitzen, kannst du die jeweilige Ausfahrt damit für diese Gruppe freischalten. Wenn sich ein Gast für die Ausfahrt anmeldet, dann wird er mit "Gast" neben dem jeweiligen Namen gekennzeichnet.')
|
||||
}}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{{ macros::faq(
|
||||
{{ macros::faq(
|
||||
question='Wie erfolgt die Absage einer Ausfahrt aufgrund ungünstiger Wetterbedingungen?',
|
||||
answer='Im Falle einer kurzfristigen Absage einer Ausfahrt - sei es aufgrund von schlechten Wetterbedingungen oder unpassendem Wasserstand - informieren wir dich rechtzeitig. Eine entsprechende Benachrichtigung wird mindestens ein paar Stunden vorher in unserem Ruderassistenten veröffentlicht. Zusätzlich gibt es eine Nachricht in unserer Signal-Gruppe. Zur Info: Leichter Regen mit trotzdem passenden Temperaturen hindern uns in der Regel nicht an einer Ausfahrt ;-)')
|
||||
}}
|
||||
|
||||
{{ macros::faq(
|
||||
{{ macros::faq(
|
||||
question='Wo finde ich mehr Infos über den Verein?',
|
||||
answer='Seit Sommer 2023 gibt es ein Handbuch mit vielen Infos über unseren Verein und Rudern im Allgemeinen. Du findest es unter https://rudernlinz.at/book')
|
||||
}}
|
||||
|
||||
{{ macros::faq(
|
||||
{{ macros::faq(
|
||||
question='Wann kann ich mich zu Ausfahrten anmelden?',
|
||||
answer='Du kannst Ausfahrten bis zu 6 Tage im Voraus sehen. Vergiss nicht, dich mindestens 2 Stunden vor Beginn an- bzw. abzumelden. Gelegentlich, wie bei der Marktausfahrt am Freitag, werden Ausfahrten kurzfristiger angekündigt. Wenn du keine Ausfahrt verpassen willst, freut sich diese Seite über Aufrufe ;-)')
|
||||
}}
|
||||
|
||||
{{ macros::faq(
|
||||
{{ macros::faq(
|
||||
question='Wann soll ich beim Bootshaus sein?',
|
||||
answer='Bitte schaue, dass du zur angegebenen Zeit abfahrbereit (d.h. bereits umgezogen) beim Bootshaus bist.')
|
||||
}}
|
||||
|
||||
{{ macros::faq(
|
||||
{{ macros::faq(
|
||||
question='Es sind mehrere Fahrten zur selben Zeit ausgeschrieben. Wo soll ich mich anmelden?',
|
||||
answer='Um das Verhältnis von Steuerleuten zu Ruderern optimal zu gestalten, schreiben wir mehrere Fahrten aus. In der Regel nehmen alle Boote, die zur selben Zeit starten, den gleichen Kurs, es sei denn, es wird in den Anmerkungen ausdrücklich anders angegeben. Die konkrete Zuordnung zu den Booten wird direkt in unserem Ruderverein vorgenommen. Bei welcher spezifischen Ausfahrt du dich anmeldest, spielt dabei keine wesentliche Rolle.')
|
||||
}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content%}
|
||||
|
@ -1,17 +1,17 @@
|
||||
{% import "includes/macros" as macros %}
|
||||
|
||||
<div class="hidden">
|
||||
<form action="/admin/planned-event" method="post" class="grid gap-3" id="addEventForm">
|
||||
<input class="day-js" type="hidden" name="tripdetails.day" value="" />
|
||||
{{ macros::input(label='Titel (z.B. Firmenrudern)', name='name', type='input', required=true) }}
|
||||
{{ macros::input(label='Startzeit', name='tripdetails.planned_starting_time', type='time', required=true) }}
|
||||
{{ macros::input(label='Anzahl Steuerleute', name='planned_amount_cox', type='number', required=true, min='0') }}
|
||||
{{ macros::input(label='Anzahl Ruderer (ohne Steuerperson)', name='tripdetails.max_people', type='number', required=true, min='0') }}
|
||||
{{ macros::checkbox(label='Gäste erlauben', name='tripdetails.allow_guests') }}
|
||||
{{ macros::checkbox(label='Immer anzeigen', name='tripdetails.always_show') }}
|
||||
{{ macros::input(label='Anmerkungen', name='tripdetails.notes', type='input') }}
|
||||
{{ macros::select(data=trip_types, select_name='tripdetails.trip_type', default='Reguläre Ausfahrt') }}
|
||||
<form action="/admin/planned-event" method="post" class="grid gap-3" id="addEventForm">
|
||||
<input class="day-js" type="hidden" name="tripdetails.day" value=""/>
|
||||
{{ macros::input(label='Titel (z.B. Firmenrudern)', name='name', type='input', required=true) }}
|
||||
{{ macros::input(label='Startzeit', name='tripdetails.planned_starting_time', type='time', required=true) }}
|
||||
{{ macros::input(label='Anzahl Steuerleute', name='planned_amount_cox', type='number', required=true, min='0') }}
|
||||
{{ macros::input(label='Anzahl Ruderer (ohne Steuerperson)', name='tripdetails.max_people', type='number', required=true, min='0') }}
|
||||
{{ macros::checkbox(label='Gäste erlauben', name='tripdetails.allow_guests') }}
|
||||
{{ macros::checkbox(label='Immer anzeigen', name='tripdetails.always_show') }}
|
||||
{{ macros::input(label='Anmerkungen', name='tripdetails.notes', type='input') }}
|
||||
{{ macros::select(data=trip_types, select_name='tripdetails.trip_type', default='Reguläre Ausfahrt') }}
|
||||
|
||||
<input value="Erstellen" class="w-full btn btn-primary" type="submit" />
|
||||
</form>
|
||||
<input value="Erstellen" class="w-full btn btn-primary" type="submit"/>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -1,15 +1,15 @@
|
||||
{% import "includes/macros" as macros %}
|
||||
|
||||
<div class="hidden">
|
||||
<form action="/cox/trip" method="post" class="grid gap-3" id="sidebarForm">
|
||||
<input class="day-js" type="hidden" name="day" value="" />
|
||||
{{ macros::input(label='Startzeit (zB "10:00")', name='planned_starting_time', type='time', required=true) }}
|
||||
{{ macros::input(label='Anzahl Ruderer (ohne Steuerperson)', name='max_people', type='number', required=true, min='0') }}
|
||||
{{ macros::checkbox(label='Gäste erlauben', name='allow_guests') }}
|
||||
{{ macros::checkbox(label='Immer anzeigen', name='always_show') }}
|
||||
{{ macros::input(label='Anmerkungen', name='notes', type='input') }}
|
||||
{{ macros::select(data=trip_types, select_name='trip_type', default='Reguläre Ausfahrt') }}
|
||||
<form action="/cox/trip" method="post" class="grid gap-3" id="sidebarForm">
|
||||
<input class="day-js" type="hidden" name="day" value=""/>
|
||||
{{ macros::input(label='Startzeit (zB "10:00")', name='planned_starting_time', type='time', required=true) }}
|
||||
{{ macros::input(label='Anzahl Ruderer (ohne Steuerperson)', name='max_people', type='number', required=true, min='0') }}
|
||||
{{ macros::checkbox(label='Gäste erlauben', name='allow_guests') }}
|
||||
{{ macros::checkbox(label='Immer anzeigen', name='always_show') }}
|
||||
{{ macros::input(label='Anmerkungen', name='notes', type='input') }}
|
||||
{{ macros::select(data=trip_types, select_name='trip_type', default='Reguläre Ausfahrt') }}
|
||||
|
||||
<input value="Erstellen" class="w-full btn btn-primary" type="submit" />
|
||||
</form>
|
||||
<input value="Erstellen" class="w-full btn btn-primary" type="submit"/>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -1,16 +1,16 @@
|
||||
{% if loggedin_user.is_cox %}
|
||||
<div class="sm:col-span-2 lg:col-span-3 grid md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-3">
|
||||
<button type="button" title="Toggle View" class="group btn btn-primary filter-trips-js" data-action="filter-days" id="filterdays-js" aria-pressed="false">
|
||||
{% include "includes/funnel-icon" %}
|
||||
Tage mit Ausfahrten
|
||||
</button>
|
||||
<button type="button" title="Toggle View" class="group btn btn-primary filter-trips-js" data-action="filter-coxs" id="filtertrips-js" aria-pressed="false">
|
||||
{% include "includes/funnel-icon" %}
|
||||
Steuerleute gesucht
|
||||
</button>
|
||||
<button type="button" title="Toggle View" class="group btn btn-primary filter-trips-js" data-action="filter-months" id="filtermonth-js" aria-pressed="false" data-month="{{ now() | date(format='%m') }}">
|
||||
{% include "includes/funnel-icon" %}
|
||||
Aktuellen Monat anzeigen
|
||||
</button>
|
||||
</div>
|
||||
<div class="sm:col-span-2 lg:col-span-3 grid md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-3">
|
||||
<button type="button" title="Toggle View" class="group btn btn-primary filter-trips-js" data-action="filter-days" id="filterdays-js" aria-pressed="false">
|
||||
{% include "includes/funnel-icon" %}
|
||||
Tage mit Ausfahrten
|
||||
</button>
|
||||
<button type="button" title="Toggle View" class="group btn btn-primary filter-trips-js" data-action="filter-coxs" id="filtertrips-js" aria-pressed="false">
|
||||
{% include "includes/funnel-icon" %}
|
||||
Steuerleute gesucht
|
||||
</button>
|
||||
<button type="button" title="Toggle View" class="group btn btn-primary filter-trips-js" data-action="filter-months" id="filtermonth-js" aria-pressed="false" data-month="{{ now() | date(format='%m') }}">
|
||||
{% include "includes/funnel-icon" %}
|
||||
Aktuellen Monat anzeigen
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
@ -1,4 +1,3 @@
|
||||
<svg width="16" height="16" fill="currentColor" class="inline-block mr-1 h-3 w-3" viewBox="0 0 16 16" style="margin-top: -0.2rem;">
|
||||
<path
|
||||
d="M2 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v13.5a.5.5 0 0 1-.777.416L8 13.101l-5.223 2.815A.5.5 0 0 1 2 15.5V2zm2-1a1 1 0 0 0-1 1v12.566l4.723-2.482a.5.5 0 0 1 .554 0L13 14.566V2a1 1 0 0 0-1-1H4z" />
|
||||
<svg width="16" height="16" fill="currentColor" class="inline-block mr-1 h-3 w-3" viewbox="0 0 16 16" style="margin-top: -0.2rem;">
|
||||
<path d="M2 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v13.5a.5.5 0 0 1-.777.416L8 13.101l-5.223 2.815A.5.5 0 0 1 2 15.5V2zm2-1a1 1 0 0 0-1 1v12.566l4.723-2.482a.5.5 0 0 1 .554 0L13 14.566V2a1 1 0 0 0-1-1H4z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 344 B After Width: | Height: | Size: 339 B |
@ -1,6 +1,4 @@
|
||||
<svg width="16" height="16" fill="currentColor" class="inline h-4 w-4" viewBox="0 0 16 16">
|
||||
<path
|
||||
d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z" />
|
||||
<path fill-rule="evenodd"
|
||||
d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z" />
|
||||
<svg width="16" height="16" fill="currentColor" class="inline h-4 w-4" viewbox="0 0 16 16">
|
||||
<path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z"/>
|
||||
<path fill-rule="evenodd" d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 551 B After Width: | Height: | Size: 540 B |
@ -1,10 +1,12 @@
|
||||
<footer class="bg-primary-950 text-white w-full flex justify-center p-3">
|
||||
<div class="max-w-screen-xl w-full flex justify-between">
|
||||
<div>
|
||||
<span class="text-[#ff0000]">♥</span> ASKÖ Ruderverein Donau Linz
|
||||
</div>
|
||||
<div>
|
||||
© {{ now() | date(format="%Y") }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="max-w-screen-xl w-full flex justify-between">
|
||||
<div>
|
||||
<span class="text-[#ff0000]">♥</span>
|
||||
ASKÖ Ruderverein Donau Linz
|
||||
</div>
|
||||
<div>
|
||||
©
|
||||
{{ now() | date(format="%Y") }}
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
@ -1,65 +1,49 @@
|
||||
{% macro new() %}
|
||||
<form
|
||||
action="/admin/boat/new"
|
||||
method="post"
|
||||
class="mt-4 bg-primary-900 rounded-md text-white px-3 pb-3 pt-2 sm:flex items-end justify-between"
|
||||
>
|
||||
<div class="w-full">
|
||||
<h2 class="text-md font-bold mb-2 uppercase tracking-wide">
|
||||
Neues Boot hinzufügen
|
||||
</h2>
|
||||
{{ macros::input(label="Name", name="name", type="text", required=true) }}
|
||||
{{ macros::input(label="Anzahl Sitze", name="amount_seats", type="number", required=true, min=1) }}
|
||||
{{ macros::input(label="Baujahr", name="year_built", type="number", min=1950, max=2050) }}
|
||||
{{ macros::input(label="Bootsbauer", name="boatbuilder", type="text") }}
|
||||
{{ macros::select(data=locations, label='location', select_name='location_id', selected_id=1) }}
|
||||
{{ macros::select(data=users, label='users', select_name='owner', default="Vereinsboot") }}
|
||||
{{ macros::checkbox(label="Steuerperson steuert nur", name="default_shipmaster_only_steering")}}
|
||||
{{ macros::checkbox(label="Skull", name="skull", checked=true)}}
|
||||
{{ macros::checkbox(label="Externes Boot (anderer Verein)", name="external")}}
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<input
|
||||
value="Hinzufügen"
|
||||
type="submit"
|
||||
class="w-28 mt-2 sm:mt-0 rounded-md bg-primary-500 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"
|
||||
/>
|
||||
</div>
|
||||
</form>
|
||||
<form action="/admin/boat/new" method="post" class="mt-4 bg-primary-900 rounded-md text-white px-3 pb-3 pt-2 sm:flex items-end justify-between">
|
||||
<div class="w-full">
|
||||
<h2 class="text-md font-bold mb-2 uppercase tracking-wide">
|
||||
Neues Boot hinzufügen
|
||||
</h2>
|
||||
{{ macros::input(label="Name", name="name", type="text", required=true) }}
|
||||
{{ macros::input(label="Anzahl Sitze", name="amount_seats", type="number", required=true, min=1) }}
|
||||
{{ macros::input(label="Baujahr", name="year_built", type="number", min=1950, max=2050) }}
|
||||
{{ macros::input(label="Bootsbauer", name="boatbuilder", type="text") }}
|
||||
{{ macros::select(data=locations, label='location', select_name='location_id', selected_id=1) }}
|
||||
{{ macros::select(data=users, label='users', select_name='owner', default="Vereinsboot") }}
|
||||
{{ macros::checkbox(label="Steuerperson steuert nur", name="default_shipmaster_only_steering")}}
|
||||
{{ macros::checkbox(label="Skull", name="skull", checked=true)}}
|
||||
{{ macros::checkbox(label="Externes Boot (anderer Verein)", name="external")}}
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<input value="Hinzufügen" type="submit" class="w-28 mt-2 sm:mt-0 rounded-md bg-primary-500 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"/>
|
||||
</div>
|
||||
</form>
|
||||
{% endmacro new %}
|
||||
|
||||
|
||||
{% macro edit(boat, uuid) %}
|
||||
<form
|
||||
action="/admin/boat"
|
||||
data-filterable="true"
|
||||
method="post"
|
||||
class="bg-white p-3 rounded-md flex items-end md:items-center justify-between"
|
||||
>
|
||||
<div class="w-full">
|
||||
<input type="hidden" name="id" value="{{ boat.id }}" />
|
||||
<div class="font-bold mb-1">{{ boat.name }}<br /></div>
|
||||
<div class="grid md:grid-cols-3">
|
||||
{{ macros::input(label='Name', name='name', type='text', value=boat.name) }}
|
||||
{{ macros::input(label='Amount Seats', name='amount_seats', type='number', min=0, value=boat.amount_seats) }}
|
||||
{{ macros::select(data=locations, label='location', select_name='location_id', selected_id=boat.location_id) }}
|
||||
{{ macros::select(data=users, label='users', select_name='owner', selected_id=boat.owner, default="Vereinsboot") }}
|
||||
{{ macros::input(label='Baujahr', name='year_built', type='number', min=1950, value=boat.year_built) }}
|
||||
{{ macros::input(label='Bootsbauer', name='boatbuilder', type='text', value=boat.boatbuilder) }}
|
||||
{{ macros::checkbox(label='default_shipmaster_only_steering', name='default_shipmaster_only_steering', id=uuid , checked=boat.default_shipmaster_only_steering) }}
|
||||
{{ macros::checkbox(label='skull', name='skull', id=uuid , checked=boat.skull) }}
|
||||
{{ macros::checkbox(label='external', name='external', id=uuid , checked=boat.external) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid gap-3">
|
||||
<a
|
||||
href="/admin/boat/{{ boat.id }}/delete"
|
||||
class="inline-block btn btn-alert"
|
||||
onclick="return confirm('Wirklich löschen?');"
|
||||
>
|
||||
{% include "includes/delete-icon" %} Löschen
|
||||
</a>
|
||||
<input value="Ändern" type="submit" class="w-28 btn btn-primary" />
|
||||
</div>
|
||||
</form>
|
||||
<form action="/admin/boat" data-filterable="true" method="post" class="bg-white p-3 rounded-md flex items-end md:items-center justify-between">
|
||||
<div class="w-full">
|
||||
<input type="hidden" name="id" value="{{ boat.id }}"/>
|
||||
<div class="font-bold mb-1">{{ boat.name }}<br/></div>
|
||||
<div class="grid md:grid-cols-3">
|
||||
{{ macros::input(label='Name', name='name', type='text', value=boat.name) }}
|
||||
{{ macros::input(label='Amount Seats', name='amount_seats', type='number', min=0, value=boat.amount_seats) }}
|
||||
{{ macros::select(data=locations, label='location', select_name='location_id', selected_id=boat.location_id) }}
|
||||
{{ macros::select(data=users, label='users', select_name='owner', selected_id=boat.owner, default="Vereinsboot") }}
|
||||
{{ macros::input(label='Baujahr', name='year_built', type='number', min=1950, value=boat.year_built) }}
|
||||
{{ macros::input(label='Bootsbauer', name='boatbuilder', type='text', value=boat.boatbuilder) }}
|
||||
{{ macros::checkbox(label='default_shipmaster_only_steering', name='default_shipmaster_only_steering', id=uuid , checked=boat.default_shipmaster_only_steering) }}
|
||||
{{ macros::checkbox(label='skull', name='skull', id=uuid , checked=boat.skull) }}
|
||||
{{ macros::checkbox(label='external', name='external', id=uuid , checked=boat.external) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid gap-3">
|
||||
<a href="/admin/boat/{{ boat.id }}/delete" class="inline-block btn btn-alert" onclick="return confirm('Wirklich löschen?');">
|
||||
{% include "includes/delete-icon" %}
|
||||
Löschen
|
||||
</a>
|
||||
<input value="Ändern" type="submit" class="w-28 btn btn-primary"/>
|
||||
</div>
|
||||
</form>
|
||||
{% endmacro edit %}
|
||||
|
@ -1,202 +1,218 @@
|
||||
{% macro new(only_ones, allow_any_shipmaster, shipmaster) %}
|
||||
<form action="/log" method="post" id="form" class="grid grid-cols-2 gap-3">
|
||||
{{ log::boat_select(only_ones=only_ones) }}
|
||||
<form action="/log" method="post" id="form" class="grid grid-cols-2 gap-3">
|
||||
{{ log::boat_select(only_ones=only_ones) }}
|
||||
|
||||
{% if allow_any_shipmaster %}
|
||||
<select name="shipmaster" id="shipmaster" class="input rounded-md h-10">
|
||||
<optgroup label="Steuerpersonen">
|
||||
{% for cox in coxes %}
|
||||
<option value="{{ cox.id }}" {% if cox.id == shipmaster%} selected {% endif %}>{{ cox.name }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
<optgroup label="Restliche Mitglieder">
|
||||
{% for user in users | filter(attribute="is_cox", value=false) %}
|
||||
<option value="{{ user.id }}" {% if user.id == shipmaster%} selected {% endif %}>{{ user.name }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
</select>
|
||||
{% else %}
|
||||
<input type="hidden" name="shipmaster" value="{{shipmaster}}" />
|
||||
{% endif %}
|
||||
{% if not only_ones %}
|
||||
{{ macros::checkbox(label='shipmaster_only_steering', name='shipmaster_only_steering') }}
|
||||
{% endif %}
|
||||
{% if allow_any_shipmaster %}
|
||||
<select name="shipmaster" id="shipmaster" class="input rounded-md h-10">
|
||||
<optgroup label="Steuerpersonen">
|
||||
{% for cox in coxes %}
|
||||
<option value="{{ cox.id }}" {% if cox.id == shipmaster%} selected {% endif %}>{{ cox.name }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
<optgroup label="Restliche Mitglieder">
|
||||
{% for user in users | filter(attribute="is_cox", value=false) %}
|
||||
<option value="{{ user.id }}" {% if user.id == shipmaster%} selected {% endif %}>{{ user.name }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
</select>
|
||||
{% else %}
|
||||
<input type="hidden" name="shipmaster" value="{{shipmaster}}"/>
|
||||
{% endif %}
|
||||
{% if not only_ones %}
|
||||
{{ macros::checkbox(label='shipmaster_only_steering', name='shipmaster_only_steering') }}
|
||||
{% endif %}
|
||||
|
||||
{% if not only_ones %}
|
||||
{{ log::rower_select(id="newrower", selected=[], class="col-span-2") }}
|
||||
{% endif %}
|
||||
{% if not only_ones %}
|
||||
{{ log::rower_select(id="newrower", selected=[], class="col-span-2") }}
|
||||
{% endif %}
|
||||
|
||||
|
||||
<div>Departure: <input type="datetime-local" id="datetime-dep" name="departure" required/></div>
|
||||
<div> Arrival: <input type="datetime-local" id="datetime-arr" name="arrival" /></div>
|
||||
<div class="col-span-2">
|
||||
Destination: <input type="search" list="destinations" placeholder="Destination" name="destination" id="destination" oninput="var inputElement = document.getElementById('destination');
|
||||
var dataList = document.getElementById('destinations');
|
||||
var selectedValue = inputElement.value;
|
||||
for (var i = 0; i < dataList.options.length; i++) {
|
||||
if (dataList.options[i].value === selectedValue) {
|
||||
var distance = dataList.options[i].getAttribute('distance');
|
||||
document.getElementById('distance_in_km').value = distance;
|
||||
break;
|
||||
}
|
||||
}">
|
||||
<datalist id="destinations">
|
||||
{% for distance in distances %}
|
||||
<option value="{{ distance.0 }}" distance={{ distance.1 }} />
|
||||
{% endfor %}
|
||||
</datalist>
|
||||
</div>
|
||||
{{ macros::input(label="Distanz", name="distance_in_km", type="number", min=0, wrapper_class="col-span-2") }}
|
||||
{{ macros::input(label="Kommentar", name="comments", type="text", wrapper_class="col-span-2") }}
|
||||
{{ macros::select(data=logtypes, select_name='logtype', default="Normal", class="col-span-2") }}
|
||||
<input type="submit" value="Starten" class="btn btn-primary w-100 col-span-2 m-auto" />
|
||||
<div>Departure:
|
||||
<input type="datetime-local" id="datetime-dep" name="departure" required/></div>
|
||||
<div>
|
||||
Arrival:
|
||||
<input type="datetime-local" id="datetime-arr" name="arrival"/></div>
|
||||
<div class="col-span-2">
|
||||
Destination:
|
||||
<input type="search" list="destinations" placeholder="Destination" name="destination" id="destination" oninput="var inputElement = document.getElementById('destination');
|
||||
var dataList = document.getElementById('destinations');
|
||||
var selectedValue = inputElement.value;
|
||||
for (var i = 0; i < dataList.options.length; i++) {
|
||||
if (dataList.options[i].value === selectedValue) {
|
||||
var distance = dataList.options[i].getAttribute('distance');
|
||||
document.getElementById('distance_in_km').value = distance;
|
||||
break;
|
||||
}
|
||||
}">
|
||||
<datalist id="destinations">
|
||||
{% for distance in distances %}
|
||||
<option value="{{ distance.0 }}" distance={{ distance.1 }}/>
|
||||
{% endfor %}
|
||||
</datalist>
|
||||
</div>
|
||||
{{ macros::input(label="Distanz", name="distance_in_km", type="number", min=0, wrapper_class="col-span-2") }}
|
||||
{{ macros::input(label="Kommentar", name="comments", type="text", wrapper_class="col-span-2") }}
|
||||
{{ macros::select(data=logtypes, select_name='logtype', default="Normal", class="col-span-2") }}
|
||||
<input type="submit" value="Starten" class="btn btn-primary w-100 col-span-2 m-auto"/>
|
||||
|
||||
<script>
|
||||
const currentDate = new Date();
|
||||
const localTime = new Date(currentDate.getTime() - (currentDate.getTimezoneOffset() * 60000));
|
||||
const formattedDate = localTime.toISOString().slice(0, 16);
|
||||
|
||||
// Set the formatted string as the value of the input field
|
||||
document.getElementById("datetime-dep").value = formattedDate;
|
||||
</script>
|
||||
</form>
|
||||
<script>
|
||||
const currentDate = new Date();
|
||||
const localTime = new Date(currentDate.getTime() - (currentDate.getTimezoneOffset() * 60000));
|
||||
const formattedDate = localTime.toISOString().slice(0, 16);
|
||||
|
||||
// Set the formatted string as the value of the input field
|
||||
document.getElementById("datetime-dep").value = formattedDate;
|
||||
document.getElementById('form').addEventListener('submit', function (e) {
|
||||
e.preventDefault();
|
||||
for (let optional_elem of["datetime-arr", "distance_in_km", "comments", "logtype"]) {
|
||||
let myInput = document.getElementById(optional_elem);
|
||||
if (myInput.value === '') {
|
||||
myInput.removeAttribute('name');
|
||||
}
|
||||
}
|
||||
this.submit();
|
||||
});
|
||||
</script>
|
||||
</form>
|
||||
<script>
|
||||
document.getElementById('form').addEventListener('submit', function(e) {
|
||||
e.preventDefault();
|
||||
for(let optional_elem of ["datetime-arr", "distance_in_km", "comments", "logtype"]){
|
||||
let myInput = document.getElementById(optional_elem);
|
||||
if (myInput.value === '') {
|
||||
myInput.removeAttribute('name');
|
||||
}
|
||||
}
|
||||
this.submit();
|
||||
});
|
||||
</script>
|
||||
{% endmacro new %}
|
||||
|
||||
{% macro show_boats(only_ones) %}
|
||||
{% if only_ones %}
|
||||
{% set_global boats = boats | filter(attribute="amount_seats", value=1) %}
|
||||
{% if only_ones %}
|
||||
{% set_global boats = boats | filter(attribute="amount_seats", value=1) %}
|
||||
{% endif %}
|
||||
{% for boat in boats %}
|
||||
<div onclick="document.getElementById('boat_id').value='{{ boat.id }}';updateElementsBasedOnSelectedOption()">{{ boat.name }}</div>
|
||||
{% endfor %}
|
||||
{% for boat in boats %}
|
||||
<div onclick="document.getElementById('boat_id').value='{{ boat.id }}';updateElementsBasedOnSelectedOption()">{{ boat.name }}</div>
|
||||
{% endfor %}
|
||||
<script>
|
||||
function updateElementsBasedOnSelectedOption() {
|
||||
var selectElement = document.getElementById('boat_id');
|
||||
var selectedOption = selectElement.selectedOptions[0];
|
||||
var shipmaster_only_steering = selectedOption.getAttribute("extra-default_shipmaster_only_steering") === 'true';
|
||||
document.getElementById('shipmaster_only_steering').checked = shipmaster_only_steering;
|
||||
document.getElementById('newrower-max_rower_allowed').innerHTML = selectedOption.getAttribute("extra-amount_seats");
|
||||
}
|
||||
function updateElementsBasedOnSelectedOption() {
|
||||
var selectElement = document.getElementById('boat_id');
|
||||
var selectedOption = selectElement.selectedOptions[0];
|
||||
var shipmaster_only_steering = selectedOption.getAttribute("extra-default_shipmaster_only_steering") === 'true';
|
||||
document.getElementById('shipmaster_only_steering').checked = shipmaster_only_steering;
|
||||
document.getElementById('newrower-max_rower_allowed').innerHTML = selectedOption.getAttribute("extra-amount_seats");
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
document.getElementById('boat_id').addEventListener('change', updateElementsBasedOnSelectedOption);
|
||||
});
|
||||
document.addEventListener('DOMContentLoaded', updateElementsBasedOnSelectedOption);
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
document.getElementById('boat_id').addEventListener('change', updateElementsBasedOnSelectedOption);
|
||||
});
|
||||
document.addEventListener('DOMContentLoaded', updateElementsBasedOnSelectedOption);
|
||||
</script>
|
||||
{% endmacro boats %}
|
||||
|
||||
{% macro boat_select(only_ones) %}
|
||||
{% if not only_ones %}
|
||||
{{ macros::select(data=boats, select_name='boat_id', display=["name", " (","amount_seats", " x)"], extras=["default_shipmaster_only_steering", "amount_seats"], class="col-span-2 md:hidden") }}
|
||||
{% else %}
|
||||
{% set ones = boats | filter(attribute="amount_seats", value=1) %}
|
||||
{{ macros::select(data=ones, select_name='boat_id', display=["name", " (","amount_seats", " x)"], extras=["default_shipmaster_only_steering", "amount_seats"], class="md:hidden") }}
|
||||
{% endif %}
|
||||
{% if not only_ones %}
|
||||
{{ macros::select(data=boats, select_name='boat_id', display=["name", " (","amount_seats", " x)"], extras=["default_shipmaster_only_steering", "amount_seats"], class="col-span-2 md:hidden") }}
|
||||
{% else %}
|
||||
{% set ones = boats | filter(attribute="amount_seats", value=1) %}
|
||||
{{ macros::select(data=ones, select_name='boat_id', display=["name", " (","amount_seats", " x)"], extras=["default_shipmaster_only_steering", "amount_seats"], class="md:hidden") }}
|
||||
{% endif %}
|
||||
<script>
|
||||
function updateElementsBasedOnSelectedOption() {
|
||||
var selectElement = document.getElementById('boat_id');
|
||||
var selectedOption = selectElement.selectedOptions[0];
|
||||
var shipmaster_only_steering = selectedOption.getAttribute("extra-default_shipmaster_only_steering") === 'true';
|
||||
document.getElementById('shipmaster_only_steering').checked = shipmaster_only_steering;
|
||||
document.getElementById('newrower-max_rower_allowed').innerHTML = selectedOption.getAttribute("extra-amount_seats");
|
||||
}
|
||||
function updateElementsBasedOnSelectedOption() {
|
||||
var selectElement = document.getElementById('boat_id');
|
||||
var selectedOption = selectElement.selectedOptions[0];
|
||||
var shipmaster_only_steering = selectedOption.getAttribute("extra-default_shipmaster_only_steering") === 'true';
|
||||
document.getElementById('shipmaster_only_steering').checked = shipmaster_only_steering;
|
||||
document.getElementById('newrower-max_rower_allowed').innerHTML = selectedOption.getAttribute("extra-amount_seats");
|
||||
}
|
||||
|
||||
document.getElementById('boat_id').addEventListener('change', updateElementsBasedOnSelectedOption);
|
||||
document.addEventListener('DOMContentLoaded', updateElementsBasedOnSelectedOption);
|
||||
document.getElementById('boat_id').addEventListener('change', updateElementsBasedOnSelectedOption);
|
||||
document.addEventListener('DOMContentLoaded', updateElementsBasedOnSelectedOption);
|
||||
</script>
|
||||
{% endmacro boat_select %}
|
||||
|
||||
{% macro show(log, state, allowed_to_close=false, only_ones) %}
|
||||
Bootsname: {{ log.boat.name }}<br />
|
||||
Schiffsführer: {{ log.shipmaster_user.name }}<br />
|
||||
{% if log.shipmaster_only_steering %}
|
||||
Schiffsführer steuert nur
|
||||
{% endif %}
|
||||
Weggefahren: {{ log.departure }}<br />
|
||||
{% if state == "completed" %}
|
||||
Angekommen: {{ log.arrival}}<br />
|
||||
{% endif %}
|
||||
{% set amount_rowers = log.rowers | length %}
|
||||
{% set amount_guests = log.boat.amount_seats - amount_rowers -1 %}
|
||||
{% if allowed_to_close and state == "on_water" %}
|
||||
{{ log::home(log=log, only_ones=only_ones) }}
|
||||
{% else %}
|
||||
Ziel: {{ log.destination }}<br />
|
||||
{% if state == "completed" %}
|
||||
Km: {{ log.distance_in_km }}<br />
|
||||
{% endif %}
|
||||
{% if log.comments %}
|
||||
Kommentare: {{ log.comments }}<br />
|
||||
{% endif %}
|
||||
{% if log.logtype %}
|
||||
Logtype: {{ log.logtype }}<br />
|
||||
{% endif %}
|
||||
{% if amount_guests > 0 or log.rowers | length > 0 %}
|
||||
Ruderer:
|
||||
{% endif %}
|
||||
{% if amount_guests > 0 %}
|
||||
{{ amount_guests }} Gäste (ohne Account)
|
||||
{% endif %}
|
||||
{% for rower in log.rowers %}
|
||||
{{ rower.name }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
Bootsname:
|
||||
{{ log.boat.name }}<br/>
|
||||
Schiffsführer:
|
||||
{{ log.shipmaster_user.name }}<br/>
|
||||
{% if log.shipmaster_only_steering %}
|
||||
Schiffsführer steuert nur
|
||||
{% endif %}
|
||||
Weggefahren:
|
||||
{{ log.departure }}<br/>
|
||||
{% if state == "completed" %}
|
||||
Angekommen:
|
||||
{{ log.arrival}}<br/>
|
||||
{% endif %}
|
||||
{% set amount_rowers = log.rowers | length %}
|
||||
{% set amount_guests = log.boat.amount_seats - amount_rowers -1 %}
|
||||
{% if allowed_to_close and state == "on_water" %}
|
||||
{{ log::home(log=log, only_ones=only_ones) }}
|
||||
{% else %}
|
||||
Ziel:
|
||||
{{ log.destination }}<br/>
|
||||
{% if state == "completed" %}
|
||||
Km:
|
||||
{{ log.distance_in_km }}<br/>
|
||||
{% endif %}
|
||||
{% if log.comments %}
|
||||
Kommentare:
|
||||
{{ log.comments }}<br/>
|
||||
{% endif %}
|
||||
{% if log.logtype %}
|
||||
Logtype:
|
||||
{{ log.logtype }}<br/>
|
||||
{% endif %}
|
||||
{% if amount_guests > 0 or log.rowers | length > 0 %}
|
||||
Ruderer:
|
||||
{% endif %}
|
||||
{% if amount_guests > 0 %}
|
||||
{{ amount_guests }}
|
||||
Gäste (ohne Account)
|
||||
{% endif %}
|
||||
{% for rower in log.rowers %}
|
||||
{{ rower.name }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endmacro show %}
|
||||
|
||||
{% macro home(log, only_ones) %}
|
||||
<form action="/log/{{log.id}}" method="post">
|
||||
Destination: <input type="search" list="destinations" placeholder="Destination" required="required", id="destination-home" name="destination" value="{{log.destination}}" oninput="var inputElement = document.getElementById('destination-home');
|
||||
var dataList = document.getElementById('destinations');
|
||||
var selectedValue = inputElement.value;
|
||||
for (var i = 0; i < dataList.options.length; i++) {
|
||||
if (dataList.options[i].value === selectedValue) {
|
||||
var distance = dataList.options[i].getAttribute('distance');
|
||||
document.getElementById('distance_in_km_home').value = distance;
|
||||
break;
|
||||
}
|
||||
}">
|
||||
{{ macros::input(label="Distanz", name="distance_in_km", id="distance_in_km_home", type="number", min=0, value=log.distance_in_km, required=true) }}
|
||||
{{ macros::input(label="Kommentar", name="comments", type="text", value=log.comments) }}
|
||||
{{ macros::select(data=logtypes, select_name='logtype', default="Normal", selected_id=log.logtype) }}
|
||||
{% if not only_ones %}
|
||||
{{ log::rower_select(id="rowers"~log.id, selected=log.rowers, amount_seats=log.boat.amount_seats) }}
|
||||
{% endif %}
|
||||
<input type="submit" value="AUSFAHRT BEENDEN"/>
|
||||
</form>
|
||||
<form action="/log/{{log.id}}" method="post">
|
||||
Destination:
|
||||
<input type="search" list="destinations" placeholder="Destination" required="required" , id="destination-home" name="destination" value="{{log.destination}}" oninput="var inputElement = document.getElementById('destination-home');
|
||||
var dataList = document.getElementById('destinations');
|
||||
var selectedValue = inputElement.value;
|
||||
for (var i = 0; i < dataList.options.length; i++) {
|
||||
if (dataList.options[i].value === selectedValue) {
|
||||
var distance = dataList.options[i].getAttribute('distance');
|
||||
document.getElementById('distance_in_km_home').value = distance;
|
||||
break;
|
||||
}
|
||||
}">
|
||||
{{ macros::input(label="Distanz", name="distance_in_km", id="distance_in_km_home", type="number", min=0, value=log.distance_in_km, required=true) }}
|
||||
{{ macros::input(label="Kommentar", name="comments", type="text", value=log.comments) }}
|
||||
{{ macros::select(data=logtypes, select_name='logtype', default="Normal", selected_id=log.logtype) }}
|
||||
{% if not only_ones %}
|
||||
{{ log::rower_select(id="rowers"~log.id, selected=log.rowers, amount_seats=log.boat.amount_seats) }}
|
||||
{% endif %}
|
||||
<input type="submit" value="AUSFAHRT BEENDEN"/>
|
||||
</form>
|
||||
{% endmacro home %}
|
||||
|
||||
|
||||
{% macro rower_select(id, selected, amount_seats='', class='') %}
|
||||
<select multiple="multiple" name="rower[]" id="{{id}}" onclick="updateSelectedRowersCount{{id}}()" onblur="updateSelectedRowersCount{{id}}()" class="{{ class }}">
|
||||
{% for user in users %}
|
||||
{% set_global sel = false %}
|
||||
{% for rower in selected %}
|
||||
{% if rower.id == user.id %}
|
||||
{% set_global sel = true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<option value="{{ user.id }}" {% if sel %}selected{% endif %} onmousedown="event.preventDefault();this.selected = !this.selected; return false;">{{user.name}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<script>
|
||||
function updateSelectedRowersCount{{id}}() {
|
||||
document.getElementById('{{id}}-amount_rower_selected').textContent = document.getElementById('{{id}}').selectedOptions.length+1;
|
||||
}
|
||||
document.addEventListener('DOMContentLoaded', updateSelectedRowersCount{{id}});
|
||||
</script>
|
||||
<div class="col-span-2">
|
||||
<span id="{{id}}-amount_rower_selected"></span>/<span id="{{id}}-max_rower_allowed">{{amount_seats}}</span> Ruderer ausgewählt
|
||||
</div>
|
||||
<select multiple="multiple" name="rower[]" id="{{id}}" onclick="updateSelectedRowersCount{{id}}()" onblur="updateSelectedRowersCount{{id}}()" class="{{ class }}">
|
||||
{% for user in users %}
|
||||
{% set_global sel = false %}
|
||||
{% for rower in selected %}
|
||||
{% if rower.id == user.id %}
|
||||
{% set_global sel = true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<option value="{{ user.id }}" {% if sel %} selected {% endif %} onmousedown="event.preventDefault();this.selected = !this.selected; return false;">{{user.name}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<script>
|
||||
function updateSelectedRowersCount {{ id }}
|
||||
() {
|
||||
document.getElementById('{{ id }}-amount_rower_selected').textContent = document.getElementById('{{ id }}').selectedOptions.length + 1;
|
||||
}
|
||||
document.addEventListener('DOMContentLoaded', updateSelectedRowersCount {{ id }});
|
||||
</script>
|
||||
<div class="col-span-2">
|
||||
<span id="{{id}}-amount_rower_selected"></span>/<span id="{{id}}-max_rower_allowed">{{amount_seats}}</span>
|
||||
Ruderer ausgewählt
|
||||
</div>
|
||||
{% endmacro rower_select %}
|
||||
|
@ -1,3 +1,3 @@
|
||||
<svg width="16" height="16" fill="currentColor" class="inline h-4 w-4 text-primary-300 group-hover:text-primary-400 mr-2" viewBox="0 0 16 16" style="margin-top: -0.2rem">
|
||||
<path d="M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5v-2z"/>
|
||||
<svg width="16" height="16" fill="currentColor" class="inline h-4 w-4 text-primary-300 group-hover:text-primary-400 mr-2" viewbox="0 0 16 16" style="margin-top: -0.2rem">
|
||||
<path d="M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5v-2z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 357 B After Width: | Height: | Size: 354 B |
@ -1,3 +1,3 @@
|
||||
<svg class="h-5 w-5 text-primary-300 group-hover:text-primary-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
||||
<path fill-rule="evenodd" d="M10 1a4.5 4.5 0 00-4.5 4.5V9H5a2 2 0 00-2 2v6a2 2 0 002 2h10a2 2 0 002-2v-6a2 2 0 00-2-2h-.5V5.5A4.5 4.5 0 0010 1zm3 8V5.5a3 3 0 10-6 0V9h6z" clip-rule="evenodd" />
|
||||
<svg class="h-5 w-5 text-primary-300 group-hover:text-primary-400" viewbox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
||||
<path fill-rule="evenodd" d="M10 1a4.5 4.5 0 00-4.5 4.5V9H5a2 2 0 00-2 2v6a2 2 0 002 2h10a2 2 0 002-2v-6a2 2 0 00-2-2h-.5V5.5A4.5 4.5 0 0010 1zm3 8V5.5a3 3 0 10-6 0V9h6z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 330 B After Width: | Height: | Size: 328 B |
@ -1,112 +1,125 @@
|
||||
{% macro header(loggedin_user) %}
|
||||
<header class="bg-primary-900 text-white flex justify-center p-3 fixed w-full z-10">
|
||||
<div class="max-w-screen-xl w-full flex justify-between items-center">
|
||||
<div>
|
||||
<a href="/">
|
||||
Hü {{ loggedin_user.name }}
|
||||
</a>
|
||||
</div>
|
||||
<header class="bg-primary-900 text-white flex justify-center p-3 fixed w-full z-10">
|
||||
<div class="max-w-screen-xl w-full flex justify-between items-center">
|
||||
<div>
|
||||
<a href="/">
|
||||
Hü
|
||||
{{ loggedin_user.name }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a href="/faq" 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">
|
||||
{% include "includes/question-icon" %}
|
||||
<span class="sr-only">FAQs</span>
|
||||
</a>
|
||||
{% if loggedin_user.is_admin %}
|
||||
<a href="/stat" 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">
|
||||
STATS
|
||||
<span class="sr-only">Logbuch</span>
|
||||
</a>
|
||||
<a href="/log/show" 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">
|
||||
LOGBUCH HISTORY
|
||||
<span class="sr-only">Logbuch History</span>
|
||||
</a>
|
||||
<a href="/log" 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">
|
||||
LOGBUCH
|
||||
<span class="sr-only">Logbuch</span>
|
||||
</a>
|
||||
<a href="/admin/boat" 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">
|
||||
BOATS
|
||||
<span class="sr-only">Bootsverwaltung</span>
|
||||
</a>
|
||||
<div>
|
||||
<a href="/faq" 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">
|
||||
{% include "includes/question-icon" %}
|
||||
<span class="sr-only">FAQs</span>
|
||||
</a>
|
||||
{% if loggedin_user.is_admin %}
|
||||
<a href="/stat" 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">
|
||||
STATS
|
||||
<span class="sr-only">Logbuch</span>
|
||||
</a>
|
||||
<a href="/log/show" 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">
|
||||
LOGBUCH HISTORY
|
||||
<span class="sr-only">Logbuch History</span>
|
||||
</a>
|
||||
<a href="/log" 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">
|
||||
LOGBUCH
|
||||
<span class="sr-only">Logbuch</span>
|
||||
</a>
|
||||
<a href="/admin/boat" 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">
|
||||
BOATS
|
||||
<span class="sr-only">Bootsverwaltung</span>
|
||||
</a>
|
||||
|
||||
|
||||
<a href="/admin/user" 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">
|
||||
<svg class="inline h-4" width="16" height="16" fill="currentColor" class="bi bi-person-lines-fill" viewBox="0 0 16 16"> <path d="M6 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-5 6s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H1zM11 3.5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5zm.5 2.5a.5.5 0 0 0 0 1h4a.5.5 0 0 0 0-1h-4zm2 3a.5.5 0 0 0 0 1h2a.5.5 0 0 0 0-1h-2zm0 3a.5.5 0 0 0 0 1h2a.5.5 0 0 0 0-1h-2z"/> </svg>
|
||||
<span class="sr-only">Userverwaltung</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
<a href="/auth/logout" class="inline-flex justify-center rounded-md bg-primary-600 ml-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">
|
||||
<svg class="inline h-4" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-log-out"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>
|
||||
<span class="sr-only">Ausloggen</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="h-8"></div>
|
||||
<a href="/admin/user" 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">
|
||||
<svg class="inline h-4" width="16" height="16" fill="currentColor" class="bi bi-person-lines-fill" viewbox="0 0 16 16">
|
||||
<path d="M6 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-5 6s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H1zM11 3.5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5zm.5 2.5a.5.5 0 0 0 0 1h4a.5.5 0 0 0 0-1h-4zm2 3a.5.5 0 0 0 0 1h2a.5.5 0 0 0 0-1h-2zm0 3a.5.5 0 0 0 0 1h2a.5.5 0 0 0 0-1h-2z"/>
|
||||
</svg>
|
||||
<span class="sr-only">Userverwaltung</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
<a href="/auth/logout" class="inline-flex justify-center rounded-md bg-primary-600 ml-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">
|
||||
<svg class="inline h-4" width="24" height="24" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-log-out">
|
||||
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path>
|
||||
<polyline points="16 17 21 12 16 7"></polyline>
|
||||
<line x1="21" y1="12" x2="9" y2="12"></line>
|
||||
</svg>
|
||||
<span class="sr-only">Ausloggen</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="h-8"></div>
|
||||
{% endmacro header %}
|
||||
|
||||
{% macro input(label, name, type, required=false, class='rounded-md', value='', min='', hide_label=false, id='', autofocus=false, wrapper_class='') %}
|
||||
<div class="{{wrapper_class}}">
|
||||
<label for="{{ name }}" class="{% if hide_label %} sr-only {% else %} small text-gray-600 {% endif %}">{{ label }}</label>
|
||||
<input {% if id %} id="{{ id }}" {% else %} id="{{ name }}" {% endif %} name="{{ name }}" type="{{ type }}" {% if required %} required {% endif %} value="{{ value }}" class="input {{ class }}" placeholder="{% if hide_label %}{{ label }}{% endif %}" {% if min %} min="{{ min }}" {% endif %}{% if autofocus %}autofocus {% endif %}>
|
||||
</div>
|
||||
<div class="{{wrapper_class}}">
|
||||
<label for="{{ name }}" class="{% if hide_label %} sr-only {% else %} small text-gray-600 {% endif %}">{{ label }}</label>
|
||||
<input {% if id %} id="{{ id }}" {% else %} id="{{ name }}" {% endif %} name="{{ name }}" type="{{ type }}" {% if required %} required {% endif %} value="{{ value }}" class="input {{ class }}" placeholder="{% if hide_label %}{{ label }}{% endif %}" {% if min %} min="{{ min }}" {% endif %} {% if autofocus %} autofocus {% endif %}>
|
||||
</div>
|
||||
{% endmacro input %}
|
||||
|
||||
{% macro checkbox(label, name, id='', checked=false, class='') %}
|
||||
<label for="{{ name }}{{ id }}" class="flex items-center cursor-pointer hover:text-gray-900 {{ class }}">
|
||||
<input type="checkbox" id="{{ name }}{{ id }}" name="{{ name }}" {% if checked %} checked {% endif %} class="h-4 w-4 accent-primary-600 mr-2"/> {{ label }}
|
||||
</label>
|
||||
<label for="{{ name }}{{ id }}" class="flex items-center cursor-pointer hover:text-gray-900 {{ class }}">
|
||||
<input type="checkbox" id="{{ name }}{{ id }}" name="{{ name }}" {% if checked %} checked {% endif %} class="h-4 w-4 accent-primary-600 mr-2"/>
|
||||
{{ label }}
|
||||
</label>
|
||||
{% endmacro checkbox %}
|
||||
|
||||
{% macro select(data, select_name='trip_type', default='', selected_id='', display='', extras='', class='') %}
|
||||
{% if display == '' %}
|
||||
{% set display = ["name"] %}
|
||||
{% endif %}
|
||||
<select name="{{ select_name }}" id="{{ select_name }}" class="input rounded-md h-10 {{ class }}">
|
||||
{% 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 %} extra-{{extra}}={{d[extra]}} {% endfor %}{% endif %}>
|
||||
{% for displa in display -%}
|
||||
{%- if d[displa] -%}
|
||||
{{- d[displa] -}}
|
||||
{%- else -%}
|
||||
{{- displa -}}
|
||||
{%- endif -%}
|
||||
{%- endfor %}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% if display == '' %}
|
||||
{% set display = ["name"] %}
|
||||
{% endif %}
|
||||
<select name="{{ select_name }}" id="{{ select_name }}" class="input rounded-md h-10 {{ class }}">
|
||||
{% 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 %} extra- {{extra}}={{d[extra]}} {% endfor %} {% endif %}>
|
||||
{% for displa in display -%}
|
||||
{%- if d[displa] -%}
|
||||
{{- d[displa] -}}
|
||||
{%- else -%}
|
||||
{{- displa -}}
|
||||
{%- endif -%}
|
||||
{%- endfor %}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% endmacro select %}
|
||||
|
||||
|
||||
|
||||
{% macro alert(message, type, class='') %}
|
||||
<div class="{{ class }} alert-{{ type }} text-white px-3 py-1 rounded-md text-center">
|
||||
{{ message }}
|
||||
</div>
|
||||
<div class="{{ class }} alert-{{ type }} text-white px-3 py-1 rounded-md text-center">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endmacro alert %}
|
||||
|
||||
{% macro box(participants, empty_seats='', header='Freie Plätze:', text='Keine Ruderer angemeldet', bg='primary-600', color='white') %}
|
||||
<div class="text-{{ color }} bg-{{ bg }} text-center p-1 mt-1 rounded-t-md">{{ header }} {{ empty_seats }}</div>
|
||||
<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">(Gast)</small> {% endif %}<span class="hidden">(angemeldet seit {{ rower.registered_at }})</span><br />
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{{ text }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="text-{{ color }} bg-{{ bg }} text-center p-1 mt-1 rounded-t-md">{{ header }}
|
||||
{{ empty_seats }}</div>
|
||||
<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">(Gast)</small>
|
||||
{% endif %}
|
||||
<span class="hidden">(angemeldet seit
|
||||
{{ rower.registered_at }})</span><br/>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{{ text }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro box %}
|
||||
|
||||
{% macro faq(question, answer) %}
|
||||
<div>
|
||||
<h2 class="flex mb-4 text-lg font-bold text-primary-900">
|
||||
{{ question }}
|
||||
</h2>
|
||||
<p class="text-primary-950">{{ answer | safe }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<h2 class="flex mb-4 text-lg font-bold text-primary-900">
|
||||
{{ question }}
|
||||
</h2>
|
||||
<p class="text-primary-950">{{ answer | safe }}</p>
|
||||
</div>
|
||||
{% endmacro faq %}
|
||||
|
@ -1,3 +1,3 @@
|
||||
<svg class="inline h-5 w-5" width="16" height="16" fill="currentColor" class="bi bi-plus" 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"/>
|
||||
<svg class="inline h-5 w-5" width="16" height="16" fill="currentColor" class="bi bi-plus" 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"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 236 B After Width: | Height: | Size: 233 B |
@ -1 +1,3 @@
|
||||
<svg class="flex-shrink-0 w-4 h-4 inline-block" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>
|
||||
<svg class="flex-shrink-0 w-4 h-4 inline-block" fill="currentColor" viewbox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 370 B After Width: | Height: | Size: 373 B |
@ -3,284 +3,286 @@
|
||||
{% extends "base" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="max-w-screen-xl w-full grid sm:grid-cols-2 lg:grid-cols-3 gap-4">
|
||||
{% if flash %}
|
||||
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
||||
{% endif %}
|
||||
<div class="max-w-screen-xl w-full grid sm:grid-cols-2 lg:grid-cols-3 gap-4">
|
||||
{% if flash %}
|
||||
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
||||
{% endif %}
|
||||
|
||||
<h1 class="h1 sm:col-span-2 lg:col-span-3">Ausfahrten</h1>
|
||||
<h1 class="h1 sm:col-span-2 lg:col-span-3">Ausfahrten</h1>
|
||||
|
||||
{% include "includes/buttons" %}
|
||||
{% include "includes/buttons" %}
|
||||
|
||||
{% for day in days %}
|
||||
{% set amount_trips = day.planned_events | length + day.trips | length %}
|
||||
{% set_global day_cox_needed = false %}
|
||||
{% if day.planned_events | length > 0 %}
|
||||
{% for planned_event in day.planned_events %}
|
||||
{% if planned_event.cox_needed %}
|
||||
{% set_global day_cox_needed = true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% for day in days %}
|
||||
{% set amount_trips = day.planned_events | length + day.trips | length %}
|
||||
{% set_global day_cox_needed = false %}
|
||||
{% if day.planned_events | length > 0 %}
|
||||
{% for planned_event in day.planned_events %}
|
||||
{% if planned_event.cox_needed %}
|
||||
{% set_global day_cox_needed = true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<div class="bg-white rounded-md flex justify-between flex-col shadow reset-js" style="min-height: 10rem;" data-trips="{{ amount_trips }}" data-month="{{ day.day| date(format='%m') }}" data-coxneeded="{{ day_cox_needed }}">
|
||||
<div>
|
||||
<h2 class="font-bold uppercase tracking-wide text-center rounded-t-md {% if day.is_pinned %} text-white bg-primary-950 {% else %} text-primary-950 bg-gray-200 bg-opacity-80 {% endif %} text-lg px-3 py-3 ">{{ day.day| date(format="%d.%m.%Y") }}
|
||||
<small class="inline-block ml-1 text-xs {% if day.is_pinned %} text-gray-200 {% else %} text-gray-500 {% endif %}">{{ day.day | date(format="%A", locale="de_AT") }}</small>
|
||||
</h2>
|
||||
<div class="bg-white rounded-md flex justify-between flex-col shadow reset-js" style="min-height: 10rem;" data-trips="{{ amount_trips }}" data-month="{{ day.day| date(format='%m') }}" data-coxneeded="{{ day_cox_needed }}">
|
||||
<div>
|
||||
<h2 class="font-bold uppercase tracking-wide text-center rounded-t-md {% if day.is_pinned %} text-white bg-primary-950 {% else %} text-primary-950 bg-gray-200 bg-opacity-80 {% endif %} text-lg px-3 py-3 ">{{ day.day| date(format="%d.%m.%Y") }}
|
||||
<small class="inline-block ml-1 text-xs {% if day.is_pinned %} text-gray-200 {% else %} text-gray-500 {% endif %}">{{ day.day | date(format="%A", locale="de_AT") }}</small>
|
||||
</h2>
|
||||
|
||||
{% if day.planned_events | length > 0 or day.trips | length > 0 %}
|
||||
<div class="grid grid-cols-1 gap-3 mb-3">
|
||||
{% if day.planned_events | length > 0 or day.trips | length > 0 %}
|
||||
<div
|
||||
class="grid grid-cols-1 gap-3 mb-3">
|
||||
|
||||
{# --- START Events --- #}
|
||||
{% if day.planned_events | length > 0 %}
|
||||
{% for planned_event in day.planned_events | sort(attribute="planned_starting_time") %}
|
||||
{% set amount_cur_cox = planned_event.cox | length %}
|
||||
{% set amount_cox_missing = planned_event.planned_amount_cox - amount_cur_cox %}
|
||||
<div class="pt-2 px-3 border-t" style="order: {{ planned_event.planned_starting_time | replace(from=":", to="") | trim_start_matches(pat="0") }}">
|
||||
<div class="flex justify-between items-center">
|
||||
<div class="mr-1">
|
||||
<strong class="text-primary-900">
|
||||
{{ planned_event.planned_starting_time }} Uhr
|
||||
</strong>
|
||||
<small class="text-gray-600">({{ planned_event.name }}{% if planned_event.trip_type %} - {{ planned_event.trip_type.icon | safe }}{{ planned_event.trip_type.name }}{% endif %})</small><br />
|
||||
{# --- START Events --- #}
|
||||
{% if day.planned_events | length > 0 %}
|
||||
{% for planned_event in day.planned_events | sort(attribute="planned_starting_time") %}
|
||||
{% set amount_cur_cox = planned_event.cox | length %}
|
||||
{% set amount_cox_missing = planned_event.planned_amount_cox - amount_cur_cox %}
|
||||
<div class="pt-2 px-3 border-t" style="order: {{ planned_event.planned_starting_time | replace(from=" :", to=" ") | trim_start_matches(pat=" 0") }}">
|
||||
<div class="flex justify-between items-center">
|
||||
<div class="mr-1">
|
||||
<strong class="text-primary-900">
|
||||
{{ planned_event.planned_starting_time }}
|
||||
Uhr
|
||||
</strong>
|
||||
<small class="text-gray-600">({{ planned_event.name }}
|
||||
{% if planned_event.trip_type %}
|
||||
-
|
||||
{{ planned_event.trip_type.icon | safe }}{{ planned_event.trip_type.name }}
|
||||
{% endif %})</small><br/>
|
||||
|
||||
<a href="#" data-sidebar="true" data-trigger="sidebar"
|
||||
data-header="<strong>{{ planned_event.planned_starting_time }} Uhr</strong> ({{ planned_event.name }}){% if planned_event.trip_type %}<small class='block'>{{ planned_event.trip_type.desc }}</small>{% endif %}{% if planned_event.notes %}<small class='block'>{{ planned_event.notes }}</small>{% endif %}"
|
||||
data-body="#event{{ planned_event.trip_details_id }}"
|
||||
class="inline-block link-primary mr-3">
|
||||
Details
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-right grid gap-2">
|
||||
{# --- START Row Buttons --- #}
|
||||
{% set_global cur_user_participates = false %}
|
||||
{% for rower in planned_event.rower%}
|
||||
{% if rower.name == loggedin_user.name %}
|
||||
{% set_global cur_user_participates = true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if cur_user_participates %}
|
||||
<a href="/remove/{{ planned_event.trip_details_id }}" class="btn btn-attention btn-fw">Abmelden</a>
|
||||
{% endif %}
|
||||
{% if planned_event.max_people > planned_event.rower | length %}
|
||||
{% if cur_user_participates == false %}
|
||||
<a href="/join/{{ planned_event.trip_details_id }}" class="btn btn-primary btn-fw" {% if planned_event.trip_type %}onclick="return confirm('{{ planned_event.trip_type.question }}');"{% endif %}>Mitrudern</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{# --- END Row Buttons --- #}
|
||||
<a href="#" data-sidebar="true" data-trigger="sidebar" data-header="<strong>{{ planned_event.planned_starting_time }} Uhr</strong> ({{ planned_event.name }}){% if planned_event.trip_type %}<small class='block'>{{ planned_event.trip_type.desc }}</small>{% endif %}{% if planned_event.notes %}<small class='block'>{{ planned_event.notes }}</small>{% endif %}" data-body="#event{{ planned_event.trip_details_id }}" class="inline-block link-primary mr-3">
|
||||
Details
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
class="text-right grid gap-2">
|
||||
{# --- START Row Buttons --- #}
|
||||
{% set_global cur_user_participates = false %}
|
||||
{% for rower in planned_event.rower%}
|
||||
{% if rower.name == loggedin_user.name %}
|
||||
{% set_global cur_user_participates = true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if cur_user_participates %}
|
||||
<a href="/remove/{{ planned_event.trip_details_id }}" class="btn btn-attention btn-fw">Abmelden</a>
|
||||
{% endif %}
|
||||
{% if planned_event.max_people > planned_event.rower | length %}
|
||||
{% if cur_user_participates == false %}
|
||||
<a href="/join/{{ planned_event.trip_details_id }}" class="btn btn-primary btn-fw" {% if planned_event.trip_type %} onclick="return confirm('{{ planned_event.trip_type.question }}');" {% endif %}>Mitrudern</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{# --- END Row Buttons --- #}
|
||||
|
||||
{# --- START Cox Buttons --- #}
|
||||
{% if loggedin_user.is_cox %}
|
||||
{% set_global cur_user_participates = false %}
|
||||
{% for cox in planned_event.cox %}
|
||||
{% if cox.name == loggedin_user.name %}
|
||||
{% set_global cur_user_participates = true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if cur_user_participates %}
|
||||
<a href="/cox/remove/{{ planned_event.id }}" class="block btn btn-attention btn-fw">
|
||||
{% include "includes/cox-icon" %}
|
||||
Abmelden
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="/cox/join/{{ planned_event.id }}" class="block btn {% if amount_cox_missing > 0 %} btn-dark {% else %} btn-gray {% endif %} btn-fw" {% if planned_event.trip_type %}onclick="return confirm('{{ planned_event.trip_type.question }}');"{% endif %}>
|
||||
{% include "includes/cox-icon" %}
|
||||
Steuern
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{# --- END Cox Buttons --- #}
|
||||
</div>
|
||||
</div>
|
||||
{# --- START Cox Buttons --- #}
|
||||
{% if loggedin_user.is_cox %}
|
||||
{% set_global cur_user_participates = false %}
|
||||
{% for cox in planned_event.cox %}
|
||||
{% if cox.name == loggedin_user.name %}
|
||||
{% set_global cur_user_participates = true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if cur_user_participates %}
|
||||
<a href="/cox/remove/{{ planned_event.id }}" class="block btn btn-attention btn-fw">
|
||||
{% include "includes/cox-icon" %}
|
||||
Abmelden
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="/cox/join/{{ planned_event.id }}" class="block btn {% if amount_cox_missing > 0 %} btn-dark {% else %} btn-gray {% endif %} btn-fw" {% if planned_event.trip_type %} onclick="return confirm('{{ planned_event.trip_type.question }}');" {% endif %}>
|
||||
{% include "includes/cox-icon" %}
|
||||
Steuern
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{# --- END Cox Buttons --- #}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# --- START Sidebar Content --- #}
|
||||
<div class="hidden">
|
||||
<div id="event{{ planned_event.trip_details_id }}">
|
||||
{# --- START List Coxes --- #}
|
||||
{% if planned_event.planned_amount_cox > 0 %}
|
||||
{% if amount_cox_missing > 0 %}
|
||||
{{ macros::box(participants=planned_event.cox, empty_seats=planned_event.planned_amount_cox - amount_cur_cox, header='Noch benötigte Steuerleute:', text='Keine Steuerleute angemeldet') }}
|
||||
{% else %}
|
||||
{{ macros::box(participants=planned_event.cox, empty_seats="", header='Genügend Steuerleute haben sich angemeldet :-)', text='Keine Steuerleute angemeldet') }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{# --- END List Coxes --- #}
|
||||
{# --- START Sidebar Content --- #}
|
||||
<div class="hidden">
|
||||
<div
|
||||
id="event{{ planned_event.trip_details_id }}">
|
||||
{# --- START List Coxes --- #}
|
||||
{% if planned_event.planned_amount_cox > 0 %}
|
||||
{% if amount_cox_missing > 0 %}
|
||||
{{ macros::box(participants=planned_event.cox, empty_seats=planned_event.planned_amount_cox - amount_cur_cox, header='Noch benötigte Steuerleute:', text='Keine Steuerleute angemeldet') }}
|
||||
{% else %}
|
||||
{{ macros::box(participants=planned_event.cox, empty_seats="", header='Genügend Steuerleute haben sich angemeldet :-)', text='Keine Steuerleute angemeldet') }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{# --- END List Coxes --- #}
|
||||
|
||||
{# --- START List Rowers --- #}
|
||||
{% if planned_event.max_people > 0 %}
|
||||
{% set amount_cur_rower = planned_event.rower | length %}
|
||||
{{ macros::box(participants=planned_event.rower, empty_seats=planned_event.max_people - amount_cur_rower, bg='primary-100', color='black') }}
|
||||
{% endif %}
|
||||
{# --- END List Rowers --- #}
|
||||
{# --- START List Rowers --- #}
|
||||
{% if planned_event.max_people > 0 %}
|
||||
{% set amount_cur_rower = planned_event.rower | length %}
|
||||
{{ macros::box(participants=planned_event.rower, empty_seats=planned_event.max_people - amount_cur_rower, bg='primary-100', color='black') }}
|
||||
{% endif %}
|
||||
{# --- END List Rowers --- #}
|
||||
|
||||
{% if planned_event.allow_guests %}
|
||||
<div class="text-primary-900 bg-primary-50 text-center p-1 mb-4">Gäste willkommen!</div>
|
||||
{% endif %}
|
||||
{% if planned_event.allow_guests %}
|
||||
<div class="text-primary-900 bg-primary-50 text-center p-1 mb-4">Gäste willkommen!</div>
|
||||
{% endif %}
|
||||
|
||||
{% if loggedin_user.is_admin %}
|
||||
{% if loggedin_user.is_admin %}
|
||||
|
||||
{# --- START Edit Form --- #}
|
||||
<div class="bg-gray-100 p-3 mt-4 rounded-md">
|
||||
<h3 class="text-primary-950 font-bold uppercase tracking-wide mb-2">Ausfahrt bearbeiten</h3>
|
||||
<form action="/admin/planned-event" method="post" class="grid gap-3">
|
||||
<input type="hidden" name="_method" value="put" />
|
||||
<input type="hidden" name="id" value="{{ planned_event.id }}" />
|
||||
{{ macros::input(label='Anzahl Ruderer', name='max_people', type='number', required=true, value=planned_event.max_people, min='0') }}
|
||||
{{ macros::input(label='Anzahl Steuerleute', name='planned_amount_cox', type='number', value=planned_event.planned_amount_cox, required=true, min='0') }}
|
||||
{{ macros::checkbox(label='Immer anzeigen', name='always_show', id=planned_event.id,checked=planned_event.always_show) }}
|
||||
{{ macros::input(label='Anmerkungen', name='notes', type='input', value=planned_event.notes) }}
|
||||
{# --- START Edit Form --- #}
|
||||
<div class="bg-gray-100 p-3 mt-4 rounded-md">
|
||||
<h3 class="text-primary-950 font-bold uppercase tracking-wide mb-2">Ausfahrt bearbeiten</h3>
|
||||
<form action="/admin/planned-event" method="post" class="grid gap-3">
|
||||
<input type="hidden" name="_method" value="put"/>
|
||||
<input type="hidden" name="id" value="{{ planned_event.id }}"/>
|
||||
{{ macros::input(label='Anzahl Ruderer', name='max_people', type='number', required=true, value=planned_event.max_people, min='0') }}
|
||||
{{ macros::input(label='Anzahl Steuerleute', name='planned_amount_cox', type='number', value=planned_event.planned_amount_cox, required=true, min='0') }}
|
||||
{{ macros::checkbox(label='Immer anzeigen', name='always_show', id=planned_event.id,checked=planned_event.always_show) }}
|
||||
{{ macros::input(label='Anmerkungen', name='notes', type='input', value=planned_event.notes) }}
|
||||
|
||||
<input value="Speichern" class="btn btn-primary" type="submit" />
|
||||
</form>
|
||||
</div>
|
||||
{# --- END Edit Form --- #}
|
||||
<input value="Speichern" class="btn btn-primary" type="submit"/>
|
||||
</form>
|
||||
</div>
|
||||
{# --- END Edit Form --- #}
|
||||
|
||||
{# --- START Delete Btn --- #}
|
||||
<div class="text-right">
|
||||
<a href="/admin/planned-event/{{ planned_event.id }}/delete" class="inline-block btn btn-alert">
|
||||
{% include "includes/delete-icon" %}
|
||||
Termin löschen
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{# --- END Delete Btn --- #}
|
||||
</div>
|
||||
</div>
|
||||
{# --- END Sidebar Content --- #}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{# --- END Events --- #}
|
||||
{# --- START Delete Btn --- #}
|
||||
<div class="text-right">
|
||||
<a href="/admin/planned-event/{{ planned_event.id }}/delete" class="inline-block btn btn-alert">
|
||||
{% include "includes/delete-icon" %}
|
||||
Termin löschen
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{# --- END Delete Btn --- #}
|
||||
</div>
|
||||
</div>
|
||||
{# --- END Sidebar Content --- #}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{# --- END Events --- #}
|
||||
|
||||
{# --- START Trips --- #}
|
||||
{% if day.trips | length > 0 %}
|
||||
{% for trip in day.trips | sort(attribute="planned_starting_time") %}
|
||||
<div class="pt-2 px-3 reset-js border-t" style="order: {{ trip.planned_starting_time | replace(from=":", to="") | trim_start_matches(pat="0") }}" data-coxneeded="false">
|
||||
<div class="flex justify-between items-center">
|
||||
<div class="mr-1">
|
||||
{% if trip.max_people == 0 %}
|
||||
<strong class="text-[#f43f5e]">⚠ {{ trip.planned_starting_time }} Uhr</strong>
|
||||
<small class="text-[#f43f5e]">(Absage {{ trip.cox_name }}{% if trip.trip_type %} - {{ trip.trip_type.icon | safe }}{{ trip.trip_type.name }}{% endif %})</small>
|
||||
{% else %}
|
||||
<strong class="text-primary-900">{{ trip.planned_starting_time }} Uhr</strong>
|
||||
<small class="text-gray-600">({{ trip.cox_name }}{% if trip.trip_type %} - {{ trip.trip_type.icon | safe }}{{ trip.trip_type.name }}{% endif %})</small>
|
||||
{% endif %}
|
||||
<br />
|
||||
<a href="#" data-sidebar="true" data-trigger="sidebar"
|
||||
data-header="<strong>{% if trip.max_people == 0 %}⚠ {% endif %}{{ trip.planned_starting_time }} Uhr</strong> ({{ trip.cox_name }}){% if trip.trip_type %}<small class='block'>{{ trip.trip_type.desc }}</small>{% endif %}{% if trip.notes %}<small class='block'>{{ trip.notes }}</small>{% endif %}"
|
||||
data-body="#trip{{ trip.trip_details_id }}"
|
||||
class="inline-block link-primary mr-3">
|
||||
Details
|
||||
</a>
|
||||
</div>
|
||||
{# --- START Trips --- #}
|
||||
{% if day.trips | length > 0 %}
|
||||
{% for trip in day.trips | sort(attribute="planned_starting_time") %}
|
||||
<div class="pt-2 px-3 reset-js border-t" style="order: {{ trip.planned_starting_time | replace(from=" :", to=" ") | trim_start_matches(pat=" 0") }}" data-coxneeded="false">
|
||||
<div class="flex justify-between items-center">
|
||||
<div class="mr-1">
|
||||
{% if trip.max_people == 0 %}
|
||||
<strong class="text-[#f43f5e]">⚠
|
||||
{{ trip.planned_starting_time }}
|
||||
Uhr</strong>
|
||||
<small class="text-[#f43f5e]">(Absage
|
||||
{{ trip.cox_name }}
|
||||
{% if trip.trip_type %}
|
||||
-
|
||||
{{ trip.trip_type.icon | safe }}{{ trip.trip_type.name }}
|
||||
{% endif %})</small>
|
||||
{% else %}
|
||||
<strong class="text-primary-900">{{ trip.planned_starting_time }}
|
||||
Uhr</strong>
|
||||
<small class="text-gray-600">({{ trip.cox_name }}
|
||||
{% if trip.trip_type %}
|
||||
-
|
||||
{{ trip.trip_type.icon | safe }}{{ trip.trip_type.name }}
|
||||
{% endif %})</small>
|
||||
{% endif %}
|
||||
<br/>
|
||||
<a href="#" data-sidebar="true" data-trigger="sidebar" data-header="<strong>{% if trip.max_people == 0 %}⚠ {% endif %}{{ trip.planned_starting_time }} Uhr</strong> ({{ trip.cox_name }}){% if trip.trip_type %}<small class='block'>{{ trip.trip_type.desc }}</small>{% endif %}{% if trip.notes %}<small class='block'>{{ trip.notes }}</small>{% endif %}" data-body="#trip{{ trip.trip_details_id }}" class="inline-block link-primary mr-3">
|
||||
Details
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{% set_global cur_user_participates = false %}
|
||||
{% for rower in trip.rower %}
|
||||
{% if rower.name == loggedin_user.name %}
|
||||
{% set_global cur_user_participates = true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if cur_user_participates %}
|
||||
<a href="/remove/{{ trip.trip_details_id }}"
|
||||
class="btn btn-attention btn-fw">Abmelden</a>
|
||||
{% endif %}
|
||||
{% if trip.max_people > trip.rower | length and trip.cox_id != loggedin_user.id and cur_user_participates == false%}
|
||||
<a href="/join/{{ trip.trip_details_id }}"
|
||||
class="btn btn-primary btn-fw" {% if trip.trip_type %}onclick="return confirm('{{ trip.trip_type.question }}');"{% endif %}>Mitrudern</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{# --- START Sidebar Content --- #}
|
||||
<div class="hidden">
|
||||
<div id="trip{{ trip.trip_details_id }}">
|
||||
{% if trip.max_people == 0 %}
|
||||
{# --- border-[#f43f5e] bg-[#f43f5e] --- #}
|
||||
{{ macros::box(participants=trip.rower,bg='[#f43f5e]',header='Absage') }}
|
||||
{% else %}
|
||||
{% set amount_cur_rower = trip.rower | length %}
|
||||
{{ macros::box(participants=trip.rower, empty_seats=trip.max_people - amount_cur_rower, bg='primary-100', color='black') }}
|
||||
{% endif %}
|
||||
<div>
|
||||
{% set_global cur_user_participates = false %}
|
||||
{% for rower in trip.rower %}
|
||||
{% if rower.name == loggedin_user.name %}
|
||||
{% set_global cur_user_participates = true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if cur_user_participates %}
|
||||
<a href="/remove/{{ trip.trip_details_id }}" class="btn btn-attention btn-fw">Abmelden</a>
|
||||
{% endif %}
|
||||
{% if trip.max_people > trip.rower | length and trip.cox_id != loggedin_user.id and cur_user_participates == false%}
|
||||
<a href="/join/{{ trip.trip_details_id }}" class="btn btn-primary btn-fw" {% if trip.trip_type %} onclick="return confirm('{{ trip.trip_type.question }}');" {% endif %}>Mitrudern</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{# --- START Sidebar Content --- #}
|
||||
<div class="hidden">
|
||||
<div id="trip{{ trip.trip_details_id }}">
|
||||
{% if trip.max_people == 0 %}
|
||||
{# --- border-[#f43f5e] bg-[#f43f5e] --- #}
|
||||
{{ macros::box(participants=trip.rower,bg='[#f43f5e]',header='Absage') }}
|
||||
{% else %}
|
||||
{% set amount_cur_rower = trip.rower | length %}
|
||||
{{ macros::box(participants=trip.rower, empty_seats=trip.max_people - amount_cur_rower, bg='primary-100', color='black') }}
|
||||
{% endif %}
|
||||
|
||||
{# --- START Edit Form --- #}
|
||||
{% if trip.cox_id == loggedin_user.id %}
|
||||
<div class="bg-gray-100 p-3 mt-4 rounded-md">
|
||||
<h3 class="text-primary-950 font-bold uppercase tracking-wide mb-2">Ausfahrt bearbeiten</h3>
|
||||
<form action="/cox/trip/{{ trip.id }}" method="post" class="grid gap-3">
|
||||
{{ macros::input(label='Anzahl Ruderer', name='max_people', type='number', required=true, value=trip.max_people, min='0') }}
|
||||
{{ macros::input(label='Anmerkungen', name='notes', type='input', value=trip.notes) }}
|
||||
{{ macros::checkbox(label='Immer anzeigen', name='always_show', id=trip.id,checked=trip.always_show) }}
|
||||
{{ macros::select(select_name='trip_type', data=trip_types, default='Reguläre Ausfahrt', selected_id=trip.trip_type_id) }}
|
||||
{# --- START Edit Form --- #}
|
||||
{% if trip.cox_id == loggedin_user.id %}
|
||||
<div class="bg-gray-100 p-3 mt-4 rounded-md">
|
||||
<h3 class="text-primary-950 font-bold uppercase tracking-wide mb-2">Ausfahrt bearbeiten</h3>
|
||||
<form action="/cox/trip/{{ trip.id }}" method="post" class="grid gap-3">
|
||||
{{ macros::input(label='Anzahl Ruderer', name='max_people', type='number', required=true, value=trip.max_people, min='0') }}
|
||||
{{ macros::input(label='Anmerkungen', name='notes', type='input', value=trip.notes) }}
|
||||
{{ macros::checkbox(label='Immer anzeigen', name='always_show', id=trip.id,checked=trip.always_show) }}
|
||||
{{ macros::select(select_name='trip_type', data=trip_types, default='Reguläre Ausfahrt', selected_id=trip.trip_type_id) }}
|
||||
|
||||
<input value="Speichern" class="btn btn-primary" type="submit" />
|
||||
</form>
|
||||
</div>
|
||||
{% if trip.rower | length == 0 %}
|
||||
<div class="text-right mt-6">
|
||||
<a href="/cox/remove/trip/{{ trip.id }}" class="inline-block btn btn-alert">
|
||||
{% include "includes/delete-icon" %}
|
||||
Termin löschen
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{# --- END Edit Form --- #}
|
||||
</div>
|
||||
</div>
|
||||
{# --- END Sidebar Content --- #}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{# --- END Trips --- #}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<input value="Speichern" class="btn btn-primary" type="submit"/>
|
||||
</form>
|
||||
</div>
|
||||
{% if trip.rower | length == 0 %}
|
||||
<div class="text-right mt-6">
|
||||
<a href="/cox/remove/trip/{{ trip.id }}" class="inline-block btn btn-alert">
|
||||
{% include "includes/delete-icon" %}
|
||||
Termin löschen
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{# --- END Edit Form --- #}
|
||||
</div>
|
||||
</div>
|
||||
{# --- END Sidebar Content --- #}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{# --- END Trips --- #}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{# --- START Add Buttons --- #}
|
||||
{% if loggedin_user.is_admin or loggedin_user.is_cox %}
|
||||
<div class="grid {% if loggedin_user.is_admin %} grid-cols-2 {% endif %} text-center">
|
||||
{% if loggedin_user.is_admin %}
|
||||
<a href="#" data-sidebar="true" data-trigger="sidebar"
|
||||
data-header="<strong>Event</strong> am {{ day.day| date(format='%d.%m.%Y') }} erstellen"
|
||||
data-day="{{ day.day }}"
|
||||
data-body="#addEventForm"
|
||||
class="relative inline-block w-full bg-primary-900 hover:bg-primary-950 focus:bg-primary-950 text-white py-2 rounded-bl-md text-sm font-semibold">
|
||||
<span class="absolute inset-y-0 left-0 flex items-center pl-3">
|
||||
{% include "includes/plus-icon" %}
|
||||
</span>
|
||||
Event
|
||||
</a>
|
||||
{% endif %}
|
||||
{# --- START Add Buttons --- #}
|
||||
{% if loggedin_user.is_admin or loggedin_user.is_cox %}
|
||||
<div class="grid {% if loggedin_user.is_admin %} grid-cols-2 {% endif %} text-center">
|
||||
{% if loggedin_user.is_admin %}
|
||||
<a href="#" data-sidebar="true" data-trigger="sidebar" data-header="<strong>Event</strong> am {{ day.day| date(format='%d.%m.%Y') }} erstellen" data-day="{{ day.day }}" data-body="#addEventForm" class="relative inline-block w-full bg-primary-900 hover:bg-primary-950 focus:bg-primary-950 text-white py-2 rounded-bl-md text-sm font-semibold">
|
||||
<span class="absolute inset-y-0 left-0 flex items-center pl-3">
|
||||
{% include "includes/plus-icon" %}
|
||||
</span>
|
||||
Event
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if loggedin_user.is_cox%}
|
||||
<a href="#" data-sidebar="true" data-trigger="sidebar"
|
||||
data-header="<strong>Ausfahrt</strong> am {{ day.day| date(format='%d.%m.%Y') }} erstellen"
|
||||
data-day="{{ day.day }}"
|
||||
data-body="#sidebarForm"
|
||||
class="relative inline-block w-full py-2 text-primary-900 hover:text-primary-950 focus:text-primary-950 text-sm font-semibold bg-gray-100 hover:bg-gray-200 focus:bg-gray-200 {% if loggedin_user.is_admin %} rounded-br-md {% else %} rounded-b-md {% endif %}">
|
||||
<span class="absolute inset-y-0 left-0 flex items-center pl-3">
|
||||
{% include "includes/plus-icon" %}
|
||||
</span>
|
||||
Ausfahrt
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{# --- END Add Buttons --- #}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if loggedin_user.is_cox%}
|
||||
<a href="#" data-sidebar="true" data-trigger="sidebar" data-header="<strong>Ausfahrt</strong> am {{ day.day| date(format='%d.%m.%Y') }} erstellen" data-day="{{ day.day }}" data-body="#sidebarForm" class="relative inline-block w-full py-2 text-primary-900 hover:text-primary-950 focus:text-primary-950 text-sm font-semibold bg-gray-100 hover:bg-gray-200 focus:bg-gray-200 {% if loggedin_user.is_admin %} rounded-br-md {% else %} rounded-b-md {% endif %}">
|
||||
<span class="absolute inset-y-0 left-0 flex items-center pl-3">
|
||||
{% include "includes/plus-icon" %}
|
||||
</span>
|
||||
Ausfahrt
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{# --- END Add Buttons --- #}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include "dynamics/sidebar" %}
|
||||
|
||||
{% if loggedin_user.is_cox %}
|
||||
{% include "forms/trip" %}
|
||||
{% include "forms/trip" %}
|
||||
{% endif %}
|
||||
|
||||
{% if loggedin_user.is_admin %}
|
||||
{% include "forms/event" %}
|
||||
{% endif %}
|
||||
|
||||
{% endblock content %}
|
||||
{% include "forms/event" %}
|
||||
{% endif %}{% endblock content %}
|
||||
|
@ -5,29 +5,29 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="w-full">
|
||||
<h1 class="h1">Logbuch</h1>
|
||||
<div class="w-full">
|
||||
<h1 class="h1">Logbuch</h1>
|
||||
|
||||
{% if flash %}
|
||||
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
||||
{% endif %}
|
||||
{% if flash %}
|
||||
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
||||
{% endif %}
|
||||
|
||||
<div class="w-full grid grid-cols-5 gap-3 mt-5">
|
||||
<div class="bg-white p-3">
|
||||
{{ log::show_boats(only_ones=false) }}
|
||||
</div>
|
||||
<div class="col-span-3 bg-white p-3">
|
||||
<h2>Neue Ausfahrt starten</h2>
|
||||
{{ log::new(only_ones=false, allow_any_shipmaster=true, shipmaster=-1) }}
|
||||
<div class="w-full grid grid-cols-5 gap-3 mt-5">
|
||||
<div class="bg-white p-3">
|
||||
{{ log::show_boats(only_ones=false) }}
|
||||
</div>
|
||||
<div class="col-span-3 bg-white p-3">
|
||||
<h2>Neue Ausfahrt starten</h2>
|
||||
{{ log::new(only_ones=false, allow_any_shipmaster=true, shipmaster=-1) }}
|
||||
|
||||
</div>
|
||||
<div class="bg-white p-3">
|
||||
<h2 class="h2">Am Wasser</h2>
|
||||
{% for log in on_water %}
|
||||
{{ log::show(log=log, state="on_water", allowed_to_close=true, only_ones=false) }}
|
||||
<hr />
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-white p-3">
|
||||
<h2 class="h2">Am Wasser</h2>
|
||||
{% for log in on_water %}
|
||||
{{ log::show(log=log, state="on_water", allowed_to_close=true, only_ones=false) }}
|
||||
<hr/>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content%}
|
||||
|
@ -5,12 +5,12 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="max-w-screen-lg w-full">
|
||||
<h1 class="h1">Logbuch</h1>
|
||||
{% for log in logs %}
|
||||
{{ log::show(log=log, state="completed", only_ones=false) }}
|
||||
<hr />
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="max-w-screen-lg w-full">
|
||||
<h1 class="h1">Logbuch</h1>
|
||||
{% for log in logs %}
|
||||
{{ log::show(log=log, state="completed", only_ones=false) }}
|
||||
<hr/>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% endblock content%}
|
||||
|
@ -4,24 +4,24 @@
|
||||
{% extends "base" %}
|
||||
|
||||
{% block content %}
|
||||
{% if flash %}
|
||||
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
||||
{% endif %}
|
||||
{% if flash %}
|
||||
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
||||
{% endif %}
|
||||
|
||||
<div class="max-w-screen-lg w-full">
|
||||
<h1 class="h1">Logbuch</h1>
|
||||
<h2>Neue Ausfahrt starten</h2>
|
||||
{{ log::new(only_ones=loggedin_user.is_cox==false, allow_any_shipmaster=loggedin_user.is_cox, shipmaster=loggedin_user.id) }}
|
||||
<div class="max-w-screen-lg w-full">
|
||||
<h1 class="h1">Logbuch</h1>
|
||||
<h2>Neue Ausfahrt starten</h2>
|
||||
{{ log::new(only_ones=loggedin_user.is_cox==false, allow_any_shipmaster=loggedin_user.is_cox, shipmaster=loggedin_user.id) }}
|
||||
|
||||
<h2 style="font-size: 100px">Am Wasser</h2>
|
||||
{% for log in on_water %}
|
||||
{% if log.shipmaster == loggedin_user.id %}
|
||||
{{ log::show(log=log, state="on_water", allowed_to_close=true, only_ones=loggedin_user.is_cox==false) }}
|
||||
{% else %}
|
||||
{{ log::show(log=log, state="on_water", only_ones=true) }}
|
||||
{% endif %}
|
||||
<hr />
|
||||
{% endfor %}
|
||||
</div>
|
||||
<h2 style="font-size: 100px">Am Wasser</h2>
|
||||
{% for log in on_water %}
|
||||
{% if log.shipmaster == loggedin_user.id %}
|
||||
{{ log::show(log=log, state="on_water", allowed_to_close=true, only_ones=loggedin_user.is_cox==false) }}
|
||||
{% else %}
|
||||
{{ log::show(log=log, state="on_water", only_ones=true) }}
|
||||
{% endif %}
|
||||
<hr/>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% endblock content%}
|
||||
|
@ -5,12 +5,13 @@
|
||||
{% block content %}
|
||||
|
||||
|
||||
<div class="max-w-screen-lg w-full">
|
||||
<h1 class="h1">Statstik</h1>
|
||||
<ol>
|
||||
{% for s in stat %}
|
||||
<li>{{s.name}}: {{s.rowed_km}}km</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
<div class="max-w-screen-lg w-full">
|
||||
<h1 class="h1">Statstik</h1>
|
||||
<ol>
|
||||
{% for s in stat %}
|
||||
<li>{{s.name}}:
|
||||
{{s.rowed_km}}km</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
{% endblock content%}
|
||||
|