##// END OF EJS Templates
Update main templates...
Juan C. Espinoza -
r96:77a52f31fce2
parent child
Show More
@@ -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
@@ -23,7 +23,7
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 %}
@@ -54,9 +54,11
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%}
@@ -73,6 +75,10
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 });
78
79 $("#bt_mix").click(function() {
80 document.location = "{% url 'url_mix_campaign' campaign.id %}";
81 });
76
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
8 {% block content-title %}{{title}}{% endblock %}
9 {% block content-suptitle %}{{suptitle}}{% endblock %}
10
11 {% block content %}
12
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 %}
18
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 %}
34
35 {% block sidebar%}
36 {% include "sidebar_devices.html" %}
37 {% endblock %}
38
6
39 {% block extra-js%}
7 {% block extra-js%}
8
40 {% if id_exp %}
9 {% if id_exp %}
10
41 <script type="text/javascript">
11 <script type="text/javascript">
12
42 $("#id_device").change(function() {
13 $("#id_device").change(function() {
43 var url = "{% url 'url_add_dev_conf' id_exp %}";
14 var url = "{% url 'url_add_dev_conf' id_exp %}";
44 document.location = url+ $(this).val() + "/";
15 document.location = url+ $(this).val() + "/?name=" + $("#id_name").val();
16 });
17
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 });
28
29 $('#id_choose_template').change(function() {
30 var url = "{% url 'url_add_dev_conf' id_exp %}";
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 %}
@@ -30,7 +30,7
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.device.name}}</a>
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>
General Comments 0
You need to be logged in to leave comments. Login now