diff options
Diffstat (limited to 'templates/layout.html')
-rw-r--r-- | templates/layout.html | 12 |
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> |