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

login
register
mail settings
Submitter Alexandru DAMIAN
Date March 31, 2014, 4:47 p.m.
Message ID <a0beac3daa60a622b77872fb43f041b4631ecf01.1396284354.git.alexandru.damian@intel.com>
Download mbox | patch
Permalink /patch/69713/
State New
Headers show

Comments

Alexandru DAMIAN - March 31, 2014, 4:47 p.m.
From: Belen Barros Pena <belen.barros.pena@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@intel.com>
---
 lib/toaster/toastergui/templates/build.html | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch

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%}