@@ -1,147 +1,143 | |||
|
1 | 1 | {% extends "base.html" %} |
|
2 | 2 | {% load bootstrap3 %} |
|
3 | 3 | {% load static %} |
|
4 | 4 | {% load main_tags %} |
|
5 | 5 | {% block extra-head %} |
|
6 | 6 | <link href="{% static 'css/bootstrap-datetimepicker.min.css' %}" media="screen" rel="stylesheet"> |
|
7 | 7 | {% endblock %} |
|
8 | 8 | |
|
9 | 9 | {% block camp-active %}active{% endblock %} |
|
10 | 10 | |
|
11 | 11 | {% block content-title %}{{title}}{% endblock %} |
|
12 | 12 | {% block content-suptitle %}{{suptitle}}{% endblock %} |
|
13 | 13 | |
|
14 | 14 | {% block content %} |
|
15 | 15 | |
|
16 | 16 | <!-- Not Empty--> |
|
17 | 17 | {% if details %} |
|
18 | 18 | |
|
19 | 19 | <form class="form" method="post" action=""> |
|
20 | 20 | {% csrf_token %} |
|
21 | 21 | |
|
22 | 22 | {% bootstrap_form form layout='horizontal' size='medium' %} |
|
23 | 23 | <div style="clear: both;"></div> |
|
24 | 24 | <br> |
|
25 | 25 | <!-- For deep search --> |
|
26 | 26 | {% if search_button == True %} |
|
27 | 27 | <button id="button-1" type="button" class="btn btn-primary pull-right">{{button}}</button> |
|
28 | 28 | {% endif %} |
|
29 | 29 | <br> |
|
30 | 30 | <br> |
|
31 | 31 | </form> |
|
32 | 32 | <br> |
|
33 | 33 | <br> |
|
34 | 34 | |
|
35 | 35 | {% endif %} |
|
36 | 36 | |
|
37 | 37 | <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true" > |
|
38 | 38 | |
|
39 | 39 | {% for location in locations %} |
|
40 | 40 | |
|
41 | 41 | <div class="panel panel-default"> |
|
42 | 42 | <div class="panel-heading" role="tab" id="headingTwo"> |
|
43 | 43 | <h4 class="panel-title"> |
|
44 | 44 | <a class="collapsed" role="button" data-toggle="collapse" href="#collapseTwo-{{ location.id }}" aria-expanded="false" aria-controls="collapseTwo"> |
|
45 | 45 | {{location.name}}: Experiment List |
|
46 | 46 | <span> |
|
47 | 47 | </span> |
|
48 | 48 | </a> |
|
49 | 49 | <button id="play-{{ location.id }}" type="button" class="btn btn-primary pull-right btn-xs" aria-label="Left Align" style="margin-left: 10px"> |
|
50 | 50 | <span class="glyphicon glyphicon-play" aria-hidden="true"></span> |
|
51 | 51 | </button> |
|
52 | 52 | <button id="stop-{{ location.id }}" type="button" class="btn btn-primary pull-right btn-xs" aria-label="Left Align" style="margin-left: 10px"> |
|
53 | 53 | <span class="glyphicon glyphicon-stop" aria-hidden="true"></span> |
|
54 | 54 | </button> |
|
55 | 55 | |
|
56 | 56 | </h4> |
|
57 | 57 | </div> |
|
58 | 58 | |
|
59 | 59 | <div id="collapseTwo-{{ location.id }}" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingTwo"> |
|
60 | 60 | <div class="panel-body"> |
|
61 | 61 | <table class="table table-hover"> |
|
62 | 62 | <tr> |
|
63 | 63 | <th>#</th> |
|
64 | 64 | {% for header in experiment_keys %} |
|
65 | 65 | <th>{{ header|title }}</th> |
|
66 | 66 | {% endfor%} |
|
67 | 67 | </tr> |
|
68 | 68 | |
|
69 | 69 | {% for item in experiments %} |
|
70 | 70 | {% if location.name in item.location.name %} |
|
71 | 71 | |
|
72 | 72 | <tr class="clickable-row" data-href="{% url 'url_experiment' item.id %}" > |
|
73 | 73 | <td>{{ forloop.counter }}</td> |
|
74 | 74 | {% for key in experiment_keys %} |
|
75 | {% if 'status' in key %} | |
|
76 | <td></td> | |
|
77 | {% else %} | |
|
78 | 75 |
|
|
79 | {% endif %} | |
|
80 | 76 |
|
|
81 | 77 | </tr> |
|
82 | 78 | {% endif %} |
|
83 | 79 | {% endfor %} |
|
84 | 80 | </table> |
|
85 | 81 | </div> |
|
86 | 82 | </div> |
|
87 | 83 | </div> |
|
88 | 84 | {% endfor %} |
|
89 | 85 | </div> |
|
90 | 86 | |
|
91 | 87 | |
|
92 | 88 | |
|
93 | 89 | {% endblock %} |
|
94 | 90 | |
|
95 | 91 | |
|
96 | 92 | |
|
97 | 93 | {% block extra-js%} |
|
98 | 94 | <script type="text/javascript"> |
|
99 | 95 | //for (i = 0; i < locations.length; i++) { |
|
100 | 96 | // text += cars[i] + "<br>"; |
|
101 | 97 | //} |
|
102 | 98 | //------For PLAY Button------- |
|
103 | 99 | {% for location in locations %} |
|
104 | 100 | $("#play-{{ location.id }}").click(function() { |
|
105 | 101 | //alert("Play-{{location}}"); |
|
106 | 102 | var id_loc = {{location.id}} |
|
107 | 103 | //document.location = |
|
108 | 104 | }); |
|
109 | 105 | {% endfor %} |
|
110 | 106 | |
|
111 | 107 | //--------For STOP Button------- |
|
112 | 108 | {% for location in locations %} |
|
113 | 109 | $("#stop-{{ location.id }}").click(function() { |
|
114 | 110 | alert("Stop-{{location}}"); |
|
115 | 111 | // document.location = "{% url 'url_operation' campaign.id %}"; |
|
116 | 112 | }); |
|
117 | 113 | {% endfor %} |
|
118 | 114 | |
|
119 | 115 | $(".clickable-row").click(function() { |
|
120 | 116 | document.location = $(this).data("href"); |
|
121 | 117 | }); |
|
122 | 118 | |
|
123 | 119 | {% if search_button == True %} |
|
124 | 120 | $(document).ready(function() { |
|
125 | 121 | $("#id_campaign").change(function() { |
|
126 | 122 | var id_camp = document.getElementById("id_campaign").value; |
|
127 | 123 | //alert(id_camp); |
|
128 | 124 | document.location = "{% url 'url_operation'%}"+String(id_camp); |
|
129 | 125 | }); |
|
130 | 126 | }); |
|
131 | 127 | {% else %} |
|
132 | 128 | $(document).ready(function() { |
|
133 | 129 | $("#id_campaign").change(function() { |
|
134 | 130 | var id_camp = document.getElementById("id_campaign").value; |
|
135 | 131 | //alert(id_camp); |
|
136 | 132 | document.location = "{% url 'url_operation_search'%}"+String(id_camp); |
|
137 | 133 | }); |
|
138 | 134 | }); |
|
139 | 135 | {% endif %} |
|
140 | 136 | |
|
141 | 137 | $("#button-1").click(function() { |
|
142 | 138 | document.location = "{% url 'url_operation_search' %}"; |
|
143 | 139 | }); |
|
144 | 140 | |
|
145 | 141 | |
|
146 | 142 | </script> |
|
147 | 143 | {% endblock %} No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now