From 877dcd709e4cd54847e756e7a8dc1de6fa926967 Mon Sep 17 00:00:00 2001 From: David Reyna Date: Tue, 25 Mar 2014 18:53:08 -0700 Subject: bitbake: toaster: add support for empty states in pages Add support for empty states in the top build page, the all packages page, and the all tasks page. [YOCTO #4865] (Bitbake rev: eaff7b50d7102c97b75df185b9ef917970319d59) Signed-off-by: David Reyna Signed-off-by: Richard Purdie --- .../lib/toaster/toastergui/templates/bpackage.html | 34 ++++++++++++--- .../lib/toaster/toastergui/templates/build.html | 50 +++++++++++++++++----- .../lib/toaster/toastergui/templates/tasks.html | 34 ++++++++++----- 3 files changed, 90 insertions(+), 28 deletions(-) (limited to 'bitbake/lib/toaster/toastergui/templates') diff --git a/bitbake/lib/toaster/toastergui/templates/bpackage.html b/bitbake/lib/toaster/toastergui/templates/bpackage.html index 77f789484c..22609e227a 100644 --- a/bitbake/lib/toaster/toastergui/templates/bpackage.html +++ b/bitbake/lib/toaster/toastergui/templates/bpackage.html @@ -12,8 +12,27 @@ {% block buildinfomain %}
+ +{% if not request.GET.filter and not request.GET.search and not objects.paginator.count %} + + + +{% else %} + + -{% if objects.paginator.count == 0 %} + {% if objects.paginator.count == 0 %}
@@ -35,8 +54,8 @@
-{% else %} -{% include "basetable_top.html" %} + {% else %} + {% include "basetable_top.html" %} {% for package in objects %} @@ -84,7 +103,8 @@ {% endfor %} -{% include "basetable_bottom.html" %} -{% endif %} + {% include "basetable_bottom.html" %} + {% endif %} {# objects.paginator.count #} +{% endif %} {# Empty #}
{% endblock %} diff --git a/bitbake/lib/toaster/toastergui/templates/build.html b/bitbake/lib/toaster/toastergui/templates/build.html index 8f557e9686..38ab2bfd7b 100644 --- a/bitbake/lib/toaster/toastergui/templates/build.html +++ b/bitbake/lib/toaster/toastergui/templates/build.html @@ -1,11 +1,30 @@ {% extends "base.html" %} - +{% load static %} {% load projecttags %} {% load humanize %} {% block pagecontent %}
+ {% if not objects.paginator.count and not request.GET.filter and not request.GET.search %} + +
+ +
+
+

This is Toaster

+

A web interface to BitBake, the Yocto Project build system.

+

+ Show me the manual + I want to contribute +

+
+
+ Yocto Project +
+
+
+ {% endif %} {%if mru.count > 0%} {% endblock %} diff --git a/bitbake/lib/toaster/toastergui/templates/tasks.html b/bitbake/lib/toaster/toastergui/templates/tasks.html index 8c73dc230e..ca7e187f73 100644 --- a/bitbake/lib/toaster/toastergui/templates/tasks.html +++ b/bitbake/lib/toaster/toastergui/templates/tasks.html @@ -36,19 +36,30 @@ {% block buildinfomain %}
- -{% if objects.paginator.count == 0 %} + {% if objects.paginator.count == 0 %}
@@ -60,8 +71,8 @@
-{% else %} -{% include "basetable_top.html" %} + {% else %} + {% include "basetable_top.html" %} {% for task in objects %} @@ -102,7 +113,8 @@ {% endfor %} -{% include "basetable_bottom.html" %} -{% endif %} + {% include "basetable_bottom.html" %} + {% endif %} {# objects.paginator.count #} +{% endif %} {# empty #}
{% endblock %} -- cgit v1.2.3-54-g00ecf