diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates/projects-toastertable.html')
| -rw-r--r-- | bitbake/lib/toaster/toastergui/templates/projects-toastertable.html | 36 |
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 %} | ||
