breadcrumbs in header for navigation
authordurandn
Fri, 12 Aug 2016 14:50:12 +0200
changeset 119 33102de1f38a
parent 118 a9be1de5fe90
child 120 340a63d12201
breadcrumbs in header for navigation
src/iconolab/templates/partials/header.html
src/iconolab/templates/partials/header_breadcrumbs.html
--- a/src/iconolab/templates/partials/header.html	Fri Aug 12 16:12:40 2016 +0200
+++ b/src/iconolab/templates/partials/header.html	Fri Aug 12 14:50:12 2016 +0200
@@ -1,5 +1,5 @@
 {% load notifications_tags %}
-<nav class="navbar navbar-default" style="">
+<nav class="navbar navbar-default" {% if collection %} style="margin-bottom: 5px;" {% endif %}>
   <div class="container-fluid">
     <div class="navbar-header">
       <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
@@ -12,7 +12,6 @@
     </div>
     <div id="navbar" class="navbar-collapse collapse">
       <ul class="nav navbar-nav">
-        <li><a href="{% url 'home' %}">Accueil</a></li>
         <li><a href="#">Le projet</a></li>
         {% if collection_name %}<li><a href="{% url 'collection_home' collection_name %}">Contribuer</a></li>{% endif %}
       </ul>
@@ -34,4 +33,5 @@
       </ul>
     </div><!--/.nav-collapse -->
   </div><!--/.container-fluid -->
-</nav>
\ No newline at end of file
+</nav>
+{% include "partials/header_breadcrumbs.html" %}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/iconolab/templates/partials/header_breadcrumbs.html	Fri Aug 12 14:50:12 2016 +0200
@@ -0,0 +1,21 @@
+{% if collection %}
+<ol class="breadcrumb">
+  <li><a href="{% url 'home' %}">Liste fonds</a></li>
+  {% if not image and not item %}
+    <li>Fond {{collection.name}}</li>
+  {% else %}
+    <li><a href="{% url 'collection_home' collection.name %}">Fond {{collection.name}}</a></li>
+    {% if not annotation %}
+      <li class="active">Objet</li>
+    {% else %}
+      <li><a href="{% url 'item_detail' collection.name image.item.item_guid %}">Objet</a></li>
+      {% if not revision %}
+        <li class="active">Annotation</li>
+      {% else %}
+        <li><a href="{% url 'annotation_detail' collection.name image.image_guid annotation.annotation_guid %}">Annotation</a></li>
+        <li class="active">Révision</li>
+      {% endif %}
+    {% endif %}
+  {% endif %}
+</ol>
+{% endif %}
\ No newline at end of file