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