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