2020-10-11 22:16:00 +02:00
|
|
|
<header>
|
2020-11-22 13:34:01 +01:00
|
|
|
<h1>GestioJeux</h1>
|
|
|
|
|
2020-12-27 00:07:09 +01:00
|
|
|
<div id="mobile_nav_trigger" onclick="toggle_mobile_nav()">
|
|
|
|
<i class="fa fa-fw fa-bars" aria-hidden="true"></i> Menu
|
|
|
|
</div>
|
|
|
|
|
2020-10-11 22:16:00 +02:00
|
|
|
<nav>
|
2020-12-27 00:07:09 +01:00
|
|
|
{% with url_name=request.resolver_match.url_name %}
|
|
|
|
<div>
|
|
|
|
<a {% if url_name == "home" %}class="current"{% endif %} href="{% url "mainsite:home" %}"><i class="fa fa-home" aria-hidden="true"></i></a>
|
|
|
|
<a {% if url_name == "inventory" %}class="current"{% endif %} href="{% url "inventory:inventory" %}">Inventaire</a>
|
|
|
|
<a {% if url_name == "suggestions" %}class="current"{% endif %} href="">Suggestions</a>
|
|
|
|
{% if request.user.is_staff %}
|
|
|
|
<a href="{% url "admin:index" %}">Admin</a>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<div id="account">
|
|
|
|
{% if request.user.is_authenticated %}
|
|
|
|
<a class="username" href="{% url "accounts:account_settings" %}">{{ request.user }}</a>
|
|
|
|
<a class="logout" href="{% url "accounts:logout" %}?next={{ request.get_full_path }}"><i class="fa fa-sign-out" aria-hidden="true"></i></a>
|
|
|
|
{% else %}
|
|
|
|
<a class="login{% if url_name == "login" %} current{% endif %}" href="{% url "accounts:login" %}?next={{ request.get_full_path }}">Connexion</a>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endwith %}
|
|
|
|
</div>
|
2020-10-11 22:16:00 +02:00
|
|
|
</header>
|