Commit 4772922a authored by Kroustouris Stauros's avatar Kroustouris Stauros

final touches

parent 1d70dbce
Version 1
==============
- redesign (bootstrap 3)
- fix google auth
- add requirements.txt file (for pip)
Version 0.9
==============
......
#DjNRO#
# DjNRO
##Description##
## Description
DjNRO is more than keeping eduroam.org updated with data. In essence it is a distributed management application.
It is distributed in the sense that information about each institution locations and services is kept up-to-date by each local eduroam administrator.
Keeping in pace with eduroam's federated nature, the implementation uses federated authentication/authorisation mechanisms, namely Shibboleth plus social media itegration.
The local institution eduroam administrators can become DjNRO admins. Local eduroam administrators register to the application via Shibboleth.
Once the accounts are acitvated, local eduroam admins can manage their eduroam locations, contact points and institution information.
##Installation Considerations##
## Installation Considerations
[![Documentation Status](https://readthedocs.org/projects/djnro/badge/?version=latest)](https://readthedocs.org/projects/djnro/?badge=latest)
You can find the installation instructions for Debian Wheezy (64)
with Django 1.4.x at [Djnro documentation](http://djnro.readthedocs.org).
If upgrading from a previous version bear in mind the changes introduced in Django 1.4.
with Django 1.4.x at [Djnro documentation](http://djnro.readthedocs.org).
If upgrading from a previous version bear in mind the changes introduced in Django 1.4.
##Contact##
## Contact
You can find more about Djnro or raise your issues at [GRNET Djnro
repository](https://code.grnet.gr/djnro), [GRNET Djnro Github repository](https://github.com/grnet/djnro), [Djnro mailing list](https://lists.grnet.gr/wws/info/djnro) or [GRNET Djnro minisite](http://djnro.grnet.gr/).
##LICENCE##
Copyright © 2011-2014 Greek Research and Technology Network (GRNET S.A.)
## LICENCE
Copyright © 2011-2015 Greek Research and Technology Network (GRNET S.A.)
Developed by Leonidas Poulopoulos (leopoul-at-noc-dot-grnet-dot-gr),
Zenon Mousmoulas (zmousm-at-noc-dot-grnet-dot-gr) and Stavros Kroustouris
......@@ -38,4 +38,4 @@ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIREC
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
\ No newline at end of file
SOFTWARE.
VERSION = '0.9.1'
VERSION = '1.0'
if __name__ == "__main__":
print VERSION
{% load i18n %}
<form id="add_user_form" method="POST" class="form-horizontal">
<form id="add_user_form" method="POST" class="">
{% csrf_token %}
<div class="control-group {% if form.name.errors %} error {% endif %}">
<label class="control-label" for="id_name"><b>{% trans "Name" %}</b></label>
......
......@@ -2,96 +2,90 @@
{% load i18n %}
{% load staticfiles %}
{% block crumbs %}
<li><a href="{% url manage %}">{% trans "Home" %}</a><span class="divider">/</span></li>
<li class="active">{% trans "CAT Enroll" %}</li>
{% endblock %}
{% block extrahead %}
<script type="text/javascript" src="{% static 'js/jquery.min.js' %}"></script>
<script src="{% static 'js/bootstrap.min.js' %}"></script>
{% endblock %}
{% block homeactive %}{% endblock %}
{% block catactive %}class="active"{% endblock %}
{% block management_content %}
<h4>eduroam CAT enroll</h4>
{% block management_content %}
<h4>eduroam {% trans 'CAT enroll' %}</h4>
{% if messages %}
<table class="table table-condensed">
{% for message in messages %}
<tr {% if message.tags %} class="{{ message.tags }}"{% endif %}><td>{{ message }}<td></tr>
{% endfor %}
</table>
{% endif %}
<table class="table table-condensed">
{% for message in messages %}
<tr {% if message.tags %} class="{{ message.tags }}"{% endif %}><td>{{ message }}<td></tr>
{% endfor %}
</table>
{% endif %}
<hr>
{% if current_enrollments %}
<div class="row">
<div class="span12">
<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" width="100%" id="table">
<thead>
<tr>
<th>{% trans "CAT Institution ID" %}</th>
<th>{% trans "CAT configuration profiles" %}</th>
<th>{% trans "URL/Status" %}</th>
<th>{% trans "CAT instance" %}</th>
<th>{% trans "Applier" %}</th>
</tr>
</thead>
<div class="col-md-12">
<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" width="100%" id="table">
<thead>
<tr>
<th>{% trans "CAT Institution ID" %}</th>
<th>{% trans "CAT configuration profiles" %}</th>
<th>{% trans "URL/Status" %}</th>
<th>{% trans "CAT instance" %}</th>
<th>{% trans "Applier" %}</th>
</tr>
</thead>
<tbody>
{% for enrollment in current_enrollments %}
<tr class="GradeC">
<td>{{enrollment.cat_inst_id}}</td>
<td>{% if enrollment.cat_configuration_url %}<a href="{{enrollment.cat_configuration_url}}" target="_blank">CAT url</a>{% else %}-{% endif %}</td>
<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>
<td>{{enrollment.cat_instance}}</td>
<td>{{enrollment.applier.first_name}} {{enrollment.applier.last_name}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<tbody>
{% for enrollment in current_enrollments %}
<tr class="GradeC">
<td>{{enrollment.cat_inst_id}}</td>
<td>{% if enrollment.cat_configuration_url %}<a href="{{enrollment.cat_configuration_url}}" target="_blank">CAT url</a>{% else %}-{% endif %}</td>
<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>
<td>{{enrollment.cat_instance}}</td>
<td>{{enrollment.applier.first_name}} {{enrollment.applier.last_name}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endif %}
{% if cat_instances %}
<div class="row">
<div class="span6 well">
<form method="POST" class="form-horizontal" id="catenroll_form" action="{% url catenroll %}">
{% csrf_token %}
<div class="control-group">
<label class="control-label" for="id_catinstance"><b>{% trans "CAT instance" %}</b></label>
<div class="controls">
<select id="catinstance" name="catinstance">
{% for instance in cat_instances %}
<option value="{{instance.0}}">{{instance.1}}</option>
{% endfor %}
</select>
</div>
</div>
<div class="control-group">
<div class="controls">
<button type="submit" id="applybutton" value="Apply" class="btn btn-primary">
{% trans "Apply" %}</button>
</div>
<div class="col-md-6">
<form method="POST" class="" id="catenroll_form" action="{% url catenroll %}">
{% csrf_token %}
<div class="form-group">
<label class="control-label" for="id_catinstance"><b>{% trans "CAT instance" %}</b></label>
<div class="controls">
<select id="catinstance" name="catinstance">
{% for instance in cat_instances %}
<option value="{{instance.0}}">{{instance.1}}</option>
{% endfor %}
</select>
</div>
</div>
<div class="control-group">
<div class="controls">
<button type="submit" id="applybutton" value="Apply" class="btn btn-primary">
{% trans "Apply" %}
</button>
</div>
</div>
</form>
</div>
</form>
</div></div>
</div>
{% endif %}
{% if response_status %}
<div class="row">
<div class="span12">
<div class="alert {% if response_status == 'Error' %}alert-error{% else %}alert-success{% endif %}">
<div><strong>Status:</strong> {{response_status}}</div>
{% if not cat_url %}
<div><strong>Response:</strong> {{response}}</div>
{% else %}
<div><strong>Institution Id:</strong> {{inst_uid}}</div>
<div><strong>CAT url:</strong> <a href="{{cat_url}}" target="_blank">{{cat_url}}</a></div>
{% endif %}
<div class="col-md-12">
<div class="alert {% if response_status == 'Error' %}alert-error{% else %}alert-success{% endif %}">
<div><strong>{% trans 'Status' %}:</strong> {{response_status}}</div>
{% if not cat_url %}
<div><strong>{% trans 'Response' %}:</strong> {{response}}</div>
{% else %}
<div><strong>{% trans 'Institution Id' %}:</strong> {{inst_uid}}</div>
<div><strong>{% trans 'CAT url' %}:</strong> <a href="{{cat_url}}" target="_blank">{{cat_url}}</a></div>
{% endif %}
</div>
</div>
</div>
</div>
{% endif %}
{% endblock %}
......@@ -2,57 +2,112 @@
{% load i18n %}
{% load staticfiles %}
{% block crumbs %}
<li><a href="{% url manage %}">{% trans "Home" %}</a><span class="divider">/</span></li>
<li class="active">{% trans "Contacts" %}</li>
{% block homeactive %}{% endblock %}
{% block contactsactive %}class="active"{% endblock %}
{% block management_content %}
<h4>{% trans "Contacts" %}</h4>
<hr>
{% if messages %}
<table class="table table-condensed">
{% for message in messages %}
<tr {% if message.tags %} class="{{ message.tags }}"{% endif %}><td>{{ message }}<td></tr>
{% endfor %}
</table>
{% endif %}
{% if contacts %}
<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" width="100%" id="table">
<thead>
<tr>
<th>{% trans "Name" %}</th>
<th>{% trans "Email" %}</th>
<th>{% trans "Phone" %}</th>
<th style="text-align: center;">{% trans "Action" %}</th>
</tr>
</thead>
<tbody>
{% for contact in contacts %}
<tr class="GradeC">
<td>{{contact.name}}</td>
<td>{{contact.email}}</td>
<td>{{contact.phone}}</td>
<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>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
<div><a href="{% url edit-contacts %}" class="btn btn-primary">{% trans "Add new contact" %}</a></div>
<div class="modal" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">{% trans "Delete contact" %}</h3>
</div>
<div class="modal-body" id="mymodalbody"></div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">{% trans "Cancel" %}</button>
<a class="btn btn-warning" id="delcontactSubmit" href="#">{% trans "Delete" %}</a>
</div>
</div>
</div>
</div>
{% endblock %}
{% block extrahead %}
<script type="text/javascript" src="{% static 'js/jquery.dataTables.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/datatables_bootstrap.js' %}"></script>
{% block extrajs %}
<script type="text/javascript" src="//cdn.datatables.net/1.10.7/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="//cdn.datatables.net/plug-ins/505bef35b56/integration/bootstrap/1/dataTables.bootstrap.js"></script>
<script type="text/javascript">
$(document).ready(function(){
{% if contacts %}
var oTable = $('#table').dataTable({
"sPaginationType": "bootstrap",
"sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
"aoColumns": [{
"bSearchable": true,
"bSortable": true
}, {
"bSearchable": true,
"bSortable": true
}, {
"bSearchable": true,
"bSortable": true
}, {
"bVisible": true,
"bSearchable": false,
"bSortable": false
}],
"aaSorting": [[0, 'desc']],
"iDisplayLength": 25,
"oSearch": {"bSmart": false, "bRegex":true},
"oLanguage": {
"sLengthMenu": '{% trans "Display" %} <select><option value="25">25</option><option value="50">50</option><option value="-1">{% trans "All" %}</option></select> {% trans "contacts" %}',
"sProcessing": "Processing...",
"sZeroRecords": '{% trans "No records to display" %}',
"sInfo": "Showing _START_ to _END_ of _TOTAL_ entries",
"sInfoEmpty": "{% trans "Showing 0 to 0 of 0 entries" %}",
"sInfoFiltered": "(filtered from _MAX_ total entries)",
"sInfoPostFix": "",
"sSearch": '{% trans "Search:" %}',
"sUrl": "",
"oPaginate": {
"sFirst": '{% trans "First" %}',
"sPrevious": '{% trans "Previous" %}',
"sNext": '{% trans "Next" %}',
"sLast": '{% trans "Last" %}'
}
}
});
var oTable = $('#table')
.on( 'init.dt', function () {
$('.pagination ul').addClass('pagination');
})
.dataTable({
"sPaginationType": "bootstrap",
"sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
"aoColumns": [{
"bSearchable": true,
"bSortable": true
}, {
"bSearchable": true,
"bSortable": true
}, {
"bSearchable": true,
"bSortable": true
}, {
"bVisible": true,
"bSearchable": false,
"bSortable": false
}],
"aaSorting": [[0, 'desc']],
"iDisplayLength": 25,
"oSearch": {"bSmart": false, "bRegex":true},
"oLanguage": {
"sLengthMenu": '{% trans "Display" %} <select><option value="25">25</option><option value="50">50</option><option value="-1">{% trans "All" %}</option></select> {% trans "contacts" %}',
"sProcessing": "Processing...",
"sZeroRecords": '{% trans "No records to display" %}',
"sInfo": "Showing _START_ to _END_ of _TOTAL_ entries",
"sInfoEmpty": "{% trans "Showing 0 to 0 of 0 entries" %}",
"sInfoFiltered": "(filtered from _MAX_ total entries)",
"sInfoPostFix": "",
"sSearch": '{% trans "Search:" %}',
"sUrl": "",
"oPaginate": {
"sFirst": '{% trans "First" %}',
"sPrevious": '{% trans "Previous" %}',
"sNext": '{% trans "Next" %}',
"sLast": '{% trans "Last" %}'
}
}
});
oTable.fnDraw();
oTable.fnDraw();
$('[id^=del_contact_]').click(function(){
contact_id = (this.id).replace("del_contact_", '');
......@@ -88,62 +143,3 @@ $("#delcontactSubmit").click(function(){
});
</script>
{% endblock %}
{% block navbar %}
{% endblock %}
{% block homeactive %}{% endblock %}
{% block contactsactive %}class="active"{% endblock %}
{% block management_content %}
<h4>{% trans "Contacts" %}</h4>
<hr>
{% if messages %}
<table class="table table-condensed">
{% for message in messages %}
<tr {% if message.tags %} class="{{ message.tags }}"{% endif %}><td>{{ message }}<td></tr>
{% endfor %}
</table>
{% endif %}
<div><a href="{% url edit-contacts %}" class="btn btn-primary">{% trans "Add new contact" %}</a></div>
<div class="span10"></div>
{% if contacts %}
<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" width="100%" id="table">
<thead>
<tr>
<th>{% trans "Name" %}</th>
<th>{% trans "Email" %}</th>
<th>{% trans "Phone" %}</th>
<th style="text-align: center;">{% trans "Action" %}</th>
</tr>
</thead>
<tbody>
{% for contact in contacts %}
<tr class="GradeC">
<td>{{contact.name}}</td>
<td>{{contact.email}}</td>
<td>{{contact.phone}}</td>
<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>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
<div class="modal hide fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">{% trans "Delete contact" %}</h3>
</div>
<div class="modal-body" id="mymodalbody">
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">{% trans "Cancel" %}</button>
<a class="btn btn-warning" id="delcontactSubmit" href="#">{% trans "Delete" %}</a>
</div>
</div>
{% endblock %}
{% extends "edumanage/welcome.html"%}
{% load i18n %}
{% load staticfiles %}
{% block crumbs %}
<li><a href="{% url manage %}">{% trans "Home" %}</a><span class="divider">/</span></li>
<li><a href="{% url contacts %}">{% trans "Contacts" %}</a><span class="divider">/</span></li>
<li class="active">{% if edit %}{{form.instance.name}} ({% trans "edit" %}){% else %}{% trans "Add Contact" %}{% endif %}</li>
{% endblock %}
{% block extrahead %}
<script type="text/javascript" src="{% static 'js/jquery.min.js' %}"></script>
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=false"></script>
{% endblock %}
{% block homeactive %}{% endblock %}
{% block contactsactive %}class="active"{% endblock %}
{% block management_content %} <h4>{% if edit %}{{form.instance.name}} ({% trans "edit" %}){% else %}{% trans "Add Contact" %}{% endif %}</h4>
{% block management_content %}
<h4>{% if edit %}{{form.instance.name}} ({% trans "edit" %}){% else %}{% trans "Add Contact" %}{% endif %}</h4>
<hr>
<form method="POST" class="form-horizontal">
<form method="POST" class="">
{% csrf_token %}
{% if form.non_field_errors %}
<p class="error">
......
......@@ -8,7 +8,6 @@
<h4>{% tolocale institution LANGUAGE_CODE%} {% trans "Edit" %}</h4>
<hr>
<div class="col-md-12">
<form method="POST">
{% csrf_token %}
......
{% extends "edumanage/welcome.html"%}
{% load staticfiles %}
{% load i18n %}
{% block crumbs %}
<li><a href="{% url manage %}">{% trans "Home" %}</a><span class="divider">/</span></li>
<li><a href="{% url instrealmmon %}">{% trans "Monitored Realms" %}</a><span class="divider">/</span></li>
<li class="active">{% if edit %}{{form.instance.realm}} ({% trans "edit" %}){% else %}{% trans "Add Monitored Realm" %}{% endif %}</li>
{% endblock %}
{% block extrahead %}
<script type="text/javascript" src="{% static 'js/jquery.min.js' %}"></script>
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=false"></script>
{% block extrajs %}
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=false"></script>
{% endblock %}
{% block homeactive %}{% endblock %}
{% block instrealmmon %}class="active"{% endblock %}
{% block management_content %}
<h4>{% if edit %}Monitored realm: {{form.instance.realm}} ({% trans "edit" %}){% else %}{% trans "Add Monitored Realm" %}{% endif %}</h4>
<h4>{% if edit %}{% trans 'Monitored realm' %}: {{form.instance.realm}} ({% trans "edit" %}){% else %}{% trans "Add Monitored Realm" %}{% endif %}</h4>
<hr>
<form method="POST" class="form-horizontal">
<form method="POST" class="">
{% csrf_token %}
{% if form.non_field_errors %}
<div class="text-error" style="color: #B94A48">{{form.non_field_errors}}</div>
......
{% extends "edumanage/welcome.html"%}
{% load i18n %}
{% load staticfiles %}
{% block crumbs %}
<li><a href="{% url manage %}">{% trans "Home" %}</a><span class="divider">/</span></li>
<li><a href="{% url instrealmmon %}">{% trans "Monitored Realms" %}</a><span class="divider">/</span></li>
<li class="active">{% if edit %}{{realm.realm}} parameters ({% trans "edit" %}){% else %}{% trans "Add Monitored Realm Parameters" %} ({{realm.realm}}){% endif %}</li>
{% endblock %}
{% block extrahead %}
<script type="text/javascript" src="{% static 'js/jquery.min.js' %}"></script>
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=false"></script>
<script src="{% static 'js/bootstrap.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/showpass.js' %}"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#id_passwp').showPassword();
});
</script>
{% endblock %}
{% block homeactive %}{% endblock %}
{% block instrealmmon %}class="active"{% endblock %}
{% block management_content %}
<h4>{% if edit %}{{realm.realm}} parameters ({% trans "edit" %}){% else %}{% trans "Add Monitored Realm Parameters" %} ({{realm.realm}}){% endif %}</h4>
<h4>{% if edit %}{{realm.realm}} {% trans 'parameters' %} ({% trans "edit" %}){% else %}{% trans "Add Monitored Realm Parameters" %} ({{realm.realm}}){% endif %}</h4>
<hr>
<form method="POST" class="form-horizontal">
<form method="POST" class="">
{% csrf_token %}
{% if form.non_field_errors %}
<div class="text-error" style="color: #B94A48">{{form.non_field_errors}}</div>
......@@ -82,3 +63,12 @@ $(document).ready(function() {
</form>
{% endblock %}
{% block extrajs %}
<script type="text/javascript" src="{% static 'js/showpass.js' %}"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#id_passwp').showPassword();
});
</script>
{% endblock %}
......@@ -2,52 +2,109 @@
{% load staticfiles %}
{% load i18n %}
{% block crumbs %}
<li><a href="{% url manage %}">{% trans "Home" %}</a><span class="divider">/</span></li>
<li class="active">{% trans "Realms" %}</li>
{% block homeactive %}{% endblock %}
{% block realmsactive %}class="active"{% endblock %}
{% block management_content %}
<h4>{% trans "Realms" %}</h4>
<hr>
{% if messages %}
<table class="table table-condensed">
{% for message in messages %}
<tr {% if message.tags %} class="{{ message.tags }}"{% endif %}><td>{{ message }}<td></tr>
{% endfor %}
</table>
{% endif %}
{% if institution.ertype == 1 or institution.ertype == 3 %}
{% if realms %}
<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" width="100%" id="table">
<thead>
<tr>
<th>{% trans "Realm" %}</th>
<th>{% trans "Server(s)" %}</th>
<th style="text-align: center;">{% trans "Action" %}</th>
</tr>
</thead>
<tbody>
{% for realm in realms %}
<tr class="GradeC">
<td>{{realm.realm}}</td>
<td>{{realm.get_servers}}</td>
<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>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
<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>
{% endif %}
<div class="modal" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">{% trans "Delete Realm" %}</h3>
</div>
<div class="modal-body" id="mymodalbody">
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">{% trans "Cancel" %}</button>
<a class="btn btn-warning" id="delrealmSubmit" href="#">{% trans "Delete" %}</a>
</div>
</div>
</div>
</div>
{% endblock %}
{% block extrahead %}
<script type="text/javascript" src="{% static 'js/jquery.dataTables.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/datatables_bootstrap.js' %}"></script>
{% block extrajs %}
<script type="text/javascript" src="//cdn.datatables.net/1.10.7/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="//cdn.datatables.net/plug-ins/505bef35b56/integration/bootstrap/1/dataTables.bootstrap.js"></script>
<script type="text/javascript">
$(document).ready(function(){
{% if realms %}
var oTable = $('#table').dataTable({
"sPaginationType": "bootstrap",
"sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
"aoColumns": [{
"bSearchable": true,
"bSortable": true
}, {
"bSearchable": true,
"bSortable": true
}, {
"bVisible": true,
"bSearchable": false,
"bSortable": false
}],
"aaSorting": [[0, 'desc']],
"iDisplayLength": 25,
"oSearch": {"bSmart": false, "bRegex":true},
"oLanguage": {
"sLengthMenu": '{% trans "Display" %} <select><option value="25">25</option><option value="50">50</option><option value="-1">{% trans "All" %}</option></select> {% trans "realms" %}',
"sProcessing": "Processing...",
"sZeroRecords": '{% trans "No records to display" %}',
"sInfo": "Showing _START_ to _END_ of _TOTAL_ entries",
"sInfoEmpty": "{% trans "Showing 0 to 0 of 0 entries" %}",
"sInfoFiltered": "(filtered from _MAX_ total entries)",
"sInfoPostFix": "",
"sSearch": '{% trans "Search:" %}',
"sUrl": "",
"oPaginate": {
"sFirst": '{% trans "First" %}',
"sPrevious": '{% trans "Previous" %}',
"sNext": '{% trans "Next" %}',
"sLast": '{% trans "Last" %}'
}
}
});
var oTable = $('#table')
.on( 'init.dt', function () {
$('.pagination ul').addClass('pagination');
})
.dataTable({
"sPaginationType": "bootstrap",
"sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
"aoColumns": [{
"bSearchable": true,
"bSortable": true
}, {
"bSearchable": true,
"bSortable": true
}, {
"bVisible": true,
"bSearchable": false,
"bSortable": false
}],
"aaSorting": [[0, 'desc']],
"iDisplayLength": 25,
"oSearch": {"bSmart": false, "bRegex":true},
"oLanguage": {
"sLengthMenu": '{% trans "Display" %} <select><option value="25">25</option><option value="50">50</option><option value="-1">{% trans "All" %}</option></select> {% trans "realms" %}',
"sProcessing": "Processing...",
"sZeroRecords": '{% trans "No records to display" %}',
"sInfo": "Showing _START_ to _END_ of _TOTAL_ entries",
"sInfoEmpty": "{% trans "Showing 0 to 0 of 0 entries" %}",
"sInfoFiltered": "(filtered from _MAX_ total entries)",
"sInfoPostFix": "",
"sSearch": '{% trans "Search:" %}',
"sUrl": "",
"oPaginate": {
"sFirst": '{% trans "First" %}',
"sPrevious": '{% trans "Previous" %}',
"sNext": '{% trans "Next" %}',
"sLast": '{% trans "Last" %}'
}
}
});