rowt/templates/log.html.tera

50 lines
1.4 KiB
Plaintext
Raw Normal View History

2023-07-23 12:17:57 +02:00
{% import "includes/macros" as macros %}
2023-07-26 12:56:19 +02:00
{% import "includes/forms/log" as log %}
2023-07-23 12:17:57 +02:00
{% extends "base" %}
{% block content %}
2023-07-30 16:59:20 +02:00
<div class="w-full">
2023-07-30 14:33:50 +02:00
<h1 class="h1">Logbuch</h1>
2023-10-30 13:49:49 +01:00
{% if flash %}
<div class="w-full">
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
</div>
{% endif %}
2023-09-05 23:03:18 +02:00
<div class="w-full grid md:grid-cols-5 gap-3 mt-5">
2023-11-04 00:19:46 +01:00
<div class="bg-white dark:bg-primary-900 rounded-md hidden md:block shadow">
2023-09-05 23:03:18 +02:00
<h2 class="h2">Boote</h2>
2023-10-30 13:49:49 +01:00
2023-09-05 23:03:18 +02:00
<div>
{{ log::show_boats(only_ones=false) }}
</div>
</div>
2023-11-04 00:19:46 +01:00
<div class="md:col-span-3 bg-white dark:bg-primary-900 rounded-md shadow">
2023-09-05 23:03:18 +02:00
<h2 class="h2">Neue Ausfahrt</h2>
<div class="p-3">
2023-10-01 17:57:22 +02:00
{{ log::new(only_ones=loggedin_user.is_cox==false, shipmaster=loggedin_user.id) }}
2023-09-05 23:03:18 +02:00
</div>
</div>
2023-11-04 00:19:46 +01:00
<div class="bg-white dark:bg-primary-900 rounded-md shadow">
2023-09-05 23:03:18 +02:00
<h2 class="h2">Am Wasser</h2>
2023-10-30 13:49:49 +01:00
{% if on_water | length > 0 %}
{% for log in on_water %}
{% if log.shipmaster == loggedin_user.id %}
{{ log::show(log=log, state="on_water", allowed_to_close=true, only_ones=loggedin_user.is_cox==false) }}
{% else %}
{{ log::show(log=log, state="on_water", only_ones=true) }}
{% endif %}
{% endfor %}
{% else %}
<p class="p-3 text-center">Kein Boot am Wasser</p>
{% endif %}
2023-09-05 23:03:18 +02:00
</div>
</div>
</div>
2023-10-30 13:49:49 +01:00
2023-09-05 23:03:18 +02:00
<script src="/public/logbook.js"></script>
2023-07-23 12:17:57 +02:00
{% endblock content%}