]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: fix global navigation
authorBelen Barros Pena <belen.barros.pena@intel.com>
Fri, 28 Aug 2015 16:27:55 +0000 (17:27 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 29 Aug 2015 13:00:25 +0000 (14:00 +0100)
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@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/toaster/toastergui/templates/base.html

index f1871002645fe7855e2a92abf5d16c005ae0ed56..0b93bb3dde8874d9d841feabab910cd53fbd2655 100644 (file)
@@ -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' %}">
               </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">