[bitbake-devel] [PATCH 2/2] toaster: fix global navigation

Elliot Smith elliot.smith at intel.com
Fri Aug 28 16:27:55 UTC 2015


From: Belen Barros Pena <belen.barros.pena at intel.com>

The "All builds" item in the global navigation should
only be active when you are in the "all builds" page.

The global navigation should not appear at all in the
landing page and in the new project page.

Signed-off-by: Belen Barros Pena <belen.barros.pena at intel.com>
Signed-off-by: Elliot Smith <elliot.smith at intel.com>
---
 lib/toaster/toastergui/templates/base.html | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/toaster/toastergui/templates/base.html b/lib/toaster/toastergui/templates/base.html
index f187100..0b93bb3 100644
--- a/lib/toaster/toastergui/templates/base.html
+++ b/lib/toaster/toastergui/templates/base.html
@@ -89,8 +89,9 @@
             <i class="icon-info-sign" title="<strong>Toaster version information</strong>" data-content="<dl><dt>Branch</dt><dd>{{TOASTER_BRANCH}}</dd><dt>Revision</dt><dd>{{TOASTER_REVISION}}</dd></dl>"></i>
             {% endif %}
           </span>
+          {% if request.resolver_match.url_name != 'landing' and request.resolver_match.url_name != 'newproject' %}
           <ul class="nav">
-            <li {% if "builds" in  request.path  %}
+            <li  {% if request.resolver_match.url_name == 'all-builds' %}
                 class="active"
                 {% endif %}>
               <a href="{% url 'all-builds' %}">
@@ -98,7 +99,7 @@
                 All builds
               </a>
             </li>
-            <li {% if "projects" in  request.path  %}
+            <li {% if request.resolver_match.url_name == 'all-projects'  %}
                 class="active"
                 {% endif %}>
               <a href="{% url 'all-projects' %}">
@@ -107,6 +108,7 @@
               </a>
             </li>
           </ul>
+          {% endif %}
           <ul class="nav pull-right">
             <li>
               <a target="_blank" href="http://www.yoctoproject.org/docs/latest/toaster-manual/toaster-manual.html">
-- 
1.9.3

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.




More information about the bitbake-devel mailing list