summaryrefslogtreecommitdiffstats
path: root/templates/layout.html
diff options
context:
space:
mode:
authorAlexander Sulfrian <alex@spline.inf.fu-berlin.de>2016-01-10 05:08:36 +0100
committerAlexander Sulfrian <alex@spline.inf.fu-berlin.de>2016-01-10 05:08:36 +0100
commit1ec270de4390f215f874e8fad23736ce978c1bbd (patch)
treef56ebd30ec7648f785b558e499148d424bc55147 /templates/layout.html
parent915c05c05a5b510d53042944582dc62c7d3f28d1 (diff)
downloadpadlite-teams-1ec270de4390f215f874e8fad23736ce978c1bbd.tar.gz
padlite-teams-1ec270de4390f215f874e8fad23736ce978c1bbd.tar.bz2
padlite-teams-1ec270de4390f215f874e8fad23736ce978c1bbd.zip
Use sqlalchemy, flask-migrate, flask-login and flask-script
No peewee anymore. All dependencies are available as debian packages now.
Diffstat (limited to 'templates/layout.html')
-rw-r--r--templates/layout.html12
1 files changed, 5 insertions, 7 deletions
diff --git a/templates/layout.html b/templates/layout.html
index 4019773..4ba5c4a 100644
--- a/templates/layout.html
+++ b/templates/layout.html
@@ -54,21 +54,19 @@
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
- {% if user %}
- {% if user.admin %}
+ {% if current_user.is_authenticated %}
+ {% if current_user.admin %}
<li><a href="{{ url_for('admin.index') }}"><span class="glyphicon glyphicon-dashboard" /> Admin</a></li>
{% endif %}
- <li><a href="{{ url_for('auth.logout') }}"><span class="glyphicon glyphicon-log-out" /> Logout</a></li>
+ <li><a href="{{ url_for('logout') }}"><span class="glyphicon glyphicon-log-out" /> Logout</a></li>
{% else %}
- <li><a href="{{ url_for('auth.login') }}"><span class="glyphicon glyphicon-log-in" /> Login</a></li>
+ <li><a href="{{ url_for('login') }}"><span class="glyphicon glyphicon-log-in" /> Login</a></li>
{% endif %}
</ul>
</div><!-- /.navbar-collapse -->
</nav>
-
-
{% for categorie, message in get_flashed_messages(with_categories=true) %}
{% if categorie == 'message' %}
<div class="alert alert-danger">{{ message }}</div>
@@ -76,7 +74,7 @@
<div class="alert alert-{{categorie}}">{{ message }}</div>
{% endif %}
{% endfor %}
-
+
{% block content %}{% endblock %}
</div>
</body>