2018-01-24 10:44:54 +00:00
|
|
|
{% load categories %}
|
2018-03-01 11:02:22 +00:00
|
|
|
{% load load_settings %}
|
2018-01-24 10:44:54 +00:00
|
|
|
{% load_categories %}
|
2018-03-01 11:02:22 +00:00
|
|
|
{% load_site_settings %}
|
2018-03-11 22:25:59 +00:00
|
|
|
{% load_static_pages %}
|
2018-02-12 08:16:25 +00:00
|
|
|
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
2018-03-01 11:02:22 +00:00
|
|
|
<a class="navbar-brand" href="{% url "home"%}">
|
|
|
|
{% if site_settings.site_logo %}
|
|
|
|
<img src="{{ site_settings.site_logo.url}}"/>
|
|
|
|
{% endif %}
|
2018-03-02 09:29:35 +00:00
|
|
|
Il était une fois dans l'est
|
2018-03-01 11:02:22 +00:00
|
|
|
</a>
|
2018-02-12 08:16:25 +00:00
|
|
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarText" aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
|
|
|
|
<span class="navbar-toggler-icon"></span>
|
|
|
|
</button>
|
|
|
|
<div class="collapse navbar-collapse" id="navbarText">
|
|
|
|
<ul class="navbar-nav mr-auto">
|
2018-01-24 11:00:01 +00:00
|
|
|
{% for c in categories %}
|
2018-02-12 08:16:25 +00:00
|
|
|
<li class="nav-item
|
|
|
|
{% if category.pk == c.pk %}active{%endif%}">
|
2018-03-09 10:44:49 +00:00
|
|
|
<a class="nav-link" href="{% url 'content:category' c.pk %}">{{c.name}}
|
2018-01-24 11:00:01 +00:00
|
|
|
</a></li>
|
2018-01-24 10:44:54 +00:00
|
|
|
{% endfor %}
|
2018-03-11 22:25:59 +00:00
|
|
|
{% for p in static_pages %}
|
|
|
|
<li class="nav-item
|
|
|
|
{% if page.pk == p.pk %}active{%endif%}">
|
|
|
|
<a class="nav-link" href="{% url 'settings:staticpage' p.pk %}">{{p.name}}
|
|
|
|
</a></li>
|
|
|
|
{% endfor %}
|
2018-02-12 08:16:25 +00:00
|
|
|
|
2018-02-28 14:06:55 +00:00
|
|
|
</ul>
|
2018-02-28 14:18:08 +00:00
|
|
|
<ul class="navbar-nav ml-auto">
|
2018-03-09 10:44:49 +00:00
|
|
|
{% if request.user.school %}
|
|
|
|
<li class="nav-item {% if school %}active{% endif %}"><a class="nav-link" href="{% url 'users:school' request.user.school.pk %}"><i class="fas fa-graduation-cap"></i> Mon école</a></li>
|
2018-02-28 21:16:53 +00:00
|
|
|
{% endif %}
|
2018-02-28 17:38:40 +00:00
|
|
|
<li class="nav-item {% if settings %}active{% endif %}"><a class="nav-link" href="{% url 'settings:index' %}"><i class="fas fa-cogs"></i> Administration</a></li>
|
2018-02-28 14:18:08 +00:00
|
|
|
{% 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">
|
2018-02-28 17:11:47 +00:00
|
|
|
<a class="dropdown-item" href="{% url 'users:logout' %}"><i class="fa fa-sign-out-alt"></i> Se déconnecter</a>
|
2018-02-28 14:18:08 +00:00
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
{% else %}
|
|
|
|
<li class="nav-item {% if active == 4 %}active{% endif %}">
|
2018-03-10 13:48:48 +00:00
|
|
|
<a class="nav-link" href="{% url 'users:login' %}">Connexion<span class="sr-only">(current)</span></a>
|
2018-02-28 17:11:47 +00:00
|
|
|
</li>
|
2018-03-11 21:02:16 +00:00
|
|
|
<li>
|
|
|
|
<a class="nav-link" href="{% url "users:password-reset" %}">(Mot de passe oublié)</a>
|
|
|
|
</li>
|
2018-02-28 17:11:47 +00:00
|
|
|
|
2018-02-28 14:18:08 +00:00
|
|
|
{% endif %}
|
|
|
|
</ul>
|
2018-02-28 14:06:55 +00:00
|
|
|
</div>
|
2018-01-20 22:14:11 +00:00
|
|
|
</nav>
|