]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
ui: Redesign navigation
authorDamien Lespiau <damien.lespiau@intel.com>
Thu, 17 Dec 2015 18:08:56 +0000 (18:08 +0000)
committerStephen Finucane <stephen.finucane@intel.com>
Mon, 8 Feb 2016 19:03:39 +0000 (19:03 +0000)
We get rid of the breadcrumbs in favour of items always present in the
top navigation bar.

Based on BĂ©len's new design iteration.

v2: Rebase onto master

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
htdocs/css/style.css
patchwork/templates/patchwork/bundles.html
patchwork/templates/patchwork/list.html
patchwork/templates/patchwork/patch.html
patchwork/templates/patchwork/project.html
templates/base.html

index e86a88a5e00e9ab4ba5f714c9d3c2c25f5927129..123d9408e987cf777a76f0e5eb6d3cadd65d8f86 100644 (file)
@@ -30,22 +30,6 @@ pre {
        color: #999;
 }
 
-#breadcrumb {
-       float: left
-       width: 100%;
-       border-bottom: 0.1em solid #ddd;
-       padding: 0.2em 1em;
-       color: #a0a0a0;
-}
-
-#breadcrumb-left {
-       float: left;
-}
-
-#breadcrum-right {
-       float: right;
-}
-
 #content {
        padding: 1em;
 }
index 029379d83af8598e0d005ab80453608f5db5ab26..35235fbf6c43e9f92956f569581b2a6d00521a90 100644 (file)
@@ -4,6 +4,7 @@
 
 {% block title %}Bundles{% endblock %}
 {% block heading %}Bundles{% endblock %}
+{% block bundle_active %}active{% endblock %}
 
 {% block body %}
 
index f4650ae39d625dbb07013e2df5e53d039eea997b..df25bb5e9935377d1b50e8bb9538999f93f921ee 100644 (file)
@@ -5,7 +5,7 @@
 
 {% block title %}{{project.name}}{% endblock %}
 {% block heading %}{{project.name}}{% endblock %}
-{% block breadcrumb %}{{ project.linkname }} patches{% endblock %}
+{% block patch_active %}active{% endblock %}
 
 {% block body %}
 
index d73377f85391e9c0043f20bdbe4ad1bae4eb4486..b5d0eb7d941ebb3db217aa0b318aedb036aeffdc 100644 (file)
@@ -6,12 +6,6 @@
 {% load patch %}
 
 {% block title %}{{patch.name}}{% endblock %}
-{% block breadcrumb %}
-<a href="{% url 'patch-list' project_id=project.linkname %}"
- >{{ project.linkname }} patches</a>
- &#8594;
- {{ patch.name }}
-{% endblock %}
 
 {% block body %}
 <script language="JavaScript" type="text/javascript">
index a29edae775a74105e2cd6e15ab78e5e5700a9ab9..5238ba481c00a0076ed0a1b12aa9b7ceba72ab88 100644 (file)
@@ -2,6 +2,7 @@
 
 {% block title %}{{ project.name }}{% endblock %}
 {% block heading %}{{ project.name }}{% endblock %}
+{% block info_active %}active{% endblock %}
 
 {% block body %}
 
index c0008f7325943a4e9c41fbb011a3f15e991e3584..78c563c9df9d0ba0fbbde0a3f55852ebe8eff560 100644 (file)
        {% block heading %}{% endblock %}</span>
     </div>
     <div class="collapse navbar-collapse" id="navbar-collapse">
-     <ul class="nav navbar-nav navbar-right">
 {% if project %}
-     <li><a href="{% url 'project-detail' project_id=project.linkname %}"
-      >Project Info</a></li>
-    <li><p class="navbar-text">|</p></li>
+      <ul class="nav navbar-nav">
+        <li class="{% block patch_active %}{% endblock %}">
+          <a href="{% url 'patch-list' project_id=project.linkname %}">
+            <span class="glyphicon glyphicon-file"></span>
+            Patches
+          </a>
+        </li>
+        <li class="{% block bundle_active %}{% endblock %}">
+          <a href="{% url 'bundle-list' project_id=project.linkname %}">
+            <span class="glyphicon glyphicon-gift"></span>
+            Bundles
+          </a>
+        </li>
+        <li class="{% block info_active %}{% endblock %}">
+          <a href="{% url 'project-detail' project_id=project.linkname %}">
+            <span class="glyphicon glyphicon-info-sign"></span>
+            About this project
+          </a>
+        </li>
+        <li>
+          <a href="{% url 'project-list' %}">
+            <span class="glyphicon glyphicon-home"></span>
+            All projects
+          </a>
+        </li>
+     </ul>
 {% endif %}
+     <ul class="nav navbar-nav navbar-right">
 {% if user.is_authenticated %}
-     <li><a href="{% url 'user-todos' %}">Todo
-      <span class="badge">{{ user.profile.n_todo_patches }}</span></a>
+     <li>
+      <a href="{% url 'user-todos' %}">
+       Todo
+       <span class="badge">{{ user.profile.n_todo_patches }}</span></a>
      </li>
-     <li><a href="{% url 'bundle-list' %}">Bundles</a></li>
 {% if user.is_staff %}
      <li><a href="{% url 'admin:index' %}">Admin</a></li>
 {% endif %}
      <li><a href="{% url 'user-register' %}">Register</a></li>
      <li><a href="{% url 'mail-settings' %}">Mail settings</a></li>
 {% endif %}
+     </ul>
     </div>
    </div>
   </nav>
-{% if project %}
-  <div id="breadcrumb">
-   <div id="breadcrumb-left">
-     <a href="{% url 'project-list' %}">All projects</a>
-     &#8594;
-     {% block breadcrumb %}
-      <a href="{% url 'patch-list' project_id=project.linkname %}"
-       >{{ project.linkname }} patches</a>
-     {% endblock %}
-   </div>
-   <div style="clear: both"></div>
-  </div>
-{% endif %}
 {% if messages %}
   <div id="messages">
   {% for message in messages %}