From 7a6bea3c46e254f0ce80f01032bb396f7e5fd67d Mon Sep 17 00:00:00 2001 From: philipp Date: Tue, 5 Mar 2024 09:35:08 +0100 Subject: [PATCH 1/3] fix ci (#245) Reviewed-on: https://git.hofer.link/Ruderverein-Donau-Linz/rowt/pulls/245 --- src/tera/log.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tera/log.rs b/src/tera/log.rs index e2dca51..3ff330b 100644 --- a/src/tera/log.rs +++ b/src/tera/log.rs @@ -86,7 +86,7 @@ async fn index( Template::render("log", context.into_json()) } -#[get("/show", rank = 2)] +#[get("/show", rank = 3)] async fn show(db: &State, user: DonauLinzUser) -> Template { let logs = Logbook::completed(db).await; @@ -96,7 +96,7 @@ async fn show(db: &State, user: DonauLinzUser) -> Template { ) } -#[get("/show?")] +#[get("/show?", rank = 2)] async fn show_for_year(db: &State, user: AdminUser, year: i32) -> Template { let logs = Logbook::completed_in_year(db, year).await; -- 2.45.2 From aadc1b315ee7fe5aba2d5ed87f20df21b8a3260e Mon Sep 17 00:00:00 2001 From: philipp Date: Tue, 5 Mar 2024 09:46:53 +0100 Subject: [PATCH 2/3] staging (#246) Reviewed-on: https://git.hofer.link/Ruderverein-Donau-Linz/rowt/pulls/246 --- templates/log.completed.html.tera | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/log.completed.html.tera b/templates/log.completed.html.tera index 1edaefa..0b2b75c 100644 --- a/templates/log.completed.html.tera +++ b/templates/log.completed.html.tera @@ -5,7 +5,7 @@

Logbuch - {% if "admin" in loggedin_user.roles %} + {% if loggedin_user and "admin" in loggedin_user.roles %} @@ -62,6 +63,11 @@ {% for role in roles %} {{ macros::checkbox(label=role.name, name="roles[" ~ role.id ~ "]", id=loop.index , checked=role.name in user.roles, disabled=allowed_to_edit == false) }} {% endfor %} + {% if user.membership_pdf %} + Beitrittserklärung herunterladen + {% endif %} + {{ macros::input(label='Beitrittserklärung', name='membership_pdf', id=loop.index, type="file", readonly=allowed_to_edit == false) }} {{ macros::input(label='DOB', name='dob', id=loop.index, type="text", value=user.dob, readonly=allowed_to_edit == false) }} {{ macros::input(label='Weight (kg)', name='weight', id=loop.index, type="text", value=user.weight, readonly=allowed_to_edit == false) }} {{ macros::input(label='Sex', name='sex', id=loop.index, type="text", value=user.sex, readonly=allowed_to_edit == false) }} -- 2.45.2