From 02cd893370a891e5e7c4e5537b3b423e1cbc9dab Mon Sep 17 00:00:00 2001 From: philipp Date: Sun, 5 Mar 2023 16:33:02 +0100 Subject: [PATCH] rebase --- static/css/skeleton.css | 32 +++++++++++++++++ templates/base.html.tera | 6 ++-- templates/index.html.tera | 73 ++++++++++++++++++++++++++++++++++----- 3 files changed, 100 insertions(+), 11 deletions(-) diff --git a/static/css/skeleton.css b/static/css/skeleton.css index 2a370ee..5eee2cb 100644 --- a/static/css/skeleton.css +++ b/static/css/skeleton.css @@ -263,6 +263,7 @@ input[type="text"], input[type="tel"], input[type="url"], input[type="password"], +input[type="time"], textarea, select { height: 38px; @@ -280,6 +281,7 @@ input[type="text"], input[type="tel"], input[type="url"], input[type="password"], +input[type="time"], textarea { -webkit-appearance: none; -moz-appearance: none; @@ -295,6 +297,7 @@ input[type="text"]:focus, input[type="tel"]:focus, input[type="url"]:focus, input[type="password"]:focus, +input[type="time"]:focus, textarea:focus, select:focus { border: 1px solid #222; @@ -461,6 +464,11 @@ there. justify-content: end; } +.content-align-bottom { + display: flex; + align-items: flex-end; +} + .font-base { font-size: 1.2rem !important; } @@ -490,6 +498,14 @@ there. margin-bottom: 3rem; } +.mr-2 { + margin-right: 2rem; +} + +.mt-1 { + margin-top: 1rem; +} + .w-full { width: 100%; } @@ -522,6 +538,22 @@ there. color: #fff; } +.text-red { + color: red; +} + .text-center { text-align: center; } + +.text-right { + text-align: right; +} + +.text-left { + text-align: left; +} + +.data-block[data-needed="true"] { + border: 3px solid red; +} diff --git a/templates/base.html.tera b/templates/base.html.tera index 42760ed..418d871 100644 --- a/templates/base.html.tera +++ b/templates/base.html.tera @@ -35,8 +35,8 @@
{% if user.is_admin %} - 🚣 - 👥 + 🚣 + 👥 {% endif %} LOGOUT
@@ -56,7 +56,7 @@ {% endif %} {% if flash.0 == "error" %}
-
+
{{ flash.1 }}
diff --git a/templates/index.html.tera b/templates/index.html.tera index ec7f68e..fe7cd27 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -6,7 +6,12 @@ {% set day = day_with_trip.day %} {% set day_string = day.day | date(format="%Y-%m-%d") %} {% set trips = day_with_trip.trips %} -
+ + {% set cox = trips | filter(attribute="user.is_cox", value=true) %} + {% set amount_cox = cox | length %} + {% set cox_needed = amount_cox < day.planned_amount_cox %} + +
{{ day.day | date(format="%d.%m.%Y")}} {% if day.planned_amount_cox > 0%} @@ -64,19 +69,19 @@ (Noch) keine Ausfahrt geplant {% endif %} - {% if user.is_admin %} -
+ {% if user.is_admin %} +
-
+ -
+
- +
- +
@@ -91,12 +96,64 @@
{% endif %} + + {% if day.planned_amount_cox > 0%} + {% set rowers = trips | filter(attribute="user.is_cox", value=false) %} + {% if cox_needed %} + {% set cox_left = day.planned_amount_cox - amount_cox %} +
Es {{ cox_left | pluralize(singular="wird", plural="werden")}} noch {{ cox_left }} Steuerperson{{ cox_left | pluralize(plural="en")}} gesucht!
+ {% endif %} + Abfahrtszeit: {{ day.planned_starting_time }} Uhr + +
{{ trips | length }} angemeldete Person{{ trips | length | pluralize(plural="en") }}: {{ cox | length }} Steuerperson{{ cox | length | pluralize(plural="en") }} ({% for c in cox %}{{ c.user.name }} {% endfor %}), {{ rowers | length }} Ruderer:
+ +
    + {% for r in rowers %} +
  1. + {{ r.user.name }} (angemeldet seit {{ r.trip.created }}) + {% if r.user.name == user.name %} +
    + + + + + + +
    + {% endif %} +
  2. + {% endfor %} +
+ + {% if day.open_registration or user.is_cox %} +
+ + +
+ + +
+
+ + +
+
+ +
+
+
+
+ {% else %} + Anmeldung an diesem Tag leider nicht möglich (zB bei USI Kursen) + {% endif %} + {% else %} + (Noch) keine Ausfahrt geplant + {% endif %}
{% endfor %} {% if user.is_cox %} - Alle heurigen Ausfahrten anzeigen + Alle heurigen Ausfahrten anzeigen {% endif %} {% endblock content %}