toaster: link to configuration in all breadcrumbs
PATCH 1/2 toaster: link to configuration in all breadcrumbs
From: Belen Barros Pena <[email protected]>
The existing breadcrumb does not always provide a link to the project configuration page. When you are in the build history pages, you must go back to the builds information first, and from there access the project configuration. That feels very long.
Change the breadcrumb so that the project name item always provides a link to the project configuration.
--- bitbake/lib/toaster/toastergui/static/css/default.css | 1 - bitbake/lib/toaster/toastergui/static/js/layerdetails.js | 15 --------------- .../toaster/toastergui/templates/basebuilddetailpage.html | 4 ++-- .../lib/toaster/toastergui/templates/basebuildpage.html | 4 ++-- .../lib/toaster/toastergui/templates/layerdetails.html | 4 +--- .../lib/toaster/toastergui/templates/recipedetails.html | 5 +---- 6 files changed, 6 insertions(+), 27 deletions(-)
bitbake/lib/toaster/toastergui/static/css/default.css +0 -1
@@ -10,7 +10,6 @@ /* 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; }
bitbake/lib/toaster/toastergui/static/js/layerdetails.js +0 -15
@@ -32,21 +32,6 @@ function layerDetailsPageInit (ctx) { } }); - - $(".breadcrumb li:first a").click(function(e){ - e.preventDefault(); - /* By default this link goes to the project configuration page. However - * if we have some builds we go there instead of the default href - */ - libtoaster.getProjectInfo(libtoaster.ctx.projectPageUrl, function(prjInfo){ - if (prjInfo.builds && prjInfo.builds.length > 0) { - window.location.replace(libtoaster.ctx.projectBuildsUrl); - } else { - window.location.replace(libtoaster.ctx.projectPageUrl); - } - }); - }); - function addRemoveDep(depLayerId, add, doneCb) { var data = { layer_version_id : ctx.layerVersion.id }; if (add)
bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html +2 -2
@@ -6,7 +6,7 @@ <!-- Breadcrumbs --> <div class="section"> <ul class="breadcrumb" id="breadcrumb"> - <li class="muted">{{build.project.name}}:</li> + <li><a href="{% url 'project' build.project.id %}">{{build.project.name}}</a></li> <li><a href="{% url 'projectbuilds' build.project.id %}">Builds</a></li> <li><a href="{%url 'builddashboard' build.pk%}">{{build.get_sorted_target_list.0.target}} {%if build.target_set.all.count > 1%}(+{{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|date:"d/m/y H:i"}})</a></li> {% block localbreadcrumb %}{% endblock %}
@@ -15,7 +15,7 @@ $( function () { $('#breadcrumb > li').append('<span class="divider">→</span>'); $('#breadcrumb > li:last').addClass("active"); - $('#breadcrumb > li:last > span, #breadcrumb > li:first > span').remove(); + $('#breadcrumb > li:last > span').remove(); }); </script> </div> <!--section-->
bitbake/lib/toaster/toastergui/templates/basebuildpage.html +2 -2
@@ -8,7 +8,7 @@ <!-- Breadcrumbs --> <div class="section"> <ul class="breadcrumb" id="breadcrumb"> - <li class="muted">{{build.project.name}}:</li> + <li><a href="{% url 'project' build.project.id %}">{{build.project.name}}</a></li> <li><a href="{% url 'projectbuilds' build.project.id %}">Builds</a></li> <li> {% block parentbreadcrumb %}
@@ -23,7 +23,7 @@ $( function () { $('#breadcrumb > li').append('<span class="divider">→</span>'); $('#breadcrumb > li:last').addClass("active"); - $('#breadcrumb > li:last > span, #breadcrumb > li:first > span').remove(); + $('#breadcrumb > li:last > span').remove(); }); </script> </div>
bitbake/lib/toaster/toastergui/templates/layerdetails.html +1 -3
@@ -8,9 +8,8 @@ <div class="section"> <ul class="breadcrumb"> - <li class="muted">{{project.name}}:</li> <li> - <a href="{% url 'project' project.id %}">Configuration</a> + <a href="{% url 'project' project.id %}">{{project.name}}</a> <span class="divider">→</span> </li> <li><a href="{% url 'projectlayers' project.id %}">Compatible layers</a>
@@ -46,7 +45,6 @@ $(document).ready(function (){ var ctx = { - projectBuildsUrl : "{% url 'projectbuilds' project.id %}", xhrUpdateLayerUrl : "{% url 'xhr_updatelayer' %}", layerVersion : { name : "{{layerversion.layer.name}}",
bitbake/lib/toaster/toastergui/templates/recipedetails.html +1 -4
@@ -6,11 +6,8 @@ <div class="section"> <ul class="breadcrumb"> - <li class="muted"> - {{project.name}} - </li> <li> - <a href="{% url 'project' project.id %}">Configuration</a> + <a href="{% url 'project' project.id %}">{{project.name}}</a> <span class="divider">→</span> </li> <li>
Signature · 1 line
2.5.4 (Apple Git-61)
PATCH 2/2 toaster: make 'configuration' the first tab
From: Belen Barros Pena <[email protected]>
Our project pages have 4 tabs: builds, configuration, import layer and new custom image. Even though we treat the 'configuration' as the default tab, it comes second after the builds tab.
That's a bit strange: the default tab should be the first one listed. This patch changes the tab order to put 'configuration' first.
--- bitbake/lib/toaster/toastergui/templates/projecttopbar.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
bitbake/lib/toaster/toastergui/templates/projecttopbar.html +5 -5
@@ -44,17 +44,17 @@ {% if not project.is_default %} <div id="project-topbar"> <ul class="nav nav-pills"> - <li> - <a href="{% url 'projectbuilds' project.id %}"> - Builds ({{project.get_number_of_builds}}) - </a> - </li> <li id="topbar-configuration-tab"> <a href="{% url 'project' project.id %}"> Configuration </a> </li> <li> + <a href="{% url 'projectbuilds' project.id %}"> + Builds ({{project.get_number_of_builds}}) + </a> + </li> + <li> <a href="{% url 'importlayer' project.id %}"> Import layer </a>
Signature · 1 line
2.5.4 (Apple Git-61)