@@ -0,0 +1,14 | |||
|
1 | {% extends "base_edit.html" %} | |
|
2 | {% load bootstrap3 %} | |
|
3 | {% load static %} | |
|
4 | {% load main_tags %} | |
|
5 | {% block extra-head %} | |
|
6 | <link href="{% static 'css/bootstrap-datetimepicker.min.css' %}" media="screen" rel="stylesheet"> | |
|
7 | {% endblock %} | |
|
8 | ||
|
9 | {% block extra-js%} | |
|
10 | <script src="{% static 'js/moment.min.js' %}"></script> | |
|
11 | <script src="{% static 'js/bootstrap-datetimepicker.min.js' %}"></script> | |
|
12 | <script src="{% static 'js/cr.js' %}"></script> | |
|
13 | ||
|
14 | {% endblock %} No newline at end of file |
@@ -1,35 +1,35 | |||
|
1 | 1 | {% extends "base.html" %} |
|
2 | 2 | {% load bootstrap3 %} |
|
3 | 3 | {% load static %} |
|
4 | 4 | {% load main_tags %} |
|
5 | 5 | |
|
6 | 6 | {% block content-title %}{{title}}{% endblock %} |
|
7 | 7 | {% block content-suptitle %}{{suptitle}}{% endblock %} |
|
8 | 8 | |
|
9 | 9 | {% block content %} |
|
10 | 10 | {% if form.is_multipart %} |
|
11 | 11 | <form class="form" enctype="multipart/form-data" method="post" action="{{action}}"> |
|
12 | 12 | {% else %} |
|
13 | 13 | <form class="form" method="post" action="{{action}}"> |
|
14 | 14 | {% endif %} |
|
15 | 15 | {% csrf_token %} |
|
16 | 16 | {% bootstrap_form form layout='horizontal' size='medium' %} |
|
17 | 17 | <div style="clear: both;"></div> |
|
18 | 18 | <br> |
|
19 | 19 | {% if extra_button %} |
|
20 | 20 | <div class="pull-left"> |
|
21 | 21 | <button type="button" class="btn btn-primary" id="bt_{{extra_button}}">{{extra_button}}</button> |
|
22 | 22 | </div> |
|
23 | 23 | {% endif %} |
|
24 | 24 | {% if button %} |
|
25 | 25 | <div class="pull-right"> |
|
26 | <button type="button" class="btn btn-primary" onclick="{% if previous %}window.location.replace('{{ previous }}');{% else %}history.go(-1);{% endif %}">Cancel</button> | |
|
26 | <button type="button" class="btn btn-primary" onclick="{% if previous %}window.location.replace('{{ previous }}');{% else %}history.go(-1);{% endif %}">{% if cancel %}{{cancel}}{% else %}Cancel{% endif %}</button> | |
|
27 | 27 | <button type="submit" class="btn btn-primary">{{button}}</button> |
|
28 | 28 | </div> |
|
29 | 29 | {% endif %} |
|
30 | 30 | </form> |
|
31 | 31 | {% endblock %} |
|
32 | 32 | |
|
33 | 33 | {% block sidebar%} |
|
34 | 34 | {% include "sidebar_devices.html" %} |
|
35 | 35 | {% endblock %} |
@@ -1,78 +1,84 | |||
|
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 | <table class="table table-bordered"> |
|
16 | 16 | {% for key in campaign_keys %} |
|
17 | 17 | <tr><th>{{key|title}}</th><td>{{campaign|attr:key}}</td></tr> |
|
18 | 18 | {% endfor %} |
|
19 | 19 | </table> |
|
20 | 20 | |
|
21 | 21 | <button class="btn btn-primary pull-right" style="margin-left: 10px" id="bt_export">Export</button> |
|
22 | 22 | <button class="btn btn-primary pull-right" style="margin-left: 10px" id="bt_edit">Edit</button> |
|
23 | 23 | |
|
24 | 24 | <br></br> |
|
25 | 25 | <br></br> |
|
26 | 26 | |
|
27 | 27 | <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true"> |
|
28 | 28 | |
|
29 | 29 | <div class="panel panel-default"> |
|
30 | 30 | <div class="panel-heading" role="tab" id="headingTwo"> |
|
31 | 31 | <h4 class="panel-title"> |
|
32 | 32 | <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> |
|
33 | 33 | Experiment List |
|
34 | 34 | </a> |
|
35 | 35 | </h4> |
|
36 | 36 | </div> |
|
37 | 37 | |
|
38 | 38 | <div id="collapseTwo" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingTwo"> |
|
39 | 39 | <div class="panel-body"> |
|
40 | 40 | <table class="table table-hover"> |
|
41 | 41 | <tr> |
|
42 | 42 | <th>#</th> |
|
43 | 43 | {% for header in experiment_keys %} |
|
44 | 44 | <th>{{ header|title }}</th> |
|
45 | 45 | {% endfor%} |
|
46 | 46 | </tr> |
|
47 | 47 | {% for item in experiments %} |
|
48 | 48 | <tr class="clickable-row" data-href="{% url 'url_experiment' item.id %}"> |
|
49 | 49 | <td>{{ forloop.counter }}</td> |
|
50 | 50 | {% for key in experiment_keys %} |
|
51 | 51 | <td>{{ item|attr:key }}</td> |
|
52 | 52 | {% endfor %} |
|
53 | 53 | </tr> |
|
54 | 54 | {% endfor %} |
|
55 | 55 | </table> |
|
56 | 56 | </div> |
|
57 | 57 | </div> |
|
58 | 58 | </div> |
|
59 | 59 | </div> |
|
60 | <br> | |
|
61 | <button class="btn btn-primary pull-right" style="margin-left: 10px" id="bt_mix">Mix Experiments</button> | |
|
60 | 62 | {% endblock %} |
|
61 | 63 | |
|
62 | 64 | {% block sidebar%} |
|
63 | 65 | {% include "sidebar_devices.html" %} |
|
64 | 66 | {% endblock %} |
|
65 | 67 | |
|
66 | 68 | {% block extra-js%} |
|
67 | 69 | <script type="text/javascript"> |
|
68 | 70 | |
|
69 | 71 | $(".clickable-row").click(function() { |
|
70 | 72 | document.location = $(this).data("href"); |
|
71 | 73 | }); |
|
72 | 74 | |
|
73 | 75 | $("#bt_edit").click(function() { |
|
74 | 76 | document.location = "{% url 'url_edit_campaign' campaign.id %}"; |
|
75 | 77 | }); |
|
76 | 78 | |
|
79 | $("#bt_mix").click(function() { | |
|
80 | document.location = "{% url 'url_mix_campaign' campaign.id %}"; | |
|
81 | }); | |
|
82 | ||
|
77 | 83 | </script> |
|
78 | 84 | {% endblock %} No newline at end of file |
@@ -1,48 +1,38 | |||
|
1 | {% extends "base.html" %} | |
|
1 | {% extends "base_edit.html" %} | |
|
2 | 2 | {% load bootstrap3 %} |
|
3 | 3 | {% load static %} |
|
4 | 4 | {% load main_tags %} |
|
5 | 5 | |
|
6 | {% block conf-active %}active{% endblock %} | |
|
7 | 6 | |
|
8 | {% block content-title %}{{title}}{% endblock %} | |
|
9 | {% block content-suptitle %}{{suptitle}}{% endblock %} | |
|
7 | {% block extra-js%} | |
|
10 | 8 | |
|
11 | {% block content %} | |
|
9 | {% if id_exp %} | |
|
12 | 10 | |
|
13 | {% if form.is_multipart %} | |
|
14 | <form class="form" enctype="multipart/form-data" method="post" action="{{action}}"> | |
|
15 | {% else %} | |
|
16 | <form class="form" method="post" action="{{action}}"> | |
|
17 | {% endif %} | |
|
11 | <script type="text/javascript"> | |
|
18 | 12 | |
|
19 | {% csrf_token %} | |
|
20 | {% bootstrap_form form layout='horizontal' size='medium' %} | |
|
21 | <div style="clear: both;"></div> | |
|
22 | <br> | |
|
23 | {% if extra_button %} | |
|
24 | <div class="pull-left"> | |
|
25 | <button type="button" class="btn btn-primary" id="bt_{{extra_button}}">{{extra_button}}</button> | |
|
26 | </div> | |
|
27 | {% endif %} | |
|
28 | <div class="pull-right"> | |
|
29 | <button type="button" class="btn btn-primary" onclick="{% if previous %}window.location.replace('{{ previous }}');{% else %}history.go(-1);{% endif %}">Cancel</button> | |
|
30 | <button type="submit" class="btn btn-primary">{{button}}</button> | |
|
31 | </div> | |
|
32 | </form> | |
|
33 | {% endblock %} | |
|
13 | $("#id_device").change(function() { | |
|
14 | var url = "{% url 'url_add_dev_conf' id_exp %}"; | |
|
15 | document.location = url+ $(this).val() + "/?name=" + $("#id_name").val(); | |
|
16 | }); | |
|
34 | 17 | |
|
35 | {% block sidebar%} | |
|
36 | {% include "sidebar_devices.html" %} | |
|
37 | {% endblock %} | |
|
18 | $('#id_create_from').change(function() { | |
|
19 | var url = "{% url 'url_add_dev_conf' id_exp %}"; | |
|
20 | if ($(this).val()=="2"){ | |
|
21 | document.location = url+"?template=0"; | |
|
22 | }else if ($(this).val()=="1"){ | |
|
23 | document.location = url+"?blank=0"; | |
|
24 | }else{ | |
|
25 | document.location = url; | |
|
26 | } | |
|
27 | }); | |
|
38 | 28 | |
|
39 | {% block extra-js%} | |
|
40 | {% if id_exp %} | |
|
41 | <script type="text/javascript"> | |
|
42 | $("#id_device").change(function() { | |
|
29 | $('#id_choose_template').change(function() { | |
|
43 | 30 |
var url = "{% url 'url_add_dev_conf' id_exp |
|
44 |
document.location = url+ |
|
|
31 | document.location = url+"?template="+$(this).val(); | |
|
45 | 32 | }); |
|
33 | ||
|
46 | 34 | </script> |
|
35 | ||
|
47 | 36 | {% endif %} |
|
37 | ||
|
48 | 38 | {% endblock %} No newline at end of file |
@@ -1,37 +1,37 | |||
|
1 | 1 | |
|
2 | 2 | {% if campaign %} |
|
3 | 3 | <div class="panel panel-default"> |
|
4 | 4 | <div class="panel-heading"> |
|
5 | 5 | <h4>Campaign</h4> |
|
6 | 6 | </div> |
|
7 | 7 | <div class="list-group"> |
|
8 | 8 | <a href="{% url 'url_campaign' campaign.id %}" class="list-group-item active" >{{ campaign.name }}</a> |
|
9 | 9 | </div> |
|
10 | 10 | </div> |
|
11 | 11 | {% endif %} |
|
12 | 12 | |
|
13 | 13 | {% if experiment %} |
|
14 | 14 | <div class="panel panel-default"> |
|
15 | 15 | <div class="panel-heading"> |
|
16 | 16 | <h4>Experiments</h4> |
|
17 | 17 | </div> |
|
18 | 18 | <div class="list-group"> |
|
19 | 19 | {% for item in side_experiments %} |
|
20 | 20 | <a href="{% url 'url_experiment' item.id %}" class="list-group-item {%if item.id == experiment.id%}active{%endif%}">{{item.name}}</a> |
|
21 | 21 | {% endfor %} |
|
22 | 22 | </div> |
|
23 | 23 | </div> |
|
24 | 24 | {% endif %} |
|
25 | 25 | |
|
26 | 26 | {% if dev_conf %} |
|
27 | 27 | <div class="panel panel-default"> |
|
28 | 28 | <div class="panel-heading"> |
|
29 | 29 | <h4>Device Configurations</h4> |
|
30 | 30 | </div> |
|
31 | 31 | <div class="list-group"> |
|
32 | 32 | {% for item in side_configurations %} |
|
33 |
<a href="{{item.get_absolute_url}}" class="list-group-item {%if item.id == dev_conf.id%}active{%endif%}">{{item |
|
|
33 | <a href="{{item.get_absolute_url}}" class="list-group-item {%if item.id == dev_conf.id%}active{%endif%}">{{item}}</a> | |
|
34 | 34 | {% endfor %} |
|
35 | 35 | </div> |
|
36 | 36 | </div> |
|
37 | 37 | {% endif %} |
General Comments 0
You need to be logged in to leave comments.
Login now