diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates/builds-toastertable.html')
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/builds-toastertable.html | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/builds-toastertable.html b/bitbake/lib/toaster/toastergui/templates/builds-toastertable.html new file mode 100644 index 0000000000..419d2b52f4 --- /dev/null +++ b/bitbake/lib/toaster/toastergui/templates/builds-toastertable.html @@ -0,0 +1,62 @@ +{% extends 'base.html' %} + +{% block title %} All builds - Toaster {% endblock %} + +{% block pagecontent %} + <div class="page-header top-air"> + <h1 data-role="page-title"></h1> + </div> + + <div class="row-fluid"> + {# TODO need to pass this data to context #} + {#% include 'mrb_section.html' %#} + + {% url 'builds' as xhr_table_url %} + {% include 'toastertable.html' %} + </div> + + <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 builds"; + + if (tableParams.search || tableParams.filter) { + if (total === 0) { + title = "No builds found"; + } + else if (total > 0) { + title = total + " build" + (total > 1 ? 's' : '') + " found"; + } + } + + titleElt.text(title); + }); + + /* {% if last_date_from and last_date_to %} + // TODO initialize the date range controls; + // this will need to be added via ToasterTable + date_init( + "started_on", + "{{last_date_from}}", + "{{last_date_to}}", + "{{dateMin_started_on}}", + "{{dateMax_started_on}}", + "{{daterange_selected}}" + ); + + date_init( + "completed_on", + "{{last_date_from}}", + "{{last_date_to}}", + "{{dateMin_completed_on}}", + "{{dateMax_completed_on}}", + "{{daterange_selected}}" + ); + {% endif %} + */ + }); + </script> +{% endblock %} |