django-refunds/templates/navbar.html

45 lines
No EOL
2.3 KiB
HTML

<nav class="navbar navbar-default">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{% url 'home' %}">Refunds</a>
</div>
<!-- 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">
{% if user.is_authenticated %}
<li><a href="{% url 'not_refunded_payments' %}">Paiements</a></li>
<li><a href="{% url 'latest_refunds' %}">Remboursements</a></li>
{% endif %}
</ul>
<ul class="nav navbar-nav navbar-right">
{% if not user.is_authenticated %}
<li><a href="{% url 'auth_login' %}?next={{ request.path }}">Connexion</a></li>
{% else %}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false">
{% firstof user.get_full_name user.get_username %} <span class="caret"></span>
</a>
<ul class="dropdown-menu">
{% if user.is_staff %}
<li><a href="{% url 'admin:index' %}">Admin</a></li>
{% endif %}
<li><a href="{% url 'password_change' %}">Modifier le mot de passe</a></li>
<li role="separator" class="divider"></li>
<li><a href="{% url 'auth_logout' %}?next={{ request.path }}">Déconnexion</a></li>
</ul>
</li>
{% endif %}
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>