format tera files
@ -5,7 +5,7 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="max-w-screen-lg w-full">
|
||||
<div class="max-w-screen-lg w-full">
|
||||
<h1 class="h1">Boats</h1>
|
||||
{{ boat::new() }}
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
{{ boat::edit(boat=boat, uuid=loop.index) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
|
@ -3,14 +3,14 @@
|
||||
{% extends "base" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="max-w-screen-lg w-full">
|
||||
<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>
|
||||
|
||||
<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">
|
||||
<h2 class="text-md font-bold mb-2 uppercase tracking-wide">Neuen User hinzufügen</h2>
|
||||
<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"/>
|
||||
</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>
|
||||
<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>
|
||||
|
||||
<!-- START filterBar -->
|
||||
<div class="bg-primary-200 p-3 mt-4 rounded-t-md">
|
||||
<!-- 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>
|
||||
<!-- 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>
|
||||
{% 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 }}" />
|
||||
<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 }})
|
||||
(last access:
|
||||
{{ user.last_access | date }})
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid md:grid-cols-3">
|
||||
@ -63,9 +65,9 @@
|
||||
<input value="Ändern" type="submit" class="w-28 btn btn-primary"/>
|
||||
</div>
|
||||
</form>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
|
@ -1,12 +1,12 @@
|
||||
{% extends "base" %}
|
||||
|
||||
{% 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>
|
||||
|
||||
<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 }}" />
|
||||
<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) }}
|
||||
@ -25,6 +25,6 @@
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
|
@ -2,20 +2,19 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<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="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">
|
||||
</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 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 %}
|
||||
@ -23,8 +22,7 @@
|
||||
{%endif%}
|
||||
|
||||
<script src="/public/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -5,8 +5,7 @@
|
||||
Ü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">
|
||||
<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>
|
||||
|
@ -3,7 +3,7 @@
|
||||
{% extends "base" %}
|
||||
|
||||
{% 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>
|
||||
|
||||
<div class="grid pt-8 text-left gap-10">
|
||||
@ -65,5 +65,5 @@
|
||||
}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content%}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<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="" />
|
||||
<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') }}
|
||||
@ -12,6 +12,6 @@
|
||||
{{ 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" />
|
||||
<input value="Erstellen" class="w-full btn btn-primary" type="submit"/>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<div class="hidden">
|
||||
<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='Anzahl Ruderer (ohne Steuerperson)', name='max_people', type='number', required=true, min='0') }}
|
||||
{{ macros::checkbox(label='Gäste erlauben', name='allow_guests') }}
|
||||
@ -10,6 +10,6 @@
|
||||
{{ 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" />
|
||||
<input value="Erstellen" class="w-full btn btn-primary" type="submit"/>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% 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">
|
||||
{% include "includes/funnel-icon" %}
|
||||
Tage mit Ausfahrten
|
||||
@ -12,5 +12,5 @@
|
||||
{% include "includes/funnel-icon" %}
|
||||
Aktuellen Monat anzeigen
|
||||
</button>
|
||||
</div>
|
||||
</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
|
||||
<span class="text-[#ff0000]">♥</span>
|
||||
ASKÖ Ruderverein Donau Linz
|
||||
</div>
|
||||
<div>
|
||||
© {{ now() | date(format="%Y") }}
|
||||
©
|
||||
{{ now() | date(format="%Y") }}
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
@ -1,9 +1,5 @@
|
||||
{% 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"
|
||||
>
|
||||
<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
|
||||
@ -19,26 +15,17 @@
|
||||
{{ 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"
|
||||
/>
|
||||
<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"
|
||||
>
|
||||
<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>
|
||||
<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) }}
|
||||
@ -52,14 +39,11 @@
|
||||
</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 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" />
|
||||
<input value="Ändern" type="submit" class="w-28 btn btn-primary"/>
|
||||
</div>
|
||||
</form>
|
||||
{% endmacro edit %}
|
||||
|
@ -16,7 +16,7 @@
|
||||
</optgroup>
|
||||
</select>
|
||||
{% else %}
|
||||
<input type="hidden" name="shipmaster" value="{{shipmaster}}" />
|
||||
<input type="hidden" name="shipmaster" value="{{shipmaster}}"/>
|
||||
{% endif %}
|
||||
{% if not only_ones %}
|
||||
{{ macros::checkbox(label='shipmaster_only_steering', name='shipmaster_only_steering') }}
|
||||
@ -27,10 +27,14 @@
|
||||
{% 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>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');
|
||||
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++) {
|
||||
@ -42,35 +46,35 @@
|
||||
}">
|
||||
<datalist id="destinations">
|
||||
{% for distance in distances %}
|
||||
<option value="{{ distance.0 }}" distance={{ distance.1 }} />
|
||||
<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" />
|
||||
<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);
|
||||
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;
|
||||
// Set the formatted string as the value of the input field
|
||||
document.getElementById("datetime-dep").value = formattedDate;
|
||||
</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();
|
||||
});
|
||||
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 %}
|
||||
|
||||
@ -83,17 +87,17 @@
|
||||
{% 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");
|
||||
}
|
||||
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 %}
|
||||
|
||||
@ -106,48 +110,57 @@
|
||||
{% 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");
|
||||
}
|
||||
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 />
|
||||
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 />
|
||||
Weggefahren:
|
||||
{{ log.departure }}<br/>
|
||||
{% if state == "completed" %}
|
||||
Angekommen: {{ log.arrival}}<br />
|
||||
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 />
|
||||
Ziel:
|
||||
{{ log.destination }}<br/>
|
||||
{% if state == "completed" %}
|
||||
Km: {{ log.distance_in_km }}<br />
|
||||
Km:
|
||||
{{ log.distance_in_km }}<br/>
|
||||
{% endif %}
|
||||
{% if log.comments %}
|
||||
Kommentare: {{ log.comments }}<br />
|
||||
Kommentare:
|
||||
{{ log.comments }}<br/>
|
||||
{% endif %}
|
||||
{% if log.logtype %}
|
||||
Logtype: {{ log.logtype }}<br />
|
||||
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)
|
||||
{{ amount_guests }}
|
||||
Gäste (ohne Account)
|
||||
{% endif %}
|
||||
{% for rower in log.rowers %}
|
||||
{{ rower.name }}
|
||||
@ -156,8 +169,9 @@
|
||||
{% 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');
|
||||
<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++) {
|
||||
@ -187,16 +201,18 @@
|
||||
{% 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>
|
||||
<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}});
|
||||
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
|
||||
<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">
|
||||
<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 |
@ -3,7 +3,8 @@
|
||||
<div class="max-w-screen-xl w-full flex justify-between items-center">
|
||||
<div>
|
||||
<a href="/">
|
||||
Hü {{ loggedin_user.name }}
|
||||
Hü
|
||||
{{ loggedin_user.name }}
|
||||
</a>
|
||||
</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">
|
||||
<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>
|
||||
</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>
|
||||
<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>
|
||||
@ -47,15 +54,16 @@
|
||||
{% 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}}">
|
||||
<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>
|
||||
<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 }}
|
||||
<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 %}
|
||||
|
||||
@ -68,7 +76,7 @@
|
||||
<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 %}>
|
||||
<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] -}}
|
||||
@ -82,31 +90,36 @@
|
||||
{% endmacro select %}
|
||||
|
||||
|
||||
|
||||
{% 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 }}
|
||||
</div>
|
||||
</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">
|
||||
<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 />
|
||||
{{ 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>
|
||||
{% endmacro box %}
|
||||
|
||||
{% macro faq(question, answer) %}
|
||||
<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>
|
||||
</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">
|
||||
<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,7 +3,7 @@
|
||||
{% extends "base" %}
|
||||
|
||||
{% 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 %}
|
||||
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
||||
{% endif %}
|
||||
@ -30,29 +30,33 @@
|
||||
</h2>
|
||||
|
||||
{% 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 --- #}
|
||||
{% 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="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
|
||||
{{ 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 />
|
||||
<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">
|
||||
<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">
|
||||
<div
|
||||
class="text-right grid gap-2">
|
||||
{# --- START Row Buttons --- #}
|
||||
{% set_global cur_user_participates = false %}
|
||||
{% for rower in planned_event.rower%}
|
||||
@ -65,7 +69,7 @@
|
||||
{% 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>
|
||||
<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 --- #}
|
||||
@ -84,7 +88,7 @@
|
||||
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 %}>
|
||||
<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>
|
||||
@ -96,7 +100,8 @@
|
||||
|
||||
{# --- START Sidebar Content --- #}
|
||||
<div class="hidden">
|
||||
<div id="event{{ planned_event.trip_details_id }}">
|
||||
<div
|
||||
id="event{{ planned_event.trip_details_id }}">
|
||||
{# --- START List Coxes --- #}
|
||||
{% if planned_event.planned_amount_cox > 0 %}
|
||||
{% if amount_cox_missing > 0 %}
|
||||
@ -124,14 +129,14 @@
|
||||
<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 }}" />
|
||||
<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" />
|
||||
<input value="Speichern" class="btn btn-primary" type="submit"/>
|
||||
</form>
|
||||
</div>
|
||||
{# --- END Edit Form --- #}
|
||||
@ -156,21 +161,30 @@
|
||||
{# --- 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="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>
|
||||
<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>
|
||||
<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">
|
||||
<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>
|
||||
@ -183,12 +197,10 @@
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if cur_user_participates %}
|
||||
<a href="/remove/{{ trip.trip_details_id }}"
|
||||
class="btn btn-attention btn-fw">Abmelden</a>
|
||||
<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>
|
||||
<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>
|
||||
@ -213,7 +225,7 @@
|
||||
{{ 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" />
|
||||
<input value="Speichern" class="btn btn-primary" type="submit"/>
|
||||
</form>
|
||||
</div>
|
||||
{% if trip.rower | length == 0 %}
|
||||
@ -241,11 +253,7 @@
|
||||
{% 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">
|
||||
<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>
|
||||
@ -254,11 +262,7 @@
|
||||
{% 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 %}">
|
||||
<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>
|
||||
@ -281,6 +285,4 @@
|
||||
|
||||
{% if loggedin_user.is_admin %}
|
||||
{% include "forms/event" %}
|
||||
{% endif %}
|
||||
|
||||
{% endblock content %}
|
||||
{% endif %}{% endblock content %}
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="w-full">
|
||||
<div class="w-full">
|
||||
<h1 class="h1">Logbuch</h1>
|
||||
|
||||
{% if flash %}
|
||||
@ -25,9 +25,9 @@
|
||||
<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 />
|
||||
<hr/>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content%}
|
||||
|
@ -5,12 +5,12 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="max-w-screen-lg w-full">
|
||||
<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 />
|
||||
<hr/>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content%}
|
||||
|
@ -4,11 +4,11 @@
|
||||
{% extends "base" %}
|
||||
|
||||
{% block content %}
|
||||
{% if flash %}
|
||||
{% if flash %}
|
||||
{{ 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>
|
||||
<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) }}
|
||||
@ -20,8 +20,8 @@
|
||||
{% else %}
|
||||
{{ log::show(log=log, state="on_water", only_ones=true) }}
|
||||
{% endif %}
|
||||
<hr />
|
||||
<hr/>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content%}
|
||||
|
@ -5,12 +5,13 @@
|
||||
{% block content %}
|
||||
|
||||
|
||||
<div class="max-w-screen-lg w-full">
|
||||
<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>
|
||||
<li>{{s.name}}:
|
||||
{{s.rowed_km}}km</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content%}
|
||||
|