@@ -1,105 +1,122 | |||
|
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 | <form class="form" method="post" action=""> |
|
17 | 17 | {% csrf_token %} |
|
18 | 18 | {% bootstrap_form form layout='horizontal' size='medium' %} |
|
19 | 19 | <div style="clear: both;"></div> |
|
20 | 20 | <br> |
|
21 |
<button type=" |
|
|
21 | <button id="button-1" type="button" class="btn btn-primary pull-right">{{button}}</button> | |
|
22 | 22 | <br> |
|
23 | 23 | <br> |
|
24 | 24 | </form> |
|
25 | 25 | <br> |
|
26 | 26 | <br> |
|
27 | 27 | |
|
28 | 28 | <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true" > |
|
29 | 29 | |
|
30 | 30 | {% for location in locations %} |
|
31 | 31 | |
|
32 | 32 | <div class="panel panel-default"> |
|
33 | 33 | <div class="panel-heading" role="tab" id="headingTwo"> |
|
34 | 34 | <h4 class="panel-title"> |
|
35 | 35 | <a class="collapsed" role="button" data-toggle="collapse" href="#collapseTwo-{{ location.id }}" aria-expanded="false" aria-controls="collapseTwo"> |
|
36 | 36 | {{location.name}}: Experiment List |
|
37 | 37 | <span> |
|
38 | 38 | </span> |
|
39 | 39 | </a> |
|
40 | <button type="button" class="btn btn-primary pull-right btn-xs" aria-label="Left Align" style="margin-left: 10px"> | |
|
40 | <button id="play-{{ location.id }}" type="button" class="btn btn-primary pull-right btn-xs" aria-label="Left Align" style="margin-left: 10px"> | |
|
41 | 41 | <span class="glyphicon glyphicon-play" aria-hidden="true"></span> |
|
42 | 42 | </button> |
|
43 | <button type="button" class="btn btn-primary pull-right btn-xs" aria-label="Left Align" style="margin-left: 10px"> | |
|
43 | <button id="stop-{{ location.id }}" type="button" class="btn btn-primary pull-right btn-xs" aria-label="Left Align" style="margin-left: 10px"> | |
|
44 | 44 | <span class="glyphicon glyphicon-stop" aria-hidden="true"></span> |
|
45 | 45 | </button> |
|
46 | 46 | |
|
47 | 47 | </h4> |
|
48 | 48 | </div> |
|
49 | 49 | |
|
50 | 50 | <div id="collapseTwo-{{ location.id }}" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingTwo"> |
|
51 | 51 | <div class="panel-body"> |
|
52 | 52 | <table class="table table-hover"> |
|
53 | 53 | <tr> |
|
54 | ||
|
54 | <th>#</th> | |
|
55 | 55 | {% for header in experiment_keys %} |
|
56 | 56 | <th>{{ header|title }}</th> |
|
57 | 57 | {% endfor%} |
|
58 | 58 | </tr> |
|
59 | 59 | |
|
60 | 60 | {% for item in experiments %} |
|
61 | {% for exs in item %} | |
|
62 | <tr class="clickable-row" data-href="{% url 'url_experiment' exs.id %}" > | |
|
61 | {% if location.name in item.location.name %} | |
|
63 | 62 |
|
|
63 | <tr class="clickable-row" data-href="{% url 'url_experiment' item.id %}" > | |
|
64 | <td>{{ forloop.counter }}</td> | |
|
64 | 65 | {% for key in experiment_keys %} |
|
65 | {% if location.name in exs.location.name %} | |
|
66 | <td>{{ exs|value:key }}</td> | |
|
67 | {% endif %} | |
|
68 | {% endfor %} | |
|
66 | <td>{{ item|value:key }}</td> | |
|
69 | 67 | {% endfor %} |
|
70 | 68 | </tr> |
|
69 | {% endif %} | |
|
71 | 70 | {% endfor %} |
|
72 | 71 | </table> |
|
73 | 72 | </div> |
|
74 | 73 | </div> |
|
75 | 74 | </div> |
|
76 | 75 | {% endfor %} |
|
77 | 76 | </div> |
|
78 | 77 | |
|
79 | 78 | {% endblock %} |
|
80 | 79 | |
|
81 | 80 | |
|
82 | 81 | |
|
83 | 82 | {% block extra-js%} |
|
84 | 83 | <script type="text/javascript"> |
|
84 | //for (i = 0; i < locations.length; i++) { | |
|
85 | // text += cars[i] + "<br>"; | |
|
86 | //} | |
|
87 | //------For PLAY Button------- | |
|
88 | {% for location in locations %} | |
|
89 | $("#play-{{ location.id }}").click(function() { | |
|
90 | //alert("Play-{{location}}"); | |
|
91 | var id_loc = {{location.id}} | |
|
92 | //document.location = | |
|
93 | }); | |
|
94 | {% endfor %} | |
|
85 | 95 | |
|
86 | //$("#bt_add").click(function() { | |
|
87 | //alert("sometext"); | |
|
96 | //--------For STOP Button------- | |
|
97 | {% for location in locations %} | |
|
98 | $("#stop-{{ location.id }}").click(function() { | |
|
99 | alert("Stop-{{location}}"); | |
|
88 | 100 | // document.location = "{% url 'url_operation' campaign.id %}"; |
|
89 |
|
|
|
101 | }); | |
|
102 | {% endfor %} | |
|
90 | 103 |
|
|
91 | 104 | $(".clickable-row").click(function() { |
|
92 | 105 | document.location = $(this).data("href"); |
|
93 | 106 | }); |
|
94 | 107 | |
|
95 | 108 | $(document).ready(function() { |
|
96 | 109 | $("#id_campaign").change(function() { |
|
97 | 110 | var id_camp = document.getElementById("id_campaign").value; |
|
98 | 111 | //alert(id_camp); |
|
99 | 112 | document.location = "{% url 'url_operation'%}"+String(id_camp); |
|
100 | 113 | }); |
|
101 | 114 | }); |
|
102 | 115 | |
|
116 | $("#button-1").click(function() { | |
|
117 | document.location = "{% url 'url_operation_search' %}"; | |
|
118 | }); | |
|
119 | ||
|
103 | 120 | |
|
104 | 121 | </script> |
|
105 | 122 | {% endblock %} No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now