Statistics
| Branch: | Tag: | Revision:

root / templates / base.html @ 2fe10776

History | View | Annotate | Download (7.2 kB)

1
<!DOCTYPE HTML>
2
<html>
3
<head>
4
{% load i18n %}
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
<script src="/fodstatic/js/jquery.min.js" type="text/javascript"></script>
10
<script src="/fodstatic/js/jquery_csrf_protect.js" type="text/javascript"></script>
11
<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">
15

    
16
<script type="text/javascript" src="/fodstatic/js/jquery-ui-1.8.23.custom.min.js"></script>
17
<script type="text/javascript" src="/fodstatic/js/jquery.cookie.js"></script>
18
<script type="text/javascript" src="/fodstatic/js/bootstrap.js"></script>
19
<script type="text/javascript">
20

21
          function setlang(lang){
22
                $("#langsel").val(lang);
23
                $("#langform").submit();
24
        }
25

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

    
44

    
45

    
46
<body>
47
        {% comment %}
48
                        <div id="header">
49
                                <a class="grnetlogo" href="{% url group-routes %}">
50
                                        <img class="logoimg" src="/fodstatic/logo.png">
51
                                </a>
52
                                <div id="title">
53
                                        <a href="{% url group-routes %}">Firewall on Demand</a>
54
                                </div>
55
                                <div class="loginform">
56
                                        <div id="formcontent">
57
                                        {% block menublock %}
58
                                                {% if user.is_authenticated %}
59
                                                <span class="topmenuuser">{% trans "Welcome" %} <strong>{{user}}</strong></span>
60
                                                {% endif %}
61
                                                
62
                                                <span {% if  %}class="topmenuaction"{% else %}class="topmenuuser"{% endif %} >
63
                                                        <form action="{% url django.views.i18n.set_language %}" method="post" style="display:inline;" id="langform">
64
                                                                {% csrf_token %}
65
                                                                <input name="next" type="hidden" value="{{ next }}" />
66
                                                                <input id="langsel" name="language" type="hidden" value="" />
67
                                                                {% 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 %}
68
                                                                {% endfor %}
69
                                                        </form>
70
                                                </span>
71

    
72
                                                {% if user.is_authenticated %}
73
                                                <span class="topmenuaction"><a href="{% url user-profile %}">{% trans "My profile" %}</a></span>
74
                                                {% if user.is_superuser %}
75
                                                <span class="topmenuaction"><a href="{% url admin:index %}">{% trans "Admin" %}</a></span>
76
                                                {% endif %}
77
                                                <span class="topmenuaction"><a href="{% url logout %}">{% trans "Logout" %}</a></span>
78
                                                {% else %}
79
                                                {% if error %}
80
                                                <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>
81
                                                {% else %}
82
                                                <span class="topmenuaction"><a href="{% url login %}">{% trans "Shibboleth Login" %}</a></span>
83
                                                {% endif %}
84
                                                {% endif %}
85
                                                {% endblock %}
86
                                        </div>
87
                                        
88
                                </div>
89
                        </div>
90
                        {% endcomment %}
91
                        <div class="navbar navbar-fixed-top">
92

    
93
                                <div class="navbar-inner">
94
                                    <div class="container">
95
                                       
96
                                    {% block topmenu %}
97
                                    <a class="brand brandimg" href="{% url group-routes %}"><img src="/fodstatic/img/fod_logo.png" /></a>
98
                                    <ul class="nav">
99
                                    {% if user.is_authenticated %}
100
                                    
101
                                    {% if user.get_profile.peer %}
102
                                        <li>
103
                                            <a href="{% url user-profile %}">{% trans "My profile" %}</a>
104
                                        </li>
105
                                    {% endif %}
106
                                        
107
                                    {% if perms.accounts.overview %}<li>
108
                            <a href="{% url overview %}">{% trans "Overview" %}</a>
109
                        </li>{% endif %}
110
                                    {% if user.is_superuser %}
111
                                                <li {% block  %}{% endblock %}>
112
                                                        <a href="{% url admin:index %}">{% trans "Admin" %}</a>
113
                                                </li>
114
                                                {% endif %}
115
                                    {% else %}
116
                                        <li {% block  %}{% endblock %}>
117
                                            
118
                                        </li>
119
                                    {% endif %}
120
                                      <li class="dropdown">
121
                                            <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>
122
                                            <ul class="dropdown-menu">
123
                                            <form action="{% url django.views.i18n.set_language %}" method="post" style="display:inline;" id="langform">
124
                                                                                                {% csrf_token %}
125
                                                                                                <input name="next" type="hidden" value="{{ next }}" />
126
                                                                                                <input id="langsel" name="language" type="hidden" value="" />
127
                                                                                        </form>
128
                                                    {% for lang in LANGUAGES %}
129
                                                <li>
130
                                                    <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>
131
                                                </li>
132
                                              {% endfor %}
133
                                            </ul>
134
                                        </li>
135
                                
136
                                    </ul>
137
                                    {% endblock %}
138
                                    <ul class="nav pull-right">
139
                                         {% if user.is_authenticated %}
140
                                         <li><span><strong>{{user}}</strong></span></li>
141
                                        <li>
142
                                                <a href="{% url logout %}">{% trans "Logout" %}</a>
143
                                        </li>
144
                                        {% else %}
145
                                        {% if error %}
146
                                                {% if inactive %}
147
                                                        <li><a href="{% url login %}">{% trans "Shibboleth Login" %}</a></li>
148
                                                {% else %}
149
                                                <li>
150
                                                        <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>
151
                                                </li>{% endif %}
152
                                                {% else %}                                                
153
                                        <li><a href="{% url login %}">{% trans "Shibboleth Login" %}</a></li>
154
                                        {% endif %}
155
                                        {% endif %}
156
                                    </ul>
157
                                        
158
                                    </div>    
159
                                </div>
160
                        </div>
161
                        {% block contentplaceholder %}
162
                        <div id="content" class="container">
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 %}
165
                                {% block breadcrumbs %}{% endblock %}
166
                                </ul>
167
                                {% endblock %}
168
                                {% if messages %}
169
                                <div id="messages">
170
                                {% for message in messages %}
171
                                        <span{% if  %} class="{{ message.tags }}"{% endif %}>{{ message }}</span><br />
172
                                {% endfor %}
173
                                </div>
174
                                {% endif %}
175
                                
176
                                
177
                                {% block content %}
178
                                {% endblock %}
179

    
180
                        </div>
181
                        {% endblock %}
182
                        {% block footerblock %}
183
                                {% include "footer.html" %}
184
                        {% endblock %}
185
        
186
</body>
187
</html>