All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] toaster: link to configuration in all breadcrumbs
@ 2016-02-15 14:06 Belen Barros Pena
  2016-02-15 14:06 ` [PATCH 2/2] toaster: make 'configuration' the first tab Belen Barros Pena
  0 siblings, 1 reply; 2+ messages in thread
From: Belen Barros Pena @ 2016-02-15 14:06 UTC (permalink / raw)
  To: toaster

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

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.

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
---
 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(-)

diff --git a/bitbake/lib/toaster/toastergui/static/css/default.css b/bitbake/lib/toaster/toastergui/static/css/default.css
index b674a9d..5125f2a 100644
--- a/bitbake/lib/toaster/toastergui/static/css/default.css
+++ b/bitbake/lib/toaster/toastergui/static/css/default.css
@@ -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; }
diff --git a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
index 8c2ec4c..663b3c6 100644
--- a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
+++ b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
@@ -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)
diff --git a/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html b/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html
index ffe7aa4..e350c1a 100644
--- a/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html
+++ b/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html
@@ -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">&rarr;</span>');
             $('#breadcrumb > li:last').addClass("active");
-            $('#breadcrumb > li:last > span, #breadcrumb > li:first > span').remove();
+            $('#breadcrumb > li:last > span').remove();
         });
         </script>
     </div> <!--section-->
diff --git a/bitbake/lib/toaster/toastergui/templates/basebuildpage.html b/bitbake/lib/toaster/toastergui/templates/basebuildpage.html
index a9048d3..3571869 100644
--- a/bitbake/lib/toaster/toastergui/templates/basebuildpage.html
+++ b/bitbake/lib/toaster/toastergui/templates/basebuildpage.html
@@ -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">&rarr;</span>');
             $('#breadcrumb > li:last').addClass("active");
-            $('#breadcrumb > li:last > span, #breadcrumb > li:first > span').remove();
+            $('#breadcrumb > li:last > span').remove();
         });
         </script>
     </div>
diff --git a/bitbake/lib/toaster/toastergui/templates/layerdetails.html b/bitbake/lib/toaster/toastergui/templates/layerdetails.html
index 7fe365d..61ae52c 100644
--- a/bitbake/lib/toaster/toastergui/templates/layerdetails.html
+++ b/bitbake/lib/toaster/toastergui/templates/layerdetails.html
@@ -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">&rarr;</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}}",
diff --git a/bitbake/lib/toaster/toastergui/templates/recipedetails.html b/bitbake/lib/toaster/toastergui/templates/recipedetails.html
index aed0492..23aa171 100644
--- a/bitbake/lib/toaster/toastergui/templates/recipedetails.html
+++ b/bitbake/lib/toaster/toastergui/templates/recipedetails.html
@@ -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">&rarr;</span>
     </li>
     <li>
-- 
2.5.4 (Apple Git-61)



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 2/2] toaster: make 'configuration' the first tab
  2016-02-15 14:06 [PATCH 1/2] toaster: link to configuration in all breadcrumbs Belen Barros Pena
@ 2016-02-15 14:06 ` Belen Barros Pena
  0 siblings, 0 replies; 2+ messages in thread
From: Belen Barros Pena @ 2016-02-15 14:06 UTC (permalink / raw)
  To: toaster

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

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.

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
---
 bitbake/lib/toaster/toastergui/templates/projecttopbar.html | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/bitbake/lib/toaster/toastergui/templates/projecttopbar.html b/bitbake/lib/toaster/toastergui/templates/projecttopbar.html
index 5bc1ac4..268a99e 100644
--- a/bitbake/lib/toaster/toastergui/templates/projecttopbar.html
+++ b/bitbake/lib/toaster/toastergui/templates/projecttopbar.html
@@ -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>
-- 
2.5.4 (Apple Git-61)



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-15 14:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-15 14:06 [PATCH 1/2] toaster: link to configuration in all breadcrumbs Belen Barros Pena
2016-02-15 14:06 ` [PATCH 2/2] toaster: make 'configuration' the first tab Belen Barros Pena

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.