diff options
Diffstat (limited to 'accounts/templates/base.html')
-rw-r--r-- | accounts/templates/base.html | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/accounts/templates/base.html b/accounts/templates/base.html index 1eeda55..f59408d 100644 --- a/accounts/templates/base.html +++ b/accounts/templates/base.html @@ -15,9 +15,15 @@ <div id="header-background"> </div> <header> - <h1><a href="{{ url_for('default.settings') if g.user else url_for('default.index') }}"> - <img src="{{ url_for('static', filename='logo.png') }}" alt="spline accounts" /> - </a></h1> + <h1> + {%- if current_user.is_authenticated -%} + <a href="{{ url_for('default.settings') }}"> + {%- else -%} + <a href="{{ url_for('default.index') }}"> + {%- endif -%} + <img src="{{ url_for('static', filename='logo.png') }}" alt="spline accounts" /> + </a> + </h1> <span id="roundcornerb"> </span> <span id="roundcornerw"> </span> @@ -31,9 +37,9 @@ {%- if not no_login_message %} <nav id="usermenu"> <ul> - {%- if g.user %} - <li>Angemeldet als <strong>{{ g.user.uid }}</strong></li> - {%- if g.user.uid in config.get('ADMIN_USERS', []) %} + {%- if current_user.is_authenticated %} + <li>Angemeldet als <strong>{{ current_user.uid }}</strong></li> + {%- if current_user.uid in config.get('ADMIN_USERS', []) %} <li><a href="{{ url_for('admin.index') }}">Admin</a></li> {%- endif %} <li><a href="{{ url_for('default.logout') }}">Abmelden</a></li> |