bitbake: 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.

(Bitbake rev: 135dff67216759286f584e501583584a9cb09f27)

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>
This commit is contained in:
Belen Barros Pena 2015-09-04 11:05:19 +01:00 committed by Richard Purdie
parent 6271fcb589
commit 446070074e
5 changed files with 23 additions and 9 deletions

View File

@ -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; }

View File

@ -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">&rarr;</span>');
$('#breadcrumb > li:last').addClass("active");
$('#breadcrumb > li:last > span').remove();
$('#breadcrumb > li:last > span, #breadcrumb > li:first > span').remove();
});
</script>
</div> <!--section-->

View File

@ -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">&rarr;</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 %}

View File

@ -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">

View File

@ -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">&rarr;</span>
</li>
<li><a href="{% url 'projectlayers' project.id %}">Compatible layers</a>
<span class="divider">&rarr;</span>
</li>
<li>
<li class="active">
{{layerversion.layer.name}} ({{layerversion.get_vcs_reference|truncatechars:13}})
</li>
</ul>