<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
{% load djblets_deco %}
{% load djblets_utils %}
{% load i18n %}

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
  <title>{% block title %}{% endblock %} | Review Board</title>
{% block extrahead %}{% endblock %}
  <script type="text/javascript">
    var AJAX_SERIAL = "{{AJAX_SERIAL}}";
    var MEDIA_SERIAL = "{{MEDIA_SERIAL}}";
    var MEDIA_URL = "{{MEDIA_URL}}";
    var SITE_ROOT = "{{SITE_ROOT}}";

    var gUserAuthenticated = {{user.is_authenticated|lower}};
{% if not user.is_anonymous %}
    var gUserName = "{{user.username}}";
    var gUserFullName = "{{user|user_displayname}}";
{% endif %}
{% block jsconsts %}{% endblock %}
  </script>
  <link rel="shortcut icon" type="image/x-icon" href="{{MEDIA_URL}}rb/images/favicon.ico?{{MEDIA_SERIAL}}" />
  <link rel="apple-touch-icon-precomposed" type="image/png" href="{{MEDIA_URL}}rb/images/apple-home-icon.png?{{MEDIA_SERIAL}}" />
  <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}rb/css/common.css?{{MEDIA_SERIAL}}" />
{% block css %}{% endblock %}
  <!--[if lt IE 7.]>
  <style type="text/css">
    body {
      behavior: url("{{MEDIA_URL}}rb/js/csshover2.htc?{{MEDIA_SERIAL}}");
    }

    img,
    table.sidebyside .commentflag,
    .box.important .box-inner {
      behavior: url("{{MEDIA_URL}}rb/js/pngfix.htc?{{MEDIA_SERIAL}}");
    }
{% block ie6_csshacks %}{% endblock %}
  </style>
  <![endif]-->
  <!--[if lt IE 8.]>
  <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}rb/css/ie_hacks.css?{{MEDIA_SERIAL}}"></script>
  <![endif]-->
{% include "js/jquery.html" %}
{% block scripts %}{% endblock %}
 </head>
{% block bodytag %}
 <body>
{% endblock %}
  <div id="container">
{% block headerbar %}
   <div id="headerbar">
    <ul id="accountnav">
{% if user.is_authenticated %}
{%  blocktrans with user|realname|escape as username %}
     <li>Welcome, <b>{{username}}</b></li>
{% endblocktrans %}
     <li>- <a href="{% url user-preferences %}">{% trans "My account" %}</a></li>
{%  if user.is_staff %}
     <li>- <a href="{% url reviewboard.admin.views.dashboard %}">{% trans "Admin" %}</a></li>
{%  endif %}
     <li>- <a href="{% url logout %}">{% trans "Log out" %}</a></li>
{% else %}
     <li><a href="{% url login %}?next_page={{request.path}}">{% trans "Log in" %}</a></li>
{#  XXX Using default sucks, but siteconfig defaults don't #}
{#      work from templates.                               #}
{%  if auth_backends.0.supports_registration and siteconfig.settings.auth_enable_registration|default_if_none:1 %}
     <li>- <a href="{% url register %}">{% trans "Register" %}</a></li>
{%  endif %}
{% endif %}{# !is_authenticated #}
     <li>- <a href="http://www.reviewboard.org/docs/manual/1.6/">{% trans "Documentation" %}</a></li>
     <li>- <a href="http://www.reviewboard.org/bugs/">{% trans "Bugs" %}</a></li>
     <li>- <a href="http://www.reviewboard.org/bugs/new/">{% trans "Report bug" %}</a></li>
    </ul>
    <br />
    <div id="rbinfo">
     <a href="{% url root %}"><img id="logo" src="{{MEDIA_URL}}rb/images/logo.png?{{MEDIA_SERIAL}}" alt="" border="0" /></a>
     <h1 id="title">
	  <a href="{% url root %}">Review Board</a>
	  <span class="version">{{version}}</span>
	 </h1>
    </div>
   </div>
   <div id="page-container">
{% block navbar %}
   {% if user.is_authenticated or not siteconfig.settings.auth_require_sitewide_login %}
    {% if siteconfig.settings.search_enable %}<form method="get" action="{% url search %}">{% endif %}
     <div id="navbar-outer">
      <ul id="navbar">
{% if user.is_authenticated %}
       <li><a href="{% url dashboard %}">{% trans "My Dashboard" %}</a></li>
       <li><a href="{% url new-review-request %}">{% trans "New Review Request" %}</a></li>
       <li>-</li>
{% endif %}
       <li><a href="{% url all-review-requests %}">{% trans "All review requests" %}</a></li>
       <li><a href="{% url all-groups %}">{% trans "Groups" %}</a></li>
       <li><a href="{% url all-users %}">{% trans "Submitters" %}</a></li>
       <li id="searchbar">
       <input type="text" name="q" id="search_field" {% attr "value" %}{{query}}{% endattr %} />
       {% if siteconfig.settings.search_enable %}
        <input type="submit" value="{% trans "Search" %}" />
       {% endif %}
       </li>
      </ul>
     </div>
     {% if siteconfig.settings.search_enable %}</form>{% endif %}
    {% endif %}
{% endblock %}
{% endblock %}
    <noscript>
{%  box "important" %}
     <h1>{% trans "JavaScript is turned off" %}</h1>
     <p>{% blocktrans %}Review Board requires JavaScript in order to function.
     Please turn it on in your browser preferences.{% endblocktrans %}
     <p>{% blocktrans %}Firefox users: if you prefer to turn on JavaScript only
     for specific sites, we recommend the
     <a href="https://addons.mozilla.org/en-US/firefox/addon/722">NoScript
     extension</a>.{% endblocktrans %}</p>
{%  endbox %}
    </noscript>
    <div id="error"></div>
    <div id="content">
{% block content %}{% endblock %}
    </div>
   </div>
  </div>
  {% include "js/jquery-ui.html" %}
  <script type="text/javascript" src="{{MEDIA_URL}}rb/js/datastore.js?{{MEDIA_SERIAL}}"></script>
  <script type="text/javascript" src="{{MEDIA_URL}}djblets/js/jquery.gravy.js?{{MEDIA_SERIAL}}"></script>
  <script type="text/javascript" src="{{MEDIA_URL}}rb/js/ui.autocomplete.min.js?{{MEDIA_SERIAL}}"></script>
  <script type="text/javascript" src="{{MEDIA_URL}}rb/js/common.js?{{MEDIA_SERIAL}}"></script>
{% block scripts-post %}{% endblock %}
 </body>
</html>
