]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toasterui: fix the h1 in the project builds page
authorBelen Barros Pena <belen.barros.pena@intel.com>
Fri, 27 Feb 2015 15:12:57 +0000 (15:12 +0000)
committerAlexandru DAMIAN <alexandru.damian@intel.com>
Mon, 9 Mar 2015 13:15:21 +0000 (13:15 +0000)
It was not displaying the number of search results.

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
lib/toaster/toastergui/templates/projectbuilds.html

index afcf5191b57b7f9f12dcadce32861fe1effb284b..07595f2376c2a571e445fa6081283029f86d3b77 100644 (file)
@@ -7,21 +7,19 @@
 {% endblock %}
 
 {% block projectinfomain %}
-                <div class="page-header">
-                    <h1>
- {% if objects.paginator.count == 0 and request.GET.filter or request.GET.search %}
-        No builds found
 
- {% else %}
-    {% if  request.GET.filter or request.GET.search  %}
-            {{objects.paginator.count}} builds found
-    {% else %}
-                        Project builds <small>({{objects.paginator.count}})</small>
-    {% endif %}
- {% endif %}
-                        <i class="icon-question-sign get-help heading-help" title="This page lists all the builds for the current project"></i>
-                    </h1>
-                </div>
+    <div class="page-header">
+      <h1>
+        {% 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 request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %}
+            No builds found
+        {%else%}
+            All builds
+        {%endif%}
+        <i class="icon-question-sign get-help heading-help" title="This page lists all the builds for the current project"></i>
+      </h1>
+    </div>
 
 
  {% if objects.paginator.count == 0 %}