1{% extends 'base.html' %}
2
3{% load static %}
4
5{% block extraheadcontent %}
6<link rel="stylesheet" href="{% static 'css/jquery-ui.min.css' %}" type='text/css'>
7<link rel="stylesheet" href="{% static 'css/jquery-ui.structure.min.css' %}" type='text/css'>
8<link rel="stylesheet" href="{% static 'css/jquery-ui.theme.min.css' %}" type='text/css'>
9<script src="{% static 'js/jquery-ui.min.js' %}">
10</script>
11{% endblock %}
12
13{% block title %} {{title}} - {{project.name}} - Toaster {% endblock %}
14
15{% block pagecontent %}
16<div class="row">
17
18  {% include "projecttopbar.html" %}
19
20  <div class="col-md-12">
21    {% with mru=mru mrb_type=mrb_type %}
22    {% include 'mrb_section.html' %}
23    {% endwith %}
24
25    <h2 class="top-air" data-role="page-title"></h2>
26
27    {% if not build_in_progress_none_completed %}
28    {% url 'projectbuilds' project.id as xhr_table_url %}
29    {% include 'toastertable.html' %}
30    {% endif %}
31  </div>
32
33 <script>
34 $(document).ready(function () {
35   // title
36   var tableElt = $("#{{table_name}}");
37   var titleElt = $("[data-role='page-title']");
38
39   tableElt.on("table-done", function (e, total, tableParams) {
40     var title = "All project builds";
41
42     if (tableParams.search || tableParams.filter) {
43       if (total === 0) {
44         title = "No project builds found";
45       }
46       else if (total > 0) {
47         title = total + " project build" + (total > 1 ? 's' : '') + " found";
48       }
49     }
50
51     if (total === 0) {
52       titleElt.hide();
53     } else {
54       titleElt.show();
55       titleElt.text(title);
56     }
57   });
58
59   // highlight builds tab
60   $("#topbar-builds-tab").addClass("active")
61 });
62 </script>
63
64</div>
65{% endblock %}
66