2020-10-11 22:16:00 +02:00
|
|
|
<header>
|
2020-11-22 13:34:01 +01:00
|
|
|
<h1>GestioJeux</h1>
|
|
|
|
|
2020-10-11 22:16:00 +02:00
|
|
|
{% with url_name=request.resolver_match.url_name %}
|
|
|
|
<nav>
|
|
|
|
<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>
|
2020-11-22 13:34:01 +01:00
|
|
|
{% if request.user.is_staff %}
|
|
|
|
<a href="{% url "admin:index" %}">Admin</a>
|
|
|
|
{% endif %}
|
2020-10-11 22:16:00 +02:00
|
|
|
</nav>
|
2020-10-17 21:31:55 +02:00
|
|
|
{% if request.user.is_authenticated %}
|
2020-12-20 01:10:02 +01:00
|
|
|
<a class="username" href="{% url "gestiojeux_auth:account_settings" %}">{% include "./user.html" with user=request.user %}</a>
|
2020-11-22 13:34:01 +01:00
|
|
|
<a class="login" href="{% url "gestiojeux_auth:logout" %}?next={{ request.get_full_path }}"><i class="fa fa-sign-out" aria-hidden="true"></i></a>
|
2020-12-13 00:12:06 +01:00
|
|
|
{% else %}
|
|
|
|
<a class="login{% if url_name == "login" %} current{% endif %}" href="{% url "gestiojeux_auth:login" %}?next={{ request.get_full_path }}">Connexion</a>
|
2020-10-17 21:31:55 +02:00
|
|
|
{% endif %}
|
2020-10-11 22:16:00 +02:00
|
|
|
{% endwith %}
|
|
|
|
</header>
|