<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ LANGUAGE_CODE|default:"en-us" }}" xml:lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
<head>
<title>{% block title %}{% endblock %} | {{setup.installation_name}}</title>
{% if setup.favicon_mime %}
    <link rel="icon" type="{{setup.favicon_mime}}" href="{{setup.favicon_url}}" />
{% endif %}
<link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/base.css{% endblock %}" />
<link rel="stylesheet" type="text/css" href="/static/css/main.css" />
<link rel="stylesheet" type="text/css" href="/static/css/menu.css" />
<META NAME="Copyright" CONTENT="2007-2011, nocproject.org" />
<META HTTP-EQUIV="Pragma" CONTENT="no-cache" />
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate" />
<SCRIPT TYPE="text/javascript" SRC="{% admin_media_prefix %}js/jquery.js"></SCRIPT>
<SCRIPT TYPE="text/javascript" SRC="/static/js/menu.js"></SCRIPT>
{% block extrastyle %}{% endblock %}
<!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="{% block stylesheet_ie %}{% load adminmedia %}{% admin_media_prefix %}css/ie.css{% endblock %}" /><![endif]-->
{% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% admin_media_prefix %}css/rtl.css{% endblock %}" />{% endif %}
<script type="text/javascript">window.__admin_media_prefix__ = "{% filter escapejs %}{% admin_media_prefix %}{% endfilter %}";</script>
{% block extrahead %}{% endblock %}
{% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE" />{% endblock %}
</head>
{% load i18n %}

<body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}">
<script type="text/javascript">
    MENU_JSON_URL="{% url main:menu:json user.id %}";
    $(document).ready(menu);
</script>
<!-- Container -->
<div id="container">

    {% if not is_popup %}
    <!-- Header -->
    <div id="header">
        <div id="branding">
        {% block branding %}<img src="{{setup.logo_url}}" width="{{setup.logo_width}}" height="{{setup.logo_height}}" alt="logo" style="float: left; margin: 0px 4px 0px 4px"/><h1 ID="site-name">{{setup.installation_name}}</h1>{% endblock %}
        </div>
        {% if user.is_active and user.is_staff %}
        <div id="user-tools">
            {% trans 'Welcome,' %}
            <strong>{% filter force_escape %}{% firstof user.first_name user.username %}{% endfilter %}</strong>.
            {% block userlinks %}
                <a href="{% url main:userprofile:change %}">Profile</a> /
                <a href="{% url main:auth:change_password %}">{% trans 'Change password' %}</a> /
                <a href="{% url main:auth:logout %}">{% trans 'Log out' %}</a>
            {% endblock %}
            <FORM METHOD="POST" ACTION="{% url main:search:search %}"><INPUT TYPE="search" NAME="query"  PLACEHOLDER="Search..."/></FORM>
        </div>
        {% endif %}
        {% block nav-global %}{% endblock %}
    </div>
    <div id="menu"></div>
    <!-- END Header -->
    <!-- Breadcrumbs -->
    <div class="breadcrumbs"><ul>{% block breadcrumbs %}<li><a href="{% url main:index:home %}">{% trans 'Home' %}</a></li>{% endblock %}</ul></div>
    <!-- END Breadcrumbs -->
    {% endif %}

    {% if messages %}
    <ul class="messagelist">
        {% for message in messages %}
        <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
        {% endfor %}
    </ul>
    {% endif %}
        
    <!-- Content -->
    <div id="content" class="{% block coltype %}colM{% endblock %}">
        {% block pretitle %}{% endblock %}
        {% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
        {% block content %}
        {% block object-tools %}{% endblock %}
        {{ content }}
        {% endblock %}
        {% block sidebar %}{% endblock %}
        <br class="clear" />
    </div>
    <!-- END Content -->

    {% block footer %}<div id="footer">&copy;2007-2011, <A HREF="http://nocproject.org/">nocproject.org</A></div>{% endblock %}
</div>
<!-- END Container -->

</body>
</html>
