From 1e96c113a9b710726ce315b1d54f8286a1570d4d Mon Sep 17 00:00:00 2001 From: philipp Date: Sat, 9 Mar 2024 16:15:47 +0100 Subject: [PATCH] single location for flash message --- templates/admin/boat/index.html.tera | 1 - templates/admin/list/index.html.tera | 1 - templates/admin/list/result.html.tera | 1 - templates/admin/mail.html.tera | 1 - templates/admin/schnupper/index.html.tera | 1 - templates/admin/user/fees.html.tera | 1 - templates/admin/user/index.html.tera | 1 - templates/admin/user/scheckbuch.html.tera | 1 - templates/base.html.tera | 7 ++++++- templates/board/boathouse.html.tera | 13 +++++++------ templates/boatdamages.html.tera | 1 - templates/ergo.final.html.tera | 1 - templates/ergo.html.tera | 1 - templates/index.html.tera | 1 - templates/kiosk.html.tera | 5 ----- templates/log.html.tera | 3 --- templates/planned.html.tera | 1 - 17 files changed, 13 insertions(+), 28 deletions(-) diff --git a/templates/admin/boat/index.html.tera b/templates/admin/boat/index.html.tera index 33127e1..a79cbbd 100644 --- a/templates/admin/boat/index.html.tera +++ b/templates/admin/boat/index.html.tera @@ -2,7 +2,6 @@ {% import "includes/forms/boat" as boat %} {% extends "base" %} {% block content %} - {% if flash %}{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}{% endif %}

Boats

{{ boat::new() }} diff --git a/templates/admin/list/index.html.tera b/templates/admin/list/index.html.tera index 6fe0e31..a020b1f 100644 --- a/templates/admin/list/index.html.tera +++ b/templates/admin/list/index.html.tera @@ -1,7 +1,6 @@ {% import "includes/macros" as macros %} {% extends "base" %} {% block content %} - {% if flash %}{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}{% endif %}

List

diff --git a/templates/admin/list/result.html.tera b/templates/admin/list/result.html.tera index ae43182..a5863c2 100644 --- a/templates/admin/list/result.html.tera +++ b/templates/admin/list/result.html.tera @@ -1,7 +1,6 @@ {% import "includes/macros" as macros %} {% extends "base" %} {% block content %} - {% if flash %}{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}{% endif %}

List - Result

    diff --git a/templates/admin/mail.html.tera b/templates/admin/mail.html.tera index 05a0b8f..1f80747 100644 --- a/templates/admin/mail.html.tera +++ b/templates/admin/mail.html.tera @@ -2,7 +2,6 @@ {% import "includes/forms/boat" as boat %} {% extends "base" %} {% block content %} - {% if flash %}{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}{% endif %}

    Mail

    diff --git a/templates/admin/schnupper/index.html.tera b/templates/admin/schnupper/index.html.tera index a3e9d5a..b2520b8 100644 --- a/templates/admin/schnupper/index.html.tera +++ b/templates/admin/schnupper/index.html.tera @@ -2,7 +2,6 @@ {% extends "base" %} {% block content %}
    - {% if flash %}{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}{% endif %}

    Schnupper Verwaltung

    - {% if flash %}{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}{% endif %}

    Gebühren

    diff --git a/templates/admin/user/index.html.tera b/templates/admin/user/index.html.tera index 932975d..068ce64 100644 --- a/templates/admin/user/index.html.tera +++ b/templates/admin/user/index.html.tera @@ -2,7 +2,6 @@ {% extends "base" %} {% block content %}
    - {% if flash %}{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}{% endif %}

    Users

    {% if allowed_to_edit %} - {% if flash %}{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}{% endif %}

    Scheckbücher

    diff --git a/templates/base.html.tera b/templates/base.html.tera index e9c6eb3..dbb98d5 100644 --- a/templates/base.html.tera +++ b/templates/base.html.tera @@ -25,7 +25,12 @@
    {% endif %} -
    +
    + {% if flash and loggedin_user %} +
    + {{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }} +
    + {% endif %} {% block content %} {% endblock content %}
    diff --git a/templates/board/boathouse.html.tera b/templates/board/boathouse.html.tera index a92fbd4..d07f520 100644 --- a/templates/board/boathouse.html.tera +++ b/templates/board/boathouse.html.tera @@ -37,17 +37,18 @@
    {% endmacro show_side %} {% macro show_aisle(name) %} -
    +
    {{ self::show_side(aisle_name = name, side_name = "mountain") }} {{ self::show_side(aisle_name = name, side_name = "water") }}
    {% endmacro show_aisle %} {% block content %} - {% if flash %}{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}{% endif %} -
    +

    Bootshaus

    - {{ self::show_aisle(name = "mountain") }} - {{ self::show_aisle(name = "middle") }} - {{ self::show_aisle(name = "water") }} +
    + {{ self::show_aisle(name = "mountain") }} + {{ self::show_aisle(name = "middle") }} + {{ self::show_aisle(name = "water") }} +
    {% endblock content %} diff --git a/templates/boatdamages.html.tera b/templates/boatdamages.html.tera index d863c49..74908a4 100644 --- a/templates/boatdamages.html.tera +++ b/templates/boatdamages.html.tera @@ -4,7 +4,6 @@ {% block content %}

    Bootschäden

    - {% if flash %}{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3 mt-3") }}{% endif %}

    Neuen Schaden - {% if flash %}{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}{% endif %}

    Aktuelle Woche

    Dirty Thirty diff --git a/templates/ergo.html.tera b/templates/ergo.html.tera index 1487cdd..dff7d8a 100644 --- a/templates/ergo.html.tera +++ b/templates/ergo.html.tera @@ -3,7 +3,6 @@ {% block content %}

    Ergo Challenges

    - {% if flash %}{{ macros::alert(message=flash.1, type=flash.0, class="my-3") }}{% endif %}