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