@@ -1,83 +1,86 | |||
|
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 | <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%} |
|
61 | 64 | {% include "sidebar_devices.html" %} |
|
62 | 65 | {% endblock %} |
|
63 | 66 | |
|
64 | 67 | {% block extra-js%} |
|
65 | 68 | <script src="{% static 'js/moment.min.js' %}"></script> |
|
66 | 69 | <script src="{% static 'js/bootstrap-datetimepicker.min.js' %}"></script> |
|
67 | 70 | <script type="text/javascript"> |
|
68 | 71 | $('.input-group.date').datetimepicker({"format": "YYYY-MM-DD HH:mm"}); |
|
69 | 72 | |
|
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 | |
|
78 | 81 | $("#bt_add").click(function() { |
|
79 | 82 | document.location = "{% url 'url_add_experiment' campaign.id%}"; |
|
80 | 83 | }); |
|
81 | 84 | |
|
82 | 85 | </script> |
|
83 | 86 | {% endblock %} No newline at end of file |
@@ -1,34 +1,36 | |||
|
1 | 1 | {% extends "base.html" %} |
|
2 | 2 | {% load bootstrap3 %} |
|
3 | 3 | {% load static %} |
|
4 | 4 | {% load main_tags %} |
|
5 | 5 | |
|
6 | 6 | {% block conf-active %}active{% endblock %} |
|
7 | 7 | |
|
8 | 8 | {% block content-title %}{{title}}{% endblock %} |
|
9 | 9 | {% block content-suptitle %}{{suptitle}}{% endblock %} |
|
10 | 10 | |
|
11 | 11 | {% block content %} |
|
12 | 12 | <table class="table table-bordered"> |
|
13 | 13 | {% for key in dev_conf_keys %} |
|
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 %} |
|
21 | 23 | |
|
22 | 24 | {% block sidebar%} |
|
23 | 25 | {% include "sidebar_devices.html" %} |
|
24 | 26 | {% endblock %} |
|
25 | 27 | |
|
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 | |
|
33 | 35 | </script> |
|
34 | 36 | {% endblock %} No newline at end of file |
@@ -1,36 +1,36 | |||
|
1 | 1 | {% extends "base.html" %} |
|
2 | 2 | {% load bootstrap3 %} |
|
3 | 3 | {% load static %} |
|
4 | 4 | {% load main_tags %} |
|
5 | 5 | |
|
6 | 6 | {% block dev-active %}active{% endblock %} |
|
7 | 7 | |
|
8 | 8 | {% block content-title %}{{title}}{% endblock %} |
|
9 | 9 | {% block content-suptitle %}{{suptitle}}{% endblock %} |
|
10 | 10 | |
|
11 | 11 | {% block content %} |
|
12 | 12 | <table class="table table-bordered"> |
|
13 | 13 | {% for key in device_keys %} |
|
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 %} |
|
21 | 21 | |
|
22 | 22 | {% block sidebar%} |
|
23 | 23 | {% include "sidebar_devices.html" %} |
|
24 | 24 | {% endblock %} |
|
25 | 25 | |
|
26 | 26 | {% block extra-js%} |
|
27 | 27 | <script src="{% static 'js/moment.min.js' %}"></script> |
|
28 | 28 | <script src="{% static 'js/bootstrap-datetimepicker.min.js' %}"></script> |
|
29 | 29 | <script type="text/javascript"> |
|
30 | 30 | |
|
31 | 31 | $("#bt_edit_device").click(function() { |
|
32 | 32 | document.location = "{% url 'url_edit_device' device.id%}"; |
|
33 | 33 | }); |
|
34 | 34 | |
|
35 | 35 | </script> |
|
36 | 36 | {% endblock %} No newline at end of file |
@@ -1,83 +1,83 | |||
|
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 exp-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 | <table class="table table-bordered"> |
|
16 | 16 | {% for key in experiment_keys %} |
|
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 | |
|
24 | 25 | <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true"> |
|
25 | 26 | |
|
26 | 27 | <div class="panel panel-default"> |
|
27 | 28 | <div class="panel-heading" role="tab" id="headingTwo"> |
|
28 | 29 | <h4 class="panel-title"> |
|
29 | 30 | <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseThree"> |
|
30 | 31 | Device Configurations |
|
31 | 32 | </a> |
|
32 | 33 | </h4> |
|
33 | 34 | </div> |
|
34 | 35 | <div id="collapseTwo" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingTwo"> |
|
35 | 36 | <div class="panel-body"> |
|
36 | 37 | <table class="table table-hover"> |
|
37 | 38 | <tr> |
|
38 | 39 | <th>#</th> |
|
39 | 40 | {% for key in configuration_keys %} |
|
40 | 41 | <th>{{ key|title }}</th> |
|
41 | 42 | {% endfor%} |
|
42 | 43 | </tr> |
|
43 | 44 | {% for item in configurations %} |
|
44 | 45 | <tr class="clickable-row" data-href="/{{item.device__device_type__name}}/{{item.id}}/"> |
|
45 | 46 | <td>{{ forloop.counter }}</td> |
|
46 | 47 | {% for key in configuration_keys %} |
|
47 | 48 | <td>{{ item|attr:key }}</td> |
|
48 | 49 | {% endfor %} |
|
49 | 50 | </tr> |
|
50 | 51 | {% endfor %} |
|
51 | 52 | </table> |
|
52 | 53 | <button class="btn btn-primary pull-right" id="bt_add_conf">{{button}}</button> |
|
53 | 54 | </div> |
|
54 | 55 | </div> |
|
55 | 56 | </div> |
|
56 | 57 | </div> |
|
57 | 58 | {% endblock %} |
|
58 | 59 | |
|
59 | 60 | {% block sidebar%} |
|
60 | 61 | {% include "sidebar_devices.html" %} |
|
61 | 62 | {% endblock %} |
|
62 | 63 | |
|
63 | 64 | {% block extra-js%} |
|
64 | 65 | |
|
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 | |
|
78 | 78 | $("#bt_add_conf").click(function() { |
|
79 | 79 | document.location = "{% url 'url_add_dev_conf' experiment.id%}"; |
|
80 | 80 | }); |
|
81 | 81 | |
|
82 | 82 | </script> |
|
83 | 83 | {% endblock %} No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now