summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templates
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2016-01-15 13:00:44 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-15 16:29:59 +0000
commitd29e4cd040f06cc62210231f6fae8532f2d56cb6 (patch)
treeef280d418083b5ec952d8fdc75ed6d9479288cdb /bitbake/lib/toaster/toastergui/templates
parentb1256dbc59d24bd1274f4191325ec1f5145e99b6 (diff)
downloadpoky-d29e4cd040f06cc62210231f6fae8532f2d56cb6.tar.gz
bitbake: toastergui: use ToasterTable for projects page
The projects page uses the old approach for showing tables, which means a template for each table. This means that applying changes to ToasterTable (which is used for most tables) has no effect on the layout, styling and behaviour for these older tables, and requires additional duplicated effort. Move the projects page to use ToasterTable instead, to remove the duplication of effort. [YOCTO #8738] (Bitbake rev: df56a35bc71639457329c4b58839976c5ee40106) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates')
-rw-r--r--bitbake/lib/toaster/toastergui/templates/projects-toastertable.html36
1 files changed, 36 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/projects-toastertable.html b/bitbake/lib/toaster/toastergui/templates/projects-toastertable.html
new file mode 100644
index 0000000000..5814f32d06
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/projects-toastertable.html
@@ -0,0 +1,36 @@
1{% extends 'base.html' %}
2
3{% block title %} All projects - Toaster {% endblock %}
4
5{% block pagecontent %}
6
7 <div class="page-header top-air">
8 <h1 data-role="page-title"></h1>
9 </div>
10
11 {% url 'projects' as xhr_table_url %}
12 {% include 'toastertable.html' %}
13
14 <script>
15 $(document).ready(function () {
16 var tableElt = $("#{{table_name}}");
17 var titleElt = $("[data-role='page-title']");
18
19 tableElt.on("table-done", function (e, total, tableParams) {
20 var title = "All projects";
21
22 if (tableParams.search || tableParams.filter) {
23 if (total === 0) {
24 title = "No projects found";
25 }
26 else if (total > 0) {
27 title = total + " project" + (total > 1 ? 's' : '') + " found";
28 }
29 }
30
31 titleElt.text(title);
32 });
33 });
34 </script>
35
36{% endblock %}