@@ -12,49 +12,52 | |||
|
12 | 12 | {% block content-suptitle %}{{suptitle}}{% endblock %} |
|
13 | 13 | |
|
14 | 14 | {% block content %} |
|
15 | <table class="table table-bordered"> | |
|
16 | {% for key in campaign_keys %} | |
|
17 | <tr><th>{{key|title}}</th><td>{{campaign|attr:key}}</td></tr> | |
|
18 | {% endfor %} | |
|
19 | </table> | |
|
20 | <button class="btn btn-primary pull-right" id="bt_edit_campaign">Edit Campaign</button> | |
|
21 | <br></br> | |
|
22 | <br></br> | |
|
15 | <table class="table table-bordered"> | |
|
16 | {% for key in campaign_keys %} | |
|
17 | <tr><th>{{key|title}}</th><td>{{campaign|attr:key}}</td></tr> | |
|
18 | {% endfor %} | |
|
19 | </table> | |
|
20 | ||
|
21 | <button class="btn btn-primary pull-right" style="margin-left: 10px" id="bt_export">Export</button> | |
|
22 | <button class="btn btn-primary pull-right" style="margin-left: 10px" id="bt_edit">Edit</button> | |
|
23 | ||
|
24 | <br></br> | |
|
25 | <br></br> | |
|
23 | 26 | |
|
24 | <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true"> | |
|
25 | ||
|
26 | <div class="panel panel-default"> | |
|
27 | <div class="panel-heading" role="tab" id="headingTwo"> | |
|
28 | <h4 class="panel-title"> | |
|
29 | <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> | |
|
30 | Experiment List | |
|
31 | </a> | |
|
32 | </h4> | |
|
33 | </div> | |
|
34 | ||
|
35 | <div id="collapseTwo" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingTwo"> | |
|
36 | <div class="panel-body"> | |
|
37 | <table class="table table-hover"> | |
|
38 | <tr> | |
|
39 | <th>#</th> | |
|
40 | {% for header in experiment_keys %} | |
|
41 | <th>{{ header|title }}</th> | |
|
42 | {% endfor%} | |
|
43 | </tr> | |
|
44 | {% for item in experiments %} | |
|
45 | <tr class="clickable-row" data-href="{% url 'url_experiment' item.id %}"> | |
|
46 | <td>{{ forloop.counter }}</td> | |
|
47 | {% for key in experiment_keys %} | |
|
48 | <td>{{ item|attr:key }}</td> | |
|
49 | {% endfor %} | |
|
50 | </tr> | |
|
51 | {% endfor %} | |
|
52 | </table> | |
|
53 | <button class="btn btn-primary pull-right" id="bt_add">{{button}}</button> | |
|
54 | </div> | |
|
55 | </div> | |
|
56 | </div> | |
|
57 | </div> | |
|
27 | <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true"> | |
|
28 | ||
|
29 | <div class="panel panel-default"> | |
|
30 | <div class="panel-heading" role="tab" id="headingTwo"> | |
|
31 | <h4 class="panel-title"> | |
|
32 | <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> | |
|
33 | Experiment List | |
|
34 | </a> | |
|
35 | </h4> | |
|
36 | </div> | |
|
37 | ||
|
38 | <div id="collapseTwo" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingTwo"> | |
|
39 | <div class="panel-body"> | |
|
40 | <table class="table table-hover"> | |
|
41 | <tr> | |
|
42 | <th>#</th> | |
|
43 | {% for header in experiment_keys %} | |
|
44 | <th>{{ header|title }}</th> | |
|
45 | {% endfor%} | |
|
46 | </tr> | |
|
47 | {% for item in experiments %} | |
|
48 | <tr class="clickable-row" data-href="{% url 'url_experiment' item.id %}"> | |
|
49 | <td>{{ forloop.counter }}</td> | |
|
50 | {% for key in experiment_keys %} | |
|
51 | <td>{{ item|attr:key }}</td> | |
|
52 | {% endfor %} | |
|
53 | </tr> | |
|
54 | {% endfor %} | |
|
55 | </table> | |
|
56 | <button class="btn btn-primary pull-right" id="bt_add">{{button}}</button> | |
|
57 | </div> | |
|
58 | </div> | |
|
59 | </div> | |
|
60 | </div> | |
|
58 | 61 | {% endblock %} |
|
59 | 62 | |
|
60 | 63 | {% block sidebar%} |
@@ -70,8 +73,8 | |||
|
70 | 73 | $(".clickable-row").click(function() { |
|
71 | 74 | document.location = $(this).data("href"); |
|
72 | 75 | }); |
|
73 | ||
|
74 |
$("#bt_edit |
|
|
76 | ||
|
77 | $("#bt_edit").click(function() { | |
|
75 | 78 | document.location = "{% url 'url_edit_campaign' campaign.id%}"; |
|
76 | 79 | }); |
|
77 | 80 |
@@ -14,7 +14,9 | |||
|
14 | 14 | <tr><th>{{key|title}}</th><td>{{dev_conf|attr:key}}</td></tr> |
|
15 | 15 | {% endfor %} |
|
16 | 16 | </table> |
|
17 |
<button class="btn btn-primary pull-right" id="bt_ |
|
|
17 | <button class="btn btn-primary pull-right" style="margin-left: 10px" id="bt_send">Send</button> | |
|
18 | <button class="btn btn-primary pull-right" style="margin-left: 10px" id="bt_export">Export</button> | |
|
19 | <button class="btn btn-primary pull-right" style="margin-left: 10px" id="bt_edit">Edit</button> | |
|
18 | 20 | <br></br> |
|
19 | 21 | <br></br> |
|
20 | 22 | {% endblock %} |
@@ -26,7 +28,7 | |||
|
26 | 28 | {% block extra-js%} |
|
27 | 29 | <script type="text/javascript"> |
|
28 | 30 | |
|
29 |
$("#bt_edit |
|
|
31 | $("#bt_edit").click(function() { | |
|
30 | 32 | document.location = "{% url 'url_edit_dev_conf' dev_conf.id%}"; |
|
31 | 33 | }); |
|
32 | 34 |
@@ -14,7 +14,7 | |||
|
14 | 14 | <tr><th>{{key|title}}</th><td>{{device|attr:key}}</td></tr> |
|
15 | 15 | {% endfor %} |
|
16 | 16 | </table> |
|
17 |
<button class="btn btn-primary pull-right" id="bt_edit_device">Edit |
|
|
17 | <button class="btn btn-primary pull-right" style="margin-left: 10px" id="bt_edit_device">Edit</button> | |
|
18 | 18 | <br></br> |
|
19 | 19 | <br></br> |
|
20 | 20 | {% endblock %} |
@@ -17,7 +17,8 | |||
|
17 | 17 | <tr><th>{{key|title}}</th><td>{{experiment|attr:key}}</td></tr> |
|
18 | 18 | {% endfor %} |
|
19 | 19 | </table> |
|
20 |
<button class="btn btn-primary pull-right" id="bt_e |
|
|
20 | <button class="btn btn-primary pull-right" style="margin-left: 10px" id="bt_export">Export</button> | |
|
21 | <button class="btn btn-primary pull-right" style="margin-left: 10px" id="bt_edit">Edit</button> | |
|
21 | 22 | <br></br> |
|
22 | 23 | <br></br> |
|
23 | 24 | |
@@ -65,13 +66,12 | |||
|
65 | 66 | <script src="{% static 'js/moment.min.js' %}"></script> |
|
66 | 67 | <script src="{% static 'js/bootstrap-datetimepicker.min.js' %}"></script> |
|
67 | 68 | <script type="text/javascript"> |
|
68 | $('.input-group.date').datetimepicker({"format": "YYYY-MM-DD HH:mm"}); | |
|
69 | 69 | |
|
70 | 70 | $(".clickable-row").click(function() { |
|
71 | 71 | document.location = $(this).data("href"); |
|
72 | 72 | }); |
|
73 | 73 | |
|
74 |
$("#bt_edit |
|
|
74 | $("#bt_edit").click(function() { | |
|
75 | 75 | document.location = "{% url 'url_edit_experiment' experiment.id%}"; |
|
76 | 76 | }); |
|
77 | 77 |
General Comments 0
You need to be logged in to leave comments.
Login now