Compare commits
No commits in common. "fda2673f5a22461a693e43dbff98e1f518214262" and "7614cc8fae79b45178f11cab1b6ead9d6ece8a0c" have entirely different histories.
fda2673f5a
...
7614cc8fae
@ -146,7 +146,7 @@ CREATE TABLE IF NOT EXISTS "boathouse" (
|
|||||||
"boat_id" INTEGER NOT NULL REFERENCES boat(id),
|
"boat_id" INTEGER NOT NULL REFERENCES boat(id),
|
||||||
"aisle" TEXT NOT NULL CHECK (aisle in ('water', 'middle', 'mountain')),
|
"aisle" TEXT NOT NULL CHECK (aisle in ('water', 'middle', 'mountain')),
|
||||||
"side" TEXT NOT NULL CHECK(side IN ('mountain', 'water')),
|
"side" TEXT NOT NULL CHECK(side IN ('mountain', 'water')),
|
||||||
"level" INTEGER NOT NULL CHECK(level BETWEEN 0 AND 11),
|
"level" INTEGER NOT NULL CHECK(level BETWEEN 0 AND 3),
|
||||||
CONSTRAINT unq UNIQUE (aisle, side, level) -- only 1 boat allowed to rest at each space
|
CONSTRAINT unq UNIQUE (aisle, side, level) -- only 1 boat allowed to rest at each space
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -10,22 +10,18 @@
|
|||||||
{{ place[level].1.name }} <a class="btn btn-primary absolute end-0"
|
{{ place[level].1.name }} <a class="btn btn-primary absolute end-0"
|
||||||
href="/board/boathouse/{{ place[level].0 }}/delete">X</a>
|
href="/board/boathouse/{{ place[level].0 }}/delete">X</a>
|
||||||
{% elif boats | length > 0 %}
|
{% elif boats | length > 0 %}
|
||||||
{% if "admin" in loggedin_user.roles %}
|
<details>
|
||||||
<details>
|
<summary>Kein Boot</summary>
|
||||||
<summary>Kein Boot</summary>
|
<form action="/board/boathouse" method="post" class="grid gap-3">
|
||||||
<form action="/board/boathouse" method="post" class="grid gap-3">
|
{{ macros::select(label="Boot", data=boats, name="boat_id", id="boat_id", display=["name", " (","amount_seats", " x)"], wrapper_class="col-span-4") }}
|
||||||
{{ macros::select(label="Boot", data=boats, name="boat_id", id="boat_id", display=["name", " (","amount_seats", " x)"], wrapper_class="col-span-4") }}
|
<input type="hidden" name="aisle" value="{{ aisle_name }}" />
|
||||||
<input type="hidden" name="aisle" value="{{ aisle_name }}" />
|
<input type="hidden" name="side" value="{{ side_name }}" />
|
||||||
<input type="hidden" name="side" value="{{ side_name }}" />
|
<input type="hidden" name="level" value="{{ level }}" />
|
||||||
<input type="hidden" name="level" value="{{ level }}" />
|
<input type="submit"
|
||||||
<input type="submit"
|
class="btn btn-primary w-full col-span-4"
|
||||||
class="btn btn-primary w-full col-span-4"
|
value="Boot eintragen" />
|
||||||
value="Boot eintragen" />
|
</form>
|
||||||
</form>
|
</details>
|
||||||
</details>
|
|
||||||
{% else %}
|
|
||||||
Kein Boot
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
{% else %}
|
||||||
Kein Boot
|
Kein Boot
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -39,9 +35,7 @@
|
|||||||
{{ self::show_place(aisle_name = aisle_name, side_name = side_name, level = 2) }}
|
{{ self::show_place(aisle_name = aisle_name, side_name = side_name, level = 2) }}
|
||||||
{{ self::show_place(aisle_name = aisle_name, side_name = side_name, level = 3) }}
|
{{ self::show_place(aisle_name = aisle_name, side_name = side_name, level = 3) }}
|
||||||
{{ self::show_place(aisle_name = aisle_name, side_name = side_name, level = 4) }}
|
{{ self::show_place(aisle_name = aisle_name, side_name = side_name, level = 4) }}
|
||||||
{% if aisle_name != 'water' or side_name != 'water' %}
|
{{ self::show_place(aisle_name = aisle_name, side_name = side_name, level = 5) }}
|
||||||
{{ self::show_place(aisle_name = aisle_name, side_name = side_name, level = 5) }}
|
|
||||||
{% endif %}
|
|
||||||
{% set show_additional = false %}
|
{% set show_additional = false %}
|
||||||
{% if aisle_name == "mountain" %}
|
{% if aisle_name == "mountain" %}
|
||||||
{% set show_additional = true %}
|
{% set show_additional = true %}
|
||||||
@ -63,16 +57,6 @@
|
|||||||
{% macro show_aisle(name, last=false) %}
|
{% macro show_aisle(name, last=false) %}
|
||||||
<div id="{{ name }}-aisle"
|
<div id="{{ name }}-aisle"
|
||||||
class="grid grid-cols-2 gap-4 {% if not last %}md:border-r{% endif %}">
|
class="grid grid-cols-2 gap-4 {% if not last %}md:border-r{% endif %}">
|
||||||
<h1 class="col-span-2 text-center">
|
|
||||||
{% if name == "water" %}
|
|
||||||
🌊
|
|
||||||
{% elif name == "middle" %}
|
|
||||||
◯
|
|
||||||
{% else %}
|
|
||||||
⛰️
|
|
||||||
{% endif %}
|
|
||||||
- Gang
|
|
||||||
</h1>
|
|
||||||
{{ self::show_side(aisle_name = name, side_name = "mountain") }}
|
{{ self::show_side(aisle_name = name, side_name = "mountain") }}
|
||||||
{{ self::show_side(aisle_name = name, side_name = "water") }}
|
{{ self::show_side(aisle_name = name, side_name = "water") }}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user