mirror of
https://github.com/nelsbrock/NateMan.git
synced 2026-08-14 21:36:49 +02:00
Startseite für Angemeldete erreichbar gemacht
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<a id="nateman-logo-container" href="{{ url_for('klausuren.mine' if g.lehrer is not none else 'index.index') }}">
|
||||
<a id="nateman-logo-container" href="{{ url_for('index.index') }}">
|
||||
<img id="nateman-logo" alt="NateMan Logo"
|
||||
src="{{ url_for('static', filename='img/logo.png') }}" draggable="false">
|
||||
</a>
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
{%- if not loop.first -%}{%- if loop.last %} und {% else -%}, {% endif -%}{%- endif -%}
|
||||
<a href="{{ url_for('klausuren.stufe', stufe_name=stufe.name) }}">{{ stufe.name }}</a>
|
||||
{%- endfor %}
|
||||
einsehen oder sich als Lehrer <a href="{{ url_for('auth.login') }}">anmelden</a>.
|
||||
einsehen
|
||||
{%- if g.lehrer is none %}
|
||||
oder sich als Lehrer <a href="{{ url_for('auth.login') }}">anmelden</a>
|
||||
{%- endif -%}.
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user