diff options
author | Belen Barros Pena <belen.barros.pena@intel.com> | 2015-09-04 11:05:19 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-09 14:26:55 +0100 |
commit | 135dff67216759286f584e501583584a9cb09f27 (patch) | |
tree | 4bcd492b0e99de33167d710843a7ce974a017c0d /lib/toaster | |
parent | c43d6a8d711db8d3bd9a1976b9f8e3efdb4cb4ae (diff) | |
download | bitbake-135dff67216759286f584e501583584a9cb09f27.zip |
toaster: Changes to navigation
This patch:
* Changes the breadcrumb to provide access to either
the project builds or the project configuration, as
appropriate
* Changes the left navigation in the project configuration
to reflect the hierarchical relationship between the
basic configuration and all other configuration pages
* Changes the left navigation in the build history to bring
it in line with the changes in the project configuration
This way the breadcrumb explicitly exposes the hierarchy
of the application, which is its correct behaviour, making it
easier to move around within Toaster.
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>
Diffstat (limited to 'lib/toaster')
5 files changed, 23 insertions, 9 deletions
diff --git a/lib/toaster/toastergui/static/css/default.css b/lib/toaster/toastergui/static/css/default.css index 9723db36..cce3e315 100644 --- a/lib/toaster/toastergui/static/css/default.css +++ b/lib/toaster/toastergui/static/css/default.css @@ -10,6 +10,7 @@ /* Style the breadcrumb */ .breadcrumb { display: inline-block; background-color: transparent; } +.breadcrumb li:first-child { padding-right: 10px; } /* Styles for the help information */ .get-help { color: #CCCCCC; } @@ -112,6 +113,10 @@ th > a, th > span { font-weight: normal; } .btn-group + .btn-group { margin-right: 10px; } .navbar-inner > .btn-group { margin-top: 6px; } +/* Styles for the parent item in the left navigation */ + +.nav > li > a.nav-parent { font-size: 18px; line-height: 25px; } + /* Other styles */ .dropdown-menu { padding: 10px; } select { width: auto; } diff --git a/lib/toaster/toastergui/templates/basebuilddetailpage.html b/lib/toaster/toastergui/templates/basebuilddetailpage.html index 8657845c..22ca50c0 100644 --- a/lib/toaster/toastergui/templates/basebuilddetailpage.html +++ b/lib/toaster/toastergui/templates/basebuilddetailpage.html @@ -6,7 +6,8 @@ <!-- Breadcrumbs --> <div class="section"> <ul class="breadcrumb" id="breadcrumb"> - <li><a href="{% url 'project' build.project.id %}">{{build.project.name}}</a></li> + <li class="muted">{{build.project.name}}:</li> + <li><a href="{% url 'projectbuilds' build.project.id %}">Builds</a></li> <li><a href="{%url 'builddashboard' build.pk%}">{{build.target_set.all.0.target}} {%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%} ({{build.completed_on|date:"d/m/y H:i"}})</a></li> {% block localbreadcrumb %}{% endblock %} </ul> @@ -14,7 +15,7 @@ $( function () { $('#breadcrumb > li').append('<span class="divider">→</span>'); $('#breadcrumb > li:last').addClass("active"); - $('#breadcrumb > li:last > span').remove(); + $('#breadcrumb > li:last > span, #breadcrumb > li:first > span').remove(); }); </script> </div> <!--section--> diff --git a/lib/toaster/toastergui/templates/basebuildpage.html b/lib/toaster/toastergui/templates/basebuildpage.html index f399ba46..d441df84 100644 --- a/lib/toaster/toastergui/templates/basebuildpage.html +++ b/lib/toaster/toastergui/templates/basebuildpage.html @@ -8,7 +8,8 @@ <!-- Breadcrumbs --> <div class="section"> <ul class="breadcrumb" id="breadcrumb"> - <li><a href="{% url 'project' build.project.id %}">{{build.project.name}}</a></li> + <li class="muted">{{build.project.name}}:</li> + <li><a href="{% url 'projectbuilds' build.project.id %}">Builds</a></li> <li> {% block parentbreadcrumb %} <a href="{%url 'builddashboard' build.pk%}"> @@ -22,7 +23,7 @@ $( function () { $('#breadcrumb > li').append('<span class="divider">→</span>'); $('#breadcrumb > li:last').addClass("active"); - $('#breadcrumb > li:last > span').remove(); + $('#breadcrumb > li:last > span, #breadcrumb > li:first > span').remove(); console.log("done"); }); </script> @@ -33,6 +34,12 @@ <!-- begin left sidebar container --> <div id="nav" class="span2"> <ul class="nav nav-list well"> + <li + {% if request.resolver_match.url_name == 'builddashboard' %} + class="active" + {% endif %} > + <a class="nav-parent" href="{% url 'builddashboard' build.pk %}">Build summary</a> + </li> {% if build.target_set.all.0.is_image and build.outcome == 0 %} <li class="nav-header">Images</li> {% block nav-target %} diff --git a/lib/toaster/toastergui/templates/baseprojectpage.html b/lib/toaster/toastergui/templates/baseprojectpage.html index 0db06a86..668e0bf5 100644 --- a/lib/toaster/toastergui/templates/baseprojectpage.html +++ b/lib/toaster/toastergui/templates/baseprojectpage.html @@ -21,14 +21,14 @@ <!-- only on config pages --> <div id="config-nav" class="span2"> <ul class="nav nav-list well"> - <li class="nav-header">Configuration</li> - <li><a href="{% url 'project' project.id %}">Basic configuration</a></li> - <li><a href="{% url 'projectconf' project.id %}">BitBake variables</a></li> + <li><a class="nav-parent" href="{% url 'project' project.id %}">Configuration</a></li> <li class="nav-header">Compatible metadata</li> <!-- <li><a href="all-image-recipes.html">Image recipes</a></li> --> <li><a href="{% url 'projecttargets' project.id %}">Recipes</a></li> <li><a href="{% url 'projectmachines' project.id %}">Machines</a></li> <li><a href="{% url 'projectlayers' project.id %}">Layers</a></li> + <li class="nav-header">Extra configuration</li> + <li><a href="{% url 'projectconf' project.id %}">BitBake variables</a></li> </ul> </div> <div class="span10"> diff --git a/lib/toaster/toastergui/templates/layerdetails.html b/lib/toaster/toastergui/templates/layerdetails.html index f7f5685f..7dd3db27 100644 --- a/lib/toaster/toastergui/templates/layerdetails.html +++ b/lib/toaster/toastergui/templates/layerdetails.html @@ -7,14 +7,15 @@ <div class="section"> <ul class="breadcrumb"> + <li class="muted">{{project.name}}:</li> <li> - <a href="{% url 'project' project.id %}">{{project.name}}</a> + <a href="{% url 'project' project.id %}">Configuration</a> <span class="divider">→</span> </li> <li><a href="{% url 'projectlayers' project.id %}">Compatible layers</a> <span class="divider">→</span> </li> - <li> + <li class="active"> {{layerversion.layer.name}} ({{layerversion.get_vcs_reference|truncatechars:13}}) </li> </ul> |