format tera files
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div class="max-w-screen-lg w-full">
|
<div class="max-w-screen-lg w-full">
|
||||||
<h1 class="h1">Boats</h1>
|
<h1 class="h1">Boats</h1>
|
||||||
{{ boat::new() }}
|
{{ boat::new() }}
|
||||||
|
|
||||||
@ -14,6 +14,7 @@
|
|||||||
{{ boat::edit(boat=boat, uuid=loop.index) }}
|
{{ boat::edit(boat=boat, uuid=loop.index) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
</div>
|
||||||
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
@ -3,14 +3,14 @@
|
|||||||
{% extends "base" %}
|
{% extends "base" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="max-w-screen-lg w-full">
|
<div class="max-w-screen-lg w-full">
|
||||||
{% if flash %}
|
{% if flash %}
|
||||||
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
||||||
{% endif %}
|
{% 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">
|
<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">
|
<div class="w-full">
|
||||||
<h2 class="text-md font-bold mb-2 uppercase tracking-wide">Neuen User hinzufügen</h2>
|
<h2 class="text-md font-bold mb-2 uppercase tracking-wide">Neuen User hinzufügen</h2>
|
||||||
<div class="grid md:grid-cols-3">
|
<div class="grid md:grid-cols-3">
|
||||||
@ -19,31 +19,33 @@
|
|||||||
<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"/>
|
<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>
|
||||||
<div class="flex items-center">
|
<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>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-right">
|
<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"/>
|
<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>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<!-- START filterBar -->
|
<!-- START filterBar -->
|
||||||
<div class="bg-primary-200 p-3 mt-4 rounded-t-md">
|
<div class="bg-primary-200 p-3 mt-4 rounded-t-md">
|
||||||
<label for="name" class="sr-only">Suche</label>
|
<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..."/>
|
<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>
|
</div>
|
||||||
<!-- END filterBar -->
|
<!-- END filterBar -->
|
||||||
|
|
||||||
<div class="bg-primary-100 p-3 rounded-b-md grid gap-4">
|
<div class="bg-primary-100 p-3 rounded-b-md grid gap-4">
|
||||||
<div id="filter-result-js" class="text-primary-950"></div>
|
<div id="filter-result-js" class="text-primary-950"></div>
|
||||||
{% for user in users %}
|
{% 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">
|
<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">
|
<div class="w-full">
|
||||||
<input type="hidden" name="id" value="{{ user.id }}" />
|
<input type="hidden" name="id" value="{{ user.id }}"/>
|
||||||
<div class="font-bold mb-1">{{ user.name }}
|
<div class="font-bold mb-1">{{ user.name }}
|
||||||
{% if user.last_access %}
|
{% if user.last_access %}
|
||||||
(last access: {{ user.last_access | date }})
|
(last access:
|
||||||
|
{{ user.last_access | date }})
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="grid md:grid-cols-3">
|
<div class="grid md:grid-cols-3">
|
||||||
@ -63,9 +65,9 @@
|
|||||||
<input value="Ändern" type="submit" class="w-28 btn btn-primary"/>
|
<input value="Ändern" type="submit" class="w-28 btn btn-primary"/>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
{% extends "base" %}
|
{% extends "base" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="w-full max-w-md space-y-8">
|
<div class="w-full max-w-md space-y-8">
|
||||||
<h1 class="mt-6 h1">Passwort setzen</h1>
|
<h1 class="mt-6 h1">Passwort setzen</h1>
|
||||||
|
|
||||||
<form class="mt-8 space-y-6" action="/auth/set-pw" method="post">
|
<form class="mt-8 space-y-6" action="/auth/set-pw" method="post">
|
||||||
<input type="hidden" name="remember" value="true">
|
<input type="hidden" name="remember" value="true">
|
||||||
<input type="hidden" name="userid" value="{{ userid }}" />
|
<input type="hidden" name="userid" value="{{ userid }}"/>
|
||||||
<div class="-space-y-px rounded-md shadow-sm">
|
<div class="-space-y-px rounded-md shadow-sm">
|
||||||
<div>
|
<div>
|
||||||
{{ macros::input(label='Passwort', name='password', type='password', required=true, class='rounded-t-md',hide_label=true) }}
|
{{ macros::input(label='Passwort', name='password', type='password', required=true, class='rounded-t-md',hide_label=true) }}
|
||||||
@ -25,6 +25,6 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
@ -2,20 +2,19 @@
|
|||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<link rel="manifest" href="public/manifest.json" />
|
<link rel="manifest" href="public/manifest.json"/>
|
||||||
<link rel="stylesheet" href="/public/main.css" />
|
<link rel="stylesheet" href="/public/main.css"/>
|
||||||
<link rel="icon" type="image/x-icon" href="/public/images/favicon.ico">
|
<link rel="icon" type="image/x-icon" href="/public/images/favicon.ico">
|
||||||
<title>Ruderassistent - ASKÖ Ruderverein Donau Linz</title>
|
<title>Ruderassistent - ASKÖ Ruderverein Donau Linz</title>
|
||||||
</head>
|
</head>
|
||||||
<body class="bg-gray-100">
|
<body class="bg-gray-100">
|
||||||
{%if loggedin_user %}
|
{%if loggedin_user %}
|
||||||
{{ macros::header(loggedin_user=loggedin_user) }}
|
{{ macros::header(loggedin_user=loggedin_user) }}
|
||||||
{%endif%}
|
{%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">
|
<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 %}
|
||||||
{% block content %}{% endblock content %}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{%if loggedin_user %}
|
{%if loggedin_user %}
|
||||||
@ -23,8 +22,7 @@
|
|||||||
{%endif%}
|
{%endif%}
|
||||||
|
|
||||||
<script src="/public/main.js"></script>
|
<script src="/public/main.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
@ -5,8 +5,7 @@
|
|||||||
Überschrift (wird ersetzt)
|
Überschrift (wird ersetzt)
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</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"
|
<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">
|
||||||
data-trigger="sidebar">
|
|
||||||
{% include "includes/plus-icon" %}
|
{% include "includes/plus-icon" %}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
{% extends "base" %}
|
{% extends "base" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="max-w-screen-lg w-full">
|
<div class="max-w-screen-lg w-full">
|
||||||
<h1 class="h1">Infrequently asked questions</h1>
|
<h1 class="h1">Infrequently asked questions</h1>
|
||||||
|
|
||||||
<div class="grid pt-8 text-left gap-10">
|
<div class="grid pt-8 text-left gap-10">
|
||||||
@ -65,5 +65,5 @@
|
|||||||
}}
|
}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock content%}
|
{% endblock content%}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<div class="hidden">
|
<div class="hidden">
|
||||||
<form action="/admin/planned-event" method="post" class="grid gap-3" id="addEventForm">
|
<form action="/admin/planned-event" method="post" class="grid gap-3" id="addEventForm">
|
||||||
<input class="day-js" type="hidden" name="tripdetails.day" value="" />
|
<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='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='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 Steuerleute', name='planned_amount_cox', type='number', required=true, min='0') }}
|
||||||
@ -12,6 +12,6 @@
|
|||||||
{{ macros::input(label='Anmerkungen', name='tripdetails.notes', type='input') }}
|
{{ macros::input(label='Anmerkungen', name='tripdetails.notes', type='input') }}
|
||||||
{{ macros::select(data=trip_types, select_name='tripdetails.trip_type', default='Reguläre Ausfahrt') }}
|
{{ 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" />
|
<input value="Erstellen" class="w-full btn btn-primary" type="submit"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<div class="hidden">
|
<div class="hidden">
|
||||||
<form action="/cox/trip" method="post" class="grid gap-3" id="sidebarForm">
|
<form action="/cox/trip" method="post" class="grid gap-3" id="sidebarForm">
|
||||||
<input class="day-js" type="hidden" name="day" value="" />
|
<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='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::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='Gäste erlauben', name='allow_guests') }}
|
||||||
@ -10,6 +10,6 @@
|
|||||||
{{ macros::input(label='Anmerkungen', name='notes', type='input') }}
|
{{ macros::input(label='Anmerkungen', name='notes', type='input') }}
|
||||||
{{ macros::select(data=trip_types, select_name='trip_type', default='Reguläre Ausfahrt') }}
|
{{ macros::select(data=trip_types, select_name='trip_type', default='Reguläre Ausfahrt') }}
|
||||||
|
|
||||||
<input value="Erstellen" class="w-full btn btn-primary" type="submit" />
|
<input value="Erstellen" class="w-full btn btn-primary" type="submit"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{% if loggedin_user.is_cox %}
|
{% 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">
|
<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">
|
<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" %}
|
{% include "includes/funnel-icon" %}
|
||||||
Tage mit Ausfahrten
|
Tage mit Ausfahrten
|
||||||
@ -12,5 +12,5 @@
|
|||||||
{% include "includes/funnel-icon" %}
|
{% include "includes/funnel-icon" %}
|
||||||
Aktuellen Monat anzeigen
|
Aktuellen Monat anzeigen
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% 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;">
|
<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
|
<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"/>
|
||||||
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>
|
</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">
|
<svg width="16" height="16" fill="currentColor" class="inline h-4 w-4" viewbox="0 0 16 16">
|
||||||
<path
|
<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"/>
|
||||||
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"/>
|
||||||
<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>
|
</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">
|
<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 class="max-w-screen-xl w-full flex justify-between">
|
||||||
<div>
|
<div>
|
||||||
<span class="text-[#ff0000]">♥</span> ASKÖ Ruderverein Donau Linz
|
<span class="text-[#ff0000]">♥</span>
|
||||||
|
ASKÖ Ruderverein Donau Linz
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
© {{ now() | date(format="%Y") }}
|
©
|
||||||
|
{{ now() | date(format="%Y") }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
{% macro new() %}
|
{% macro new() %}
|
||||||
<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">
|
||||||
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">
|
<div class="w-full">
|
||||||
<h2 class="text-md font-bold mb-2 uppercase tracking-wide">
|
<h2 class="text-md font-bold mb-2 uppercase tracking-wide">
|
||||||
Neues Boot hinzufügen
|
Neues Boot hinzufügen
|
||||||
@ -19,26 +15,17 @@
|
|||||||
{{ macros::checkbox(label="Externes Boot (anderer Verein)", name="external")}}
|
{{ macros::checkbox(label="Externes Boot (anderer Verein)", name="external")}}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<input
|
<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"/>
|
||||||
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>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% endmacro new %}
|
{% endmacro new %}
|
||||||
|
|
||||||
|
|
||||||
{% macro edit(boat, uuid) %}
|
{% macro edit(boat, uuid) %}
|
||||||
<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">
|
||||||
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">
|
<div class="w-full">
|
||||||
<input type="hidden" name="id" value="{{ boat.id }}" />
|
<input type="hidden" name="id" value="{{ boat.id }}"/>
|
||||||
<div class="font-bold mb-1">{{ boat.name }}<br /></div>
|
<div class="font-bold mb-1">{{ boat.name }}<br/></div>
|
||||||
<div class="grid md:grid-cols-3">
|
<div class="grid md:grid-cols-3">
|
||||||
{{ macros::input(label='Name', name='name', type='text', value=boat.name) }}
|
{{ 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::input(label='Amount Seats', name='amount_seats', type='number', min=0, value=boat.amount_seats) }}
|
||||||
@ -52,14 +39,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid gap-3">
|
<div class="grid gap-3">
|
||||||
<a
|
<a href="/admin/boat/{{ boat.id }}/delete" class="inline-block btn btn-alert" onclick="return confirm('Wirklich löschen?');">
|
||||||
href="/admin/boat/{{ boat.id }}/delete"
|
{% include "includes/delete-icon" %}
|
||||||
class="inline-block btn btn-alert"
|
Löschen
|
||||||
onclick="return confirm('Wirklich löschen?');"
|
|
||||||
>
|
|
||||||
{% include "includes/delete-icon" %} Löschen
|
|
||||||
</a>
|
</a>
|
||||||
<input value="Ändern" type="submit" class="w-28 btn btn-primary" />
|
<input value="Ändern" type="submit" class="w-28 btn btn-primary"/>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% endmacro edit %}
|
{% endmacro edit %}
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
</optgroup>
|
</optgroup>
|
||||||
</select>
|
</select>
|
||||||
{% else %}
|
{% else %}
|
||||||
<input type="hidden" name="shipmaster" value="{{shipmaster}}" />
|
<input type="hidden" name="shipmaster" value="{{shipmaster}}"/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if not only_ones %}
|
{% if not only_ones %}
|
||||||
{{ macros::checkbox(label='shipmaster_only_steering', name='shipmaster_only_steering') }}
|
{{ macros::checkbox(label='shipmaster_only_steering', name='shipmaster_only_steering') }}
|
||||||
@ -27,10 +27,14 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
<div>Departure: <input type="datetime-local" id="datetime-dep" name="departure" required/></div>
|
<div>Departure:
|
||||||
<div> Arrival: <input type="datetime-local" id="datetime-arr" name="arrival" /></div>
|
<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">
|
<div class="col-span-2">
|
||||||
Destination: <input type="search" list="destinations" placeholder="Destination" name="destination" id="destination" oninput="var inputElement = document.getElementById('destination');
|
Destination:
|
||||||
|
<input type="search" list="destinations" placeholder="Destination" name="destination" id="destination" oninput="var inputElement = document.getElementById('destination');
|
||||||
var dataList = document.getElementById('destinations');
|
var dataList = document.getElementById('destinations');
|
||||||
var selectedValue = inputElement.value;
|
var selectedValue = inputElement.value;
|
||||||
for (var i = 0; i < dataList.options.length; i++) {
|
for (var i = 0; i < dataList.options.length; i++) {
|
||||||
@ -42,35 +46,35 @@
|
|||||||
}">
|
}">
|
||||||
<datalist id="destinations">
|
<datalist id="destinations">
|
||||||
{% for distance in distances %}
|
{% for distance in distances %}
|
||||||
<option value="{{ distance.0 }}" distance={{ distance.1 }} />
|
<option value="{{ distance.0 }}" distance={{ distance.1 }}/>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</datalist>
|
</datalist>
|
||||||
</div>
|
</div>
|
||||||
{{ macros::input(label="Distanz", name="distance_in_km", type="number", min=0, wrapper_class="col-span-2") }}
|
{{ 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::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") }}
|
{{ 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" />
|
<input type="submit" value="Starten" class="btn btn-primary w-100 col-span-2 m-auto"/>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
const currentDate = new Date();
|
const currentDate = new Date();
|
||||||
const localTime = new Date(currentDate.getTime() - (currentDate.getTimezoneOffset() * 60000));
|
const localTime = new Date(currentDate.getTime() - (currentDate.getTimezoneOffset() * 60000));
|
||||||
const formattedDate = localTime.toISOString().slice(0, 16);
|
const formattedDate = localTime.toISOString().slice(0, 16);
|
||||||
|
|
||||||
// Set the formatted string as the value of the input field
|
// Set the formatted string as the value of the input field
|
||||||
document.getElementById("datetime-dep").value = formattedDate;
|
document.getElementById("datetime-dep").value = formattedDate;
|
||||||
</script>
|
</script>
|
||||||
</form>
|
</form>
|
||||||
<script>
|
<script>
|
||||||
document.getElementById('form').addEventListener('submit', function(e) {
|
document.getElementById('form').addEventListener('submit', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
for(let optional_elem of ["datetime-arr", "distance_in_km", "comments", "logtype"]){
|
for (let optional_elem of["datetime-arr", "distance_in_km", "comments", "logtype"]) {
|
||||||
let myInput = document.getElementById(optional_elem);
|
let myInput = document.getElementById(optional_elem);
|
||||||
if (myInput.value === '') {
|
if (myInput.value === '') {
|
||||||
myInput.removeAttribute('name');
|
myInput.removeAttribute('name');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.submit();
|
this.submit();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endmacro new %}
|
{% endmacro new %}
|
||||||
|
|
||||||
@ -83,17 +87,17 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
<script>
|
<script>
|
||||||
function updateElementsBasedOnSelectedOption() {
|
function updateElementsBasedOnSelectedOption() {
|
||||||
var selectElement = document.getElementById('boat_id');
|
var selectElement = document.getElementById('boat_id');
|
||||||
var selectedOption = selectElement.selectedOptions[0];
|
var selectedOption = selectElement.selectedOptions[0];
|
||||||
var shipmaster_only_steering = selectedOption.getAttribute("extra-default_shipmaster_only_steering") === 'true';
|
var shipmaster_only_steering = selectedOption.getAttribute("extra-default_shipmaster_only_steering") === 'true';
|
||||||
document.getElementById('shipmaster_only_steering').checked = shipmaster_only_steering;
|
document.getElementById('shipmaster_only_steering').checked = shipmaster_only_steering;
|
||||||
document.getElementById('newrower-max_rower_allowed').innerHTML = selectedOption.getAttribute("extra-amount_seats");
|
document.getElementById('newrower-max_rower_allowed').innerHTML = selectedOption.getAttribute("extra-amount_seats");
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
document.getElementById('boat_id').addEventListener('change', updateElementsBasedOnSelectedOption);
|
document.getElementById('boat_id').addEventListener('change', updateElementsBasedOnSelectedOption);
|
||||||
});
|
});
|
||||||
document.addEventListener('DOMContentLoaded', updateElementsBasedOnSelectedOption);
|
document.addEventListener('DOMContentLoaded', updateElementsBasedOnSelectedOption);
|
||||||
</script>
|
</script>
|
||||||
{% endmacro boats %}
|
{% endmacro boats %}
|
||||||
|
|
||||||
@ -106,48 +110,57 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
<script>
|
<script>
|
||||||
function updateElementsBasedOnSelectedOption() {
|
function updateElementsBasedOnSelectedOption() {
|
||||||
var selectElement = document.getElementById('boat_id');
|
var selectElement = document.getElementById('boat_id');
|
||||||
var selectedOption = selectElement.selectedOptions[0];
|
var selectedOption = selectElement.selectedOptions[0];
|
||||||
var shipmaster_only_steering = selectedOption.getAttribute("extra-default_shipmaster_only_steering") === 'true';
|
var shipmaster_only_steering = selectedOption.getAttribute("extra-default_shipmaster_only_steering") === 'true';
|
||||||
document.getElementById('shipmaster_only_steering').checked = shipmaster_only_steering;
|
document.getElementById('shipmaster_only_steering').checked = shipmaster_only_steering;
|
||||||
document.getElementById('newrower-max_rower_allowed').innerHTML = selectedOption.getAttribute("extra-amount_seats");
|
document.getElementById('newrower-max_rower_allowed').innerHTML = selectedOption.getAttribute("extra-amount_seats");
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementById('boat_id').addEventListener('change', updateElementsBasedOnSelectedOption);
|
document.getElementById('boat_id').addEventListener('change', updateElementsBasedOnSelectedOption);
|
||||||
document.addEventListener('DOMContentLoaded', updateElementsBasedOnSelectedOption);
|
document.addEventListener('DOMContentLoaded', updateElementsBasedOnSelectedOption);
|
||||||
</script>
|
</script>
|
||||||
{% endmacro boat_select %}
|
{% endmacro boat_select %}
|
||||||
|
|
||||||
{% macro show(log, state, allowed_to_close=false, only_ones) %}
|
{% macro show(log, state, allowed_to_close=false, only_ones) %}
|
||||||
Bootsname: {{ log.boat.name }}<br />
|
Bootsname:
|
||||||
Schiffsführer: {{ log.shipmaster_user.name }}<br />
|
{{ log.boat.name }}<br/>
|
||||||
|
Schiffsführer:
|
||||||
|
{{ log.shipmaster_user.name }}<br/>
|
||||||
{% if log.shipmaster_only_steering %}
|
{% if log.shipmaster_only_steering %}
|
||||||
Schiffsführer steuert nur
|
Schiffsführer steuert nur
|
||||||
{% endif %}
|
{% endif %}
|
||||||
Weggefahren: {{ log.departure }}<br />
|
Weggefahren:
|
||||||
|
{{ log.departure }}<br/>
|
||||||
{% if state == "completed" %}
|
{% if state == "completed" %}
|
||||||
Angekommen: {{ log.arrival}}<br />
|
Angekommen:
|
||||||
|
{{ log.arrival}}<br/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% set amount_rowers = log.rowers | length %}
|
{% set amount_rowers = log.rowers | length %}
|
||||||
{% set amount_guests = log.boat.amount_seats - amount_rowers -1 %}
|
{% set amount_guests = log.boat.amount_seats - amount_rowers -1 %}
|
||||||
{% if allowed_to_close and state == "on_water" %}
|
{% if allowed_to_close and state == "on_water" %}
|
||||||
{{ log::home(log=log, only_ones=only_ones) }}
|
{{ log::home(log=log, only_ones=only_ones) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
Ziel: {{ log.destination }}<br />
|
Ziel:
|
||||||
|
{{ log.destination }}<br/>
|
||||||
{% if state == "completed" %}
|
{% if state == "completed" %}
|
||||||
Km: {{ log.distance_in_km }}<br />
|
Km:
|
||||||
|
{{ log.distance_in_km }}<br/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if log.comments %}
|
{% if log.comments %}
|
||||||
Kommentare: {{ log.comments }}<br />
|
Kommentare:
|
||||||
|
{{ log.comments }}<br/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if log.logtype %}
|
{% if log.logtype %}
|
||||||
Logtype: {{ log.logtype }}<br />
|
Logtype:
|
||||||
|
{{ log.logtype }}<br/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if amount_guests > 0 or log.rowers | length > 0 %}
|
{% if amount_guests > 0 or log.rowers | length > 0 %}
|
||||||
Ruderer:
|
Ruderer:
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if amount_guests > 0 %}
|
{% if amount_guests > 0 %}
|
||||||
{{ amount_guests }} Gäste (ohne Account)
|
{{ amount_guests }}
|
||||||
|
Gäste (ohne Account)
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for rower in log.rowers %}
|
{% for rower in log.rowers %}
|
||||||
{{ rower.name }}
|
{{ rower.name }}
|
||||||
@ -156,8 +169,9 @@
|
|||||||
{% endmacro show %}
|
{% endmacro show %}
|
||||||
|
|
||||||
{% macro home(log, only_ones) %}
|
{% macro home(log, only_ones) %}
|
||||||
<form action="/log/{{log.id}}" method="post">
|
<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');
|
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 dataList = document.getElementById('destinations');
|
||||||
var selectedValue = inputElement.value;
|
var selectedValue = inputElement.value;
|
||||||
for (var i = 0; i < dataList.options.length; i++) {
|
for (var i = 0; i < dataList.options.length; i++) {
|
||||||
@ -187,16 +201,18 @@
|
|||||||
{% set_global sel = true %}
|
{% set_global sel = true %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<option value="{{ user.id }}" {% if sel %}selected{% endif %} onmousedown="event.preventDefault();this.selected = !this.selected; return false;">{{user.name}}</option>
|
<option value="{{ user.id }}" {% if sel %} selected {% endif %} onmousedown="event.preventDefault();this.selected = !this.selected; return false;">{{user.name}}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
<script>
|
<script>
|
||||||
function updateSelectedRowersCount{{id}}() {
|
function updateSelectedRowersCount {{ id }}
|
||||||
document.getElementById('{{id}}-amount_rower_selected').textContent = document.getElementById('{{id}}').selectedOptions.length+1;
|
() {
|
||||||
}
|
document.getElementById('{{ id }}-amount_rower_selected').textContent = document.getElementById('{{ id }}').selectedOptions.length + 1;
|
||||||
document.addEventListener('DOMContentLoaded', updateSelectedRowersCount{{id}});
|
}
|
||||||
|
document.addEventListener('DOMContentLoaded', updateSelectedRowersCount {{ id }});
|
||||||
</script>
|
</script>
|
||||||
<div class="col-span-2">
|
<div class="col-span-2">
|
||||||
<span id="{{id}}-amount_rower_selected"></span>/<span id="{{id}}-max_rower_allowed">{{amount_seats}}</span> Ruderer ausgewählt
|
<span id="{{id}}-amount_rower_selected"></span>/<span id="{{id}}-max_rower_allowed">{{amount_seats}}</span>
|
||||||
|
Ruderer ausgewählt
|
||||||
</div>
|
</div>
|
||||||
{% endmacro rower_select %}
|
{% 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">
|
<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"/>
|
<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>
|
</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">
|
<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" />
|
<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>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 330 B After Width: | Height: | Size: 328 B |
@ -3,7 +3,8 @@
|
|||||||
<div class="max-w-screen-xl w-full flex justify-between items-center">
|
<div class="max-w-screen-xl w-full flex justify-between items-center">
|
||||||
<div>
|
<div>
|
||||||
<a href="/">
|
<a href="/">
|
||||||
Hü {{ loggedin_user.name }}
|
Hü
|
||||||
|
{{ loggedin_user.name }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -32,12 +33,18 @@
|
|||||||
|
|
||||||
|
|
||||||
<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">
|
<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>
|
<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>
|
<span class="sr-only">Userverwaltung</span>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% 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">
|
<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>
|
<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>
|
<span class="sr-only">Ausloggen</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -47,15 +54,16 @@
|
|||||||
{% endmacro header %}
|
{% endmacro header %}
|
||||||
|
|
||||||
{% macro input(label, name, type, required=false, class='rounded-md', value='', min='', hide_label=false, id='', autofocus=false, wrapper_class='') %}
|
{% macro input(label, name, type, required=false, class='rounded-md', value='', min='', hide_label=false, id='', autofocus=false, wrapper_class='') %}
|
||||||
<div class="{{wrapper_class}}">
|
<div class="{{wrapper_class}}">
|
||||||
<label for="{{ name }}" class="{% if hide_label %} sr-only {% else %} small text-gray-600 {% endif %}">{{ label }}</label>
|
<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 %}>
|
<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>
|
||||||
{% endmacro input %}
|
{% endmacro input %}
|
||||||
|
|
||||||
{% macro checkbox(label, name, id='', checked=false, class='') %}
|
{% macro checkbox(label, name, id='', checked=false, class='') %}
|
||||||
<label for="{{ name }}{{ id }}" class="flex items-center cursor-pointer hover:text-gray-900 {{ 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 }}
|
<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>
|
||||||
{% endmacro checkbox %}
|
{% endmacro checkbox %}
|
||||||
|
|
||||||
@ -68,7 +76,7 @@
|
|||||||
<option selected value>{{ default }}</option>
|
<option selected value>{{ default }}</option>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for d in data %}
|
{% 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 %}>
|
<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 -%}
|
{% for displa in display -%}
|
||||||
{%- if d[displa] -%}
|
{%- if d[displa] -%}
|
||||||
{{- d[displa] -}}
|
{{- d[displa] -}}
|
||||||
@ -82,31 +90,36 @@
|
|||||||
{% endmacro select %}
|
{% endmacro select %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{% macro alert(message, type, class='') %}
|
{% macro alert(message, type, class='') %}
|
||||||
<div class="{{ class }} alert-{{ type }} text-white px-3 py-1 rounded-md text-center">
|
<div class="{{ class }} alert-{{ type }} text-white px-3 py-1 rounded-md text-center">
|
||||||
{{ message }}
|
{{ message }}
|
||||||
</div>
|
</div>
|
||||||
{% endmacro alert %}
|
{% endmacro alert %}
|
||||||
|
|
||||||
{% macro box(participants, empty_seats='', header='Freie Plätze:', text='Keine Ruderer angemeldet', bg='primary-600', color='white') %}
|
{% 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="text-{{ color }} bg-{{ bg }} text-center p-1 mt-1 rounded-t-md">{{ header }}
|
||||||
<div class="p-2 border border-t-0 border-{{ bg }} mb-4 rounded-b-md">
|
{{ empty_seats }}</div>
|
||||||
|
<div class="p-2 border border-t-0 border-{{ bg }} mb-4 rounded-b-md">
|
||||||
{% if participants | length > 0 %}
|
{% if participants | length > 0 %}
|
||||||
{% for rower in participants %}
|
{% 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 />
|
{{ 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 %}
|
{% endfor %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ text }}
|
{{ text }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endmacro box %}
|
{% endmacro box %}
|
||||||
|
|
||||||
{% macro faq(question, answer) %}
|
{% macro faq(question, answer) %}
|
||||||
<div>
|
<div>
|
||||||
<h2 class="flex mb-4 text-lg font-bold text-primary-900">
|
<h2 class="flex mb-4 text-lg font-bold text-primary-900">
|
||||||
{{ question }}
|
{{ question }}
|
||||||
</h2>
|
</h2>
|
||||||
<p class="text-primary-950">{{ answer | safe }}</p>
|
<p class="text-primary-950">{{ answer | safe }}</p>
|
||||||
</div>
|
</div>
|
||||||
{% endmacro faq %}
|
{% 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">
|
<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"/>
|
<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>
|
</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,7 +3,7 @@
|
|||||||
{% extends "base" %}
|
{% extends "base" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="max-w-screen-xl w-full grid sm:grid-cols-2 lg:grid-cols-3 gap-4">
|
<div class="max-w-screen-xl w-full grid sm:grid-cols-2 lg:grid-cols-3 gap-4">
|
||||||
{% if flash %}
|
{% if flash %}
|
||||||
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -30,29 +30,33 @@
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
{% if day.planned_events | length > 0 or day.trips | length > 0 %}
|
{% if day.planned_events | length > 0 or day.trips | length > 0 %}
|
||||||
<div class="grid grid-cols-1 gap-3 mb-3">
|
<div
|
||||||
|
class="grid grid-cols-1 gap-3 mb-3">
|
||||||
|
|
||||||
{# --- START Events --- #}
|
{# --- START Events --- #}
|
||||||
{% if day.planned_events | length > 0 %}
|
{% if day.planned_events | length > 0 %}
|
||||||
{% for planned_event in day.planned_events | sort(attribute="planned_starting_time") %}
|
{% for planned_event in day.planned_events | sort(attribute="planned_starting_time") %}
|
||||||
{% set amount_cur_cox = planned_event.cox | length %}
|
{% set amount_cur_cox = planned_event.cox | length %}
|
||||||
{% set amount_cox_missing = planned_event.planned_amount_cox - amount_cur_cox %}
|
{% 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="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="flex justify-between items-center">
|
||||||
<div class="mr-1">
|
<div class="mr-1">
|
||||||
<strong class="text-primary-900">
|
<strong class="text-primary-900">
|
||||||
{{ planned_event.planned_starting_time }} Uhr
|
{{ planned_event.planned_starting_time }}
|
||||||
|
Uhr
|
||||||
</strong>
|
</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 />
|
<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"
|
<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">
|
||||||
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
|
Details
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-right grid gap-2">
|
<div
|
||||||
|
class="text-right grid gap-2">
|
||||||
{# --- START Row Buttons --- #}
|
{# --- START Row Buttons --- #}
|
||||||
{% set_global cur_user_participates = false %}
|
{% set_global cur_user_participates = false %}
|
||||||
{% for rower in planned_event.rower%}
|
{% for rower in planned_event.rower%}
|
||||||
@ -65,7 +69,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% if planned_event.max_people > planned_event.rower | length %}
|
{% if planned_event.max_people > planned_event.rower | length %}
|
||||||
{% if cur_user_participates == false %}
|
{% 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>
|
<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 %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{# --- END Row Buttons --- #}
|
{# --- END Row Buttons --- #}
|
||||||
@ -84,7 +88,7 @@
|
|||||||
Abmelden
|
Abmelden
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% 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 %}>
|
<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" %}
|
{% include "includes/cox-icon" %}
|
||||||
Steuern
|
Steuern
|
||||||
</a>
|
</a>
|
||||||
@ -96,7 +100,8 @@
|
|||||||
|
|
||||||
{# --- START Sidebar Content --- #}
|
{# --- START Sidebar Content --- #}
|
||||||
<div class="hidden">
|
<div class="hidden">
|
||||||
<div id="event{{ planned_event.trip_details_id }}">
|
<div
|
||||||
|
id="event{{ planned_event.trip_details_id }}">
|
||||||
{# --- START List Coxes --- #}
|
{# --- START List Coxes --- #}
|
||||||
{% if planned_event.planned_amount_cox > 0 %}
|
{% if planned_event.planned_amount_cox > 0 %}
|
||||||
{% if amount_cox_missing > 0 %}
|
{% if amount_cox_missing > 0 %}
|
||||||
@ -124,14 +129,14 @@
|
|||||||
<div class="bg-gray-100 p-3 mt-4 rounded-md">
|
<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>
|
<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">
|
<form action="/admin/planned-event" method="post" class="grid gap-3">
|
||||||
<input type="hidden" name="_method" value="put" />
|
<input type="hidden" name="_method" value="put"/>
|
||||||
<input type="hidden" name="id" value="{{ planned_event.id }}" />
|
<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 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::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::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) }}
|
{{ macros::input(label='Anmerkungen', name='notes', type='input', value=planned_event.notes) }}
|
||||||
|
|
||||||
<input value="Speichern" class="btn btn-primary" type="submit" />
|
<input value="Speichern" class="btn btn-primary" type="submit"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{# --- END Edit Form --- #}
|
{# --- END Edit Form --- #}
|
||||||
@ -156,21 +161,30 @@
|
|||||||
{# --- START Trips --- #}
|
{# --- START Trips --- #}
|
||||||
{% if day.trips | length > 0 %}
|
{% if day.trips | length > 0 %}
|
||||||
{% for trip in day.trips | sort(attribute="planned_starting_time") %}
|
{% 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="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="flex justify-between items-center">
|
||||||
<div class="mr-1">
|
<div class="mr-1">
|
||||||
{% if trip.max_people == 0 %}
|
{% if trip.max_people == 0 %}
|
||||||
<strong class="text-[#f43f5e]">⚠ {{ trip.planned_starting_time }} Uhr</strong>
|
<strong class="text-[#f43f5e]">⚠
|
||||||
<small class="text-[#f43f5e]">(Absage {{ trip.cox_name }}{% if trip.trip_type %} - {{ trip.trip_type.icon | safe }}{{ trip.trip_type.name }}{% endif %})</small>
|
{{ 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 %}
|
{% else %}
|
||||||
<strong class="text-primary-900">{{ trip.planned_starting_time }} Uhr</strong>
|
<strong class="text-primary-900">{{ trip.planned_starting_time }}
|
||||||
<small class="text-gray-600">({{ trip.cox_name }}{% if trip.trip_type %} - {{ trip.trip_type.icon | safe }}{{ trip.trip_type.name }}{% endif %})</small>
|
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 %}
|
{% endif %}
|
||||||
<br />
|
<br/>
|
||||||
<a href="#" data-sidebar="true" data-trigger="sidebar"
|
<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">
|
||||||
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
|
Details
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -183,12 +197,10 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if cur_user_participates %}
|
{% if cur_user_participates %}
|
||||||
<a href="/remove/{{ trip.trip_details_id }}"
|
<a href="/remove/{{ trip.trip_details_id }}" class="btn btn-attention btn-fw">Abmelden</a>
|
||||||
class="btn btn-attention btn-fw">Abmelden</a>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if trip.max_people > trip.rower | length and trip.cox_id != loggedin_user.id and cur_user_participates == false%}
|
{% 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 }}"
|
<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>
|
||||||
class="btn btn-primary btn-fw" {% if trip.trip_type %}onclick="return confirm('{{ trip.trip_type.question }}');"{% endif %}>Mitrudern</a>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -213,7 +225,7 @@
|
|||||||
{{ macros::checkbox(label='Immer anzeigen', name='always_show', id=trip.id,checked=trip.always_show) }}
|
{{ 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) }}
|
{{ 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" />
|
<input value="Speichern" class="btn btn-primary" type="submit"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{% if trip.rower | length == 0 %}
|
{% if trip.rower | length == 0 %}
|
||||||
@ -241,11 +253,7 @@
|
|||||||
{% if loggedin_user.is_admin or loggedin_user.is_cox %}
|
{% if loggedin_user.is_admin or loggedin_user.is_cox %}
|
||||||
<div class="grid {% if loggedin_user.is_admin %} grid-cols-2 {% endif %} text-center">
|
<div class="grid {% if loggedin_user.is_admin %} grid-cols-2 {% endif %} text-center">
|
||||||
{% if loggedin_user.is_admin %}
|
{% if loggedin_user.is_admin %}
|
||||||
<a href="#" data-sidebar="true" data-trigger="sidebar"
|
<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">
|
||||||
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">
|
<span class="absolute inset-y-0 left-0 flex items-center pl-3">
|
||||||
{% include "includes/plus-icon" %}
|
{% include "includes/plus-icon" %}
|
||||||
</span>
|
</span>
|
||||||
@ -254,11 +262,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if loggedin_user.is_cox%}
|
{% if loggedin_user.is_cox%}
|
||||||
<a href="#" data-sidebar="true" data-trigger="sidebar"
|
<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 %}">
|
||||||
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">
|
<span class="absolute inset-y-0 left-0 flex items-center pl-3">
|
||||||
{% include "includes/plus-icon" %}
|
{% include "includes/plus-icon" %}
|
||||||
</span>
|
</span>
|
||||||
@ -281,6 +285,4 @@
|
|||||||
|
|
||||||
{% if loggedin_user.is_admin %}
|
{% if loggedin_user.is_admin %}
|
||||||
{% include "forms/event" %}
|
{% include "forms/event" %}
|
||||||
{% endif %}
|
{% endif %}{% endblock content %}
|
||||||
|
|
||||||
{% endblock content %}
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div class="w-full">
|
<div class="w-full">
|
||||||
<h1 class="h1">Logbuch</h1>
|
<h1 class="h1">Logbuch</h1>
|
||||||
|
|
||||||
{% if flash %}
|
{% if flash %}
|
||||||
@ -25,9 +25,9 @@
|
|||||||
<h2 class="h2">Am Wasser</h2>
|
<h2 class="h2">Am Wasser</h2>
|
||||||
{% for log in on_water %}
|
{% for log in on_water %}
|
||||||
{{ log::show(log=log, state="on_water", allowed_to_close=true, only_ones=false) }}
|
{{ log::show(log=log, state="on_water", allowed_to_close=true, only_ones=false) }}
|
||||||
<hr />
|
<hr/>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock content%}
|
{% endblock content%}
|
||||||
|
@ -5,12 +5,12 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div class="max-w-screen-lg w-full">
|
<div class="max-w-screen-lg w-full">
|
||||||
<h1 class="h1">Logbuch</h1>
|
<h1 class="h1">Logbuch</h1>
|
||||||
{% for log in logs %}
|
{% for log in logs %}
|
||||||
{{ log::show(log=log, state="completed", only_ones=false) }}
|
{{ log::show(log=log, state="completed", only_ones=false) }}
|
||||||
<hr />
|
<hr/>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock content%}
|
{% endblock content%}
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
{% extends "base" %}
|
{% extends "base" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if flash %}
|
{% if flash %}
|
||||||
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="max-w-screen-lg w-full">
|
<div class="max-w-screen-lg w-full">
|
||||||
<h1 class="h1">Logbuch</h1>
|
<h1 class="h1">Logbuch</h1>
|
||||||
<h2>Neue Ausfahrt starten</h2>
|
<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) }}
|
{{ log::new(only_ones=loggedin_user.is_cox==false, allow_any_shipmaster=loggedin_user.is_cox, shipmaster=loggedin_user.id) }}
|
||||||
@ -20,8 +20,8 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
{{ log::show(log=log, state="on_water", only_ones=true) }}
|
{{ log::show(log=log, state="on_water", only_ones=true) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<hr />
|
<hr/>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock content%}
|
{% endblock content%}
|
||||||
|
@ -5,12 +5,13 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
|
|
||||||
<div class="max-w-screen-lg w-full">
|
<div class="max-w-screen-lg w-full">
|
||||||
<h1 class="h1">Statstik</h1>
|
<h1 class="h1">Statstik</h1>
|
||||||
<ol>
|
<ol>
|
||||||
{% for s in stat %}
|
{% for s in stat %}
|
||||||
<li>{{s.name}}: {{s.rowed_km}}km</li>
|
<li>{{s.name}}:
|
||||||
|
{{s.rowed_km}}km</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
{% endblock content%}
|
{% endblock content%}
|
||||||
|