Commit af9d484b authored by Leonidas Poulopoulos's avatar Leonidas Poulopoulos

Major form fixes. Added geolocation

parent b1e7b4ee
This diff is collapsed.
......@@ -7,12 +7,12 @@ from django.conf import settings
from django.contrib.contenttypes.generic import BaseGenericInlineFormSet
import pprint
class InstDetailsForm(forms.ModelForm):
class Meta:
model = InstitutionDetails
model = InstitutionDetails
class InstServerForm(forms.ModelForm):
......@@ -24,8 +24,55 @@ class ServiceLocForm(forms.ModelForm):
class Meta:
model = ServiceLoc
class ContactForm(forms.ModelForm):
class Meta:
model = Contact
class NameFormSetFact(BaseGenericInlineFormSet):
def clean(self):
super(NameFormSetFact, self).clean()
print "SELLLL", self.forms
if any(self.errors):
return
langs = []
emptyForms = True
for i in range(0, self.total_form_count()):
form = self.forms[i]
pprint.pprint(form.__dict__)
if len(form.cleaned_data) != 0:
emptyForms = False
langs.append(form.cleaned_data.get('lang', None))
if emptyForms:
raise forms.ValidationError, "Fill in at least one location name in English"
if "en" not in langs:
raise forms.ValidationError, "Fill in at least one location name in English"
class UrlFormSetFact(BaseGenericInlineFormSet):
def clean(self):
#raise forms.ValidationError, "Clean method called"
if any(self.errors):
return
pprint.pprint(self.forms)
for i in range(0, self.total_form_count()):
form = self.forms[i]
pprint.pprint(len(form.cleaned_data))
if len(form.cleaned_data) == 0:
#raise forms.ValidationError, "Fill in at least one url "
pass
#print "ERROROROROR"
#self.append_non_form_error("not enough subs")
# pass
return
# raise forms.ValidationError('Invalid date range')
# def save(self, commit=True, request=None):
# for uform in self.forms:
# urls = uform.save(commit=False)
# urls.content_object = self.instance
# urls.save()
# return self.save_existing_objects(commit) + self.save_new_objects(commit)
......@@ -73,6 +73,9 @@ class URL_i18n(models.Model):
url = models.CharField(max_length=180, db_column='URL')
lang = models.CharField(max_length=5, choices=LANGS)
urltype = models.CharField(max_length=10, choices=URLTYPES, db_column='type')
content_type = models.ForeignKey(ContentType, blank=True, null=True)
object_id = models.PositiveIntegerField(blank=True, null=True)
content_object = generic.GenericForeignKey('content_type', 'object_id')
def __unicode__(self):
return self.url
......@@ -248,7 +251,7 @@ class ServiceLoc(models.Model):
AP_no = models.PositiveIntegerField(max_length=3)
wired = models.BooleanField()
# only urltype = 'info' should be accepted here
url = models.ManyToManyField(URL_i18n)
url = generic.GenericRelation(URL_i18n, blank=True, null=True)
ts = models.DateTimeField(auto_now=True)
def __unicode__(self):
......@@ -306,7 +309,7 @@ class InstitutionDetails(models.Model):
address_street = models.CharField(max_length=96)
address_city = models.CharField(max_length=64)
contact = models.ManyToManyField(Contact)
url = models.ManyToManyField(URL_i18n)
url = generic.GenericRelation(URL_i18n)
# accept if ertype: 2 (sp) or 3 (idpsp)
oper_name = models.CharField(max_length=24)
# accept if ertype: 1 (idp) or 3 (idpsp)
......@@ -339,7 +342,7 @@ class Realm(models.Model):
address_street = models.CharField(max_length=32)
address_city = models.CharField(max_length=24)
contact = models.ManyToManyField(Contact)
url = models.ManyToManyField(URL_i18n)
url = generic.GenericRelation(URL_i18n)
ts = models.DateTimeField(auto_now=True)
def __unicode__(self):
......
This diff is collapsed.
......@@ -73,4 +73,8 @@ table.dataTable th:active {
tr.even {
background: #eaeaea;
}
\ No newline at end of file
}
.breadcrumb{
background-color: white;
}
This diff is collapsed.
<!DOCTYPE html>
<html>
<head>
<title>Eduroam 101 Template</title>
<title>{% block title %}eduroam@Greece{% endblock %}</title>
<link href="/static/css/bootstrap.min.css" rel="stylesheet">
<link href="/static/css/style.css" rel="stylesheet">
<style type="text/css">
......@@ -12,6 +12,17 @@
.sidebar-nav {
padding: 9px 0;
}
.headtitle {font-family: "Franklin Gothic Demi", "Franklin Gothic", "ITC Franklin Gothic", Arial, sans-serif; letter-spacing: -1px; }
#logotitle, #logotitle.a{
color: #656565;
font-size: 18px;
font-weight: bold;
left: 105px;
position: relative;
top: 60px;
font-family: "Franklin Gothic Demi", "Franklin Gothic", "ITC Franklin Gothic", Arial, sans-serif; letter-spacing: -1px;
width: 300px;"
}
</style>
<script type="text/javascript" src="/static/js/jquery.min.js"></script>
<script src="/static/js/bootstrap.min.js"></script>
......@@ -19,15 +30,27 @@
</head>
<body>
<div class="navbar navbar-fixed-top">
<p class="navbar-text pull-left">
<a class="brand2" href="#" style="position: absolute; top: 0px; left: 15px;">
<img src="/static/img/grnet_logo3.png" style="position: absolute; top: 10px; left: 10px; max-width: none;">
</a>
</p>
<a class="brand2" href="#" style="position: absolute; top: 0px; left: 15px;">
<img src="/static/img/grnet_logo3.png" style="position: absolute; top: 10px; left: 10px; max-width: none;">
</a>
<div class="navbar-inner">
<div class="container-fluid">
<a class="brand" href="#"><img src="/static/img/eduroam.png"></a>
<div class="nav-collapse collapse">
<p class="navbar-text pull-right">
<p class="navbar-text pull-left">
<a class="brand" href="#">
<img src="/static/img/grnet_logo.png">
<img src="/static/img/pixelrow.png">
</a>
</p>
<div style="text-align:center; margin: auto; top: 3px; float: none;" class="nav"><a href="{% url index %}" style="height: 200px;"><img src="/static/img/eduroam_trans_248pix.png"></a></div>
</div>
</div>
</div>
......@@ -51,10 +74,9 @@
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li class="nav-header">Sidebar</li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li class="nav-header">Admin Area</li>
<li><a href="{% url manage %}">Login</a></li>
</ul>
</div><!--/.well -->
</div><!--/span-->
......
{% load i18n %}
<form id="add_user_form" method="POST" class="form-horizontal">
{% csrf_token %}
<div class="control-group {% if form.firstname.errors %} error {% endif %}">
<label class="control-label" for="id_firstname"><b>First name</b></label>
<div class="controls">
{{ form.firstname }}
{% if form.firstname.errors %} <span class="help-inline"> {{ form.firstname.errors|join:", " }} </span>
{% endif %} <span class="help-block"> {{ form.firstname.help_text }}</span>
</div>
</div>
<div class="control-group {% if form.lastname.errors %} error {% endif %}">
<label class="control-label" for="id_lastname"><b>Last name</b></label>
<div class="controls">
{{ form.lastname }}
{% if form.lastname.errors %} <span class="help-inline"> {{ form.lastname.errors|join:", " }} </span>
{% endif %} <span class="help-block"> {{ form.lastname.help_text }}</span>
</div>
</div>
<div class="control-group {% if form.email.errors %} error {% endif %}">
<label class="control-label" for="id_email"><b>Email</b></label>
<div class="controls">
{{ form.email }}
{% if form.email.errors %} <span class="help-inline"> {{ form.email.errors|join:", " }} </span>
{% endif %} <span class="help-block"> {{ form.email.help_text }}</span>
</div>
</div>
<div class="control-group {% if form.phone.errors %} error {% endif %}">
<label class="control-label" for="id_phone"><b>Phone</b></label>
<div class="controls">
{{ form.phone }}
{% if form.phone.errors %} <span class="help-inline"> {{ form.phone.errors|join:", " }} </span>
{% endif %} <span class="help-block"> {{ form.phone.help_text }}</span>
</div>
</div>
</form>
{% extends "edumanage/welcome.html"%}
{% block crumbs %}
<li><a href="{% url manage %}">Home</a><span class="divider">/</span></li>
<li class="active">Institution</li>
{% endblock %}
{% block homeactive %}{% endblock %}
{% block instactive %}class="active"{% endblock %}
{% block subcontent %}
<h4>Institution</h4>
<hr>
{% load tolocale %}
{% if institution %}
<h5>{% tolocale institution LANGUAGE_CODE%}</h5>(<a href="{% url edit-institution institution.pk %}">edit</a>)
{% if institution.institutiondetails %}
<dl class="dl-horizontal">
<dt>ErType</dt><dd>{{institution.institutiondetails.get_ertype_display}}</dd>
<dt>Adress</dt><dd>{{institution.institutiondetails.address_street}}@{{institution.institutiondetails.address_city}}</dd>
<dt>Contact</dt>{% if institution.institutiondetails.contact.all %}{% for con in institution.institutiondetails.contact.all %}<dd>{{con}}</dd>{% endfor %}{% else %}<dd>(no contacts)</dd>{% endif %}
<dt>Url</dt>{% if institution.institutiondetails.url.all %}{% for url in institution.institutiondetails.url.all %}<dd>{{url}}</dd>{% endfor %}{% else %}<dd>(no urls)</dd>{% endif %}
<dt>oper_name</dt><dd>{{institution.institutiondetails.oper_name}}</dd>
<dt>Number User</dt><dd>{{institution.institutiondetails.number_user}}</dd>
<dt>Number Id</dt><dd>{{institution.institutiondetails.number_id}}</dd>
<dt>Ts</dt><dd>{{institution.institutiondetails.ts}}</dd>
</dl>
<div class="row-fluid">
<div class="span12"></div>
</div>
<table class="table table-striped" width="100%" id="table"><thead>
<tr>
<th>Name</th>
<th>Address</th>
<th>Type</th>
<th>Contact</th>
<th>Url</th>
<th>Oper Name</th>
<th># Users</th>
<th># Id</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr class="info">
<td><b>{% tolocale institution LANGUAGE_CODE%}</b></td>
<td>{{institution.institutiondetails.address_street}}@{{institution.institutiondetails.address_city}}</td>
<td>{{institution.institutiondetails.get_ertype_display}}</td>
<td>{% if institution.institutiondetails.contact.all %}{% for con in institution.institutiondetails.contact.all %}{{con}}<br>{% endfor %}{% else %}(no contacts){% endif %}</td>
<td>{% if institution.institutiondetails.url.all %}{% for url in institution.institutiondetails.url.all %}{{url}}<br>{% endfor %}{% else %}(no urls){% endif %}</td>
<td>{{institution.institutiondetails.oper_name}}</td>
<td>{{institution.institutiondetails.number_user}}</td>
<td>{{institution.institutiondetails.number_id}}</td>
<td style="text-align: center;"><a href="{% url edit-institution institution.pk %}" class="btn btn-small btn-primary">edit</a></td>
</tr>
</tbody>
</table>
{% else %}
<div>No institution details defined yet <a href="{% url edit-institution institution.pk %}">(edit)</a></div>
<div>No institution details defined yet for {% tolocale institution LANGUAGE_CODE%} <a href="{% url edit-institution institution.pk %}" class="btn btn-small btn-primary">edit</a></div>
{% endif %}
{% else %}
<p>No institution defined!</p>
......
{% extends "edumanage/welcome.html"%}
{% extends "edumanage/welcome.html"%}
{% block crumbs %}
<li><a href="{% url manage %}">Home</a><span class="divider">/</span></li>
<li><a href="{% url institutions %}">Institutions</a><span class="divider">/</span></li>
<li class="active">Add-Edit</li>
{% endblock %}
{% block homeactive %}{% endblock %}
{% block instactive %}class="active"{% endblock %}
{% block subcontent %}
<h4>Institution</h4>
{% load tolocale %} <h5>{% tolocale institution LANGUAGE_CODE%}</h5>
<h4>Institution Edit</h4>
<hr>
{% load tolocale %}
<form method="POST" class="form-horizontal">
{% csrf_token %}
{% if form.non_field_errors %}
......@@ -13,6 +19,12 @@
{% endif %}
<div style="display: none">
{{form.institution}}
</div>
<div class="control-group">
<label class="control-label" for="id_ertype">Name</label>
<div class="controls">
<input class="input" id="disabledInput" type="text" placeholder="{% tolocale institution LANGUAGE_CODE%}" disabled>
</div>
</div>
<div class="control-group {% if form.ertype.errors %} error {% endif %}">
<label class="control-label" for="id_ertype">ErType</label>
......
{% extends "edumanage/welcome.html"%}
{% block crumbs %}
<li><a href="{% url manage %}">Home</a><span class="divider">/</span></li>
<li class="active">Servers</li>
{% endblock %}
{% load i18n %}
{% block extrahead %}
<script type="text/javascript" src="/static/js/jquery.dataTables.min.js"></script>
......@@ -76,7 +80,8 @@ oTable.fnDraw();
{% block subcontent %}
<h4>My Servers</h4>
<h4>Servers</h4>
<hr>
<div><a href="{% url edit-servers %}" class="btn btn-primary">Add new server</a></div>
<div class="span10"></div>
{% if servers %}
......
{% extends "edumanage/welcome.html"%}
{% block crumbs %}
<li><a href="{% url manage %}">Home</a><span class="divider">/</span></li>
<li><a href="{% url servers %}">Servers</a><span class="divider">/</span></li>
<li class="active">Add-Edit</li>
{% endblock %}
{% block extrahead %}
<script type="text/javascript" src="/static/js/jquery.min.js"></script>
<script type="text/javascript"
......@@ -11,8 +16,8 @@
{% block homeactive %}{% endblock %}
{% block serversactive %}class="active"{% endblock %}
{% block subcontent %} <h4>Servers</h4>
<h5>Server...</h5>
{% block subcontent %} <h4>Servers Add/Edit</h4>
<hr>
<form method="POST" class="form-horizontal">
{% csrf_token %}
{% if form.non_field_errors %}
......
{% extends "edumanage/welcome.html"%}
{% block crumbs %}
<li><a href="{% url manage %}">Home</a><span class="divider">/</span></li>
<li class="active">Services</li>
{% endblock %}
{% load i18n %}
{% block extrahead %}
<script type="text/javascript" src="/static/js/jquery.dataTables.min.js"></script>
......@@ -76,6 +80,7 @@ oTable.fnDraw();
{% block servicesactive %}class="active"{% endblock %}
{% block subcontent %}
<h4>Services</h4>
<hr>
<div><a href="{% url edit-services %}" class="btn btn-primary">Add new service</a></div>
<div class="span10"></div>
{% load tolocale %}
......
{% extends "edumanage/welcome.html"%}
{% block crumbs %}
<li><a href="{% url manage %}">Home</a><span class="divider">/</span></li>
<li><a href="{% url services %}">Services</a><span class="divider">/</span></li>
<li class="active">Add-Edit</li>
{% endblock %}
{% block extrahead %}
<script type="text/javascript" src="/static/js/jquery.min.js"></script>
<script type="text/javascript" src="/static/js/jquery.formset.js"></script>
<script type="text/javascript"
src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
<script src="/static/js/jquery_csrf_protect.js" type="text/javascript"></script>
<script type="text/javascript">
function gettext(msgid) { return msgid; }
var lat = 36.97;
var lng = 23.71;
var zoomLevel = 6;
{% if form.data.latitude or form.instance.latitude %}
var lat = {% if form.data.latitude %}{{form.data.latitude}}{% else %}{{form.instance.latitude}}{% endif %};
var lat = "{% if form.data.latitude %}{{form.data.latitude}}{% else %}{{form.instance.latitude}}{% endif %}";
var lat = parseFloat(lat.replace(",","."));
{% endif %}
{% if form.data.longitude or form.instance.longitude %}
var lng = {% if form.data.longitude %}{{form.data.longitude}}{% else %}{{form.instance.longitude}}{% endif %};
var lng = "{% if form.data.longitude %}{{form.data.longitude}}{% else %}{{form.instance.longitude}}{% endif %}";
var lng = parseFloat(lng.replace(",","."));
var zoomLevel = 14;
getOnce = true;
{% endif %}
......@@ -219,7 +230,69 @@
$("#updatemap").removeAttr('disabled');
});
// Initialize jquery formset
$('#urlsform tbody tr').formset({
prefix: '{{urls_form.prefix}}',
formCssClass: "dynamic-formset1",
added: addButton,
});
$('#locsform tbody tr').formset({
prefix: '{{services_form.prefix}}',
formCssClass: "dynamic-formset2",
added: addButton
});
$(".delete-row").prepend('<i class="icon-remove-sign icon-white"></i> ').addClass('btn btn-small btn-warning');
$(".add-row").prepend('<i class="icon-plus-sign icon-white"></i> ').addClass('btn btn-small btn-info');
$("#adduserSubmit").click(function(){
$.ajax({
url:"{% url adduser %}",
data:$("#add_user_form").serialize(),
type: "POST",
cache: false,
success:function(data){
try {
value = data.value;
text = data.text;
if (typeof value === 'undefined' && typeof text === 'undefined'){
$('#mymodalbody').html(data);
}
else{
$('#id_contact').append($("<option></option>").attr("value",value).text(text));
$('#myModal').modal('hide')
}
}
catch (exception) {
$('#mymodalbody').html(data);
}
}
});
return false;
});
$("#add_contact").click(function(){
$('#myModal').modal('show')
$.ajax({
url:"{% url adduser %}",
type: "GET",
success: function(data){
$('#mymodalbody').html(data);
}
});
return false;
});
});
function addButton(row){
$(row).find(".delete-row").prepend('<i class="icon-remove-sign icon-white"></i> ').addClass('btn btn-small btn-warning');
}
</script>
......@@ -229,8 +302,8 @@
{% block servicesactive %}class="active"{% endblock %}
{% block subcontent %}
<h4>Services</h4>
<h5>Service...</h5>
<h4>Services Add/Edit</h4>
<hr>
<form method="POST" class="form-horizontal">
{% csrf_token %}
{% if form.non_field_errors %}
......@@ -261,17 +334,26 @@
{% endif %} <span class="help-block">{{ form.longitude.help_text }}</span>
</div>
</div>
<div class="control-group {% if services_form.errors %} error {% endif %}">
<div class="control-group {% for err in services_form.errors %}{% if err|length > 0 %}error{% endif %}{% endfor %}{% if services_form.non_form_errors %}error{% endif %}">
<label class="control-label" for="id_address_city"><b>loc_name</b></label>
{{services_form.management_form}}
{% for formset in services_form.forms %}
{{ formset.id }}
<div class="controls">
{{ formset.name }} {{formset.lang}}
{% if formset.errors %} <span class="help-inline"> {{ formset.errors|join:", " }} </span>
{% endif %} <span class="help-block"></span>
</div>
{% for err in services_form.errors %}{% if err|length > 0 %}<span class="help-inline"></span>{% endif %}{% endfor %}
{% if services_form.non_form_errors %} <span class="help-inline"> {{ services_form.non_form_errors|join:", "}}</span>{% endif %}
<table id="locsform"><thead><tr><td>Name</td><td>language</td></tr></thead><tbody>
{% for formset_s in services_form.forms %}
{{ formset_s.id }}
<tr id="{{ formset_s.prefix }}-row">
<td> {% if formset_s.instance.pk %}{{ formset_s.DELETE }}{% endif %}{{ formset_s.name }}{% if formset_s.name.errors %}<br><div class="help-inline"> {{ formset_s.name.errors|join:", " }} </div>{% endif %}</td>
<td>{{formset_s.lang}}{% if formset_s.lang.errors %}<br><p class="help-inline"> {{ formset_s.lang.errors|join:", " }} </p>{% endif %}</td>
</tr>
{% endfor %}
</tbody></table>
</div>
</div>
<div class="control-group {% if form.address_street.errors %} error {% endif %}">
<label class="control-label" for="id_address_street"><b>Address Street</b></label>
......@@ -300,7 +382,7 @@
<div class="control-group {% if form.contact.errors %} error {% endif %}">
<label class="control-label" for="id_url"><b>Contact</b></label>
<div class="controls">
{{ form.contact }}
{{ form.contact }} <button class="btn btn-small btn-info" id="add_contact"><i class="icon-plus-sign icon-white"></i>Add...</button>
{% if form.contact.errors %} <span class="help-inline"> {{ form.contact.errors|join:", " }} </span>
{% endif %} <span class="help-block"> {{ form.contact.help_text }}</span>
</div>
......@@ -361,12 +443,25 @@
{% endif %} <span class="help-block"> {{ form.wired.help_text }}</span>
</div>
</div>
<div class="control-group {% if form.url.errors %} error {% endif %}">
<label class="control-label" for="id_url"><b>URL(s)</b></label>
<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 %}">
<label class="control-label" for="id_urls">Urls</label>
{{urls_form.management_form}}
<div class="controls">
{{ form.url }}
{% if form.url.errors %} <span class="help-inline"> {{ form.url.errors|join:", " }} </span>
{% endif %} <span class="help-block"> {{ form.url.help_text }}</span>
{% for err in urls_form.errors %}{% if err|length > 0 %}<span class="help-inline">{{err}}</span>{% endif %}{% endfor %}
{% if urls_form.non_form_errors %} <span class="help-inline"> {{ urls_form.non_form_errors|join:", "}}</span>{% endif %}
<table id="urlsform"><thead><tr><td>url</td><td>type</td><td>language</td></tr></thead><tbody>
{% for formset in urls_form.forms %}
{{ formset.id }}
<tr id="{{ formset.prefix }}-row">
<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>
<td>{{formset.urltype}}{% if formset.urltype.errors %}<br><p class="help-inline"> {{ formset.urltype.errors|join:", " }} </p>{% endif %}</td>
<td>{{formset.lang}}{% if formset.lang.errors %}<br><p class="help-inline"> {{ formset.lang.errors|join:", " }} </p>{% endif %}</td>
</tr>
{% endfor %}
</tbody></table>
</div>
</div>
<div class="control-group">
......@@ -377,4 +472,18 @@
</div>
</form>
<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">Add User</h3>
</div>
<div class="modal-body" id="mymodalbody">
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
<a class="btn btn-primary" id="adduserSubmit" href="#">Save changes</a>
</div>
</div>
{% endblock %}
\ No newline at end of file
......@@ -157,14 +157,25 @@ $.get("{% url get-service-points %}", function(data){
{% if services %}
initialize();
marks = placeMarkers();
console.log(marks);
clusterMarkers(marks);
{% endif %}});</script>
{% endblock %}
{% block headtitle %}eduroam@Greece admin{% endblock %}
{% block content %}
<div class="container-fluid">
<div class="row-fluid">
<div class="span2"></div>
<div class="span10">
<div class="row-fluid"><div class="span10">
<ul class="breadcrumb" style="display: inline-table; padding: 0">
{% block crumbs %}
<li class="active">Home</li>
{% endblock %}
</ul>
<p class="pull-right">You are logged in as: {{user}} (<a href="{% url logout %}">Logout</a>)</p>
</div></div>
</div>
</div>
<div class="row-fluid">
<div class="span2">
<div class="sidebar-nav">
......@@ -173,13 +184,13 @@ $.get("{% url get-service-points %}", function(data){
<a href="{% url manage %}">Home</a>
</li>
<li {% block instactive %}{% endblock %}>
<a href="{% url institutions %}">My Institution</a>
<a href="{% url institutions %}">Institution ({{inst_num}})</a>
</li>
<li {% block servicesactive %}{% endblock %}>
<a href="{% url services %}">My Services</a>
<a href="{% url services %}">Services ({{services_num}})</a>
</li>
<li {% block serversactive %}{% endblock %}>
<a href="{% url servers %}">My Servers</a>
<a href="{% url servers %}">Servers ({{servers_num}})</a>
</li>
</ul>
</div><!--/.well -->
......@@ -188,7 +199,7 @@ $.get("{% url get-service-points %}", function(data){
<div class="row-fluid">
<!--/span-->
<div class="span10">
{% block subcontent %} <h4>My Services</h4>
{% block subcontent %}