]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
html: Turn the navbar into a breadcrumb bar
authorBelén Barros Peña <belen.barros.pena@intel.com>
Sat, 20 Sep 2014 22:33:57 +0000 (23:33 +0100)
committerStephen Finucane <stephen.finucane@intel.com>
Thu, 5 Nov 2015 03:51:34 +0000 (03:51 +0000)
So we can have a somewhat of a hierarchical progression:

  All projects -> $project patches -> patch name

That should also help when we add series, we'll be able to just add the
series in there.

By default, we have:

  All projects -> $project patches

both being links, so we can return to the list of patches from any page
where the project is defined. The '$project patches' link becomes
insensitive in the list page. Finally the patch page adds the patch at
the end.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Belén Barros Peña <belen.barros.pena@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
patchwork/templates/patchwork/list.html
patchwork/templates/patchwork/patch.html
templates/base.html

index 654fe8c7ec3e74b34c99333576c14d4b90d98d6b..f895d28ed1c9ea7a9ceaab0e6094e147f588f8e6 100644 (file)
@@ -5,6 +5,7 @@
 
 {% block title %}{{project.name}}{% endblock %}
 {% block heading %}{{project.name}}{% endblock %}
+{% block breadcrumb %}{{ project.linkname }} patches{% endblock %}
 
 {% block body %}
 
index f18ee3b789e92de900f4814a79fb90027c693f03..ef257f2e4bec696a662f69b8c2bfd82236953985 100644 (file)
@@ -5,7 +5,12 @@
 {% load patch %}
 
 {% block title %}{{patch.name}}{% endblock %}
-{% block heading %}{{patch.name}}{%endblock%}
+{% block breadcrumb %}
+<a href="{% url 'patchwork.views.patch.list' project_id=project.linkname %}"
+ >{{ project.linkname }} patches</a>
+ &#8594;
+ {{ patch.name }}
+{% endblock %}
 
 {% block body %}
 <script language="JavaScript" type="text/javascript">
index 75083b6813c02c17364eccc159cbb520188e4f08..60a4fd4014812e0314947c2371b1d360f2b95291 100644 (file)
 {% if project %}
   <div id="nav">
    <div id="navleft">
-    <strong>Project</strong>: {{ project.linkname }}
-     :
-     <a href="{% url 'patchwork.views.patch.list' project_id=project.linkname %}"
-      >patches</a>
-    {% if other_projects %}
-     :
-     <a href="{% url 'patchwork.views.projects' %}"
-     >other projects</a>
-    {% endif %}
+     <a href="{% url 'patchwork.views.projects' %}">All projects</a>
+     &#8594;
+     {% block breadcrumb %}
+      <a href="{% url 'patchwork.views.patch.list' project_id=project.linkname %}"
+       >{{ project.linkname }} patches</a>
+     {% endblock %}
    </div>
    <div style="clear: both"></div>
   </div>