datatracker/ietf/templates/base.html
2014-07-19 17:18:18 +00:00

154 lines
6.5 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
{% comment %}<!--
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of the Nokia Corporation and/or its
subsidiary(-ies) nor the names of its contributors may be used
to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->{% endcomment %}
{% load ietf_filters %}
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- v{{version_num}}, {{ revision_num }}, {{ revision_time }} -->
<title>{% block title %}No title{% endblock %}{% if server_mode %}{% if server_mode != "production" %} - {{ server_mode|upper }} MODE{% endif %}{% endif %}</title>
<link rel="stylesheet" type="text/css" href="/css/yui/yui-20100305.css"></link>
<link rel="stylesheet" type="text/css" href="/css/base2.css"></link>
<style type="text/css">
{% block morecss %}{% endblock %}
</style>
{% block pagehead %}{% endblock %}
{% if server_mode != "production" %}
<link rel="icon" href="/images/ietf-dev-icon.bmp" />
{% else %}
<link rel="icon" href="/images/ietf-icon-blue.bmp" />
{% endif %}
<link rel="search" href="/js/datatracker-search.xml" type="application/opensearchdescription+xml" title="IETF Datatracker Search" />
</head>
<body class="yui-skin-sam" {% block bodyAttrs %}{%endblock%}>
<div style="background-color:{% if server_mode %}{% if server_mode != "production" %}#c00000{% else %}#313163{% endif %}{%else %}#313163{%endif%};color:white;font-size:150%;height:35px;" class="noprint">
<span style="padding-left:15px;font-weight:bold;letter-spacing:0.1em;"><a href="/" style="text-decoration:none;color:white"><img src="/images/ietflogo-blue-small.png" width="60" height="34" style="vertical-align:middle;padding-left:8px;" alt=""/>datatracker.ietf.org</a> {% if server_mode %}{% if server_mode != "production" %} - {{ server_mode|upper}} MODE{% endif %}{% endif %}</span>
</div>
{% if user %}
<div id="ietf-login" class="noprint">
{% if request.get_full_path == "/accounts/logout/" %}
<a href="{% if server_mode == "development" %}http://{% else %}https://{% endif %}{{ request.get_host }}/accounts/login/" class="login" rel="nofollow">Sign in</a>
{% else %}
{% if user.is_authenticated %}
<a href="/accounts/">{{ user }}</a> | <a href="/accounts/logout/" class="login" rel="nofollow">Sign out</a>
{% else %}
<a href="{% if debug %}http://{% else %}https://{% endif %}{{ request.get_host }}/accounts/login/?next={{request.get_full_path|urlencode}}" class="login" rel="nofollow">Sign in</a>
{% endif %}
{% endif %}
</div>
{% endif %}
{% block start_content_table %}
<table style="margin-left:8px;margin-top:8px; width:98%;" id="ietf_menubar">
<tr valign="top">
<td style="width:130px;padding-right:8px;" class="noprint">
<div class="ietf-navbar">
{% include "base/left_menu.html" %}
</div>
<div style="width: 100%; text-align: center; padding-top:4px;font-size:69%;">
{% if version_num %}
<a href="/release/{{version_num}}/">Version {{ version_num }}, {{revision_date}}</a>
<br/>
{% endif %}
<a href="http://tools.ietf.org/tools/ietfdb/newticket">Report a bug</a>
</div>
</td>
<td>
{% endblock start_content_table %}
{% if messages %}
<ul class="messages">
{% for message in messages %}
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% block content %}
{% endblock %}
<script type="text/javascript" src="/js/lib/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="/js/yui/yui-20100305.js"></script>
<script type="text/javascript">
//<![CDATA[
YAHOO.util.Event.onContentReady("wgs", function () {
var oMenu = new YAHOO.widget.Menu("wgs", { position: "static", hidedelay: 750, lazyload: true });
oMenu.render();
});
// setup CSRF protection
// using jQuery
function getCookie(name) {
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
// Does this cookie string begin with the name we want?
if (cookie.substring(0, name.length + 1) == (name + '=')) {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
break;
}
}
}
return cookieValue;
}
var csrftoken = getCookie('csrftoken');
function csrfSafeMethod(method) {
// these HTTP methods do not require CSRF protection
return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
}
jQuery.ajaxSetup({
crossDomain: false, // obviates need for sameOrigin test
beforeSend: function(xhr, settings) {
if (!csrfSafeMethod(settings.type)) {
xhr.setRequestHeader("X-CSRFToken", csrftoken);
}
}
});
{% block scripts %}
{% endblock %}
//]]>
</script>
{% block js %}{% endblock %}
{% block content_end %}
{% endblock %}
<div id="ietf-extras"></div>
{% block end_content_table %}
</td></tr></table>
{% endblock end_content_table %}
{% include "debug.html" %}
</body></html>