poulpe/shared/templates/shared/base_header.html
2018-08-04 05:38:03 +02:00

53 lines
2.3 KiB
HTML

{% load i18n %}
<div class="strong-banner">
<div class="container">
<nav class="navbar navbar-inverse">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#main-menu">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{% url "shared:home" %}">Poulpe</a>
</div>
<div class="collapse navbar-collapse" id="main-menu">
<ul class="nav navbar-nav">
{% if user.is_authenticated %}
{% comment %}
<li><a href="{% url "user:profile" %}">{% trans "Mon profil" %}</a></li>
{% endcomment %}
{% if user.is_staff %}
<li><a href="{% url "admin:index" %}">{% trans "Admin" %}</a></li>
{% endif %}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ user.username }}
<span class="glyphicon glyphicon-menu-hamburger"></span>
</a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="{% url "account_email" %}">
<span class="glyphicon glyphicon-envelope"></span>
{% trans "Emails" %}</a></li>
<li><a href="{% url "account_change_password" %}">
<span class="glyphicon glyphicon-lock"></span>
{% trans "Changer de mot de passe" %}</a></li>
<li class="divider"></li>
<li><a href="{% url "account_logout" %}">
<span class="glyphicon glyphicon-off"></span>
{% trans "Déconnexion" %}</a></li>
</ul>
</li>
{% else %}
<li><a href="{% url "account_signup" %}">
<span class="glyphicon glyphicon-plus"></span>
{% trans "Inscription" %}</a></li>
<li><a href="{% url "account_login" %}">
<span class="glyphicon glyphicon-log-in"></span>
{% trans "Connexion" %}</a></li>
{% endif %}
</ul>
</div>
</nav>
</div><!-- /.container -->
</div><!-- /.strong-banner -->