Added lang select to error template
[flowspy] / templates / error.html
1 {% load i18n %}
2 <html>
3 <head>
4 <title>{% if error %}{% if inactive %}{% trans "Activation Pending" %}{% else %}{% trans "Error" %}{% endif %}{% endif %}</title>
5 <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
6 <META HTTP-EQUIV="Expires" CONTENT="-1">
7 <script src="/static/js/jquery.min.js" type="text/javascript"></script>
8 <link rel="stylesheet" type="text/css" href="/static/css/base.css">
9 <link rel="stylesheet" type="text/css" href="/static/css/smoothness/jquery-ui-1.8.13.custom.css">
10 <script type="text/javascript" src="/static/js/jquery-ui-1.8.12.custom.min.js"></script>
11 <script type="text/javascript" src="/static/js/jquery.tooltip.min.js"></script>
12
13 <script type="text/javascript">
14 $(document).ready(function(){
15         $(".relogin").tooltip({ position: "bottom center", opacity: 0.7});
16         });
17 </script>
18 <style type="text/css">
19
20     .tooltip {
21         display: none;
22         background: transparent url(/static/black_arrow_updown.png);
23         font-size: 12px;
24         height: 70px;
25         width: 160px;
26         padding: 25px;
27                 padding-top: 30px;
28         color: #fff;
29     }
30
31 </style>
32 <script type="text/javascript">
33
34         function setlang(lang){
35                 $("#langsel").val(lang);
36                 $("#langform").submit();
37         }
38
39 </script>
40 </head>
41
42
43
44 <body>
45         <div id="main">
46                         <div id="header">
47                                 <a class="grnetlogo" href="{% url group-routes %}">
48                                         <img class="logoimg" src="/static/grnet_logo.png">
49                                 </a>
50                                 <div id="title">
51                                         <a href="{% url group-routes %}">Firewall on Demand</a>
52                                 </div>
53                                 <div class="loginform">
54                                         <div id="formcontent">
55                                                 {% if user.is_authenticated %}
56                                                 <span class="topmenuuser">{% trans "Welcome" %} <strong>{{user}}</strong></span>
57                                                 {% endif %}
58                                                 <span {% if user.is_authenticated %}class="topmenuaction"{% else %}class="topmenuuser"{% endif %} >
59                                                                 <form action="{% url django.views.i18n.set_language %}" method="post" style="display:inline;" id="langform">
60                                                                 {% csrf_token %}
61                                                                 <input name="next" type="hidden" value="{{ next }}" />
62                                                                 <input id="langsel" name="language" type="hidden" value="" />
63                                                                 {% 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 %}
64                                                                 {% endfor %}
65                                                         </form>
66                                                 </span>
67                                                 {% if user.is_authenticated %}
68                                                 <span class="topmenuaction"><a href="{% url user-profile %}">{% trans "My profile" %}</a></span>
69 {% if user.is_superuser %}
70                                                 <span class="topmenuaction"><a href="{% url admin:index %}">{% trans "Admin" %}</a></span>
71 {% endif %}
72                                                 <span class="topmenuaction"><a href="{% url logout %}">{% trans "Logout" %}</a></span>
73                                                 {% else %}
74                                                 <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>
75                                                 {% endif %}
76                                         </div>
77                                         
78                                 </div>
79                         </div>
80                         <div id="content">
81                                 {% block brcrmb_container %}
82                                 <div class="info_content_title">{% if user.is_authenticated %}<a href="{% url group-routes %}">{% trans "My routes" %}</a>{% endif %}
83                                 {% block breadcrumbs %}{% endblock %}
84                                 </div>
85                                 
86                                 {% endblock %}
87                                 {% block content %}
88                                 {% if error %}{% if inactive %}<h2>{% trans "Activation Pending" %}</h2>{% else %}<h2>{% trans "Error" %}</h2>{% endif %}{% endif %}
89                                 <div>
90                                 {% if missing_attributes %}
91                                 <p>{% trans "One or more required shibboleth attributes were not released towards this service" %}</p>
92                                 {% endif %}
93                                 <p {% if not inactive %}style="color: red;"{% endif %}>{% autoescape off %}{{error}}{% endautoescape %}</p>
94                                 {% if missing_attributes %}
95                                 <p>
96                                 {% trans "Required shibboleth attributes" %}:<br>
97                                 <ul>
98                                 <li>HTTP_EPPN</li>
99                                 <li>HTTP_SHIB_HOMEORGANIZATION</li>
100                                 <li>HTTP_SHIB_INETORGPERSON_MAIL</li>
101                                 <li>An appropriate HTTP_SHIB_EP_ENTITLEMENT</li>
102                                 </ul>
103                                 {% trans "Optional" %}:
104                                 <ul>
105                                 <li>HTTP_SHIB_INETORGPERSON_GIVENNAME</li>
106                                 <li>HTTP_SHIB_PERSON_SURNAME</li>
107                                 </ul>
108                                 </p>
109                                 {% endif %}
110                                 </div>
111
112                                 {% endblock %}
113
114                         </div>
115                         <div id="footer">
116                         {% if user.is_authenticated %}
117                         {% trans "If you have any questions or need help, contact GRNET Helpdesk at <a href='mailto:helpdesk@grnet.gr'>helpdesk@grnet.gr</a> or 800-11-47638." %}<br />
118                         {% endif %}
119                         <a href="http://www.grnet.gr">{% trans "GRNET" %} NOC</a> | <a href="/about/info/">{% trans "Info" %}</a> | <a href="/about/terms-of-service">{% trans "Service Terms" %}</a>
120                         </div>
121         </div>
122 </body>
123 </html>