From fd2eb164e1b8b250f1253743fe10a4fc32b00c14 Mon Sep 17 00:00:00 2001 From: Niklas Elsbrock Date: Wed, 1 Sep 2021 21:12:10 +0200 Subject: [PATCH] =?UTF-8?q?Startseite=20f=C3=BCr=20Angemeldete=20erreichba?= =?UTF-8?q?r=20gemacht?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nateman/blueprints/__init__.py | 9 +++------ nateman/templates/base.html.j2 | 2 +- nateman/templates/index/index.html.j2 | 5 ++++- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/nateman/blueprints/__init__.py b/nateman/blueprints/__init__.py index 37f7f47..cc786d7 100644 --- a/nateman/blueprints/__init__.py +++ b/nateman/blueprints/__init__.py @@ -19,15 +19,12 @@ Index-Blueprint """ -from flask import Blueprint, g, redirect, url_for, render_template +from flask import Blueprint, render_template bp = Blueprint("index", __name__) @bp.route("/") def index(): - """ Startseite (Pfad ``/``, leitet bei angemeldetem Lehrer auf Klausurseite um) """ - if g.lehrer is not None: - return redirect(url_for("klausuren.mine"), code=303) - else: - return render_template("index/index.html.j2") + """ Startseite (Pfad ``/``) """ + return render_template("index/index.html.j2") diff --git a/nateman/templates/base.html.j2 b/nateman/templates/base.html.j2 index 5898d07..b50c198 100644 --- a/nateman/templates/base.html.j2 +++ b/nateman/templates/base.html.j2 @@ -54,7 +54,7 @@
- + diff --git a/nateman/templates/index/index.html.j2 b/nateman/templates/index/index.html.j2 index 5ae6d74..dd80bbf 100644 --- a/nateman/templates/index/index.html.j2 +++ b/nateman/templates/index/index.html.j2 @@ -30,6 +30,9 @@ {%- if not loop.first -%}{%- if loop.last %} und {% else -%}, {% endif -%}{%- endif -%} {{ stufe.name }} {%- endfor %} - einsehen oder sich als Lehrer anmelden. + einsehen + {%- if g.lehrer is none %} + oder sich als Lehrer anmelden + {%- endif -%}.

{% endblock %}