Commit 62ee35d6 authored by Leonidas Poulopoulos's avatar Leonidas Poulopoulos

Added bootstrap

parent 4d64063c
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* Default class modification */
$.extend( $.fn.dataTableExt.oStdClasses, {
"sWrapper": "dataTables_wrapper form-inline"
} );
/* API method to get paging information */
$.fn.dataTableExt.oApi.fnPagingInfo = function ( oSettings )
{
return {
"iStart": oSettings._iDisplayStart,
"iEnd": oSettings.fnDisplayEnd(),
"iLength": oSettings._iDisplayLength,
"iTotal": oSettings.fnRecordsTotal(),
"iFilteredTotal": oSettings.fnRecordsDisplay(),
"iPage": Math.ceil( oSettings._iDisplayStart / oSettings._iDisplayLength ),
"iTotalPages": Math.ceil( oSettings.fnRecordsDisplay() / oSettings._iDisplayLength )
};
}
/* Bootstrap style pagination control */
$.extend( $.fn.dataTableExt.oPagination, {
"bootstrap": {
"fnInit": function( oSettings, nPaging, fnDraw ) {
var oLang = oSettings.oLanguage.oPaginate;
var fnClickHandler = function ( e ) {
e.preventDefault();
if ( oSettings.oApi._fnPageChange(oSettings, e.data.action) ) {
fnDraw( oSettings );
}
};
$(nPaging).addClass('pagination').append(
'<ul>'+
'<li class="prev disabled"><a href="#">&larr; '+oLang.sPrevious+'</a></li>'+
'<li class="next disabled"><a href="#">'+oLang.sNext+' &rarr; </a></li>'+
'</ul>'
);
var els = $('a', nPaging);
$(els[0]).bind( 'click.DT', { action: "previous" }, fnClickHandler );
$(els[1]).bind( 'click.DT', { action: "next" }, fnClickHandler );
},
"fnUpdate": function ( oSettings, fnDraw ) {
var iListLength = 5;
var oPaging = oSettings.oInstance.fnPagingInfo();
var an = oSettings.aanFeatures.p;
var i, j, sClass, iStart, iEnd, iHalf=Math.floor(iListLength/2);
if ( oPaging.iTotalPages < iListLength) {
iStart = 1;
iEnd = oPaging.iTotalPages;
}
else if ( oPaging.iPage <= iHalf ) {
iStart = 1;
iEnd = iListLength;
} else if ( oPaging.iPage >= (oPaging.iTotalPages-iHalf) ) {
iStart = oPaging.iTotalPages - iListLength + 1;
iEnd = oPaging.iTotalPages;
} else {
iStart = oPaging.iPage - iHalf + 1;
iEnd = iStart + iListLength - 1;
}
for ( i=0, iLen=an.length ; i<iLen ; i++ ) {
// Remove the middle elements
$('li:gt(0)', an[i]).filter(':not(:last)').remove();
// Add the new list items and their event handlers
for ( j=iStart ; j<=iEnd ; j++ ) {
sClass = (j==oPaging.iPage+1) ? 'class="active"' : '';
$('<li '+sClass+'><a href="#">'+j+'</a></li>')
.insertBefore( $('li:last', an[i])[0] )
.bind('click', function (e) {
e.preventDefault();
oSettings._iDisplayStart = (parseInt($('a', this).text(),10)-1) * oPaging.iLength;
fnDraw( oSettings );
} );
}
// Add / remove disabled classes from the static elements
if ( oPaging.iPage === 0 ) {
$('li:first', an[i]).addClass('disabled');
} else {
$('li:first', an[i]).removeClass('disabled');
}
if ( oPaging.iPage === oPaging.iTotalPages-1 || oPaging.iTotalPages === 0 ) {
$('li:last', an[i]).addClass('disabled');
} else {
$('li:last', an[i]).removeClass('disabled');
}
}
}
}
} );
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -8,10 +8,19 @@
});
});
</script>
<form id="add_port_form" method="POST">
{% csrf_token %}
<table>
<tr><th>{% trans "Port" %}</th><td>{{ form.port }}<span class="error" id='rl_error'>{{ form.port.errors|join:", " }}</span></td></tr>
</table>
</form>
<form id="add_port_form" method="POST" class="form-horizontal">
{% csrf_token %}
<div class="control-group {% if form.port.errors %} error {% endif %}">
<label class="control-label" for="inputEmail">Port</label>
<div class="control">{{ form.port }}
{% if form.port.errors %}
<span class="help-block">{{ form.port.errors|join:", " }}</span>
{% endif %}
</div>
</div>
</form>
This diff is collapsed.
{% load i18n %}
<!DOCTYPE HTML>
<html>
<head>
{% load i18n %}
<title>GRNET's FoD :: {% block title %}{% endblock %} </title>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
<script src="/static/js/jquery.min.js" type="text/javascript"></script>
<script src="/static/js/jquery_csrf_protect.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="/static/css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="/static/css/base.css">
<link rel="stylesheet" type="text/css" href="/static/css/smoothness/jquery-ui-1.8.13.custom.css">
<script type="text/javascript" src="/static/js/jquery-ui-1.8.12.custom.min.js"></script>
<script type="text/javascript" src="/static/js/jquery.tooltip.min.js"></script>
<script type="text/javascript" src="/static/js/jquery-ui-1.8.23.custom.min.js"></script>
<script type="text/javascript" src="/static/js/jquery.cookie.js"></script>
<script type="text/javascript" src="/static/js/bootstrap.js"></script>
<script type="text/javascript">
function setlang(lang){
......@@ -69,11 +72,11 @@
</div>
</div>
<div id="content">
<div id="content" class="container">
{% block brcrmb_container %}
<div class="info_content_title">{% if user.is_authenticated %}<a href="{% url group-routes %}">{% trans "My rules" %}</a>{% endif %}
<ul class="breadcrumb">{% if user.is_authenticated %}<li><a href="{% url group-routes %}">{% trans "My rules" %}</a></li>{% endif %}
{% block breadcrumbs %}{% endblock %}
</div>
</ul>
{% if messages %}
<div id="messages">
{% for message in messages %}
......
......@@ -25,7 +25,7 @@
</style>
{% endblock %}
{% block title %}{% trans "Info" %}{% endblock %}
{% block breadcrumbs %}:: {% trans "Info" %}{% endblock %}
{% block breadcrumbs %}<li class="active"><span class="divider">/</span>{% trans "Info" %}</li>{% endblock %}
{% block content %}
{% csrf_token %}
<div>
......
......@@ -25,7 +25,7 @@
</style>
{% endblock %}
{% block title %}{% trans "Terms of Service" %}{% endblock %}
{% block breadcrumbs %}:: {% trans "Terms of Service" %}{% endblock %}
{% block breadcrumbs %}<li class="active"><span class="divider">/</span>{% trans "Terms of Service" %}</li>{% endblock %}
{% block content %}
{% csrf_token %}
<div>
......
......@@ -187,7 +187,7 @@ var updater = {
function blink(selector){
$(selector).animate({ color: "red" }, 500, function(){
$(this).animate({ color: "#555555" }, 500, function(){
$(this).animate({ color: "white" }, 500, function(){
blink(this);
});
});
......
......@@ -2,22 +2,46 @@
{% load i18n %}
{% block title %}{% trans "My profile" %}{% endblock %}
{% block breadcrumbs %}:: {% trans "My profile" %}{% endblock %}
{% block breadcrumbs %} <li class="active"><span class="divider">/</span>{% trans "My profile" %}</li>{% endblock %}
{% block content %}
<h3>{% trans "My profile" %}</h3>
<h4>{% trans "My profile" %}</h4>
<br>
<div id="profile">
<strong>{% trans "First name" %}:</strong> {{user.first_name}} <br>
<strong>{% trans "Last name" %}:</strong> {{user.last_name}} <br>
<strong>{% trans "Email" %}:</strong> {{user.email}}<br>
<br>
<strong>{% trans "My Networks" %}:</strong><br>
<table class="display">
<div class="row">
<div class="span2"><strong>{% trans "Username" %}:</strong></div>
<div class="span8">{{user.username}}</div>
</div>
<div class="row">
<div class="span2"><strong>Rest API Key:</strong></div>
<div class="span8"><span id="apikey">{{apikey.key}}</span></div>
</div>
<div class="row">
<div class="span2"><strong>{% trans "First name" %}:</strong></div>
<div class="span8">{{user.first_name}}</div>
</div>
<div class="row">
<div class="span2"><strong>{% trans "Last name" %}:</strong></div>
<div class="span8">{{user.last_name}}</div>
</div>
<div class="row">
<div class="span2"><strong>{% trans "Email" %}:</strong></div>
<div class="span8">{{user.email}}</div>
</div>
</div>
<br>
<div>
<div class="row">
<div class="span2"><strong>{% trans "My Networks" %}:</strong></div>
<div class="span8"></div>
</div>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th class="ui-state-default">{% trans "Organization" %}</th><th class="ui-state-default">{% trans "Networks" %}</th>
<th>{% trans "Organization" %}</th><th>{% trans "Networks" %}</th>
</tr>
</thead>
{% for peer in peers %}
<tr class="gradeC {% if forloop.counter|divisibleby:2 %}even{% else %}odd{% endif %}">
<tr>
<td>{{peer}} </td>
<td>
{% for network in peer.networks.all %}
......@@ -32,3 +56,5 @@
{% endblock %}
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment