User dans la navbar
This commit is contained in:
parent
47d96bbef9
commit
4d8074ef95
1 changed files with 17 additions and 0 deletions
|
@ -16,5 +16,22 @@
|
||||||
|
|
||||||
<li class="nav-item {% if settings %}active{% endif %}"><a class="nav-link" href="{% url 'settings:index' %}">Administration</a></li>
|
<li class="nav-item {% if settings %}active{% endif %}"><a class="nav-link" href="{% url 'settings:index' %}">Administration</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<ul class="navbar-nav ml-auto">
|
||||||
|
{% if request.user.is_authenticated %}
|
||||||
|
<li class="nav-item dropdown">
|
||||||
|
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
|
{{request.user}}
|
||||||
|
</a>
|
||||||
|
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
|
||||||
|
<a class="dropdown-item" href="#"><i class="fa fa-user"></i> Accéder à mon profil</a>
|
||||||
|
<a class="dropdown-item" href="#"><i class="fa fa-sign-out-alt"></i> Se déconnecter</a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{% else %}
|
||||||
|
<li class="nav-item {% if active == 4 %}active{% endif %}">
|
||||||
|
<a class="nav-link" href="">Connexion<span class="sr-only">(current)</span></a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
Loading…
Reference in a new issue