base.html 7.16 KB
Newer Older
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
1
<!DOCTYPE HTML>
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
2 3
<html>
<head>
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
4
{% load i18n %}
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
5
<title>GRNET's FoD :: {% block title %}{% endblock %} </title>
6
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
7
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
8
<link REL="SHORTCUT ICON" HREF="/fodstatic/favicon.ico">  
9 10 11
<script src="/fodstatic/js/jquery.min.js" type="text/javascript"></script>
<script src="/fodstatic/js/jquery_csrf_protect.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="/fodstatic/css/bootstrap.css">
12
<link rel="stylesheet" type="text/css" href="/fodstatic/css/bootstrap-responsive.css">
13
<link rel="stylesheet" type="text/css" href="/fodstatic/css/smoothness/jquery-ui-1.8.13.custom.css">
14
<link rel="stylesheet" type="text/css" href="/fodstatic/css/base.css">
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
15

16 17 18
<script type="text/javascript" src="/fodstatic/js/jquery-ui-1.8.23.custom.min.js"></script>
<script type="text/javascript" src="/fodstatic/js/jquery.cookie.js"></script>
<script type="text/javascript" src="/fodstatic/js/bootstrap.js"></script>
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
19 20 21 22 23 24 25 26
<script type="text/javascript">

  	function setlang(lang){
		$("#langsel").val(lang);
		$("#langform").submit();
	}

</script>
27 28 29 30 31 32 33 34 35 36 37 38 39 40
<style>
body {
    background-color: #EEEEEE;
    height: 100%;
    overflow-y: scroll;
}
#content {
    background-color: #FFFFFF;
    min-height: 100%;
    padding: 20px;
    padding-top: 90px;
    position: relative;
}
</style>
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
41 42 43 44 45 46
{% block extrahead %}{% endblock %}
</head>



<body>
47
	{% comment %}
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
48
			<div id="header">
49
				<a class="grnetlogo" href="{% url group-routes %}">
50
					<img class="logoimg" src="/fodstatic/logo.png">
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
51 52
				</a>
				<div id="title">
53
					<a href="{% url group-routes %}">Firewall on Demand</a>
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
54 55 56
				</div>
				<div class="loginform">
					<div id="formcontent">
57
					{% block menublock %}
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
58 59 60
						{% if user.is_authenticated %}
						<span class="topmenuuser">{% trans "Welcome" %} <strong>{{user}}</strong></span>
						{% endif %}
61
						
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
62 63 64 65 66 67 68 69 70
						<span {% if user.is_authenticated %}class="topmenuaction"{% else %}class="topmenuuser"{% endif %} >
							<form action="{% url django.views.i18n.set_language %}" method="post" style="display:inline;" id="langform">
								{% csrf_token %}
								<input name="next" type="hidden" value="{{ next }}" />
								<input id="langsel" name="language" type="hidden" value="" />
								{% for lang in LANGUAGES %}<a class="select_lang" href="#" onclick="setlang('{{ lang.0 }}'); return false;" title="{{lang.1}}">{% ifnotequal LANGUAGE_CODE lang.0 %}<font style="font-weight:normal;">{% endifnotequal %}{% trans lang.1 %}{% ifnotequal LANGUAGE_CODE lang.0 %}</font>{% endifnotequal %}</a>{% if not forloop.last %} -{% endif %}
								{% endfor %}
							</form>
						</span>
71

Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
72
						{% if user.is_authenticated %}
73 74
						<span class="topmenuaction"><a href="{% url user-profile %}">{% trans "My profile" %}</a></span>
						{% if user.is_superuser %}
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
75
						<span class="topmenuaction"><a href="{% url admin:index %}">{% trans "Admin" %}</a></span>
76
						{% endif %}
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
77 78
						<span class="topmenuaction"><a href="{% url logout %}">{% trans "Logout" %}</a></span>
						{% else %}
79 80 81
						{% if error %}
						<span class="topmenuaction relogin" title="{% trans 'After clicking Retry Login, it is strongly suggested to close your browser and visit the page again' %}"><a href="{% url logout %}">{% trans "Retry Login" %}</a></span>
						{% else %}
82
						<span class="topmenuaction"><a href="{% url login %}">{% trans "Shibboleth Login" %}</a></span>
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
83
						{% endif %}
84
						{% endif %}
85
						{% endblock %}
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
86 87 88 89
					</div>
					
				</div>
			</div>
90 91 92 93 94 95 96
			{% endcomment %}
			<div class="navbar navbar-fixed-top">

				<div class="navbar-inner">
				    <div class="container">
				       
				    {% block topmenu %}
97
				    <a class="brand brandimg" href="{% url group-routes %}"><img src="/fodstatic/img/fod_logo_latest.png" /></a>
98 99 100
				    <ul class="nav">
				    {% if user.is_authenticated %}
				    
101
				    {% if user.get_profile.peer %}
102 103 104
				        <li>
				            <a href="{% url user-profile %}">{% trans "My profile" %}</a>
				        </li>
105 106 107 108 109
				    {% endif %}
				        
				    {% if perms.accounts.overview %}<li>
                            <a href="{% url overview %}">{% trans "Overview" %}</a>
                        </li>{% endif %}
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
				    {% if user.is_superuser %}
						<li {% block hometop %}{% endblock %}>
							<a href="{% url admin:index %}">{% trans "Admin" %}</a>
						</li>
						{% endif %}
				    {% else %}
				        <li {% block faqtop %}{% endblock %}>
				            
				        </li>
				    {% endif %}
				      <li class="dropdown">
				            <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>
				            <ul class="dropdown-menu">
				            <form action="{% url django.views.i18n.set_language %}" method="post" style="display:inline;" id="langform">
												{% csrf_token %}
												<input name="next" type="hidden" value="{{ next }}" />
												<input id="langsel" name="language" type="hidden" value="" />
											</form>
				            	{% for lang in LANGUAGES %}
				                <li>
				                    <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>
				                </li>
				              {% endfor %}
				            </ul>
				        </li>
				
				    </ul>
				    {% endblock %}
				    <ul class="nav pull-right">
				         {% if user.is_authenticated %}
				         <li><span><strong>{{user}}</strong></span></li>
				        <li>
				        	<a href="{% url logout %}">{% trans "Logout" %}</a>
				        </li>
				        {% else %}
145 146 147 148 149 150 151 152
				        {% if error %}
				        	{% if inactive %}
				        		<li><a href="{% url login %}">{% trans "Shibboleth Login" %}</a></li>
				        	{% else %}
						<li>
							<a id='ttip' data-placement="bottom" rel="tooltip" href="{% url logout %}" data-original-title="{% trans 'After clicking Retry Login, it is strongly suggested to close your browser and visit the page again' %}">{% trans "Retry Login" %}</a>
						</li>{% endif %}
						{% else %}						
153 154
				        <li><a href="{% url login %}">{% trans "Shibboleth Login" %}</a></li>
				        {% endif %}
155
				        {% endif %}
156 157 158 159 160
				    </ul>
				        
				    </div>    
				</div>
			</div>
161
			{% block contentplaceholder %}
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
162
			<div id="content" class="container">
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
163
				{% block brcrmb_container %}
164
				<ul class="breadcrumb">{% if user.is_authenticated %}<li><a href="{% url group-routes %}">{% trans "My rules" %}</a></li>{% else %}<li><a href="{% url welcome %}">{% trans "Welcome" %}</a></li>{% endif %}
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
165
				{% block breadcrumbs %}{% endblock %}
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
166
				</ul>
167
				{% endblock %}
168 169 170 171 172 173 174
				{% if messages %}
				<div id="messages">
				{% for message in messages %}
					<span{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</span><br />
				{% endfor %}
				</div>
				{% endif %}
175 176
				
				
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
177 178 179 180
				{% block content %}
				{% endblock %}

			</div>
181
			{% endblock %}
182 183 184
			{% block footerblock %}
				{% include "footer.html" %}
			{% endblock %}
185
	
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
186 187
</body>
</html>