summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/bitbake/lib/toaster/toastergui/templates/projects-toastertable.html
blob: d8020a97f230911dff99fc04e9014a9c23d85794 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{% extends 'base.html' %}

{% block title %} All projects - Toaster {% endblock %}

{% block pagecontent %}

<div class="row">
  <div class="col-md-12">

    <div class="page-header">
      <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>

  </div>
</div>

{% endblock %}
OpenPOWER on IntegriCloud