##// 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 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 %}
@@ -54,9 +54,11
54 54 {% endfor %}
55 55 </table>
56 56 </div>
57 </div>
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%}
@@ -73,6 +75,10
73 75 $("#bt_edit").click(function() {
74 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 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
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 7 {% block extra-js%}
8
40 9 {% if id_exp %}
10
41 11 <script type="text/javascript">
12
42 13 $("#id_device").change(function() {
43 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 34 </script>
35
47 36 {% endif %}
37
48 38 {% endblock %} No newline at end of file
@@ -30,7 +30,7
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.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 34 {% endfor %}
35 35 </div>
36 36 </div>
General Comments 0
You need to be logged in to leave comments. Login now