summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templates/build.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/build.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/build.html')
-rw-r--r--bitbake/lib/toaster/toastergui/templates/build.html50
1 files changed, 40 insertions, 10 deletions
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 @@
1{% extends "base.html" %} 1{% extends "base.html" %}
2 2
3 3{% load static %}
4{% load projecttags %} 4{% load projecttags %}
5{% load humanize %} 5{% load humanize %}
6 6
7{% block pagecontent %} 7{% block pagecontent %}
8<div class="row-fluid"> 8<div class="row-fluid">
9 {% if not objects.paginator.count and not request.GET.filter and not request.GET.search %}
10 <!-- Empty - no data in database -->
11 <div class="hero-unit span12">
12 <button type="button" class="close" data-dismiss="alert">&times;</button>
13 <div class="row-fluid">
14 <div class="span6">
15 <h1>This is Toaster</h1>
16 <p>A web interface to <a href="http://www.yoctoproject.org/tools-resources/projects/bitbake">BitBake</a>, the <a href="http://www.yoctoproject.org">Yocto Project</a> build system.</p>
17 <p class="hero-actions">
18 <a class="btn btn-primary btn-large" href="https://www.yoctoproject.org/documentation/toaster-manual">Show me the manual</a>
19 <a class="btn btn-large" href="https://wiki.yoctoproject.org/wiki/Contribute_to_Toaster">I want to contribute</a>
20 </p>
21 </div>
22 <div class="span5">
23 <a href="http://www.yoctoproject.org"><img src="{% static 'img/toaster.png' %}" class="thumbnail" alt="Yocto Project"/> </a>
24 </div>
25 </div>
26 </div>
27 {% endif %}
9 28
10 {%if mru.count > 0%} 29 {%if mru.count > 0%}
11 <div class="page-header top-air"> 30 <div class="page-header top-air">
@@ -53,9 +72,20 @@
53 72
54 {% endfor %}{%endif%} 73 {% endfor %}{%endif%}
55 74
75 {% if not objects.paginator.count and not request.GET.filter and not request.GET.search %}
76 <!-- Empty - no data in database -->
77 {% if mru.count == 0 %}
78 <div class="page-header top-air">
79 <h1>All builds</h1>
80 </div>
81 <div class="alert alert-info lead">
82 Toaster has not recorded any builds yet. Go build something with <a href="http://www.yoctoproject.org/docs/current/yocto-project-qs/yocto-project-qs.html#test-run">Knotty</a> or <a href="https://www.yoctoproject.org/documentation/hob-manual">Hob</a>
83 </div>
84 {% endif %}
85 {% else %}
56 <div class="page-header top-air"> 86 <div class="page-header top-air">
57 <h1> 87 <h1>
58 {% if request.GET.filter or request.GET.search and objects.count > 0 %} 88 {% if request.GET.filter and objects.count or request.GET.search and objects.count > 0 %}
59 {{objects.paginator.count}} build{{objects.paginator.count|pluralize}} found 89 {{objects.paginator.count}} build{{objects.paginator.count|pluralize}} found
60 {%elif objects.paginator.count == 0%} 90 {%elif objects.paginator.count == 0%}
61 No builds 91 No builds
@@ -65,8 +95,8 @@
65 </h1> 95 </h1>
66 </div> 96 </div>
67 97
68 {% if objects.paginator.count == 0 %} 98 {% if objects.paginator.count == 0 %}
69 <div class="row-fluid"> 99 <div class="row-fluid">
70 <div class="alert"> 100 <div class="alert">
71 <form class="no-results input-append" id="searchform"> 101 <form class="no-results input-append" id="searchform">
72 <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %} 102 <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
@@ -74,11 +104,11 @@
74 <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all builds</button> 104 <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all builds</button>
75 </form> 105 </form>
76 </div> 106 </div>
77 </div> 107 </div>
78 108
79 109
80{% else %} 110 {% else %}
81{% include "basetable_top.html" %} 111 {% include "basetable_top.html" %}
82 <!-- Table data rows; the order needs to match the order of "tablecols" definitions; and the <td class value needs to match the tablecols clclass value for show/hide buttons to work --> 112 <!-- Table data rows; the order needs to match the order of "tablecols" definitions; and the <td class value needs to match the tablecols clclass value for show/hide buttons to work -->
83 {% for build in objects %} 113 {% for build in objects %}
84 <tr class="data"> 114 <tr class="data">
@@ -98,9 +128,9 @@
98 {% endfor %} 128 {% endfor %}
99 129
100 130
101{% include "basetable_bottom.html" %} 131 {% include "basetable_bottom.html" %}
102 132 {% endif %} {# objects.paginator.count #}
103{% endif %} 133{% endif %} {# empty #}
104</div><!-- end row-fluid--> 134</div><!-- end row-fluid-->
105 135
106{% endblock %} 136{% endblock %}