Revision 1d70dbce

b/djnro/templates/base.html
69 69
                        <li class="{% block api %}{% endblock %}"><a href="{% url api %}">{% trans "Closest point api" %}</a>
70 70
                    </ul>
71 71
                </li>
72
                {% if request.user.is_authenticated %}
73
                <li><a href="{% url logout %}">Logout</a></li>
74
                {% endif %}
72 75
              </ul>
73 76
            </div><!--/.nav-collapse -->
74 77
          </div>
......
85 88
    </div>
86 89
    {% include "partial/footer.html" %}
87 90
    <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
88
    <script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
89 91
    <script type="text/javascript" src="{% static 'js/script.js' %}"></script>
92
    <script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
90 93
    {% block extrajs %}{% endblock %}
91 94
  </body>
92 95
</html>
b/djnro/templates/edumanage/catenroll.html
14 14

  
15 15
{% block homeactive %}{% endblock %}
16 16
{% block catactive %}class="active"{% endblock %}
17
{% block subcontent %} <h4>eduroam CAT enroll</h4>
17
{% block management_content %}
18

  
19
 <h4>eduroam CAT enroll</h4>
18 20
 {% if messages %}
19 21
                    <table class="table table-condensed">
20 22
                        {% for message in messages %}
b/djnro/templates/edumanage/contacts.html
95 95

  
96 96
    		{% block homeactive %}{% endblock %}
97 97
    		{% block contactsactive %}class="active"{% endblock %}
98
            {% block subcontent %}
98
				{% block management_content %}
99 99

  
100 100

  
101 101
	              <h4>{% trans "Contacts" %}</h4>
b/djnro/templates/edumanage/contacts_edit.html
13 13

  
14 14
{% block homeactive %}{% endblock %}
15 15
{% block contactsactive %}class="active"{% endblock %}
16
{% block subcontent %} <h4>{% if edit %}{{form.instance.name}} ({% trans "edit" %}){% else %}{% trans "Add Contact" %}{% endif %}</h4>
16
{% block management_content %} <h4>{% if edit %}{{form.instance.name}} ({% trans "edit" %}){% else %}{% trans "Add Contact" %}{% endif %}</h4>
17 17
<hr>
18 18
<form method="POST" class="form-horizontal">
19 19
	{% csrf_token %}
b/djnro/templates/edumanage/institution.html
1 1
{% extends "edumanage/welcome.html"%}
2
 {% load tolocale %}
2 3
{% load i18n %}
3
{% block extrahead %}
4
	<style type="text/css">
5
		.control-label{
6
			padding-top: 0px !important;
7
			width: auto !important;
8
		}
9
	</style>
10
{% endblock %}
11
{% block crumbs %}
12
		<li><a href="{% url manage %}">{% trans "Home" %}</a><span class="divider">/</span></li>
13
		<li class="active">{% trans "Institution" %}</li>
14
		{% endblock %}
4

  
15 5
{% block homeactive %}{% endblock %}
16 6
{% block instactive %}class="active"{% endblock %}
17
{% block subcontent %}
7
{% block management_content %}
18 8
  <h4>{% trans "Institution" %}</h4>
19 9
  		<hr>
20 10
  		{% if messages %}
21
        <table class="table table-condensed">
22
            {% for message in messages %}
23
            <tr {% if message.tags %} class="{{ message.tags }}"{% endif %}><td>{{ message }}<td></tr>
24
            {% endfor %}
25
        </table>
26
    {% endif %}
27
  {% load tolocale %}
28
  {% if institution %}
29
  		{% if institution.institutiondetails %}
30

  
31
<div class="form-horizontal">
11
	        <table class="table table-condensed">
12
	            {% for message in messages %}
13
	            <tr {% if message.tags %} class="{{ message.tags }}"{% endif %}><td>{{ message }}<td></tr>
14
	            {% endfor %}
15
	        </table>
16
	    {% endif %}
17
  		{% if institution %}
18
  			{% if institution.institutiondetails %}
19
				<div class="row">
20
					<div class="col-md-12">
21
						<div class="col-md-2">
22
							<label for="id_ertype">{% trans "Name" %}</label>
23
							<div>
24
								{% tolocale institution LANGUAGE_CODE %}
25
							</div>
26
						</div>
27
						<div class="col-md-2">
28
							<label class="" for="id_ertype">{% trans "Type" %}</label>
29
							<div class="">
30
								{{ institution.get_ertype_display }}
31
							</div>
32
						</div>
33
					<div class="col-md-2">
34
						<label class="" for="id_address_street">{% trans "Address Street" %}</label>
35
						<div class="">
36
							{{ institution.institutiondetails.address_street }}
37
						</div>
38
					</div>
39
					<div class="col-md-2">
40
						<label class="" for="id_address_city">{% trans "Address City" %}</label>
41
						<div class="">
42
							{{ institution.institutiondetails.address_city }}
43
						</div>
44
					</div>
45
					<div class="col-md-2">
46
						<label class="" for="id_contact">{% trans "Contacts" %}</label>
47
						<div class="">
48
								{% for contact in institution.institutiondetails.contact.all %}
49
								        		{{contact.name}} (<a href="mailto:{{contact.email}}">{{contact.email}}</a> - tel:{{contact.phone}}){% if not forloop.last %}<br>{% endif %}
50
								        	{% endfor %}
51
						</div>
52
					</div>
53
				    <div class="col-md-2 ">
54
				        <label class="" for="id_urls">{% trans "Urls" %}</label>
32 55

  
33

  
34
		<div class="control-group">
35
		<label class="control-label" for="id_ertype">{% trans "Name" %}</label>
36
		<div class="controls">
37
			{% tolocale institution LANGUAGE_CODE %}
38
		</div>
39
	</div>
40
	<div class="control-group">
41
		<label class="control-label" for="id_ertype">{% trans "Type" %}</label>
42
		<div class="controls">
43
			{{ institution.get_ertype_display }}
44
		</div>
45
	</div>
46
	<div class="control-group">
47
		<label class="control-label" for="id_address_street">{% trans "Address Street" %}</label>
48
		<div class="controls">
49
			{{ institution.institutiondetails.address_street }}
50
		</div>
51
	</div>
52
	<div class="control-group">
53
		<label class="control-label" for="id_address_city">{% trans "Address City" %}</label>
54
		<div class="controls">
55
			{{ institution.institutiondetails.address_city }}
56
		</div>
57
	</div>
58
	<div class="control-group">
59
		<label class="control-label" for="id_contact">{% trans "Contacts" %}</label>
60
		<div class="controls">
61
				{% for contact in institution.institutiondetails.contact.all %}
62
        		{{contact.name}} (<a href="mailto:{{contact.email}}">{{contact.email}}</a> - tel:{{contact.phone}}){% if not forloop.last %}<br>{% endif %}
63
        	{% endfor %}
64
		</div>
65
	</div>
66
    <div class="control-group ">
67
        <label class="control-label" for="id_urls">{% trans "Urls" %}</label>
68

  
69
        <div class="controls">
70
        {% for url in institution.institutiondetails.url.all %}
71
        		<a href="{{url.url}}" target="_blank">{{url.url}}</a> - {{url.get_urltype_display}} ({{url.get_lang_display}}){% if not forloop.last %}<br>{% endif %}
72
        {% endfor %}
73
        </div>
74
    </div>
75
    {% if institution.ertype == 2 or institution.ertype == 3 %}
76
	<div class="control-group">
77
		<label class="control-label" for="id_oper_name">{% trans "Domain Name" %}</label>
78
		<div class="controls">
79
			{{ institution.institutiondetails.oper_name }}
80
		</div>
81
	</div>
82
	{% endif %}
83
	{% if institution.ertype == 1 or institution.ertype == 3 %}
84
	<div class="control-group">
85
		<label class="control-label" for="id_number_user">{% trans "Number User" %}</label>
86
		<div class="controls">
87
			{{ institution.institutiondetails.number_user }}
88
		</div>
89
	</div>
90
	{% endif %}
91
	<div class="control-group">
92
		<label class="control-label" for="id_number_id">{% trans "Number of IDs" %}</label>
93
		<div class="controls">
94
			{{ institution.institutiondetails.number_id }}
95
		</div>
96
	</div>
97
	<div class="control-group">
98
        <div class="controls">
99
            <a class="btn btn-primary" href="{% url edit-institution institution.pk %}">{% trans "Edit" %}</a>
100
        </div>
101
    </div>
102
            </div>
103
              		{% else %}
104
              			<div>{% trans "No institution details defined yet for" %} {% tolocale institution LANGUAGE_CODE%} <a href="{% url edit-institution institution.pk %}" class="btn btn-small btn-primary">{% trans "edit" %}</a></div>
105
              		{% endif %}
106
              {% else %}
107
              <p>{% trans "No institution defined" %}</p>
108
              {% endif %}
109
             {% endblock %}
56
				        <div class="">
57
				        {% for url in institution.institutiondetails.url.all %}
58
				        		<a href="{{url.url}}" target="_blank">{{url.url}}</a> - {{url.get_urltype_display}} ({{url.get_lang_display}}){% if not forloop.last %}<br>{% endif %}
59
				        {% endfor %}
60
				        </div>
61
				    </div>
62
					{% if institution.ertype == 2 or institution.ertype == 3 %}
63
					<div class="col-md-2">
64
						<label class="" for="id_oper_name">{% trans "Domain Name" %}</label>
65
						<div class="">
66
							{{ institution.institutiondetails.oper_name }}
67
						</div>
68
					</div>
69
					{% endif %}
70
					{% if institution.ertype == 1 or institution.ertype == 3 %}
71
					<div class="col-md-2">
72
						<label class="" for="id_number_user">{% trans "Number User" %}</label>
73
						<div class="">
74
							{{ institution.institutiondetails.number_user }}
75
						</div>
76
					</div>
77
					{% endif %}
78
					<div class="col-md-2">
79
						<label class="" for="id_number_id">{% trans "Number of IDs" %}</label>
80
						<div class="">
81
							{{ institution.institutiondetails.number_id }}
82
						</div>
83
					</div>
84
				</div>
85
			</div>
86
			<div class="row">
87
				<div class="col-md-12" style="margin-top: 20px;">
88
					<div class="col-md-12">
89
						<a class="btn btn-primary" href="{% url edit-institution institution.pk %}">{% trans "Edit" %}</a>
90
				    </div>
91
			    </div>
92
			</div>
93
  		{% else %}
94
  			<div>{% trans "No institution details defined yet for" %} {% tolocale institution LANGUAGE_CODE%} <a href="{% url edit-institution institution.pk %}" class="btn btn-small btn-primary">{% trans "edit" %}</a></div>
95
  		{% endif %}
96
	{% else %}
97
    	<p>{% trans "No institution defined" %}</p>
98
    {% endif %}
99
{% endblock %}
110 100

  
b/djnro/templates/edumanage/institution_edit.html
2 2
{% load staticfiles %}
3 3
{% load i18n %}
4 4
{% load tolocale %}
5
{% block homeactive %}{% endblock %}
6
{% block instactive %}class="active"{% endblock %}
7
{% block management_content %}
8

  
9
<h4>{% tolocale institution LANGUAGE_CODE%} {% trans "Edit" %}</h4>
10
<hr>
11

  
12
	<div class="col-md-12">
13
		<form method="POST">
14
			{% csrf_token %}
15
			{% if form.non_field_errors %}
16
			<p class="error">
17
				{{ form.non_field_errors}}
18
			</p>
19
			{% endif %}
20
			<div style="display: none">
21
				{{form.institution}}
22
			</div>
23
			<div class="form-group">
24
				<label class="control-label" for="id_name"><b>{% trans "Name" %}</b></label>
25
				<div class="controls">
26
					<input class="input" id="disabledInput" type="text" placeholder="{% tolocale institution LANGUAGE_CODE %}" disabled>
27
				</div>
28
			</div>
29
			<div class="form-group {% if form.ertype.errors %} error {% endif %}">
30
				<label class="control-label" for="id_ertype"><b>{% trans "Type" %}</b></label>
31
				<div class="controls">
32
					<input class="input" id="disabledInput2" type="text" placeholder="{{institution.get_ertype_display}}" disabled>
33
				</div>
34
			</div>
35
			<div class="form-group {% if form.address_street.errors %} error {% endif %}">
36
				<label class="control-label" for="id_address_street"><b>{% trans "Address Street" %}</b></label>
37
				<div class="controls">
38
					{{ form.address_street }}
39
					{% if form.address_street.errors %} <span class="help-inline"> {{ form.address_street.errors|join:", " }} </span>
40
					{% endif %} <span class="help-block"> {{ form.address_street.help_text }}</span>
41
				</div>
42
			</div>
43
			<div class="form-group {% if form.address_city.errors %} error {% endif %}">
44
				<label class="control-label" for="id_address_city"><b>{% trans "Address City" %}</b></label>
45
				<div class="controls">
46
					{{ form.address_city }}
47
					{% if form.address_city.errors %} <span class="help-inline"> {{ form.address_city.errors|join:", " }} </span>
48
					{% endif %} <span class="help-block"> {{ form.address_city.help_text }}</span>
49
				</div>
50
			</div>
51
			<div class="form-group {% if form.contact.errors %} error {% endif %}">
52
				<label class="control-label" for="id_contact"><b>{% trans "Contacts" %}</b></label>
53
				<div class="controls">
54
					<div class="">{{ form.contact }}</div>
55
					<button class="btn btn-small btn-info" id="add_contact"><i class="icon-plus-sign icon-white"></i>Add...</button>
56
					{% if form.contact.errors %} <span class="help-inline"> {{ form.ertype.contact|join:", " }} </span>
57
					{% endif %} <span class="help-block"> {{ form.contact.help_text }}</span>
58
				</div>
59
			</div>
60
		    <div class="form-group {% for err in urls_form.errors %}{% if err|length > 0 %}error{% endif %}{% endfor %}{% if urls_form.non_form_errors %}error{% endif %}">
61
		        <label class="control-label" for="id_urls"><b>{% trans "Urls" %}</b></label>
62
		        {{urls_form.management_form}}
63
		        <div class="controls">
64
		        {% if urls_form.non_form_errors %} <span class="help-inline"> {{ urls_form.non_form_errors|join:", "}}</span>{% endif %}
65
		            <table id="urlsform"><thead><tr><td>url</td><td>type</td><td>language</td></tr></thead><tbody>
66
		        {% for formset in urls_form.forms %}
67
		        {{ formset.id }}
68

  
69

  
70
		            <tr id="{{ formset.prefix }}-row">
71
		            <td> {% if formset.instance.pk %}{{ formset.DELETE }}{% endif %}{{ formset.url }}{% if formset.url.errors %}<br><div class="help-inline"> {{ formset.url.errors|join:", " }} </div>{% endif %}</td>
72
		             <td>{{formset.urltype}}{% if formset.urltype.errors %}<br><p class="help-inline"> {{ formset.urltype.errors|join:", " }} </p>{% endif %}</td>
73
		             <td>{{formset.lang}}{% if formset.lang.errors %}<br><p class="help-inline"> {{ formset.lang.errors|join:", " }} </p>{% endif %}</td>
74

  
75
		        </tr>
76
		        {% endfor %}
77
		        </tbody></table>
78
		        </div>
79
		    </div>
80
		    {% if institution.ertype == 2 or institution.ertype == 3 %}
81
			<div class="form-group {% if form.oper_name.errors %} error {% endif %}">
82
				<label class="control-label" for="id_oper_name"><b>{% trans "Domain Name" %}</b></label>
83
				<div class="controls">
84
					{{ form.oper_name }}
85
					{% if form.oper_name.errors %} <span class="help-inline"> {{ form.oper_name.errors|join:", " }} </span>
86
					{% endif %} <span class="help-block">{% autoescape off %}{{ form.oper_name.help_text }}{% endautoescape %}</span>
87
				</div>
88
			</div>
89
			{% endif %}
90
			{% if institution.ertype == 1 or institution.ertype == 3 %}
91
			<div class="form-group {% if form.number_user.errors %} error {% endif %}">
92
				<label class="control-label" for="id_number_user">{% trans "Number of Users" %}</label>
93
				<div class="controls">
94
					{{ form.number_user }}
95
					{% if form.number_user.errors %} <span class="help-inline"> {{ form.number_user.errors|join:", " }} </span>
96
					{% endif %} <span class="help-block"> {{ form.number_user.help_text }}</span>
97
				</div>
98
			</div>
99
			{% endif %}
100
			<div class="form-group {% if form.number_id.errors %} error {% endif %}">
101
				<label class="control-label" for="id_number_id">{% trans "Number of IDs" %}</label>
102
				<div class="controls">
103
					{{ form.number_id }}
104
					{% if form.number_id.errors %} <span class="help-inline"> {{ form.number_id.errors|join:", " }} </span>
105
					{% endif %} <span class="help-block"> {{ form.number_id.help_text }}</span>
106
				</div>
107
			</div>
108
			<div class="form-group">
109
				<div class="controls">
110
					<button type="submit" id="applybutton" value="Apply" class="btn btn-primary"/>{% trans "Apply" %}</button>
111
				</div>
112
			</div>
113
		</form>
114
	</div>
115
</div>
116

  
117
<div class="modal fade" id="myModal">
118
  <div class="modal-dialog">
119
    <div class="modal-content">
120
      <div class="modal-header">
121
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
122
        <h4 class="modal-title" id="myModalLabel">{% trans "Add User" %}</h4>
123
      </div>
124
      <div class="modal-body" id="mymodalbody">
125
        <p>Loading...</p>
126
      </div>
127
      <div class="modal-footer">
128
        <button type="button" class="btn btn-default" data-dismiss="modal">{% trans "Close" %}</button>
129
        <button type="button" id="adduserSubmit" class="btn btn-primary">{% trans "Save changes" %}</button>
130
      </div>
131
    </div>
132
  </div>
133
</div>
5 134

  
6
{% block crumbs %}
7
	<li><a href="{% url manage %}">{% trans "Home" %}</a><span class="divider">/</span></li>
8
	<li><a href="{% url institutions %}">{% trans "Institution" %}</a><span class="divider">/</span></li>
9
	<li class="active">{% tolocale institution LANGUAGE_CODE%} ({% trans "Edit" %})</li>
10 135
{% endblock %}
11 136

  
12
{% block extrahead %}
137
{% block extrajs %}
13 138
<script type="text/javascript" src="{% static 'js/jquery.formset.js' %}"></script>
14 139
<script type="text/javascript">
15 140
$(document).ready(function() {
......
40 165
	});
41 166

  
42 167
	$("#add_contact").click(function(){
43
	 $('#myModal').modal('show')
44
	 $.ajax({
45
			url:"{% url adduser %}",
46
			type: "GET",
47
			success: function(data){
48
				$('#mymodalbody').html(data);
168
		$('#myModal').modal('show');
169
		$.ajax({
170
				url:"{% url adduser %}",
171
				type: "GET",
172
				success: function(data){
173
					$('#mymodalbody').html(data);
49 174
				}
50 175
			});
51 176

  
......
71 196
</script>
72 197

  
73 198
{% endblock %}
74
{% block homeactive %}{% endblock %}
75
{% block instactive %}class="active"{% endblock %}
76
{% block subcontent %}
77
<h4>{% tolocale institution LANGUAGE_CODE%} {% trans "Edit" %}</h4>
78
<hr>
79
<form method="POST" class="form-horizontal">
80
	{% csrf_token %}
81
	{% if form.non_field_errors %}
82
	<p class="error">
83
		{{ form.non_field_errors}}
84
	</p>
85
	{% endif %}
86
	<div style="display: none">
87
		{{form.institution}}
88
	</div>
89
		<div class="control-group">
90
		<label class="control-label" for="id_name"><b>{% trans "Name" %}</b></label>
91
		<div class="controls">
92
			<input class="input" id="disabledInput" type="text" placeholder="{% tolocale institution LANGUAGE_CODE %}" disabled>
93
		</div>
94
	</div>
95
	<div class="control-group {% if form.ertype.errors %} error {% endif %}">
96
		<label class="control-label" for="id_ertype"><b>{% trans "Type" %}</b></label>
97
		<div class="controls">
98
			<input class="input" id="disabledInput2" type="text" placeholder="{{institution.get_ertype_display}}" disabled>
99
		</div>
100
	</div>
101
	<div class="control-group {% if form.address_street.errors %} error {% endif %}">
102
		<label class="control-label" for="id_address_street"><b>{% trans "Address Street" %}</b></label>
103
		<div class="controls">
104
			{{ form.address_street }}
105
			{% if form.address_street.errors %} <span class="help-inline"> {{ form.address_street.errors|join:", " }} </span>
106
			{% endif %} <span class="help-block"> {{ form.address_street.help_text }}</span>
107
		</div>
108
	</div>
109
	<div class="control-group {% if form.address_city.errors %} error {% endif %}">
110
		<label class="control-label" for="id_address_city"><b>{% trans "Address City" %}</b></label>
111
		<div class="controls">
112
			{{ form.address_city }}
113
			{% if form.address_city.errors %} <span class="help-inline"> {{ form.address_city.errors|join:", " }} </span>
114
			{% endif %} <span class="help-block"> {{ form.address_city.help_text }}</span>
115
		</div>
116
	</div>
117
	<div class="control-group {% if form.contact.errors %} error {% endif %}">
118
		<label class="control-label" for="id_contact"><b>{% trans "Contacts" %}</b></label>
119
		<div class="controls">
120
			{{ form.contact }} <button class="btn btn-small btn-info" id="add_contact"><i class="icon-plus-sign icon-white"></i>Add...</button>
121
			{% if form.contact.errors %} <span class="help-inline"> {{ form.ertype.contact|join:", " }} </span>
122
			{% endif %} <span class="help-block"> {{ form.contact.help_text }}</span>
123
		</div>
124
	</div>
125
    <div class="control-group {% for err in urls_form.errors %}{% if err|length > 0 %}error{% endif %}{% endfor %}{% if urls_form.non_form_errors %}error{% endif %}">
126
        <label class="control-label" for="id_urls"><b>{% trans "Urls" %}</b></label>
127
        {{urls_form.management_form}}
128
        <div class="controls">
129
        {% if urls_form.non_form_errors %} <span class="help-inline"> {{ urls_form.non_form_errors|join:", "}}</span>{% endif %}
130
            <table id="urlsform"><thead><tr><td>url</td><td>type</td><td>language</td></tr></thead><tbody>
131
        {% for formset in urls_form.forms %}
132
        {{ formset.id }}
133

  
134

  
135
            <tr id="{{ formset.prefix }}-row">
136
            <td> {% if formset.instance.pk %}{{ formset.DELETE }}{% endif %}{{ formset.url }}{% if formset.url.errors %}<br><div class="help-inline"> {{ formset.url.errors|join:", " }} </div>{% endif %}</td>
137
             <td>{{formset.urltype}}{% if formset.urltype.errors %}<br><p class="help-inline"> {{ formset.urltype.errors|join:", " }} </p>{% endif %}</td>
138
             <td>{{formset.lang}}{% if formset.lang.errors %}<br><p class="help-inline"> {{ formset.lang.errors|join:", " }} </p>{% endif %}</td>
139

  
140
        </tr>
141
        {% endfor %}
142
        </tbody></table>
143
        </div>
144
    </div>
145
    {% if institution.ertype == 2 or institution.ertype == 3 %}
146
	<div class="control-group {% if form.oper_name.errors %} error {% endif %}">
147
		<label class="control-label" for="id_oper_name"><b>{% trans "Domain Name" %}</b></label>
148
		<div class="controls">
149
			{{ form.oper_name }}
150
			{% if form.oper_name.errors %} <span class="help-inline"> {{ form.oper_name.errors|join:", " }} </span>
151
			{% endif %} <span class="help-block">{% autoescape off %}{{ form.oper_name.help_text }}{% endautoescape %}</span>
152
		</div>
153
	</div>
154
	{% endif %}
155
	{% if institution.ertype == 1 or institution.ertype == 3 %}
156
	<div class="control-group {% if form.number_user.errors %} error {% endif %}">
157
		<label class="control-label" for="id_number_user">{% trans "Number of Users" %}</label>
158
		<div class="controls">
159
			{{ form.number_user }}
160
			{% if form.number_user.errors %} <span class="help-inline"> {{ form.number_user.errors|join:", " }} </span>
161
			{% endif %} <span class="help-block"> {{ form.number_user.help_text }}</span>
162
		</div>
163
	</div>
164
	{% endif %}
165
	<div class="control-group {% if form.number_id.errors %} error {% endif %}">
166
		<label class="control-label" for="id_number_id">{% trans "Number of IDs" %}</label>
167
		<div class="controls">
168
			{{ form.number_id }}
169
			{% if form.number_id.errors %} <span class="help-inline"> {{ form.number_id.errors|join:", " }} </span>
170
			{% endif %} <span class="help-block"> {{ form.number_id.help_text }}</span>
171
		</div>
172
	</div>
173
	<div class="control-group">
174
		<div class="controls">
175
			<button type="submit" id="applybutton" value="Apply" class="btn btn-primary"/>{% trans "Apply" %}</button>
176
		</div>
177
	</div>
178
</form>
179
<div class="modal hide fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
180
<div class="modal-header">
181
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
182
<h3 id="myModalLabel">{% trans "Add User" %}</h3>
183
</div>
184
<div class="modal-body" id="mymodalbody">
185

  
186
</div>
187
<div class="modal-footer">
188
<button class="btn" data-dismiss="modal" aria-hidden="true">{% trans "Close" %}</button>
189
<a class="btn btn-primary" id="adduserSubmit" href="#">{% trans "Save changes" %}</a>
190
</div>
191
</div>
192
{% endblock %}
193

  
b/djnro/templates/edumanage/instrealmmon_edit.html
17 17

  
18 18
{% block homeactive %}{% endblock %}
19 19
{% block instrealmmon %}class="active"{% endblock %}
20
{% block subcontent %} <h4>{% if edit %}Monitored realm: {{form.instance.realm}} ({% trans "edit" %}){% else %}{% trans "Add Monitored Realm" %}{% endif %}</h4>
20
{% block management_content %}
21
 <h4>{% if edit %}Monitored realm: {{form.instance.realm}} ({% trans "edit" %}){% else %}{% trans "Add Monitored Realm" %}{% endif %}</h4>
21 22
<hr>
22 23
<form method="POST" class="form-horizontal">
23 24
	{% csrf_token %}
b/djnro/templates/edumanage/instrealmmons.html
128 128

  
129 129
    		{% block homeactive %}{% endblock %}
130 130
    		{% block instrealmmon %}class="active"{% endblock %}
131
            {% block subcontent %}
131
            {% block management_content %}
132 132

  
133 133
	              <h4>{% trans "Monitored Realms" %}</h4>
134 134
	              <hr>
b/djnro/templates/edumanage/monlocauthpar_edit.html
24 24

  
25 25
{% block homeactive %}{% endblock %}
26 26
{% block instrealmmon %}class="active"{% endblock %}
27
{% block subcontent %} <h4>{% if edit %}{{realm.realm}} parameters ({% trans "edit" %}){% else %}{% trans "Add Monitored Realm Parameters" %} ({{realm.realm}}){% endif %}</h4>
27
{% block management_content %}
28
 <h4>{% if edit %}{{realm.realm}} parameters ({% trans "edit" %}){% else %}{% trans "Add Monitored Realm Parameters" %} ({{realm.realm}}){% endif %}</h4>
28 29
<hr>
29 30
<form method="POST" class="form-horizontal">
30 31
	{% csrf_token %}
b/djnro/templates/edumanage/realms.html
92 92

  
93 93
    		{% block homeactive %}{% endblock %}
94 94
    		{% block realmsactive %}class="active"{% endblock %}
95
            {% block subcontent %}
95
		{% block management_content %}
96 96

  
97 97

  
98 98
	              <h4>Realms</h4>
b/djnro/templates/edumanage/realms_edit.html
15 15

  
16 16
{% block homeactive %}{% endblock %}
17 17
{% block realmsactive %}class="active"{% endblock %}
18
{% block subcontent %}<h4>{% if edit %}{{form.instance.realm}} ({% trans "edit" %}){% else %}{% trans "Add Realm" %}{% endif %}</h4>
18
{% block management_content %}
19

  
20
<h4>{% if edit %}{{form.instance.realm}} ({% trans "edit" %}){% else %}{% trans "Add Realm" %}{% endif %}</h4>
19 21
<hr>
20 22
{% if messages %}
21 23
	<table class="table table-condensed">
b/djnro/templates/edumanage/server_details.html
15 15
{% endblock %}
16 16
{% block homeactive %}{% endblock %}
17 17
{% block serversactive %}class="active"{% endblock %}
18
{% block subcontent %} <h4>{{server.get_name}}</h4>
18
{% block management_content %}
19

  
20
 <h4>{{server.get_name}}</h4>
19 21
<hr>
20 22
<div class="form-horizontal">
21 23
	{% csrf_token %}
......
90 92
    </div>
91 93
</div>
92 94
{% endblock %}
93
         
95

  
b/djnro/templates/edumanage/servers.html
99 99

  
100 100
    		{% block homeactive %}{% endblock %}
101 101
    		{% block serversactive %}class="active"{% endblock %}
102
            {% block subcontent %}
102
            {% block management_content %}
103 103

  
104 104

  
105 105
	              <h4>{% trans "Servers" %}</h4>
b/djnro/templates/edumanage/servers_edit.html
21 21
{% endblock %}
22 22
{% block homeactive %}{% endblock %}
23 23
{% block serversactive %}class="active"{% endblock %}
24
{% block subcontent %} <h4>{% if edit %}{{form.instance.get_name}} ({% trans "edit" %}){% else %}{% trans "Add Server" %}{% endif %}</h4>
24
{% block management_content %}
25

  
26
<h4>{% if edit %}{{form.instance.get_name}} ({% trans "edit" %}){% else %}{% trans "Add Server" %}{% endif %}</h4>
25 27
<hr>
26 28
<form method="POST" class="form-horizontal">
27 29
	{% csrf_token %}
b/djnro/templates/edumanage/service_details.html
94 94

  
95 95
{% block homeactive %}{% endblock %}
96 96
{% block servicesactive %}class="active"{% endblock %}
97
{% block subcontent %}
97
{% block management_content %}
98

  
98 99

  
99 100
<h4>{% tolocale service LANGUAGE_CODE %}</h4>
100 101
<hr>
b/djnro/templates/edumanage/services.html
1 1
{% extends "edumanage/welcome.html"%}
2 2
{% load i18n %}
3 3
{% load staticfiles %}
4
{% load tolocale %}
4 5

  
5
{% block crumbs %}
6
<li><a href="{% url manage %}">{% trans "Home" %}</a><span class="divider">/</span></li>
7
<li class="active">{% trans "Locations" %}</li>
8
{% endblock %}
9
{% block extrahead %}
10
<script type="text/javascript" src="{% static 'js/jquery.dataTables.min.js' %}"></script>
11
<script type="text/javascript" src="{% static 'js/datatables_bootstrap.js' %}"></script>
12
<script type="text/javascript">
13
$(document).ready(function(){
14
	 {% if services %}
15
var oTable = $('#table').dataTable({
16
	"sPaginationType": "bootstrap",
17
	"sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
18
	"aoColumns": [{
19
        "bSearchable": true,
20
        "bSortable": true
21
    }, {
22
        "bSearchable": true,
23
        "bSortable": true
24
    }, {
25
        "bSearchable": true,
26
        "bSortable": true
27
    }, {
28
        "bSearchable": true,
29
        "bSortable": true
30
    }, {
31
        "bSearchable": true,
32
        "bSortable": true
33
    }, {
34
        "bVisible": true,
35
        "bSearchable": false,
36
        "bSortable": false
37
    }],
38
    "aaSorting": [[0, 'desc']],
39
    "iDisplayLength": 25,
40
    "oSearch": {"bSmart": false, "bRegex":true},
41
    "oLanguage": {
42
    	"sLengthMenu": '{% trans "Display" %} <select><option value="25">25</option><option value="50">50</option><option value="-1">{% trans "All" %}</option></select> {% trans "locations" %}',
43
        "sProcessing":   "Processing...",
44
        "sZeroRecords": '{% trans "No records to display" %}',
45
        "sInfo":         "Showing _START_ to _END_ of _TOTAL_ entries",
46
        "sInfoEmpty":    "{% trans "Showing 0 to 0 of 0 entries" %}",
47
        "sInfoFiltered": "(filtered from _MAX_ total entries)",
48
        "sInfoPostFix":  "",
49
        "sSearch":       '{% trans "Search:" %}',
50
        "sUrl":          "",
51
        "oPaginate": {
52
            "sFirst":    '{% trans "First" %}',
53
            "sPrevious": '{% trans "Previous" %}',
54
            "sNext":     '{% trans "Next" %}',
55
            "sLast":     '{% trans "Last" %}'
56
        }
57
    }
58
});
59

  
60
oTable.fnDraw();
61
$('[id^=del_service_]').click(function(){
62
	server_id = (this.id).replace("del_service_", '');
63
	name = this.getAttribute("data-servicename");
64
	$("#mymodalbody").html("{% trans 'You are about to delete location' %}: <b>"+name+"</b><br>{% trans 'Press Delete to proceed or Cancel to cancel deletion' %}");
65
	$("#myModalLabel").html("{% trans 'Delete Location' %} "+name);
66
	$('#myModal').modal('show');
67
	$(".modal-footer").show();
68
	$("#service_name_del").html(name)
69
	return false;
70
});
6
{% block homeactive %}{% endblock %}
7
{% block servicesactive %}class="active"{% endblock %}
71 8

  
72
$("#delserviceSubmit").click(function(){
73
	$.ajax({
74
		url:"{% url del-service %}/?service_pk="+server_id,
75
		type: "GET",
76
		success: function(data){
77
			if (data.error){
78
				$(".modal-footer").hide();
79
				$("#mymodalbody").html("<font style='color:#B94A48'>"+data.error+"</font>");
80
			}
81
			if (data.success){
82
				$(".modal-footer").hide();
83
				$("#mymodalbody").html("{% trans 'Service' %} "+name+" {% trans 'successfully deleted' %}");
84
				window.setTimeout('location.reload()', 1000);
85

  
86
			}
87
			}
88
		});
89
});
90
{% endif %}
91
});
92
</script>
9
{% block extrahead %}
10
<link href="https://cdn.datatables.net/plug-ins/1.10.7/integration/bootstrap/3/dataTables.bootstrap.css" rel="stylesheet">
93 11
{% endblock %}
94
			{% block homeactive %}{% endblock %}
95
    		{% block servicesactive %}class="active"{% endblock %}
96
            {% block subcontent %}
97
              <h4>{% trans "Locations" %}</h4>
98
              <hr>
99
              {% if messages %}
100
	                <table class="table table-condensed">
101 12

  
102
					    {% for message in messages %}
103
					    <tr {% if message.tags %} class="{{ message.tags }}"{% endif %}><td>{{ message }}<td></tr>
104
					    {% endfor %}
105
					</table>
106
			  {% endif %}
107
              <div>{% if institution.ertype == 2 or institution.ertype == 3 %}<a href="{% url edit-services %}" class="btn btn-primary">{% trans "Add location" %}</a>{% endif %}</div>
108
	              <div class="span10"></div>
109
              {% load tolocale %}
110
              {% if institution.ertype == 2 or institution.ertype == 3 %}
111
              {% if services %}
112
               <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" width="100%" id="table">
113
	               <thead>
114
					<tr>
13
{% block management_content %}
14
		<h4>{% trans "Locations" %}</h4>
15
		<hr>
16
		{% if messages %}
17
			<table class="table table-condensed">
18
			{% for message in messages %}
19
				<tr {% if message.tags %} class="{{ message.tags }}"{% endif %}><td>{{ message }}<td></tr>
20
			{% endfor %}
21
			</table>
22
		{% endif %}
23
		<div>
24
			{% if institution.ertype == 2 or institution.ertype == 3 %}
25
				<a href="{% url edit-services %}" class="btn btn-primary">
26
					{% trans "Add location" %}
27
				</a>
28
			{% endif %}
29
		</div>
30
{% if institution.ertype == 2 or institution.ertype == 3 %}
31
	{% if services %}
32
		<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" width="100%" id="table">
33
			<thead>
34
				<tr>
115 35
					<th>{% trans "Name" %}</th>
116 36
					<th>{% trans "Address" %}</th>
117 37
					<th>{% trans "SSID" %}</th>
118 38
					<th>{% trans "Encryption Level" %}</th>
119 39
					<th>{% trans "AP no" %}</th>
120 40
					<th>{% trans "Actions" %}</th>
121
					</tr>
122
					</thead>
123
					<tbody>
124
	                {% for service in services %}
125
	              	<tr class="GradeC">
126
	                	<td><a href="{% url services service.pk %}">{% tolocale service LANGUAGE_CODE %}</a></td>
127
	                	<td>{{service.address_street}}<br>{{service.address_city}}</td>
128
	                	<td>{{service.SSID}}</td>
129
                        <td>{% for enc in service.enc_level %}{% if enc == '' %}-{% else %}{{enc}}{% if not forloop.last%},{% endif %}{% endif %}{% endfor %}</td>
130
	                	<td>{{service.AP_no}}</td>
131
	                	<td style="text-align: center;"><a href="{% url edit-services service.pk %}" class="btn btn-small">{% trans "edit" %}</a> <a href="#" id="del_service_{{service.pk}}" data-servicename="{% tolocale service LANGUAGE_CODE%}" class="btn btn-small btn-warning">{% trans "delete" %}</a></td>
132
	                </tr>
133
	              	{% endfor %}
134
	              	</tbody>
135
	              </table>
136
	              {% endif %}
137
              {% endif %}
138
<div class="modal hide fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
139
<div class="modal-header">
140
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
141
<h3 id="myModalLabel">{% trans "Delete Location" %}</h3>
142
</div>
143
<div class="modal-body" id="mymodalbody">
41
				</tr>
42
			</thead>
43
			<tbody>
44
			{% for service in services %}
45
		    	<tr class="GradeC">
46
		        	<td><a href="{% url services service.pk %}">{% tolocale service LANGUAGE_CODE %}</a></td>
47
		        	<td>{{service.address_street}}<br>{{service.address_city}}</td>
48
		        	<td>{{service.SSID}}</td>
49
		            <td>{% for enc in service.enc_level %}{% if enc == '' %}-{% else %}{{enc}}{% if not forloop.last%},{% endif %}{% endif %}{% endfor %}</td>
50
		        	<td>{{service.AP_no}}</td>
51
		        	<td style="text-align: center;"><a href="{% url edit-services service.pk %}" class="btn btn-small">{% trans "edit" %}</a> <a href="#" id="del_service_{{service.pk}}" data-servicename="{% tolocale service LANGUAGE_CODE%}" class="btn btn-small btn-warning">{% trans "delete" %}</a></td>
52
		        </tr>
53
			{% endfor %}
54
			</tbody>
55
		</table>
56
	    {% endif %}
57
	{% endif %}
144 58

  
145
</div>
146
<div class="modal-footer">
147
<button class="btn" data-dismiss="modal" aria-hidden="true">{% trans "Cancel" %}</button>
148
<a class="btn btn-warning" id="delserviceSubmit" href="#">{% trans "Delete" %}</a>
149
</div>
59
<div class="modal" id="myModal">
60
	<div class="modal-dialog">
61
    	<div class="modal-content">
62
			<div class="modal-header">
63
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
64
				<h3 id="myModalLabel">{% trans "Delete Location" %}</h3>
65
			</div>
66
			<div class="modal-body" id="mymodalbody">
67
			</div>
68
			<div class="modal-footer">
69
			<button class="btn" data-dismiss="modal" aria-hidden="true">{% trans "Cancel" %}</button>
70
			<a class="btn btn-warning" id="delserviceSubmit" href="#">{% trans "Delete" %}</a>
71
			</div>
72
		</div>
73
	</div>
150 74
</div>
151 75

  
152
<div class="modal hide fade" id="servDets" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
153
<div class="modal-header">
154
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
155
<h3 id="myModalLabelservdets">{% trans "Location Details" %}</h3>
76
<div class="modal" id="servDets">
77
	<div class="modal-dialog">
78
    	<div class="modal-content">
79
			<div class="modal-header">
80
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
81
				<h3 id="myModalLabelservdets">{% trans "Location Details" %}</h3>
82
			</div>
83
			<div class="modal-body" id="servDetsbody">
84
			</div>
85
			<div class="modal-footer">
86
				<button class="btn" data-dismiss="modal" aria-hidden="true">{% trans "Close" %}</button>
87
			</div>
88
		</div>
89
	</div>
156 90
</div>
157
<div class="modal-body" id="servDetsbody">
91
{% endblock %}
158 92

  
159
</div>
160
<div class="modal-footer">
161
<button class="btn" data-dismiss="modal" aria-hidden="true">{% trans "Close" %}</button>
162
</div>
163
</div>
164
		{% endblock %}
93

  
94
{% block extrajs %}
95
<script type="text/javascript" src="//cdn.datatables.net/1.10.7/js/jquery.dataTables.min.js"></script>
96
<script type="text/javascript" src="//cdn.datatables.net/plug-ins/505bef35b56/integration/bootstrap/1/dataTables.bootstrap.js"></script>
97
<script type="text/javascript">
98
$(document).ready(function(){
99
	{% if services %}
100
	var oTable = $('#table')
101
	.on( 'init.dt', function () {
102
       	$('.pagination ul').addClass('pagination');
103
    })
104
    .dataTable({
105
		"sPaginationType": "bootstrap",
106
		"sDom": "<'row'<'col-sm-6'l><'col-sm-6'f>r>t<'row'<'col-sm-6'i><'col-sm-6'p>>",
107
		"aoColumns": [{
108
	        "bSearchable": true,
109
	        "bSortable": true
110
	    },
111
	    {
112
	        "bSearchable": true,
113
	        "bSortable": true
114
	    },
115
	    {
116
	        "bSearchable": true,
117
	        "bSortable": true
118
	    },
119
	    {
120
	        "bSearchable": true,
121
	        "bSortable": true
122
	    },
123
	    {
124
	        "bSearchable": true,
125
	        "bSortable": true
126
	    },
127
	    {
128
	        "bVisible": true,
129
	        "bSearchable": false,
130
	        "bSortable": false
131
	    }],
132
	    "aaSorting": [[0, 'desc']],
133
	    "iDisplayLength": 25,
134
	    "oSearch": {"bSmart": false, "bRegex":true},
135
	    "oLanguage": {
136
	    	"sLengthMenu": '{% trans "Display" %} <select><option value="25">25</option><option value="50">50</option><option value="-1">{% trans "All" %}</option></select> {% trans "locations" %}',
137
	        "sProcessing":   "Processing...",
138
	        "sZeroRecords": '{% trans "No records to display" %}',
139
	        "sInfo":         "Showing _START_ to _END_ of _TOTAL_ entries",
140
	        "sInfoEmpty":    "{% trans "Showing 0 to 0 of 0 entries" %}",
141
	        "sInfoFiltered": "(filtered from _MAX_ total entries)",
142
	        "sInfoPostFix":  "",
143
	        "sSearch":       '{% trans "Search:" %}',
144
	        "sUrl":          "",
145
	        "oPaginate": {
146
	            "sFirst":    '{% trans "First" %}',
147
	            "sPrevious": '{% trans "Previous" %}',
148
	            "sNext":     '{% trans "Next" %}',
149
	            "sLast":     '{% trans "Last" %}'
150
	        }
151
	    }
152
	});
153

  
154
	oTable.fnDraw();
155
	$('[id^=del_service_]').click(function(){
156
		server_id = (this.id).replace("del_service_", '');
157
		name = this.getAttribute("data-servicename");
158
		$("#mymodalbody").html("{% trans 'You are about to delete location' %}: <b>"+name+"</b><br>{% trans 'Press Delete to proceed or Cancel to cancel deletion' %}");
159
		$("#myModalLabel").html("{% trans 'Delete Location' %} "+name);
160
		$('#myModal').modal('show');
161
		$(".modal-footer").show();
162
		$("#service_name_del").html(name)
163
		return false;
164
	});
165

  
166
	$("#delserviceSubmit").click(function(){
167
		$.ajax({
168
			url:"{% url del-service %}/?service_pk="+server_id,
169
			type: "GET",
170
			success: function(data){
171
				if (data.error){
172
					$(".modal-footer").hide();
173
					$("#mymodalbody").html("<font style='color:#B94A48'>"+data.error+"</font>");
174
				}
175
				if (data.success){
176
					$(".modal-footer").hide();
177
					$("#mymodalbody").html("{% trans 'Service' %} "+name+" {% trans 'successfully deleted' %}");
178
					window.setTimeout('location.reload()', 1000);
179

  
180
				}
181
				}
182
			});
183
	});
184
	{% endif %}
185
});
186
</script>
187
{% endblock %}
b/djnro/templates/edumanage/services_edit.html
331 331

  
332 332
{% block homeactive %}{% endblock %}
333 333
{% block servicesactive %}class="active"{% endblock %}
334
{% block subcontent %}
334
{% block management_content %}
335 335

  
336 336
<h4>{% if edit %}{% tolocale form.instance LANGUAGE_CODE %} ({% trans "edit" %}){% else %}{% trans "Add Location" %}{% endif %}</h4>
337 337
<hr>
b/djnro/templates/edumanage/welcome.html
3 3
{% load staticfiles %}
4 4

  
5 5
{% block currentpagetitle %}Management{% endblock %}
6
{% block manage %}active{% endblock %}
6 7

  
7
{% block extrahead %} <script type="text/javascript" src="{% static 'js/jquery.min.js' %}"></script %}>
8
<script type="text/javascript" src="{% static 'js/markerclusterer.js' %}"></script>
9
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=false"></script>
10
<script type="text/javascript">
11
	var lat = "{{MAP_CENTER.0}}";
12
	var lat = parseFloat(lat.replace(",","."));
13
	var lng = "{{MAP_CENTER.1}}";
14
	var lng = parseFloat(lng.replace(",","."));
15
	var zoomLevel = 6;
16
	var latlng = new google.maps.LatLng(lat,lng);
17
	var map = '';
18
	var bounds = '';
19
	var image = '';
20
	var infoWindow;
21

  
22
var styles = [{
23
	url: '{% static 'img/edugroup.png' %}',
24
	height: 54,
25
	width: 63,
26
	textColor: '#ffffff',
27
	textSize: 11
28
	},
29
	{
30
	url: '{% static 'img/edugroup.png' %}',
31
	height: 54,
32
	width: 63,
33
	textColor: '#ffffff',
34
	textSize: 11
35
	},
36
	{
37
	url: '{% static 'img/edugroup.png' %}',
38
	height: 54,
39
	width: 63,
40
	textColor: '#ffffff',
41
	textSize: 11
42
}];
43

  
44
function initialize() {
45
	image = new google.maps.MarkerImage('{% static 'img/edupin.png' %}',
46
	// This marker is 29 pixels wide by 40 pixels tall.
47
	new google.maps.Size(29, 40),
48
	// The origin for this image is 0,0.
49
	new google.maps.Point(0,0),
50
	// The anchor for this image is the base of the flagpole at 18,42.
51
	new google.maps.Point(14, 40)
52
);
53
var styleArray = [
54
{
55
	featureType: "all",
56
	stylers: [
57
	{ saturation: -60 },
58
	{gamma: 1.00 }
59
	]
60
	},{
61
	featureType: "poi.business",
62
	elementType: "labels",
63
	stylers: [
64
	{ visibility: "off" }
65
	]
66
	},
67
	{ "featureType": "transit.line", "elementType": "geometry", "stylers": [ { "visibility": "off" } ] },
68
	{ "featureType": "poi", "elementType": "all", "stylers": [ { "visibility": "off" } ] },
69
	{'featureType': "administrative.country",
70
	'elementType': "labels",
71
	'stylers': [
72
	{ 'visibility': "off" }
73
	]}
74

  
75
];
76
var mapOptions = {
77
	center : latlng,
78
	zoom : zoomLevel,
79
	mapTypeId : google.maps.MapTypeId.ROADMAP,
80
	styles: styleArray,
81
	mapTypeId: google.maps.MapTypeId.ROADMAP,
82
	mapTypeControlOptions: {
83
	style: google.maps.MapTypeControlStyle.DEFAULT
84
	},
85
	navigationControl: true,
86
	mapTypeControl: false,
87
	};
88
	map = new google.maps.Map(document.getElementById("map_canvas"),
89
	mapOptions);
90

  
91
	bounds = new google.maps.LatLngBounds();
92
	infoWindow = new google.maps.InfoWindow();
93

  
94
}
95

  
96

  
97
function placeMarkers(){
98
var markers = new Array();
99
$.get("{% url get-service-points %}", function(data){
100
	$.each(data, function(index, jsonMarker) {
101
	var marker = createMarker(jsonMarker);
102
	if (marker){
103
	bounds.extend(marker.position);
104
	markers.push(marker);
105
	google.maps.event.addListener(marker, 'click', function() {
106
		infoWindow.setContent( "<div><h4>"+jsonMarker.name+"</h4>"+
107

  
108
	"<div class='tabbable'>"+
109
    "<ul class='nav nav-tabs'>"+
110
    "<li class='active'><a href='#tab1' data-toggle='tab'>{% trans 'Info' %}</a></li>"+
111
    "<li><a href='#tab2' data-toggle='tab'>{% trans 'More...' %}</a></li>"+
112
    "</ul>"+
113
    "<div class='tab-content'>"+
114
    "<div class='tab-pane active' id='tab1'>"+
115
    "<dl class='dl-horizontal'>"+
116
			"<dt>Name</dt><dd>"+jsonMarker.name+"&nbsp;</dd>"+
117
			"<dt>Address</dt><dd>"+jsonMarker.address+"&nbsp;</dd>"+
118
			"<dt>Encryption</dt><dd>"+jsonMarker.enc+"&nbsp;</dd>"+
119
			"<dt>SSID</dt><dd>"+jsonMarker.SSID+"&nbsp;</dd>"+
120
			"<dt>Number of APs</dt><dd>"+jsonMarker.AP_no+"&nbsp;</dd></dl>"+
121
    "</div>"+
122
    "<div class='tab-pane' id='tab2'>"+
123
    "<dl class='dl-horizontal'>"+
124
			"<dt>Port Restrict</dt><dd>"+jsonMarker.port_restrict+"&nbsp;</dd>"+
125
			"<dt>transp_proxy</dt><dd>"+jsonMarker.transp_proxy+"&nbsp;</dd>"+
126
			"<dt>IPv6</dt><dd>"+jsonMarker.IPv6+"&nbsp;</dd>"+
127
			"<dt>NAT</dt><dd>"+jsonMarker.NAT+"&nbsp;</dd>"+
128
			"<dt>Wired</dt><dd>"+jsonMarker.wired+"&nbsp;</dd></dl>"+
129
    "</div>"+
130
    "</div>"+
131
    "</div>"+
132
    "<div style='text-align:right;'><a href = '{% url edit-services  %}"+jsonMarker.key+"' class='btn btn-primary'>Edit</a></div>"+
133
    "</div>");
134
		infoWindow.open(map,marker);
135
     });
136
	}
137
	});
138
	var mcOptions = {gridSize: 50, maxZoom: 15, styles: styles};
139

  
140

  
141

  
142
	var markerCluster = new MarkerClusterer(map, markers, mcOptions);
143
	map.fitBounds(bounds)
144
	});
145
	}
146

  
147
	function createMarker(markerObj){
148
	var title = markerObj.name;
149
	var latLng = new google.maps.LatLng(markerObj.lat, markerObj.lng);
150
	var marker = new google.maps.Marker({
151
	'position' : latLng,
152
	'map' : map,
153
	'title': title,
154
	'icon': image,
155
	});
156
	return marker;
157
	}
158

  
159
	function clusterMarkers(markers){
160
	var markerCluster = new MarkerClusterer(map, markers);
161
	}
162

  
163
	$(document).ready(function() {
164
{% if services %}
165
	initialize();
166
	marks = placeMarkers();
167
	clusterMarkers(marks);
168
{% endif %}});</script>
169
{% endblock %}
170 8
{% block headtitle %}eduroam@Greece admin{% endblock %}
171
    {% block topmenu %}
172
    <ul class="nav">
173
        <li>
174
        	{% load tolocale %}
175
           <a class="brand" href="{% url manage %}" style="font-size: 14px;">{% if institution_exists %}{% tolocale institution LANGUAGE_CODE %}{% else %}Management{% endif %}</a>
176
        </li>
177

  
178 9

  
179
    </ul>
180
    {% endblock %}
181 10
{% block content %}
182
<div class="container-fluid">
183
	<div class="row-fluid">
184
		<div class="span2"></div>
185
		<div class="span10">
186
			<div class="row-fluid"><div class="span12">
187
				<ul class="breadcrumb" style="display: inline-table; padding: 0">
188
					{% block crumbs %}
189
	    			<li class="active">{% trans "Home" %}</li>
190
	    			{% endblock %}
191
	    		</ul>
192
			<p class="pull-right"><strong>{{user}}</strong> (<a href="{% url logout %}">{% trans "Logout" %}</a>)</p>
193
			</div></div>
11
<div class="row" style="margin: 0">
12
	<div class="col-md-2">
13
		<div class="push-top"></div>
14
		<div class="well sidebar-nav">
15
			<ul class="nav nav-list">
16
				<li {% block homeactive %}class="active"{% endblock %}>
17
					<a href="{% url manage %}">{% trans "Home" %}</a>
18
				</li>
19
				{% if institution_exists %}
20
				<li {% block instactive %}{% endblock %}>
21
					<a href="{% url institutions %}">{% trans "Institution" %} {% if not institutiondetails %}<font style="color: red; font-weight: bold; font-size: 14px;">(!)</font>{% endif %}</a>
22
				</li>
23
				{% endif %}
24
				{% if institutiondetails %}
25
				<li {% block servicesactive %}{% endblock %}>
26
					<a href="{% url services %}">{% trans "Locations" %} ({{services_num}})</a>
27
				</li>
28
				<li {% block serversactive %}{% endblock %}>
29
					<a href="{% url servers %}">{% trans "Servers" %} ({{servers_num}})</a>
30
				</li>
31
				<li {% block realmsactive %}{% endblock %}>
32
					<a href="{% url realms %}">{% trans "Realms" %} ({{realms_num}})</a>
33
				</li>
34
				<li {% block instrealmmon %}{% endblock %}>
35
					<a href="{% url instrealmmon %}">{% trans "Monitored Realms" %} ({{monrealms_num}})</a>
36
				</li>
37
				<li {% block contactsactive %}{% endblock %}>
38
					<a href="{% url contacts %}">{% trans "Contacts" %} ({{contacts_num}})</a>
39
				</li>
40
				{% if CAT_INSTANCES %}
41
				<li {% block catactive %}{% endblock %}>
42
					<a href="{% url catenroll %}">{% trans "eduroam CAT" %}</a>
43
				</li>
44
				{% endif %}
45

  
46
				{% endif %}
47
			</ul>
194 48
		</div>
195 49
	</div>
196
	<div class="row-fluid">
197
		<div class="span2">
198
			<div class="well sidebar-nav">
199
				<ul class="nav nav-list">
200
					<li {% block homeactive %}class="active"{% endblock %}>
201
						<a href="{% url manage %}">{% trans "Home" %}</a>
202
					</li>
203
					{% if institution_exists %}
204
					<li {% block instactive %}{% endblock %}>
205
						<a href="{% url institutions %}">{% trans "Institution" %} {% if not institutiondetails %}<font style="color: red; font-weight: bold; font-size: 14px;">(!)</font>{% endif %}</a>
206
					</li>
207
					{% endif %}
208
					{% if institutiondetails %}
209
					<li {% block servicesactive %}{% endblock %}>
210
						<a href="{% url services %}">{% trans "Locations" %} ({{services_num}})</a>
211
					</li>
212
					<li {% block serversactive %}{% endblock %}>
213
						<a href="{% url servers %}">{% trans "Servers" %} ({{servers_num}})</a>
214
					</li>
215
					<li {% block realmsactive %}{% endblock %}>
216
						<a href="{% url realms %}">{% trans "Realms" %} ({{realms_num}})</a>
217
					</li>
218
					<li {% block instrealmmon %}{% endblock %}>
219
						<a href="{% url instrealmmon %}">{% trans "Monitored Realms" %} ({{monrealms_num}})</a>
220
					</li>
221
					<li {% block contactsactive %}{% endblock %}>
222
						<a href="{% url contacts %}">{% trans "Contacts" %} ({{contacts_num}})</a>
223
					</li>
224
					{% if CAT_INSTANCES %}
225
					<li {% block catactive %}{% endblock %}>
226
						<a href="{% url catenroll %}">{% trans "eduroam CAT" %}</a>
227
					</li>
228
					{% endif %}
50
	<div class="col-lg-10">
51
		 <div class="row">
52
			<div class="col-md-12">
53
			{% block management_content %}
54
			{% if not institution_exists %}
55
		                <table class="table table-condensed">
56
				    <tr class="error"><td>You are not associated with any institution. Please contact your administrator<td></tr>
57
				</table>
58
			{% else %}
59
				<h4>{% trans "Home" %} - {% trans "Service Locations" %} </h4>
60
	              		<hr>
61
				{% if services %}
62
					<div id="map_canvas" data-group="{% static 'img/edugroup.png' %}" data-pin="{% static 'img/edupin.png' %}" data-center-lat="{{MAP_CENTER.0}}" data-center-lng="{{MAP_CENTER.1}}" data-service="{% url get-service-points %}" data-service-edit="{% url edit-services  %}" style="width:100%; height:450px;"></div>
63
				{% else %}
64
					<div>
65
						{% if institutiondetails %}
66
							{% trans "No services defined yet"%}!
67
							<a href="{% url edit-services %}" class="btn btn-primary">
68
								{% trans "Add new service" %}
69
							</a>
70
						{% else %}
71
							Specify your institution details to proceed <a class="btn btn-small btn-primary" href="{% url edit-institution institution.pk %}">{% trans "Edit" %}</a>
72
						{% endif %}
73
					</div>
74
				{% endif %}
75
			{% endif %}
76
			{% endblock %}
77
			</div>
78
		</div>
79
	</div>
80
</div>
229 81

  
230
					{% endif %}
231
				</ul>
232
			</div><!--/.well -->
233
		</div><!--/span-->
234
		<div class="span10">
235
			<div class="row-fluid">
236
				<!--/span-->
237
				<div class="span12">
238
				{% if not institution_exists %}
239
	                <table class="table table-condensed">
240
					    <tr class="error"><td>You are not associated with any institution. Please contact your administrator<td></tr>
241
					</table>
242
				  {% endif %}
243
				  {% if institution_exists %}
244
					{% block subcontent %}
245 82

  
83
{% endblock %}
246 84

  
247
					<h4>{% trans "Home" %} - {% trans "Service Locations" %} - {% tolocale institution LANGUAGE_CODE %}</h4>
248
              		<hr>
249
					{% if services %} <div id="map_canvas" style="width:100%; height:450px;"></div>
250
					{% else %}
251
					<div>{% if institutiondetails %}{% trans "No services defined yet"%}! <a href="{% url edit-services %}" class="btn btn-primary">{% trans "Add new service" %}</a>{% else %}Specify your institution details to proceed <a class="btn btn-small btn-primary" href="{% url edit-institution institution.pk %}">{% trans "Edit" %}</a>{% endif %}</div>
252
					{% endif %}
253 85

  
254
					{% endblock %}{% endif %}
255
				</div><!--/span-->
256
				<!--/span-->
257
			</div><!--/row-->
258
		</div><!--/span-->
259
	</div><!--/row-->
260
</div><!--/.fluid-container-->
86
{% block extrajs %}
87
<script type="text/javascript" src="{% static 'js/markerclusterer.js' %}"></script>
88
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=false"></script>
89
<script type="text/javascript" src="{% static 'js/management-map.js' %}"></script>
261 90
{% endblock %}
b/djnro/templates/registration/select_institution.html
1 1
{% extends "base.html" %}
2 2
{% load i18n %}
3
    {% block topmenu %}
4
    <ul class="nav">
5
        <li>
6
            <a href="{% url index %}">{% trans "Home" %}</a>
7
        </li>
8
        <li>
9
            <a href="/faq/{{LANGUAGE_CODE}}/">FAQ</a>
10
        </li>
11
        {% include "front/management_dropdown.html" %}
12
    </ul>
13
    {% endblock %}
14
{% block content %}
15
<div class="container-fluid">
16 3

  
17
    <div class="row-fluid">
18
        <div class="span2">
19
        </div><!--/span-->
20
        <div class="span10">
21
            <div class="row-fluid">
22
                <!--/span-->
23
                <div class="span10">
24
                <h4>Select your institution</h4>
25
<hr>
26
<div class="span1"></div>
27
<div class="span7">
28
Excellent! You are a click away from getting into your institution eduroam management.
29
Select your institution to proceed. Our administrators will activate your account and notify you via e-mail.
4
{% block subcontent %}
5
    <h1>Select your institution</h1>
6
    <hr>
7
    <div class="row">
8
        Excellent! You are a click away from getting into your institution eduroam management.
9
        Select your institution to proceed. Our administrators will activate your account and notify you via e-mail.
30 10

  
31
Please do not continue if you are not the eduroam administrator for this institution.
32
Any inappropriate requests will be reported directly to the institution, along with your name and email.
33
</div>
34
<div class="span12"></div>
35
<div class="span12">
36
<form method="POST" class="form-horizontal" action="{% url selectinst %}">
37
    {% csrf_token %}
38
    {% if form.non_field_errors %}
39
    <p class="error">
40
        {{ form.non_field_errors}}
41
    </p>
42
    {% endif %}
43
    <div style="display: none">
44
        {{form.user}}
11
        Please do not continue if you are not the eduroam administrator for this institution.
12
        Any inappropriate requests will be reported directly to the institution, along with your name and email.
45 13
    </div>
46
   {% if nomail %}
47
    <div class="control-group {% if form.email.errors %} error {% endif %}">
48
        <label class="control-label" for="id_email"><b>{% trans "Email" %}</b></label>
49
        <div class="controls">
50
            {{ form.email }}
51
            {% if form.email.errors %} <span class="help-inline"> {{ form.email.errors|join:", " }} </span>
52
            {% endif %} <span class="help-block"> {{ form.institution.help_text }}</span>
14
    <form method="POST" class="form-horizontal" action="{% url selectinst %}">
15
        {% csrf_token %}
16
        {% if form.non_field_errors %}
17
        <p class="error">
18
            {{ form.non_field_errors}}
19
        </p>
20
        {% endif %}
21
        <div style="display: none">
22
            {{ form.user }}
53 23
        </div>
54
    </div>
55
    {% else %}
56
    <div style="display: none">
57
        {{form.email}}
58
    </div>
59
    {% endif %}
60
    <div class="control-group {% if form.institution.errors %} error {% endif %}">
61
        <label class="control-label" for="id_institution"><b>{% trans "Institution" %}</b></label>
62
        <div class="controls">
63
            {{ form.institution }}
64
            {% if form.institution.errors %} <span class="help-inline"> {{ form.institution.errors|join:", " }} </span>
65
            {% endif %} <span class="help-block"> {{ form.institution.help_text }}</span>
24
       {% if nomail %}
25
        <div class="control-group {% if form.email.errors %} error {% endif %}">
26
            <label class="control-label" for="id_email"><b>{% trans "Email" %}</b></label>
27
            <div class="controls">
28
                {{ form.email }}
29
                {% if form.email.errors %} <span class="help-inline"> {{ form.email.errors|join:", " }} </span>
30
                {% endif %} <span class="help-block"> {{ form.institution.help_text }}</span>
31
            </div>
66 32
        </div>
67
    </div>
68

  
69
    <div class="control-group">
70
        <div class="controls">
71
            <button type="submit" id="applybutton" value="Apply" class="btn btn-primary">
72
            {% trans "Apply" %}</button>
33
        {% else %}
34
        <div style="display: none">
35
            {{form.email}}
36
        </div>
37
        {% endif %}
38
        <div class="control-group {% if form.institution.errors %} error {% endif %}">
39
            <label class="control-label" for="id_institution"><b>{% trans "Institution" %}</b></label>
40
            <div class="controls">
41
                {{ form.institution }}
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff