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