[bitbake-devel] [PATCH 06/14] toaster: Show "No builds found" in the builds table

Alex DAMIAN alexandru.damian at intel.com
Mon Mar 31 16:47:06 UTC 2014


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

Making sure the h1 of build.html shows "No builds found"
instead of "0 builds found" when a search returns no results.
This matches the builds table to all other Toaster tables.

Signed-off-by: Belen Barros Pena <belen.barros.pena at intel.com>
---
 lib/toaster/toastergui/templates/build.html | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/toaster/toastergui/templates/build.html b/lib/toaster/toastergui/templates/build.html
index 7d13cc8..afa390f 100644
--- a/lib/toaster/toastergui/templates/build.html
+++ b/lib/toaster/toastergui/templates/build.html
@@ -85,10 +85,10 @@
   {% else %}
   <div class="page-header top-air">
      <h1>
-      {% if request.GET.filter and objects.count or request.GET.search and objects.count > 0  %}
+      {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %}
           {{objects.paginator.count}} build{{objects.paginator.count|pluralize}} found
-      {%elif objects.paginator.count == 0%}
-          No builds
+      {%elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %}
+          No builds found
       {%else%}
           All builds
       {%endif%}
-- 
1.9.1




More information about the bitbake-devel mailing list