diff --git a/src/tera/boatdamage.rs b/src/tera/boatdamage.rs index 1fb28b2..8722467 100644 --- a/src/tera/boatdamage.rs +++ b/src/tera/boatdamage.rs @@ -36,6 +36,7 @@ async fn index_kiosk( context.insert("boatdamages", &boatdamages); context.insert("boats", &boats); context.insert("coxes", &coxes); + context.insert("show_kiosk_header", &true); Template::render("boatdamages", context.into_json()) } diff --git a/src/tera/log.rs b/src/tera/log.rs index de65e73..9b7cfbb 100644 --- a/src/tera/log.rs +++ b/src/tera/log.rs @@ -90,7 +90,7 @@ async fn show(db: &State, user: User) -> Template { async fn show_kiosk(db: &State, _kiosk: KioskCookie) -> Template { let logs = Logbook::completed(db).await; - Template::render("log.completed", context!(logs)) + Template::render("log.completed", context!(logs, show_kiosk_header: true)) } #[get("/kiosk/ekrv2019/")] @@ -148,6 +148,7 @@ async fn kiosk( context.insert("logtypes", &logtypes); context.insert("on_water", &on_water); context.insert("distances", &distances); + context.insert("show_kiosk_header", &true); Template::render("kiosk", context.into_json()) } diff --git a/src/tera/stat.rs b/src/tera/stat.rs index 54e0def..c5d0e41 100644 --- a/src/tera/stat.rs +++ b/src/tera/stat.rs @@ -26,7 +26,7 @@ async fn index_kiosk(db: &State, _kiosk: KioskCookie) -> Template { let stat = Stat::get_rowed_km(db).await; let kiosk = true; - Template::render("stat", context!(stat, kiosk)) + Template::render("stat", context!(stat, kiosk, show_kiosk_header: true)) } pub fn routes() -> Vec { diff --git a/templates/base.html.tera b/templates/base.html.tera index cbca953..910e4c1 100644 --- a/templates/base.html.tera +++ b/templates/base.html.tera @@ -12,7 +12,13 @@ {% if loggedin_user %} {{ macros::header(loggedin_user=loggedin_user) }} - {% endif %} + {% endif %} + {% if show_kiosk_header %} + Ausfahrt eintragen + Logbuch + Statistik + Bootsschaden + {% endif %}
{% block content %}{% endblock content %}