blob: a5fed2dd411137d5f27ca304a10f5241e8258414 [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001{% extends 'base.html' %}
2
3{% load static %}
4
5{% block extraheadcontent %}
Patrick Williamsc0f7c042017-02-23 20:41:17 -06006<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>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050011{% endblock %}
12
13{% block title %} {{title}} - {{project.name}} - Toaster {% endblock %}
14
15{% block pagecontent %}
Patrick Williamsc0f7c042017-02-23 20:41:17 -060016<div class="row">
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050017
18 {% include "projecttopbar.html" %}
19
Patrick Williamsc0f7c042017-02-23 20:41:17 -060020 <div class="col-md-12">
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050021 {% with mru=mru mrb_type=mrb_type %}
Patrick Williamsc0f7c042017-02-23 20:41:17 -060022 {% include 'mrb_section.html' %}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050023 {% endwith %}
24
Patrick Williamsc0f7c042017-02-23 20:41:17 -060025 <h2 class="top-air" data-role="page-title"></h2>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050026
Patrick Williamsc0f7c042017-02-23 20:41:17 -060027 {% if not build_in_progress_none_completed %}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050028 {% url 'projectbuilds' project.id as xhr_table_url %}
29 {% include 'toastertable.html' %}
Patrick Williamsc0f7c042017-02-23 20:41:17 -060030 {% endif %}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050031 </div>
32
Patrick Williamsc0f7c042017-02-23 20:41:17 -060033 <script>
34 $(document).ready(function () {
35 // title
36 var tableElt = $("#{{table_name}}");
37 var titleElt = $("[data-role='page-title']");
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050038
Patrick Williamsc0f7c042017-02-23 20:41:17 -060039 tableElt.on("table-done", function (e, total, tableParams) {
40 var title = "All project builds";
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050041
Patrick Williamsc0f7c042017-02-23 20:41:17 -060042 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 }
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050050
Patrick Williamsc0f7c042017-02-23 20:41:17 -060051 if (total === 0) {
52 titleElt.hide();
53 } else {
54 titleElt.show();
55 titleElt.text(title);
56 }
57 });
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050058
Patrick Williamsc0f7c042017-02-23 20:41:17 -060059 // highlight builds tab
60 $("#topbar-builds-tab").addClass("active")
61 });
62 </script>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050063
Patrick Williamsc0f7c042017-02-23 20:41:17 -060064</div>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050065{% endblock %}