From a8dbf6b025e37cadcd0915019aafeb2ee1843dc5 Mon Sep 17 00:00:00 2001 From: Philipp Date: Fri, 28 Apr 2023 18:55:51 +0200 Subject: [PATCH] add missing sidebar --- templates/dynamics/sidebar.html.tera | 17 +++++++++++++ templates/includes/buttons.html.tera | 16 ++++++++++++ templates/includes/macros.html.tera | 2 +- templates/index.html.tera | 38 ++-------------------------- 4 files changed, 36 insertions(+), 37 deletions(-) create mode 100644 templates/includes/buttons.html.tera diff --git a/templates/dynamics/sidebar.html.tera b/templates/dynamics/sidebar.html.tera index e69de29..ce2341a 100644 --- a/templates/dynamics/sidebar.html.tera +++ b/templates/dynamics/sidebar.html.tera @@ -0,0 +1,17 @@ + + \ No newline at end of file diff --git a/templates/includes/buttons.html.tera b/templates/includes/buttons.html.tera new file mode 100644 index 0000000..09734f4 --- /dev/null +++ b/templates/includes/buttons.html.tera @@ -0,0 +1,16 @@ +{% if loggedin_user.is_cox %} +
+ + + +
+{% endif %} \ No newline at end of file diff --git a/templates/includes/macros.html.tera b/templates/includes/macros.html.tera index 80d1413..077a1f0 100644 --- a/templates/includes/macros.html.tera +++ b/templates/includes/macros.html.tera @@ -46,7 +46,7 @@
{% if participants | length > 0 %} {% for rower in participants %} - {{ rower.name }}
+ {{ rower.name }} {% if rower.isGuest %} (Gast) {% endif %}
{% endfor %} {% else %} {{ text }} diff --git a/templates/index.html.tera b/templates/index.html.tera index b284e75..93a5bac 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -10,22 +10,7 @@

Ausfahrten

- {% if loggedin_user.is_cox %} -
- - - -
- {% endif %} + {% include "includes/buttons" %} {% for day in days %} {% set amount_trips = day.planned_events | length + day.trips | length %} @@ -253,26 +238,7 @@
-{# --- START Add Trip Sidebar --- #} - - -{# --- END Add Trip Sidebar --- #} - +{% include "dynamics/sidebar" %} {% include "forms/trip" %} {% include "forms/event" %}