Revision d3ea44a4
b/djnro/settings.py | ||
---|---|---|
146 | 146 |
WSGI_APPLICATION = 'djnro.wsgi.application' |
147 | 147 |
|
148 | 148 |
TEMPLATE_DIRS = ( |
149 |
os.path.join(project_path, 'templates/'),
|
|
149 |
os.path.join(djnro_path, 'templates/'),
|
|
150 | 150 |
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". |
151 | 151 |
# Always use forward slashes, even on Windows. |
152 | 152 |
# Don't forget to use absolute paths, not relative paths. |
b/djnro/templates/404.html | ||
---|---|---|
1 |
{% extends "base.html" %} |
|
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 |
|
|
13 |
</ul> |
|
14 |
{% endblock %} |
|
15 |
{% block content %} |
|
16 |
<div class="container-fluid"> |
|
17 |
<div class="row-fluid"> |
|
18 |
<div class="span2"> |
|
19 |
</div><!--/span--> |
|
20 |
|
|
21 |
|
|
22 |
<div class="span10"> |
|
23 |
<div class="row-fluid"> |
|
24 |
<!--/span--> |
|
25 |
<h3>Oops! You got a nice 404: Page does not exist</h3> |
|
26 |
<hr> |
|
27 |
{% block subcontent %} |
|
28 |
<div class="span10 alert alert-error">No matter how you reached this page, it simply does not exist!</div> |
|
29 |
{% endblock %} |
|
30 |
|
|
31 |
<!--/span--> |
|
32 |
</div><!--/row--> |
|
33 |
</div><!--/span--> |
|
34 |
|
|
35 |
</div><!--/span--> |
|
36 |
|
|
37 |
</div><!--/.fluid-container--> |
|
38 |
{% endblock %} |
b/djnro/templates/500.html | ||
---|---|---|
1 |
{% extends "base.html" %} |
|
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 |
|
|
13 |
</ul> |
|
14 |
{% endblock %} |
|
15 |
{% block content %} |
|
16 |
<div class="container-fluid"> |
|
17 |
<div class="row-fluid"> |
|
18 |
<div class="span2"> |
|
19 |
</div><!--/span--> |
|
20 |
|
|
21 |
|
|
22 |
<div class="span10"> |
|
23 |
<div class="row-fluid"> |
|
24 |
<!--/span--> |
|
25 |
<h3>Oops! You got a 500: Error!</h3> |
|
26 |
<hr> |
|
27 |
{% block subcontent %} |
|
28 |
<div class="span10 alert alert-error">An error occured! Don't worry, our team has been notified about it and will soon fix it!</div> |
|
29 |
{% endblock %} |
|
30 |
|
|
31 |
<!--/span--> |
|
32 |
</div><!--/row--> |
|
33 |
</div><!--/span--> |
|
34 |
|
|
35 |
</div><!--/span--> |
|
36 |
|
|
37 |
</div><!--/.fluid-container--> |
|
38 |
{% endblock %} |
b/djnro/templates/base.html | ||
---|---|---|
1 |
{% load i18n %} |
|
2 |
<!DOCTYPE html> |
|
3 |
<html> |
|
4 |
<head> |
|
5 |
<title>{% block title %}eduroam | {{COUNTRY_CODE}}{% endblock %} : {% block currentpagetitle %}{% endblock %}</title> |
|
6 |
<link href="/static/css/bootstrap.min.css" rel="stylesheet"> |
|
7 |
|
|
8 |
<link href="/static/css/style.css" rel="stylesheet"> |
|
9 |
|
|
10 |
|
|
11 |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
12 |
<link REL="shortcut icon" HREF="/static/img/favicon.ico"> |
|
13 |
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/static/img/edu144-icon.png"> |
|
14 |
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/static/img/edu114-icon.png"> |
|
15 |
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/static/img/edu72-icon.png"> |
|
16 |
<link rel="apple-touch-icon-precomposed" href="/static/img/edu-icon.png"> |
|
17 |
<style type="text/css"> |
|
18 |
body { |
|
19 |
padding-top: 90px; |
|
20 |
/*padding-bottom: 60px;*/ |
|
21 |
} |
|
22 |
|
|
23 |
.sidebar-nav { |
|
24 |
padding: 9px 0; |
|
25 |
} |
|
26 |
|
|
27 |
.headtitle { |
|
28 |
font-family: "Franklin Gothic Demi", "Franklin Gothic", |
|
29 |
"ITC Franklin Gothic", Arial, sans-serif; |
|
30 |
letter-spacing: -1px; |
|
31 |
} |
|
32 |
|
|
33 |
#logotitle,#logotitle.a { |
|
34 |
color: #656565; |
|
35 |
font-size: 18px; |
|
36 |
font-weight: bold; |
|
37 |
left: 105px; |
|
38 |
position: relative; |
|
39 |
top: 60px; |
|
40 |
font-family: "Franklin Gothic Demi", "Franklin Gothic", |
|
41 |
"ITC Franklin Gothic", Arial, sans-serif; |
|
42 |
letter-spacing: -1px; |
|
43 |
width: 300px; |
|
44 |
} |
|
45 |
.navbar .brand { max-height: 40px; overflow: visible;padding-top: 0;padding-bottom: 0; } |
|
46 |
.dropdown-menu.loginoptions a { |
|
47 |
width: 80px; |
|
48 |
display: inline-table; |
|
49 |
} |
|
50 |
</style> |
|
51 |
<link href="/static/css/bootstrap-responsive.min.css" rel="stylesheet"> |
|
52 |
<script type="text/javascript" src="/static/js/jquery.min.js"></script> |
|
53 |
<script src="/static/js/bootstrap.min.js"></script> |
|
54 |
<script type="text/javascript"> |
|
55 |
|
|
56 |
function setlang(lang){ |
|
57 |
$("#langsel").val(lang); |
|
58 |
$("#langform").submit(); |
|
59 |
} |
|
60 |
|
|
61 |
</script> |
|
62 |
{% block extrahead %}{% endblock %} |
|
63 |
</head> |
|
64 |
<body> |
|
65 |
|
|
66 |
<div class="navbar navbar-fixed-top"> |
|
67 |
|
|
68 |
<div class="navbar-inner"> |
|
69 |
<div class="container-fluid" style="padding-left: 0px; width: auto;"> |
|
70 |
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> |
|
71 |
<span class="icon-bar"></span> |
|
72 |
<span class="icon-bar"></span> |
|
73 |
<span class="icon-bar"></span> |
|
74 |
</a> |
|
75 |
<a class="brand visible-desktop" href="{% block logourl %}{% url index %}{% endblock %}"><img src="/static/img/logo_holder.png" /></a> |
|
76 |
<a class="brand hidden-desktop" href="{% url index %}"><img src="/static/img/logo_small.png" /></a> |
|
77 |
<div class="nav-collapse collapse"> |
|
78 |
{% block topmenu %} |
|
79 |
<ul class="nav"> |
|
80 |
<li {% block hometop %}{% endblock %}> |
|
81 |
<a href="{% url index %}">{% trans "Home" %}</a> |
|
82 |
</li> |
|
83 |
<li {% block faqtop %}{% endblock %}> |
|
84 |
<a href="/faq/{{LANGUAGE_CODE}}/">FAQ</a> |
|
85 |
</li> |
|
86 |
|
|
87 |
|
|
88 |
{% include "front/management_dropdown.html" %} |
|
89 |
|
|
90 |
</ul> |
|
91 |
{% endblock %} |
|
92 |
<ul class="nav pull-right"> |
|
93 |
<li class="dropdown pull-right"> |
|
94 |
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{% trans "Language" %}: {% for lang in LANGUAGES %}{% ifequal LANGUAGE_CODE lang.0 %}{% trans lang.1 %}{% endifequal %}{% endfor %}<b class="caret"></b></a> |
|
95 |
<ul class="dropdown-menu"> |
|
96 |
<form action="{% url django.views.i18n.set_language %}" method="post" style="display:inline;" id="langform"> |
|
97 |
{% csrf_token %} |
|
98 |
<input name="next" type="hidden" value="{{ next }}" /> |
|
99 |
<input id="langsel" name="language" type="hidden" value="" /> |
|
100 |
</form> |
|
101 |
{% for lang in LANGUAGES %} |
|
102 |
<li> |
|
103 |
<a class="select_lang" href="#" onclick="setlang('{{ lang.0 }}'); return false;" title="{{lang.1}}">{% trans lang.1 %}{% ifequal LANGUAGE_CODE lang.0 %} <i class="icon-ok"></i>{% endifequal %}</a> |
|
104 |
</li> |
|
105 |
{% endfor %} |
|
106 |
</ul> |
|
107 |
</li> |
|
108 |
<li class="hidden-phone"> |
|
109 |
<a href="{{DOMAIN_MAIN_URL}}" style="padding: 0px; margin: 0px;"><img src="/static/img/right_logo_small.png"></a> |
|
110 |
</li> |
|
111 |
</ul> |
|
112 |
</div> |
|
113 |
</div> |
|
114 |
</div> |
|
115 |
</div> |
|
116 |
|
|
117 |
{% block content %} |
|
118 |
<div class="container-fluid"> |
|
119 |
<div class="row-fluid"> |
|
120 |
<div class="span2"> |
|
121 |
<div class="well sidebar-nav"> |
|
122 |
<ul class="nav nav-list"> |
|
123 |
|
|
124 |
<li {% block homepage %}{% endblock %}><a href="{% url index %}">{% trans "Home" %}</a></li> |
|
125 |
<li class="nav-header">{% trans "USERS" %}</li> |
|
126 |
<li {% block whatis %}{% endblock %}><a href="/what/{{LANGUAGE_CODE}}/">{% trans "The service" %}</a></li> |
|
127 |
<li {% block faq %}{% endblock %}><a href="/faq/{{LANGUAGE_CODE}}/">FAQ</a></li> |
|
128 |
<li class="nav-header">{% trans "INSTITUTIONS" %}</li> |
|
129 |
<li {% block mgmt %}{% endblock %}><a href="{% url managementPage %}">{% trans "Management" %}</a></li> |
|
130 |
<li class="nav-header">{% trans "SERVICE" %}</li> |
|
131 |
<li {% block closest %}{% endblock %}><a href="{% url geolocate %}" target="_blank">{% trans "Closest eduroam" %}</a></li> |
|
132 |
<li {% block world %}{% endblock %}><a href="{% url world %}">{% trans "World eduroam" %}</a></li> |
|
133 |
<li {% block participants %}{% endblock %}><a href="{% url participants %}">{% trans "Participants" %}</a></li> |
|
134 |
<li><a href="/static/pebble_app/pebduroam.pbw">{% trans "pebduroam" %}</a></li> |
|
135 |
<li class="nav-header">{% trans "API" %}</li> |
|
136 |
<li {% block api %}{% endblock %}><a href="{% url api %}">{% trans "Closest point" %}</a></li> |
|
137 |
|
|
138 |
</ul> |
|
139 |
</div><!--/.well --> |
|
140 |
<div class="hidden-phone"><img src="/static/img/keep_calm_eduroam_small.png"></div> |
|
141 |
</div><!--/span--> |
|
142 |
|
|
143 |
|
|
144 |
<div class="span10"> |
|
145 |
<div class="row-fluid"> |
|
146 |
<!--/span--> |
|
147 |
|
|
148 |
{% block subcontent %} |
|
149 |
{% endblock %} |
|
150 |
|
|
151 |
<!--/span--> |
|
152 |
</div><!--/row--> |
|
153 |
</div><!--/span--> |
|
154 |
</div><!--/row--> |
|
155 |
</div><!--/.fluid-container--> |
|
156 |
{% endblock %} |
|
157 |
{% include "footer.html" %} |
|
158 |
</body> |
|
159 |
</html> |
b/djnro/templates/edumanage/add_user.html | ||
---|---|---|
1 |
{% load i18n %} |
|
2 |
|
|
3 |
<form id="add_user_form" method="POST" class="form-horizontal"> |
|
4 |
{% csrf_token %} |
|
5 |
<div class="control-group {% if form.name.errors %} error {% endif %}"> |
|
6 |
<label class="control-label" for="id_name"><b>{% trans "Name" %}</b></label> |
|
7 |
<div class="controls"> |
|
8 |
{{ form.name }} |
|
9 |
{% if form.name.errors %} <span class="help-inline"> {{ form.name.errors|join:", " }} </span> |
|
10 |
{% endif %} <span class="help-block"> {{ form.name.help_text }}</span> |
|
11 |
</div> |
|
12 |
</div> |
|
13 |
<div class="control-group {% if form.email.errors %} error {% endif %}"> |
|
14 |
<label class="control-label" for="id_email"><b>{% trans "Email" %}</b></label> |
|
15 |
<div class="controls"> |
|
16 |
{{ form.email }} |
|
17 |
{% if form.email.errors %} <span class="help-inline"> {{ form.email.errors|join:", " }} </span> |
|
18 |
{% endif %} <span class="help-block"> {{ form.email.help_text }}</span> |
|
19 |
</div> |
|
20 |
</div> |
|
21 |
<div class="control-group {% if form.phone.errors %} error {% endif %}"> |
|
22 |
<label class="control-label" for="id_phone"><b>{% trans "Phone" %}</b></label> |
|
23 |
<div class="controls"> |
|
24 |
{{ form.phone }} |
|
25 |
{% if form.phone.errors %} <span class="help-inline"> {{ form.phone.errors|join:", " }} </span> |
|
26 |
{% endif %} <span class="help-block"> {{ form.phone.help_text }}</span> |
|
27 |
</div> |
|
28 |
</div> |
|
29 |
</form> |
|
30 |
|
|
31 |
|
|
32 |
|
b/djnro/templates/edumanage/catenroll.html | ||
---|---|---|
1 |
{% extends "edumanage/welcome.html"%} |
|
2 |
{% load i18n %} |
|
3 |
{% block crumbs %} |
|
4 |
<li><a href="{% url manage %}">{% trans "Home" %}</a><span class="divider">/</span></li> |
|
5 |
<li class="active">{% trans "CAT Enroll" %}</li> |
|
6 |
{% endblock %} |
|
7 |
{% block extrahead %} |
|
8 |
<script type="text/javascript" src="/static/js/jquery.min.js"></script> |
|
9 |
|
|
10 |
|
|
11 |
<script src="/static/js/bootstrap.min.js"></script> |
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
{% endblock %} |
|
16 |
|
|
17 |
{% block homeactive %}{% endblock %} |
|
18 |
{% block catactive %}class="active"{% endblock %} |
|
19 |
{% block subcontent %} <h4>eduroam CAT enroll</h4> |
|
20 |
{% 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 |
<hr> |
|
28 |
{% if current_enrollments %} |
|
29 |
<div class="row"> |
|
30 |
<div class="span12"> |
|
31 |
<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" width="100%" id="table"> |
|
32 |
<thead> |
|
33 |
<tr> |
|
34 |
<th>{% trans "CAT Institution ID" %}</th> |
|
35 |
<th>{% trans "CAT configuration profiles" %}</th> |
|
36 |
<th>{% trans "URL/Status" %}</th> |
|
37 |
<th>{% trans "CAT instance" %}</th> |
|
38 |
<th>{% trans "Applier" %}</th> |
|
39 |
</tr> |
|
40 |
</thead> |
|
41 |
|
|
42 |
<tbody> |
|
43 |
{% for enrollment in current_enrollments %} |
|
44 |
<tr class="GradeC"> |
|
45 |
<td>{{enrollment.cat_inst_id}}</td> |
|
46 |
<td>{% if enrollment.cat_configuration_url %}<a href="{{enrollment.cat_configuration_url}}" target="_blank">CAT url</a>{% else %}-{% endif %}</td> |
|
47 |
<td>{% if not enrollment.cat_active %}{% if enrollment.url %}<a href="{{enrollment.url}}" target="_blank">{{enrollment.url|truncatechars:50}}</a>{% else %}-{% endif %}{% else %}ACTIVE{% endif %}</td> |
|
48 |
<td>{{enrollment.cat_instance}}</td> |
|
49 |
<td>{{enrollment.applier.first_name}} {{enrollment.applier.last_name}}</td> |
|
50 |
</tr> |
|
51 |
{% endfor %} |
|
52 |
</tbody> |
|
53 |
</table> |
|
54 |
</div> |
|
55 |
</div> |
|
56 |
{% endif %} |
|
57 |
{% if cat_instances %} |
|
58 |
<div class="row"> |
|
59 |
<div class="span6 well"> |
|
60 |
<form method="POST" class="form-horizontal" id="catenroll_form" action="{% url catenroll %}"> |
|
61 |
{% csrf_token %} |
|
62 |
<div class="control-group"> |
|
63 |
<label class="control-label" for="id_catinstance"><b>{% trans "CAT instance" %}</b></label> |
|
64 |
<div class="controls"> |
|
65 |
<select id="catinstance" name="catinstance"> |
|
66 |
{% for instance in cat_instances %} |
|
67 |
<option value="{{instance.0}}">{{instance.1}}</option> |
|
68 |
{% endfor %} |
|
69 |
</select> |
|
70 |
</div> |
|
71 |
</div> |
|
72 |
<div class="control-group"> |
|
73 |
<div class="controls"> |
|
74 |
<button type="submit" id="applybutton" value="Apply" class="btn btn-primary"> |
|
75 |
{% trans "Apply" %}</button> |
|
76 |
</div> |
|
77 |
</div> |
|
78 |
</form> |
|
79 |
</div></div> |
|
80 |
{% endif %} |
|
81 |
{% if response_status %} |
|
82 |
<div class="row"> |
|
83 |
<div class="span12"> |
|
84 |
<div class="alert {% if response_status == 'Error' %}alert-error{% else %}alert-success{% endif %}"> |
|
85 |
<div><strong>Status:</strong> {{response_status}}</div> |
|
86 |
{% if not cat_url %} |
|
87 |
<div><strong>Response:</strong> {{response}}</div> |
|
88 |
{% else %} |
|
89 |
<div><strong>Institution Id:</strong> {{inst_uid}}</div> |
|
90 |
<div><strong>CAT url:</strong> <a href="{{cat_url}}" target="_blank">{{cat_url}}</a></div> |
|
91 |
{% endif %} |
|
92 |
</div> |
|
93 |
</div> |
|
94 |
</div> |
|
95 |
{% endif %} |
|
96 |
{% endblock %} |
|
97 |
|
b/djnro/templates/edumanage/contacts.html | ||
---|---|---|
1 |
{% extends "edumanage/welcome.html"%} |
|
2 |
{% load i18n %} |
|
3 |
{% block crumbs %} |
|
4 |
<li><a href="{% url manage %}">{% trans "Home" %}</a><span class="divider">/</span></li> |
|
5 |
<li class="active">{% trans "Contacts" %}</li> |
|
6 |
{% endblock %} |
|
7 |
{% load i18n %} |
|
8 |
{% block extrahead %} |
|
9 |
<script type="text/javascript" src="/static/js/jquery.dataTables.min.js"></script> |
|
10 |
<script type="text/javascript" src="/static/js/datatables_bootstrap.js"></script> |
|
11 |
<script type="text/javascript"> |
|
12 |
$(document).ready(function(){ |
|
13 |
{% if contacts %} |
|
14 |
var oTable = $('#table').dataTable({ |
|
15 |
"sPaginationType": "bootstrap", |
|
16 |
"sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>", |
|
17 |
"aoColumns": [{ |
|
18 |
"bSearchable": true, |
|
19 |
"bSortable": true |
|
20 |
}, { |
|
21 |
"bSearchable": true, |
|
22 |
"bSortable": true |
|
23 |
}, { |
|
24 |
"bSearchable": true, |
|
25 |
"bSortable": true |
|
26 |
}, { |
|
27 |
"bVisible": true, |
|
28 |
"bSearchable": false, |
|
29 |
"bSortable": false |
|
30 |
}], |
|
31 |
"aaSorting": [[0, 'desc']], |
|
32 |
"iDisplayLength": 25, |
|
33 |
"oSearch": {"bSmart": false, "bRegex":true}, |
|
34 |
"oLanguage": { |
|
35 |
"sLengthMenu": '{% trans "Display" %} <select><option value="25">25</option><option value="50">50</option><option value="-1">{% trans "All" %}</option></select> {% trans "contacts" %}', |
|
36 |
"sProcessing": "Processing...", |
|
37 |
"sZeroRecords": '{% trans "No records to display" %}', |
|
38 |
"sInfo": "Showing _START_ to _END_ of _TOTAL_ entries", |
|
39 |
"sInfoEmpty": "{% trans "Showing 0 to 0 of 0 entries" %}", |
|
40 |
"sInfoFiltered": "(filtered from _MAX_ total entries)", |
|
41 |
"sInfoPostFix": "", |
|
42 |
"sSearch": '{% trans "Search:" %}', |
|
43 |
"sUrl": "", |
|
44 |
"oPaginate": { |
|
45 |
"sFirst": '{% trans "First" %}', |
|
46 |
"sPrevious": '{% trans "Previous" %}', |
|
47 |
"sNext": '{% trans "Next" %}', |
|
48 |
"sLast": '{% trans "Last" %}' |
|
49 |
} |
|
50 |
} |
|
51 |
}); |
|
52 |
|
|
53 |
oTable.fnDraw(); |
|
54 |
|
|
55 |
$('[id^=del_contact_]').click(function(){ |
|
56 |
contact_id = (this.id).replace("del_contact_", ''); |
|
57 |
name = this.getAttribute("data-contactname"); |
|
58 |
$("#mymodalbody").html("{% trans 'You are about to delete contact' %}: <b>"+name+"</b><br>{% trans 'Press Delete to proceed or Cancel to cancel deletion' %}"); |
|
59 |
$("#myModalLabel").html("{% trans 'Delete contact' %} "+name); |
|
60 |
$('#myModal').modal('show'); |
|
61 |
$(".modal-footer").show(); |
|
62 |
$("#contact_name_del").html(name) |
|
63 |
return false; |
|
64 |
}); |
|
65 |
|
|
66 |
$("#delcontactSubmit").click(function(){ |
|
67 |
$.ajax({ |
|
68 |
url:"{% url del-contact %}/?contact_pk="+contact_id, |
|
69 |
type: "GET", |
|
70 |
success: function(data){ |
|
71 |
if (data.error){ |
|
72 |
$(".modal-footer").hide(); |
|
73 |
$("#mymodalbody").html("<font style='color:#B94A48'>"+data.error+"</font>"); |
|
74 |
} |
|
75 |
if (data.success){ |
|
76 |
$(".modal-footer").hide(); |
|
77 |
$("#mymodalbody").html("contact "+name+" successfully deleted"); |
|
78 |
window.setTimeout('location.reload()', 1000); |
|
79 |
|
|
80 |
} |
|
81 |
} |
|
82 |
}); |
|
83 |
}); |
|
84 |
|
|
85 |
{% endif %} |
|
86 |
}); |
|
87 |
</script> |
|
88 |
{% endblock %} |
|
89 |
|
|
90 |
{% block navbar %} |
|
91 |
|
|
92 |
{% endblock %} |
|
93 |
|
|
94 |
{% block homeactive %}{% endblock %} |
|
95 |
{% block contactsactive %}class="active"{% endblock %} |
|
96 |
{% block subcontent %} |
|
97 |
|
|
98 |
|
|
99 |
<h4>{% trans "Contacts" %}</h4> |
|
100 |
<hr> |
|
101 |
{% if messages %} |
|
102 |
<table class="table table-condensed"> |
|
103 |
{% for message in messages %} |
|
104 |
<tr {% if message.tags %} class="{{ message.tags }}"{% endif %}><td>{{ message }}<td></tr> |
|
105 |
{% endfor %} |
|
106 |
</table> |
|
107 |
{% endif %} |
|
108 |
<div><a href="{% url edit-contacts %}" class="btn btn-primary">{% trans "Add new contact" %}</a></div> |
|
109 |
<div class="span10"></div> |
|
110 |
{% if contacts %} |
|
111 |
<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" width="100%" id="table"> |
|
112 |
<thead> |
|
113 |
<tr> |
|
114 |
<th>{% trans "Name" %}</th> |
|
115 |
<th>{% trans "Email" %}</th> |
|
116 |
<th>{% trans "Phone" %}</th> |
|
117 |
<th style="text-align: center;">{% trans "Action" %}</th> |
|
118 |
</tr> |
|
119 |
</thead> |
|
120 |
|
|
121 |
<tbody> |
|
122 |
{% for contact in contacts %} |
|
123 |
<tr class="GradeC"> |
|
124 |
<td>{{contact.name}}</td> |
|
125 |
<td>{{contact.email}}</td> |
|
126 |
<td>{{contact.phone}}</td> |
|
127 |
<td style="text-align: center;"><a href="{% url edit-contacts contact.pk %}" class="btn btn-small">{% trans "edit" %}</a> <a href="#" id="del_contact_{{contact.pk}}" data-contactname="{{contact.name}}" class="btn btn-small btn-warning">{% trans "delete" %}</a></td> |
|
128 |
</tr> |
|
129 |
{% endfor %} |
|
130 |
</tbody> |
|
131 |
</table> |
|
132 |
{% endif %} |
|
133 |
<div class="modal hide fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> |
|
134 |
<div class="modal-header"> |
|
135 |
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
|
136 |
<h3 id="myModalLabel">{% trans "Delete contact" %}</h3> |
|
137 |
</div> |
|
138 |
<div class="modal-body" id="mymodalbody"> |
|
139 |
|
|
140 |
</div> |
|
141 |
<div class="modal-footer"> |
|
142 |
<button class="btn" data-dismiss="modal" aria-hidden="true">{% trans "Cancel" %}</button> |
|
143 |
<a class="btn btn-warning" id="delcontactSubmit" href="#">{% trans "Delete" %}</a> |
|
144 |
</div> |
|
145 |
</div> |
|
146 |
{% endblock %} |
|
147 |
|
b/djnro/templates/edumanage/contacts_edit.html | ||
---|---|---|
1 |
{% extends "edumanage/welcome.html"%} |
|
2 |
{% load i18n %} |
|
3 |
{% block crumbs %} |
|
4 |
<li><a href="{% url manage %}">{% trans "Home" %}</a><span class="divider">/</span></li> |
|
5 |
<li><a href="{% url contacts %}">{% trans "Contacts" %}</a><span class="divider">/</span></li> |
|
6 |
<li class="active">{% if edit %}{{form.instance.name}} ({% trans "edit" %}){% else %}{% trans "Add Contact" %}{% endif %}</li> |
|
7 |
{% endblock %} |
|
8 |
{% block extrahead %} |
|
9 |
<script type="text/javascript" src="/static/js/jquery.min.js"></script> |
|
10 |
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=false"></script> |
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
{% endblock %} |
|
16 |
|
|
17 |
{% block homeactive %}{% endblock %} |
|
18 |
{% block contactsactive %}class="active"{% endblock %} |
|
19 |
{% block subcontent %} <h4>{% if edit %}{{form.instance.name}} ({% trans "edit" %}){% else %}{% trans "Add Contact" %}{% endif %}</h4> |
|
20 |
<hr> |
|
21 |
<form method="POST" class="form-horizontal"> |
|
22 |
{% csrf_token %} |
|
23 |
{% if form.non_field_errors %} |
|
24 |
<p class="error"> |
|
25 |
{{ form.non_field_errors}} |
|
26 |
</p> |
|
27 |
{% endif %} |
|
28 |
<div style="display: none"> |
|
29 |
{{form.instid}} |
|
30 |
</div> |
|
31 |
<div class="control-group {% if form.name.errors %} error {% endif %}"> |
|
32 |
<label class="control-label" for="id_name"><b>{% trans "Name" %}</b></label> |
|
33 |
<div class="controls"> |
|
34 |
{{ form.name }} |
|
35 |
{% if form.name.errors %} <span class="help-inline"> {{ form.name.errors|join:", " }} </span> |
|
36 |
{% endif %} <span class="help-block"> {{ form.name.help_text }}</span> |
|
37 |
</div> |
|
38 |
</div> |
|
39 |
<div class="control-group {% if form.email.errors %} error {% endif %}"> |
|
40 |
<label class="control-label" for="id_email"><b>{% trans "Email" %}</b></label> |
|
41 |
<div class="controls"> |
|
42 |
{{ form.email }} |
|
43 |
{% if form.email.errors %} <span class="help-inline"> {{ form.email.errors|join:", " }} </span> |
|
44 |
{% endif %} <span class="help-block"> {{ form.email.help_text }}</span> |
|
45 |
</div> |
|
46 |
</div> |
|
47 |
<div class="control-group {% if form.phone.errors %} error {% endif %}"> |
|
48 |
<label class="control-label" for="id_phone"><b>{% trans "Phone" %}</b></label> |
|
49 |
<div class="controls"> |
|
50 |
{{ form.phone }} |
|
51 |
{% if form.phone.errors %} <span class="help-inline"> {{ form.phone.errors|join:", " }} </span> |
|
52 |
{% endif %} <span class="help-block"> {{ form.phone.help_text }}</span> |
|
53 |
</div> |
|
54 |
</div> |
|
55 |
<div class="control-group"> |
|
56 |
<div class="controls"> |
|
57 |
<button type="submit" id="applybutton" value="Apply" class="btn btn-primary"> |
|
58 |
{% trans "Apply" %}</button> |
|
59 |
</div> |
|
60 |
</div> |
|
61 |
</form> |
|
62 |
{% endblock %} |
|
63 |
|
b/djnro/templates/edumanage/institution.html | ||
---|---|---|
1 |
{% extends "edumanage/welcome.html"%} |
|
2 |
{% 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 %} |
|
15 |
{% block homeactive %}{% endblock %} |
|
16 |
{% block instactive %}class="active"{% endblock %} |
|
17 |
{% block subcontent %} |
|
18 |
<h4>{% trans "Institution" %}</h4> |
|
19 |
<hr> |
|
20 |
{% 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"> |
|
32 |
|
|
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 %} |
|
110 |
|
b/djnro/templates/edumanage/institution_edit.html | ||
---|---|---|
1 |
{% extends "edumanage/welcome.html"%} |
|
2 |
{% load i18n %} |
|
3 |
{% load tolocale %} |
|
4 |
{% block crumbs %} |
|
5 |
<li><a href="{% url manage %}">{% trans "Home" %}</a><span class="divider">/</span></li> |
|
6 |
<li><a href="{% url institutions %}">{% trans "Institution" %}</a><span class="divider">/</span></li> |
|
7 |
<li class="active">{% tolocale institution LANGUAGE_CODE%} ({% trans "Edit" %})</li> |
|
8 |
{% endblock %} |
|
9 |
{% block extrahead %} |
|
10 |
<script type="text/javascript" src="/static/js/jquery.formset.js"></script> |
|
11 |
<script type="text/javascript"> |
|
12 |
$(document).ready(function() { |
|
13 |
$("#adduserSubmit").click(function(){ |
|
14 |
$.ajax({ |
|
15 |
url:"{% url adduser %}", |
|
16 |
data:$("#add_user_form").serialize(), |
|
17 |
type: "POST", |
|
18 |
cache: false, |
|
19 |
success:function(data){ |
|
20 |
try { |
|
21 |
value = data.value; |
|
22 |
text = data.text; |
|
23 |
if (typeof value === 'undefined' && typeof text === 'undefined'){ |
|
24 |
$('#mymodalbody').html(data); |
|
25 |
} |
|
26 |
else{ |
|
27 |
$('#id_contact').append($("<option></option>").attr("value",value).text(text)); |
|
28 |
$('#myModal').modal('hide') |
|
29 |
} |
|
30 |
} |
|
31 |
catch (exception) { |
|
32 |
$('#mymodalbody').html(data); |
|
33 |
} |
|
34 |
} |
|
35 |
}); |
|
36 |
return false; |
|
37 |
}); |
|
38 |
|
|
39 |
$("#add_contact").click(function(){ |
|
40 |
$('#myModal').modal('show') |
|
41 |
$.ajax({ |
|
42 |
url:"{% url adduser %}", |
|
43 |
type: "GET", |
|
44 |
success: function(data){ |
|
45 |
$('#mymodalbody').html(data); |
|
46 |
} |
|
47 |
}); |
|
48 |
|
|
49 |
return false; |
|
50 |
}); |
|
51 |
|
|
52 |
|
|
53 |
$('#urlsform tbody tr').formset({ |
|
54 |
prefix: '{{urls_form.prefix}}', |
|
55 |
formCssClass: "dynamic-formset1", |
|
56 |
added: addButton, |
|
57 |
}); |
|
58 |
|
|
59 |
$(".delete-row").prepend('<i class="icon-remove-sign icon-white"></i> ').addClass('btn btn-small btn-warning'); |
|
60 |
$(".add-row").prepend('<i class="icon-plus-sign icon-white"></i> ').addClass('btn btn-small btn-info'); |
|
61 |
|
|
62 |
|
|
63 |
}); |
|
64 |
function addButton(row){ |
|
65 |
$(row).find(".delete-row").prepend('<i class="icon-remove-sign icon-white"></i> ').addClass('btn btn-small btn-warning'); |
|
66 |
} |
|
67 |
|
|
68 |
</script> |
|
69 |
|
|
70 |
{% endblock %} |
|
71 |
{% block homeactive %}{% endblock %} |
|
72 |
{% block instactive %}class="active"{% endblock %} |
|
73 |
{% block subcontent %} |
|
74 |
<h4>{% tolocale institution LANGUAGE_CODE%} {% trans "Edit" %}</h4> |
|
75 |
<hr> |
|
76 |
<form method="POST" class="form-horizontal"> |
|
77 |
{% csrf_token %} |
|
78 |
{% if form.non_field_errors %} |
|
79 |
<p class="error"> |
|
80 |
{{ form.non_field_errors}} |
|
81 |
</p> |
|
82 |
{% endif %} |
|
83 |
<div style="display: none"> |
|
84 |
{{form.institution}} |
|
85 |
</div> |
|
86 |
<div class="control-group"> |
|
87 |
<label class="control-label" for="id_name"><b>{% trans "Name" %}</b></label> |
|
88 |
<div class="controls"> |
|
89 |
<input class="input" id="disabledInput" type="text" placeholder="{% tolocale institution LANGUAGE_CODE %}" disabled> |
|
90 |
</div> |
|
91 |
</div> |
|
92 |
<div class="control-group {% if form.ertype.errors %} error {% endif %}"> |
|
93 |
<label class="control-label" for="id_ertype"><b>{% trans "Type" %}</b></label> |
|
94 |
<div class="controls"> |
|
95 |
<input class="input" id="disabledInput2" type="text" placeholder="{{institution.get_ertype_display}}" disabled> |
|
96 |
</div> |
|
97 |
</div> |
|
98 |
<div class="control-group {% if form.address_street.errors %} error {% endif %}"> |
|
99 |
<label class="control-label" for="id_address_street"><b>{% trans "Address Street" %}</b></label> |
|
100 |
<div class="controls"> |
|
101 |
{{ form.address_street }} |
|
102 |
{% if form.address_street.errors %} <span class="help-inline"> {{ form.address_street.errors|join:", " }} </span> |
|
103 |
{% endif %} <span class="help-block"> {{ form.address_street.help_text }}</span> |
|
104 |
</div> |
|
105 |
</div> |
|
106 |
<div class="control-group {% if form.address_city.errors %} error {% endif %}"> |
|
107 |
<label class="control-label" for="id_address_city"><b>{% trans "Address City" %}</b></label> |
|
108 |
<div class="controls"> |
|
109 |
{{ form.address_city }} |
|
110 |
{% if form.address_city.errors %} <span class="help-inline"> {{ form.address_city.errors|join:", " }} </span> |
|
111 |
{% endif %} <span class="help-block"> {{ form.address_city.help_text }}</span> |
|
112 |
</div> |
|
113 |
</div> |
|
114 |
<div class="control-group {% if form.contact.errors %} error {% endif %}"> |
|
115 |
<label class="control-label" for="id_contact"><b>{% trans "Contacts" %}</b></label> |
|
116 |
<div class="controls"> |
|
117 |
{{ form.contact }} <button class="btn btn-small btn-info" id="add_contact"><i class="icon-plus-sign icon-white"></i>Add...</button> |
|
118 |
{% if form.contact.errors %} <span class="help-inline"> {{ form.ertype.contact|join:", " }} </span> |
|
119 |
{% endif %} <span class="help-block"> {{ form.contact.help_text }}</span> |
|
120 |
</div> |
|
121 |
</div> |
|
122 |
<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 %}"> |
|
123 |
<label class="control-label" for="id_urls"><b>{% trans "Urls" %}</b></label> |
|
124 |
{{urls_form.management_form}} |
|
125 |
<div class="controls"> |
|
126 |
{% if urls_form.non_form_errors %} <span class="help-inline"> {{ urls_form.non_form_errors|join:", "}}</span>{% endif %} |
|
127 |
<table id="urlsform"><thead><tr><td>url</td><td>type</td><td>language</td></tr></thead><tbody> |
|
128 |
{% for formset in urls_form.forms %} |
|
129 |
{{ formset.id }} |
|
130 |
|
|
131 |
|
|
132 |
<tr id="{{ formset.prefix }}-row"> |
|
133 |
<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> |
|
134 |
<td>{{formset.urltype}}{% if formset.urltype.errors %}<br><p class="help-inline"> {{ formset.urltype.errors|join:", " }} </p>{% endif %}</td> |
|
135 |
<td>{{formset.lang}}{% if formset.lang.errors %}<br><p class="help-inline"> {{ formset.lang.errors|join:", " }} </p>{% endif %}</td> |
|
136 |
|
|
137 |
</tr> |
|
138 |
{% endfor %} |
|
139 |
</tbody></table> |
|
140 |
</div> |
|
141 |
</div> |
|
142 |
{% if institution.ertype == 2 or institution.ertype == 3 %} |
|
143 |
<div class="control-group {% if form.oper_name.errors %} error {% endif %}"> |
|
144 |
<label class="control-label" for="id_oper_name"><b>{% trans "Domain Name" %}</b></label> |
|
145 |
<div class="controls"> |
|
146 |
{{ form.oper_name }} |
|
147 |
{% if form.oper_name.errors %} <span class="help-inline"> {{ form.oper_name.errors|join:", " }} </span> |
|
148 |
{% endif %} <span class="help-block">{% autoescape off %}{{ form.oper_name.help_text }}{% endautoescape %}</span> |
|
149 |
</div> |
|
150 |
</div> |
|
151 |
{% endif %} |
|
152 |
{% if institution.ertype == 1 or institution.ertype == 3 %} |
|
153 |
<div class="control-group {% if form.number_user.errors %} error {% endif %}"> |
|
154 |
<label class="control-label" for="id_number_user">{% trans "Number of Users" %}</label> |
|
155 |
<div class="controls"> |
|
156 |
{{ form.number_user }} |
|
157 |
{% if form.number_user.errors %} <span class="help-inline"> {{ form.number_user.errors|join:", " }} </span> |
|
158 |
{% endif %} <span class="help-block"> {{ form.number_user.help_text }}</span> |
|
159 |
</div> |
|
160 |
</div> |
|
161 |
{% endif %} |
|
162 |
<div class="control-group {% if form.number_id.errors %} error {% endif %}"> |
|
163 |
<label class="control-label" for="id_number_id">{% trans "Number of IDs" %}</label> |
|
164 |
<div class="controls"> |
|
165 |
{{ form.number_id }} |
|
166 |
{% if form.number_id.errors %} <span class="help-inline"> {{ form.number_id.errors|join:", " }} </span> |
|
167 |
{% endif %} <span class="help-block"> {{ form.number_id.help_text }}</span> |
|
168 |
</div> |
|
169 |
</div> |
|
170 |
<div class="control-group"> |
|
171 |
<div class="controls"> |
|
172 |
<button type="submit" id="applybutton" value="Apply" class="btn btn-primary"/>{% trans "Apply" %}</button> |
|
173 |
</div> |
|
174 |
</div> |
|
175 |
</form> |
|
176 |
<div class="modal hide fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> |
|
177 |
<div class="modal-header"> |
|
178 |
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
|
179 |
<h3 id="myModalLabel">{% trans "Add User" %}</h3> |
|
180 |
</div> |
|
181 |
<div class="modal-body" id="mymodalbody"> |
|
182 |
|
|
183 |
</div> |
|
184 |
<div class="modal-footer"> |
|
185 |
<button class="btn" data-dismiss="modal" aria-hidden="true">{% trans "Close" %}</button> |
|
186 |
<a class="btn btn-primary" id="adduserSubmit" href="#">{% trans "Save changes" %}</a> |
|
187 |
</div> |
|
188 |
</div> |
|
189 |
{% endblock %} |
|
190 |
|
b/djnro/templates/edumanage/instrealmmon_edit.html | ||
---|---|---|
1 |
{% extends "edumanage/welcome.html"%} |
|
2 |
{% load i18n %} |
|
3 |
{% block crumbs %} |
|
4 |
<li><a href="{% url manage %}">{% trans "Home" %}</a><span class="divider">/</span></li> |
|
5 |
<li><a href="{% url instrealmmon %}">{% trans "Monitored Realms" %}</a><span class="divider">/</span></li> |
|
6 |
<li class="active">{% if edit %}{{form.instance.realm}} ({% trans "edit" %}){% else %}{% trans "Add Monitored Realm" %}{% endif %}</li> |
|
7 |
{% endblock %} |
|
8 |
{% block extrahead %} |
|
9 |
<script type="text/javascript" src="/static/js/jquery.min.js"></script> |
|
10 |
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=false"></script> |
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
{% endblock %} |
|
16 |
|
|
17 |
{% block homeactive %}{% endblock %} |
|
18 |
{% block instrealmmon %}class="active"{% endblock %} |
|
19 |
{% block subcontent %} <h4>{% if edit %}Monitored realm: {{form.instance.realm}} ({% trans "edit" %}){% else %}{% trans "Add Monitored Realm" %}{% endif %}</h4> |
|
20 |
<hr> |
|
21 |
<form method="POST" class="form-horizontal"> |
|
22 |
{% csrf_token %} |
|
23 |
{% if form.non_field_errors %} |
|
24 |
<div class="text-error" style="color: #B94A48">{{form.non_field_errors}}</div> |
|
25 |
{% endif %} |
|
26 |
<div style="display: none"> |
|
27 |
{{form.instid}} |
|
28 |
</div> |
|
29 |
<div class="control-group {% if form.realm.errors %} error {% endif %}"> |
|
30 |
<label class="control-label" for="id_realm"><b>{% trans "Realm" %}</b></label> |
|
31 |
<div class="controls"> |
|
32 |
{{ form.realm }} |
|
33 |
{% if form.realm.errors %} <span class="help-inline"> {{ form.realm.errors|join:", " }} </span> |
|
34 |
{% endif %} <span class="help-block"> {{ form.realm.help_text }}</span> |
|
35 |
</div> |
|
36 |
</div> |
|
37 |
<div class="control-group {% if form.mon_type.errors %} error {% endif %}"> |
|
38 |
<label class="control-label" for="id_mon_type"><b>{% trans "Monitoring Method" %}</b></label> |
|
39 |
<div class="controls"> |
|
40 |
{{ form.mon_type }} |
|
41 |
{% if form.mon_type.errors %} <span class="help-inline"> {{ form.mon_type.errors|join:", " }} </span> |
|
42 |
{% endif %} <span class="help-block"> {{ form.mon_type.help_text }}</span> |
|
43 |
</div> |
|
44 |
</div> |
|
45 |
<div class="control-group"> |
|
46 |
<div class="controls"> |
|
47 |
<button type="submit" id="applybutton" value="Apply" class="btn btn-primary"/> |
|
48 |
{% trans "Apply" %}</button> |
|
49 |
</div> |
|
50 |
</div> |
|
51 |
</form> |
|
52 |
{% endblock %} |
|
53 |
|
b/djnro/templates/edumanage/instrealmmons.html | ||
---|---|---|
1 |
{% extends "edumanage/welcome.html"%} |
|
2 |
{% load i18n %} |
|
3 |
{% block crumbs %} |
|
4 |
<li><a href="{% url manage %}">{% trans "Home" %}</a><span class="divider">/</span></li> |
|
5 |
<li class="active">{% trans "Monitored Realms" %}</li> |
|
6 |
{% endblock %} |
|
7 |
{% load i18n %} |
|
8 |
{% block extrahead %} |
|
9 |
<script type="text/javascript" src="/static/js/jquery.dataTables.min.js"></script> |
|
10 |
<script type="text/javascript" src="/static/js/datatables_bootstrap.js"></script> |
|
11 |
|
|
12 |
<script type="text/javascript"> |
|
13 |
$(document).ready(function(){ |
|
14 |
{% if realms %} |
|
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 |
{ |
|
26 |
"bVisible": true, |
|
27 |
"bSearchable": false, |
|
28 |
"bSortable": false |
|
29 |
}, |
|
30 |
{ |
|
31 |
"bSearchable": true, |
|
32 |
"bSortable": true |
|
33 |
} |
|
34 |
], |
|
35 |
"aaSorting": [[0, 'desc']], |
|
36 |
"iDisplayLength": 25, |
|
37 |
"oSearch": {"bSmart": false, "bRegex":true}, |
|
38 |
"oLanguage": { |
|
39 |
"sLengthMenu": '{% trans "Display" %} <select><option value="25">25</option><option value="50">50</option><option value="-1">{% trans "All" %}</option></select> {% trans "realms" %}', |
|
40 |
"sProcessing": "Processing...", |
|
41 |
"sZeroRecords": '{% trans "No records to display" %}', |
|
42 |
"sInfo": "Showing _START_ to _END_ of _TOTAL_ entries", |
|
43 |
"sInfoEmpty": "{% trans "Showing 0 to 0 of 0 entries" %}", |
|
44 |
"sInfoFiltered": "(filtered from _MAX_ total entries)", |
|
45 |
"sInfoPostFix": "", |
|
46 |
"sSearch": '{% trans "Search:" %}', |
|
47 |
"sUrl": "", |
|
48 |
"oPaginate": { |
|
49 |
"sFirst": '{% trans "First" %}', |
|
50 |
"sPrevious": '{% trans "Previous" %}', |
|
51 |
"sNext": '{% trans "Next" %}', |
|
52 |
"sLast": '{% trans "Last" %}' |
|
53 |
} |
|
54 |
} |
|
55 |
}); |
|
56 |
|
|
57 |
oTable.fnDraw(); |
|
58 |
|
|
59 |
$('[id^=del_instrealmmon_]').click(function(){ |
|
60 |
instrealmmon_pk = (this.id).replace("del_instrealmmon_", ''); |
|
61 |
name = this.getAttribute("data-realmname"); |
|
62 |
$("#mymodalbody").html("{% trans 'You are about to delete monitored realm (and its parameters if any)' %}: <b>"+name+"</b><br>{% trans 'Press Delete to proceed or Cancel to cancel deletion' %}"); |
|
63 |
$("#myModalLabel").html("{% trans 'Delete Monitored Realm' %} "+name); |
|
64 |
$('#myModal').modal('show'); |
|
65 |
$("#modalfooter1").show(); |
|
66 |
return false; |
|
67 |
}); |
|
68 |
|
|
69 |
$("#delrealmSubmit").click(function(){ |
|
70 |
$.ajax({ |
|
71 |
url:"{% url del-instrealmmon %}/?instrealmmon_pk="+instrealmmon_pk, |
|
72 |
type: "GET", |
|
73 |
success: function(data){ |
|
74 |
if (data.error){ |
|
75 |
$("#modalfooter1").hide(); |
|
76 |
$("#mymodalbody").html("<font style='color:#B94A48'>"+data.error+"</font>"); |
|
77 |
} |
|
78 |
if (data.success){ |
|
79 |
$(".modal-footer").hide(); |
|
80 |
$("#mymodalbody").html("monitored realm "+name+" successfully deleted"); |
|
81 |
window.setTimeout('location.reload()', 1000); |
|
82 |
|
|
83 |
} |
|
84 |
} |
|
85 |
}); |
|
86 |
}); |
|
87 |
|
|
88 |
|
|
89 |
$('[id^=del_monlocauthpar_]').click(function(){ |
|
90 |
monlocauthpar_pk = (this.id).replace("del_monlocauthpar_", ''); |
|
91 |
name = this.getAttribute("data-realmname"); |
|
92 |
$("#mymodalbody2").html("{% trans 'You are about to delete monitored realm parameters for ' %}: <b>"+name+"</b><br>{% trans 'Press Delete to proceed or Cancel to cancel deletion' %}"); |
|
93 |
$("#myModalLabel2").html("{% trans 'Delete Monitored Realm Parameters' %} "+name); |
|
94 |
$('#myModal2').modal('show'); |
|
95 |
$("#modalfooter1").show(); |
|
96 |
return false; |
|
97 |
}); |
|
98 |
|
|
99 |
$("#delmonlocauthparSubmit").click(function(){ |
|
100 |
$.ajax({ |
|
101 |
url:"{% url del-monlocauthpar %}/?monlocauthpar_pk="+monlocauthpar_pk, |
|
102 |
type: "GET", |
|
103 |
success: function(data){ |
|
104 |
if (data.error){ |
|
105 |
$("#modalfooter2").hide(); |
|
106 |
$("#mymodalbody2").html("<font style='color:#B94A48'>"+data.error+"</font>"); |
|
107 |
} |
|
108 |
if (data.success){ |
|
109 |
$("#modalfooter2").hide(); |
|
110 |
$("#mymodalbody2").html("monitored realm parameters "+name+" successfully deleted"); |
|
111 |
window.setTimeout('location.reload()', 1000); |
|
112 |
|
|
113 |
} |
|
114 |
} |
|
115 |
}); |
|
116 |
}); |
|
117 |
{% endif %} |
|
118 |
}); |
|
119 |
</script> |
|
120 |
|
|
121 |
{% endblock %} |
|
122 |
|
|
123 |
{% block navbar %} |
|
124 |
|
|
125 |
{% endblock %} |
|
126 |
|
|
127 |
{% block homeactive %}{% endblock %} |
|
128 |
{% block instrealmmon %}class="active"{% endblock %} |
|
129 |
{% block subcontent %} |
|
130 |
|
|
131 |
<h4>{% trans "Monitored Realms" %}</h4> |
|
132 |
<hr> |
|
133 |
{% if messages %} |
|
134 |
<table class="table table-condensed"> |
|
135 |
|
|
136 |
{% for message in messages %} |
|
137 |
<tr {% if message.tags %} class="{{ message.tags }}"{% endif %}><td>{{ message }}<td></tr> |
|
138 |
{% endfor %} |
|
139 |
</table> |
|
140 |
{% endif %} |
|
141 |
<div><a href="{% url edit-instrealmmon %}" class="btn btn-primary">{% trans "Add monitored realm" %}</a></div> |
|
142 |
<div class="span10"></div> |
|
143 |
{% if realms %} |
|
144 |
<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" width="100%" id="table"> |
|
145 |
<thead> |
|
146 |
<tr> |
|
147 |
<th>{% trans "Realm" %}</th> |
|
148 |
<th>{% trans "Type" %}</th> |
|
149 |
|
|
150 |
|
|
151 |
<th style="text-align: center;">{% trans "Action" %}</th> |
|
152 |
<th> |
|
153 |
{% trans "Parameters" %} |
|
154 |
</th> |
|
155 |
</tr> |
|
156 |
</thead> |
|
157 |
|
|
158 |
<tbody> |
|
159 |
{% for realm in realms %} |
|
160 |
<tr class="GradeC"> |
|
161 |
<td>{{realm.realm}}</td> |
|
162 |
<td style="width: 120px;"> |
|
163 |
{{realm.get_mon_type_display}} |
|
164 |
</td> |
|
165 |
<td style="text-align: center;"> |
|
166 |
|
|
167 |
<a href="{% url edit-instrealmmon realm.pk %}" class="btn btn-small">{% trans "edit" %}</a> |
|
168 |
<a href="#" id="del_instrealmmon_{{realm.pk}}" data-realmname="{{realm.realm}}" class="btn btn-small btn-warning">{% trans "delete" %}</a> |
|
169 |
</td> |
|
170 |
<td style="text-align: center;"> |
|
171 |
{% if realm.monlocalauthnparam %} |
|
172 |
<div class="well paramwell"> |
|
173 |
<div class="row"> |
|
174 |
<div class="span6"> |
|
175 |
|
|
176 |
<dl class="dl-horizontal" style=" text-align: left;"> |
|
177 |
<dt>Method</dt> |
|
178 |
<dd>{{realm.monlocalauthnparam.get_eap_method_display}}</dd> |
|
179 |
<dt>Phase 2</dt> |
|
180 |
<dd>{{realm.monlocalauthnparam.get_phase2_display}}</dd> |
|
181 |
<dt>Username</dt> |
|
182 |
<dd>{{realm.monlocalauthnparam.username}}</dd> |
|
183 |
</dl> |
|
184 |
</div> |
|
185 |
<div class="span6"> |
|
186 |
<a href="{% url edit-monlocauthpar realm.pk realm.monlocalauthnparam.pk %}" class="btn btn-mini">{% trans "edit" %}</a> |
|
187 |
<a href="#" id="del_monlocauthpar_{{realm.monlocalauthnparam.pk}}" data-realmname="{{realm.realm}}" class="btn btn-small btn-warning">{% trans "delete" %}</a> |
|
188 |
|
|
189 |
</div> |
|
190 |
</div> |
|
191 |
|
|
192 |
{% else %} |
|
193 |
{% if not realm.monlocalauthnparam %}<a href="{% url edit-monlocauthpar realm.pk %}" class="btn btn-mini btn-primary">{% trans "add" %}</a>{% endif %} |
|
194 |
{% endif %} |
|
195 |
</td> |
|
196 |
|
|
197 |
|
|
198 |
</tr> |
|
199 |
|
|
200 |
{% endfor %} |
|
201 |
</tbody> |
|
202 |
</table> |
|
203 |
{% endif %} |
|
204 |
<div class="modal hide fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> |
|
205 |
<div class="modal-header"> |
|
206 |
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
|
207 |
<h3 id="myModalLabel">{% trans "Delete monitored realm" %}</h3> |
|
208 |
</div> |
|
209 |
<div class="modal-body" id="mymodalbody"> |
|
210 |
|
|
211 |
</div> |
|
212 |
<div class="modal-footer" id="modalfooter1"> |
|
213 |
<button class="btn" data-dismiss="modal" aria-hidden="true">{% trans "Cancel" %}</button> |
|
214 |
<a class="btn btn-warning" id="delrealmSubmit" href="#">{% trans "Delete" %}</a> |
|
215 |
</div> |
|
216 |
</div> |
|
217 |
|
|
218 |
<div class="modal hide fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> |
|
219 |
<div class="modal-header"> |
|
220 |
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
|
221 |
<h3 id="myModalLabel2">{% trans "Delete monitored realm" %}</h3> |
|
222 |
</div> |
|
223 |
<div class="modal-body" id="mymodalbody2"> |
|
224 |
|
|
225 |
</div> |
|
226 |
<div class="modal-footer" id="modalfooter2"> |
|
227 |
<button class="btn" data-dismiss="modal" aria-hidden="true">{% trans "Cancel" %}</button> |
|
228 |
<a class="btn btn-warning" id="delmonlocauthparSubmit" href="#">{% trans "Delete" %}</a> |
|
229 |
</div> |
|
230 |
</div> |
|
231 |
{% endblock %} |
|
232 |
|
b/djnro/templates/edumanage/monlocauthpar_edit.html | ||
---|---|---|
1 |
{% extends "edumanage/welcome.html"%} |
|
2 |
{% load i18n %} |
|
3 |
{% block crumbs %} |
|
4 |
<li><a href="{% url manage %}">{% trans "Home" %}</a><span class="divider">/</span></li> |
|
5 |
<li><a href="{% url instrealmmon %}">{% trans "Monitored Realms" %}</a><span class="divider">/</span></li> |
|
6 |
<li class="active">{% if edit %}{{realm.realm}} parameters ({% trans "edit" %}){% else %}{% trans "Add Monitored Realm Parameters" %} ({{realm.realm}}){% endif %}</li> |
|
7 |
{% endblock %} |
|
8 |
{% block extrahead %} |
|
9 |
<script type="text/javascript" src="/static/js/jquery.min.js"></script> |
|
10 |
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=false"></script> |
|
11 |
|
|
12 |
<script src="/static/js/bootstrap.min.js"></script> |
|
13 |
<script type="text/javascript" src="/static/js/showpass.js"></script> |
|
14 |
<script type="text/javascript"> |
|
15 |
$(document).ready(function() { |
|
16 |
$('#id_passwp').showPassword(); |
|
17 |
}); |
|
18 |
</script> |
|
19 |
|
|
20 |
|
|
21 |
{% endblock %} |
|
22 |
|
|
23 |
{% block homeactive %}{% endblock %} |
|
24 |
{% block instrealmmon %}class="active"{% endblock %} |
|
25 |
{% block subcontent %} <h4>{% if edit %}{{realm.realm}} parameters ({% trans "edit" %}){% else %}{% trans "Add Monitored Realm Parameters" %} ({{realm.realm}}){% endif %}</h4> |
|
26 |
<hr> |
|
27 |
<form method="POST" class="form-horizontal"> |
|
28 |
{% csrf_token %} |
|
29 |
{% if form.non_field_errors %} |
|
30 |
<div class="text-error" style="color: #B94A48">{{form.non_field_errors}}</div> |
|
31 |
{% endif %} |
|
32 |
<div style="display: none"> |
|
33 |
{{form.instrealmmonid}} |
|
34 |
</div> |
|
35 |
<div class="control-group {% if form.ertype.errors %} error {% endif %}"> |
|
36 |
<label class="control-label" for="id_realm"><b>{% trans "Realm" %}</b></label> |
|
37 |
<div class="controls"> |
|
38 |
<input class="input" id="disabledInput" type="text" placeholder="{{realm.realm}}" disabled> |
|
39 |
</div> |
|
40 |
</div> |
|
41 |
<div class="control-group {% if form.eap_method.errors %} error {% endif %}"> |
|
42 |
<label class="control-label" for="id_eap_method"><b>{% trans "EAP Method" %}</b></label> |
|
43 |
<div class="controls"> |
|
44 |
{{ form.eap_method }} |
|
45 |
{% if form.eap_method.errors %} <span class="help-inline"> {{ form.eap_method.errors|join:", " }} </span> |
|
46 |
{% endif %} <span class="help-block"> {{ form.eap_method.help_text }}</span> |
|
47 |
</div> |
|
48 |
</div> |
|
49 |
<div class="control-group {% if form.phase2.errors %} error {% endif %}"> |
|
50 |
<label class="control-label" for="id_phase2"><b>{% trans "EAP2 Method" %}</b></label> |
|
51 |
<div class="controls"> |
|
52 |
{{ form.phase2 }} |
|
53 |
{% if form.phase2.errors %} <span class="help-inline"> {{ form.phase2.errors|join:", " }} </span> |
|
54 |
{% endif %} <span class="help-block"> {{ form.phase2.help_text }}</span> |
|
55 |
</div> |
|
56 |
</div> |
|
57 |
<div class="control-group {% if form.username.errors %} error {% endif %}"> |
|
58 |
<label class="control-label" for="id_username"><b>{% trans "Username" %}</b></label> |
|
59 |
<div class="controls"> |
|
60 |
{{ form.username }} |
|
61 |
{% if form.username.errors %} <span class="help-inline"> {{ form.username.errors|join:", " }} </span> |
|
62 |
{% endif %} <span class="help-block"> {{ form.username.help_text }}</span> |
|
63 |
</div> |
|
64 |
</div> |
|
65 |
<div class="control-group {% if form.passwp.errors %} error {% endif %}"> |
|
66 |
<label class="control-label" for="id_passwp"><b>{% trans "Password" %}</b></label> |
|
67 |
<div class="controls"> |
|
68 |
<input type="password" maxlength="80" name="passwp" id="id_passwp" {% if edit %}value='{{form.instance.passwp}}'{% endif %} {% if form.data.passwp %}value='{{form.data.passwp}}'{% endif %}> |
|
69 |
{% if form.passwp.errors %} <span class="help-inline"> {{ form.passwp.errors|join:", " }} </span> |
|
70 |
{% endif %} <span class="help-block"> {{ form.passwp.help_text }}</span> |
|
71 |
</div> |
|
72 |
</div> |
|
73 |
<div class="control-group"> |
|
74 |
<div class="controls"> |
|
75 |
<button type="submit" id="applybutton" value="Apply" class="btn btn-primary"/> |
|
76 |
{% trans "Apply" %}</button> |
|
77 |
</div> |
|
78 |
</div> |
|
79 |
</form> |
|
80 |
{% endblock %} |
|
81 |
|
b/djnro/templates/edumanage/realms.html | ||
---|---|---|
1 |
{% extends "edumanage/welcome.html"%} |
|
2 |
{% load i18n %} |
|
3 |
{% block crumbs %} |
|
4 |
<li><a href="{% url manage %}">{% trans "Home" %}</a><span class="divider">/</span></li> |
|
5 |
<li class="active">{% trans "Realms" %}</li> |
|
6 |
{% endblock %} |
|
7 |
{% load i18n %} |
|
8 |
{% block extrahead %} |
|
9 |
<script type="text/javascript" src="/static/js/jquery.dataTables.min.js"></script> |
|
10 |
<script type="text/javascript" src="/static/js/datatables_bootstrap.js"></script> |
|
11 |
<script type="text/javascript"> |
|
12 |
$(document).ready(function(){ |
|
13 |
{% if realms %} |
|
14 |
var oTable = $('#table').dataTable({ |
|
15 |
"sPaginationType": "bootstrap", |
|
16 |
"sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>", |
|
17 |
"aoColumns": [{ |
|
18 |
"bSearchable": true, |
|
19 |
"bSortable": true |
|
20 |
}, { |
|
21 |
"bSearchable": true, |
|
22 |
"bSortable": true |
|
23 |
}, { |
|
24 |
"bVisible": true, |
|
25 |
"bSearchable": false, |
|
26 |
"bSortable": false |
|
27 |
}], |
|
28 |
"aaSorting": [[0, 'desc']], |
|
29 |
"iDisplayLength": 25, |
|
30 |
"oSearch": {"bSmart": false, "bRegex":true}, |
|
31 |
"oLanguage": { |
|
32 |
"sLengthMenu": '{% trans "Display" %} <select><option value="25">25</option><option value="50">50</option><option value="-1">{% trans "All" %}</option></select> {% trans "realms" %}', |
|
33 |
"sProcessing": "Processing...", |
|
34 |
"sZeroRecords": '{% trans "No records to display" %}', |
|
35 |
"sInfo": "Showing _START_ to _END_ of _TOTAL_ entries", |
|
36 |
"sInfoEmpty": "{% trans "Showing 0 to 0 of 0 entries" %}", |
|
37 |
"sInfoFiltered": "(filtered from _MAX_ total entries)", |
|
38 |
"sInfoPostFix": "", |
|
39 |
"sSearch": '{% trans "Search:" %}', |
|
40 |
"sUrl": "", |
|
41 |
"oPaginate": { |
|
42 |
"sFirst": '{% trans "First" %}', |
|
43 |
"sPrevious": '{% trans "Previous" %}', |
|
44 |
"sNext": '{% trans "Next" %}', |
|
45 |
"sLast": '{% trans "Last" %}' |
|
46 |
} |
|
47 |
} |
|
48 |
}); |
|
49 |
|
|
50 |
oTable.fnDraw(); |
|
51 |
|
|
52 |
$('[id^=del_realm_]').click(function(){ |
|
53 |
realm_id = (this.id).replace("del_realm_", ''); |
|
54 |
name = this.getAttribute("data-realmname"); |
|
55 |
$("#mymodalbody").html("You are about to delete realm: <b>"+name+"</b><br>Press Delete to proceed or Cancel to cancel deletion"); |
|
56 |
$("#myModalLabel").html("Delete Realm "+name); |
|
57 |
$('#myModal').modal('show'); |
|
58 |
$(".modal-footer").show(); |
|
59 |
$("#realm_name_del").html(name) |
|
60 |
return false; |
|
61 |
}); |
|
62 |
|
|
63 |
$("#delrealmSubmit").click(function(){ |
|
64 |
$.ajax({ |
|
65 |
url:"{% url del-realm %}/?realm_pk="+realm_id, |
|
66 |
type: "GET", |
|
67 |
success: function(data){ |
|
68 |
if (data.error){ |
|
69 |
$(".modal-footer").hide(); |
|
70 |
$("#mymodalbody").html("<font style='color:#B94A48'>"+data.error+"</font>"); |
|
71 |
} |
|
72 |
if (data.success){ |
|
73 |
$(".modal-footer").hide(); |
|
74 |
$("#mymodalbody").html("Realm "+name+" successfully deleted"); |
|
75 |
window.setTimeout('location.reload()', 1000); |
|
76 |
|
|
77 |
} |
|
78 |
} |
|
79 |
}); |
|
80 |
}); |
|
81 |
|
|
82 |
{% endif %} |
|
83 |
}); |
|
84 |
</script> |
|
85 |
{% endblock %} |
|
86 |
|
|
87 |
{% block navbar %} |
|
88 |
|
|
89 |
{% endblock %} |
|
90 |
|
|
91 |
{% block homeactive %}{% endblock %} |
|
92 |
{% block realmsactive %}class="active"{% endblock %} |
|
93 |
{% block subcontent %} |
|
94 |
|
|
95 |
|
|
96 |
<h4>Realms</h4> |
|
97 |
<hr> |
|
98 |
{% if messages %} |
|
99 |
<table class="table table-condensed"> |
|
100 |
|
|
101 |
{% for message in messages %} |
|
102 |
<tr {% if message.tags %} class="{{ message.tags }}"{% endif %}><td>{{ message }}<td></tr> |
|
103 |
{% endfor %} |
|
104 |
</table> |
|
105 |
{% endif %} |
|
106 |
<div>{% if institution.ertype == 1 or institution.ertype == 3 %}<a href="{% url edit-realms %}" class="btn btn-primary">{% trans "Add new realm" %}</a>{% endif %}</div> |
|
107 |
<div class="span10"></div> |
|
108 |
{% if institution.ertype == 1 or institution.ertype == 3 %} |
|
109 |
{% if realms %} |
|
110 |
<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" width="100%" id="table"> |
|
111 |
<thead> |
|
112 |
<tr> |
|
113 |
<th>Realm</th> |
|
114 |
<th>Server(s)</th> |
|
115 |
<th style="text-align: center;">{% trans "Action" %}</th> |
|
116 |
</tr> |
|
117 |
</thead> |
|
118 |
|
|
119 |
<tbody> |
|
120 |
{% for realm in realms %} |
|
121 |
<tr class="GradeC"> |
|
122 |
<td>{{realm.realm}}</td> |
|
123 |
<td>{{realm.get_servers}}</td> |
|
124 |
<td style="text-align: center;"><a href="{% url edit-realms realm.pk %}" class="btn btn-small">{% trans "edit" %}</a> <a href="#" id="del_realm_{{realm.pk}}" data-realmname="{{realm.realm}}" class="btn btn-small btn-warning">{% trans "delete" %}</a></td> |
|
125 |
</tr> |
|
126 |
{% endfor %} |
|
127 |
</tbody> |
|
128 |
</table> |
|
129 |
{% endif %} |
|
130 |
{% endif %} |
|
131 |
<div class="modal hide fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> |
|
132 |
<div class="modal-header"> |
|
133 |
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
|
134 |
<h3 id="myModalLabel">{% trans "Delete Realm" %}</h3> |
|
135 |
</div> |
|
136 |
<div class="modal-body" id="mymodalbody"> |
|
137 |
|
|
138 |
</div> |
|
139 |
<div class="modal-footer"> |
|
140 |
<button class="btn" data-dismiss="modal" aria-hidden="true">{% trans "Cancel" %}</button> |
|
141 |
<a class="btn btn-warning" id="delrealmSubmit" href="#">{% trans "Delete" %}</a> |
|
142 |
</div> |
|
143 |
</div> |
|
144 |
{% endblock %} |
|
145 |
|
b/djnro/templates/edumanage/realms_edit.html | ||
---|---|---|
1 |
{% extends "edumanage/welcome.html"%} |
|
2 |
{% load i18n %} |
|
3 |
{% block crumbs %} |
|
4 |
<li><a href="{% url manage %}">{% trans "Home" %}</a><span class="divider">/</span></li> |
|
5 |
<li><a href="{% url realms %}">{% trans "Realms" %}</a><span class="divider">/</span></li> |
|
6 |
<li class="active">{% if edit %}{{form.instance.realm}} ({% trans "edit" %}){% else %}{% trans "Add Realm" %}{% endif %}</li> |
|
7 |
{% endblock %} |
|
8 |
{% block extrahead %} |
Also available in: Unified diff