##// END OF EJS Templates
Task # 487: Operation View: bt_refresh...
Fiorella Quino -
r87:249d90f0420d
parent child
Show More
@@ -1,142 +1,144
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
45 45 <a class="collapsed" role="button" data-toggle="collapse" href="#collapseTwo-{{ location.id }}" aria-expanded="false" aria-controls="collapseTwo">
46 46 {{location.name}}: Experiment List
47 47 <span>
48 48 </span>
49 49 </a>
50 50
51 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 52 <span class="glyphicon glyphicon-play" aria-hidden="true"></span>
53 53 </button>
54 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 55 <span class="glyphicon glyphicon-stop" aria-hidden="true"></span>
56 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 60 </h4>
59 61 </div>
60 62
61 63 <div id="collapseTwo-{{ location.id }}" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingTwo">
62 64 <div class="panel-body">
63 65 <table class="table table-hover">
64 66 <tr>
65 67 <th>#</th>
66 68 {% for header in experiment_keys %}
67 69 <th>{{ header|title }}</th>
68 70 {% endfor%}
69 71 </tr>
70 72
71 73 {% for item in experiments %}
72 74 {% if location.name in item.location.name %}
73 75
74 76 <tr class="clickable-row" data-href="{% url 'url_experiment' item.id %}" >
75 77 <td>{{ forloop.counter }}</td>
76 78 {% for key in experiment_keys %}
77 79 {% if 'status' in key %}
78 80 <td class="text-{{item.status_color}}">{{ item|value:key }}</td>
79 81 {% else %}
80 82 <td>{{ item|value:key }}</td>
81 83 {% endif %}
82 84 {% endfor %}
83 85 </tr>
84 86 {% endif %}
85 87 {% endfor %}
86 88 </table>
87 89 </div>
88 90 </div>
89 91 </div>
90 92 {% endfor %}
91 93 </div>
92 94
93 95
94 96
95 97 {% endblock %}
96 98
97 99
98 100
99 101 {% block extra-js%}
100 102 <script type="text/javascript">
101 103
102 104 //--------For PLAY Button-------
103 105 $("#accordion").on("click", "button[name=bt_play]", function(){
104 106 //alert($(this).data('url'));
105 107 document.location = $(this).data('url');
106 108 });
107 109
108 110 //--------For STOP Button-------
109 111 $("#accordion").on("click", "button[name=bt_stop]", function(){
110 112 //alert($(this).data('url'));
111 113 document.location = $(this).data('url');
112 114 });
113 115
114 116 $(".clickable-row").click(function() {
115 117 document.location = $(this).data("href");
116 118 });
117 119
118 120 {% if search_button == True %}
119 121 $(document).ready(function() {
120 122 $("#id_campaign").change(function() {
121 123 var id_camp = document.getElementById("id_campaign").value;
122 124 //alert(id_camp);
123 125 document.location = "{% url 'url_operation'%}"+String(id_camp);
124 126 });
125 127 });
126 128 {% else %}
127 129 $(document).ready(function() {
128 130 $("#id_campaign").change(function() {
129 131 var id_camp = document.getElementById("id_campaign").value;
130 132 //alert(id_camp);
131 133 document.location = "{% url 'url_operation_search'%}"+String(id_camp);
132 134 });
133 135 });
134 136 {% endif %}
135 137
136 138 $("#button-1").click(function() {
137 139 document.location = "{% url 'url_operation_search' %}";
138 140 });
139 141
140 142
141 143 </script>
142 144 {% endblock %} No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now