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/static/css/default.css | 4 +- .../lib/toaster/toastergui/static/img/toaster.png | Bin 0 -> 51986 bytes .../lib/toaster/toastergui/templates/bpackage.html | 34 +++++++++++--- .../lib/toaster/toastergui/templates/build.html | 50 ++++++++++++++++----- .../lib/toaster/toastergui/templates/tasks.html | 34 +++++++++----- 5 files changed, 93 insertions(+), 29 deletions(-) create mode 100755 bitbake/lib/toaster/toastergui/static/img/toaster.png diff --git a/bitbake/lib/toaster/toastergui/static/css/default.css b/bitbake/lib/toaster/toastergui/static/css/default.css index d960f4bd83..260f5d46c3 100644 --- a/bitbake/lib/toaster/toastergui/static/css/default.css +++ b/bitbake/lib/toaster/toastergui/static/css/default.css @@ -106,7 +106,9 @@ select { width: auto; } .task-name { margin-left: 7px; } .icon-hand-right {color: #ccccc; } .help-inline { margin: 5px; } - +.hero-unit { margin: 20px 0 30px; } +.hero-unit > .close { font-size:40px; } +.hero-actions { margin-top: 30px; } diff --git a/bitbake/lib/toaster/toastergui/static/img/toaster.png b/bitbake/lib/toaster/toastergui/static/img/toaster.png new file mode 100755 index 0000000000..11bb5d51b1 Binary files /dev/null and b/bitbake/lib/toaster/toastergui/static/img/toaster.png differ 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