From 88af24db7be87f25af205a6fb8a8c93ca4b02bf4 Mon Sep 17 00:00:00 2001 From: philipp Date: Mon, 23 Oct 2023 21:38:08 +0200 Subject: [PATCH] allow all users to report boat damage --- src/tera/boatdamage.rs | 4 ++-- templates/boatdamages.html.tera | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tera/boatdamage.rs b/src/tera/boatdamage.rs index 8722467..8738e68 100644 --- a/src/tera/boatdamage.rs +++ b/src/tera/boatdamage.rs @@ -26,7 +26,7 @@ async fn index_kiosk( ) -> Template { let boatdamages = BoatDamage::all(db).await; let boats = Boat::all(db).await; - let coxes = User::cox(db).await; + let user = User::all(db).await; let mut context = Context::new(); if let Some(msg) = flash { @@ -35,7 +35,7 @@ async fn index_kiosk( context.insert("boatdamages", &boatdamages); context.insert("boats", &boats); - context.insert("coxes", &coxes); + context.insert("user", &user); context.insert("show_kiosk_header", &true); Template::render("boatdamages", context.into_json()) diff --git a/templates/boatdamages.html.tera b/templates/boatdamages.html.tera index 377e036..09d39eb 100644 --- a/templates/boatdamages.html.tera +++ b/templates/boatdamages.html.tera @@ -27,7 +27,7 @@
{{ log::boat_select(only_ones=false, id='boat') }} {% if not loggedin_user %} - {{ macros::select(label='Gemeldet von', data=coxes, name='user_id') }} + {{ macros::select(label='Gemeldet von', data=user, name='user_id') }} {% endif %} {{ macros::input(label='Beschreibung des Schadens', name='desc', type='text', required=true, wrapper_class='col-span-4') }}