summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templates/tasks.html
diff options
context:
space:
mode:
authorDavid Reyna <David.Reyna@windriver.com>2014-03-25 18:53:08 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-28 13:44:52 +0000
commit877dcd709e4cd54847e756e7a8dc1de6fa926967 (patch)
treea6fc0240a28f80ebf5960baf00588c6079c7ea0b /bitbake/lib/toaster/toastergui/templates/tasks.html
parent14a84434a1c76f5d0bef7a75f2c7529a9ff166cf (diff)
downloadpoky-877dcd709e4cd54847e756e7a8dc1de6fa926967.tar.gz
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 <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates/tasks.html')
-rw-r--r--bitbake/lib/toaster/toastergui/templates/tasks.html34
1 files changed, 23 insertions, 11 deletions
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 @@
36 36
37{% block buildinfomain %} 37{% block buildinfomain %}
38<div class="span10"> 38<div class="span10">
39<div class="page-header"> 39{% if not request.GET.filter and not request.GET.search and not objects.paginator.count %}
40<h1> 40 <!-- Empty - no data in database -->
41 {% if request.GET.filter or request.GET.search and objects.paginator.count > 0 %} 41 <div class="page-header">
42 <h1>{{title}}</h1>
43 </div>
44 <div class="alert alert-info lead">
45 No data was recorded for this build.
46 </div>
47
48{% else %}
49
50 <div class="page-header">
51 <h1>
52 {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %}
42 {{objects.paginator.count}} task{{objects.paginator.count|pluralize}} found 53 {{objects.paginator.count}} task{{objects.paginator.count|pluralize}} found
43 {%elif request.GET.filter or request.GET.search and objects.paginator.count == 0%} 54 {%elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %}
44 No tasks found 55 No tasks found
45 {%else%} 56 {%else%}
46 {{title}} 57 {{title}}
47 {%endif%} 58 {%endif%}
48 </h1> 59 </h1>
49</div> 60 </div>
50 61
51{% if objects.paginator.count == 0 %} 62 {% if objects.paginator.count == 0 %}
52 <div class="row-fluid"> 63 <div class="row-fluid">
53 <div class="alert"> 64 <div class="alert">
54 <form class="no-results input-append" id="searchform"> 65 <form class="no-results input-append" id="searchform">
@@ -60,8 +71,8 @@
60 </div> 71 </div>
61 72
62 73
63{% else %} 74 {% else %}
64{% include "basetable_top.html" %} 75 {% include "basetable_top.html" %}
65 76
66 {% for task in objects %} 77 {% for task in objects %}
67 <tr {{ task|task_color }} class="flash" id="{{task.order}}" name="{{task.order}}"> 78 <tr {{ task|task_color }} class="flash" id="{{task.order}}" name="{{task.order}}">
@@ -102,7 +113,8 @@
102 </tr> 113 </tr>
103 {% endfor %} 114 {% endfor %}
104 115
105{% include "basetable_bottom.html" %} 116 {% include "basetable_bottom.html" %}
106{% endif %} 117 {% endif %} {# objects.paginator.count #}
118{% endif %} {# empty #}
107</div> 119</div>
108{% endblock %} 120{% endblock %}