From 0eac1a66f9c5eac9840d319d791e5d2e974ddebc Mon Sep 17 00:00:00 2001 From: philipp Date: Thu, 16 May 2024 22:35:26 +0200 Subject: [PATCH] better layout --- src/tera/mod.rs | 10 ++- src/tera/planned.rs | 6 -- templates/index.html.tera | 125 ++++++++++++++++++++---------------- templates/planned.html.tera | 21 ------ 4 files changed, 77 insertions(+), 85 deletions(-) diff --git a/src/tera/mod.rs b/src/tera/mod.rs index c47c7f1..c38206c 100644 --- a/src/tera/mod.rs +++ b/src/tera/mod.rs @@ -21,9 +21,10 @@ use sqlx::SqlitePool; use tera::Context; use crate::model::{ + logbook::Logbook, notification::Notification, role::Role, - user::{User, UserWithDetails}, + user::{User, UserWithDetails, SCHECKBUCH}, }; pub(crate) mod admin; @@ -52,8 +53,15 @@ async fn index(db: &State, user: User, flash: Option -

- Ruder - - assistent -

+

Ruder­assistent

- +
+ Vergangene Nachrichten (14 Tage) +
+ {% for notification in notifications %} + {% if notification.read_at %} +
+ + {{ notification.category }} • {{ notification.created_at | date(format="%d.%m.%Y %H:%M") }} + +
{{ notification.message | safe }}
+
+ {% endif %} + {% endfor %} +
+
+
+ {% endif %} {% if "Donau Linz" in loggedin_user.roles and "Unterstützend" not in loggedin_user.roles and "Förderndes Mitglied" not in loggedin_user.roles %} {% endif %} {% if "scheckbuch" in loggedin_user.roles %} -