1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 13:09:50 +00:00

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>
This commit is contained in:
Elliot Smith
2016-01-15 13:00:44 +02:00
committed by Richard Purdie
parent b1256dbc59
commit d29e4cd040
3 changed files with 265 additions and 3 deletions
@@ -0,0 +1,36 @@
{% extends 'base.html' %}
{% block title %} All projects - Toaster {% endblock %}
{% block pagecontent %}
<div class="page-header top-air">
<h1 data-role="page-title"></h1>
</div>
{% url 'projects' as xhr_table_url %}
{% include 'toastertable.html' %}
<script>
$(document).ready(function () {
var tableElt = $("#{{table_name}}");
var titleElt = $("[data-role='page-title']");
tableElt.on("table-done", function (e, total, tableParams) {
var title = "All projects";
if (tableParams.search || tableParams.filter) {
if (total === 0) {
title = "No projects found";
}
else if (total > 0) {
title = total + " project" + (total > 1 ? 's' : '') + " found";
}
}
titleElt.text(title);
});
});
</script>
{% endblock %}