src/iconolab_episteme/templates/partials/header.html
changeset 12 902a14596a56
child 15 37c39e71b944
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/iconolab_episteme/templates/partials/header.html	Tue Jul 03 13:38:28 2018 +0200
@@ -0,0 +1,46 @@
+{% load notifications_tags %}
+{% load iconolab_tags %}
+{% load staticfiles %}
+
+<header>
+  <section id="topnav">
+    <nav class="navbar navbar-default">
+      <div class="{% container_class %}">
+        <div class="navbar-header">
+            {# {% if not homepage %} #}
+              <a class="navbar-brand" href="{% url 'home' %}">
+                <img src="{% static 'iconolab/img/iconolab.png' %}" alt="Iconolab" height="20">
+              </a>
+            {# {% endif %} #}
+        </div>
+        <div id="navbar" class="navbar-collapse collapse">
+          <ul class="nav navbar-nav">
+            <li><a href="{% url 'iconolab_help' %}">Le projet</a></li>
+            {% if collection_name %}<li><a href="{% url 'collection_home' collection_name %}">Contribuer</a></li>{% endif %}
+          </ul>
+          {% include "partials/header_search_form.html"%}
+          <a class="navbar-brand" href="https://projet-episteme.org/" target="_blank" rel="noopener noreferrer">
+            <img src="{% static 'iconolab_episteme/img/logo_episteme.png' %}" alt="Episteme" height="25" style="margin-left: 20%;">
+          </a>
+          <ul class="nav navbar-nav navbar-right">
+            {% if request.user.is_authenticated %}
+              {% notifications_unread as unread_count %}
+              <li><a href="{% url 'user_home' request.user.username %}" title="{{request.user.username}}: Mon espace - {{ unread_count }} notification(s)">
+                Mon espace <span class="badge {% if unread_count %}badge-warning{% endif %}">
+                {{ unread_count }} <i class="fa fa-envelope-o" aria-hidden="true"></i> </span>
+              </a></li>
+              <li><a href="{% url 'account:logout' %}">Déconnexion</a></li>
+            {% else %}
+              <li><a href="{% url 'account:register' %}">Créer un compte</a></li>
+              <li><a href="{% url 'account:login' %}?next={{ request.path | urlencode }}">Connexion</a></li>
+            {% endif %}
+          </ul>
+        </div><!--/.nav-collapse -->
+      </div><!--/.container-fluid -->
+    </nav>
+  </section>
+</header>
+
+<div class="{% container_class %}">
+{% include "partials/header_breadcrumbs.html" %}
+</div>