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