{% extends base_template %}

{% load admin_static i18n %}
{% load url from future %}

{% block headcss %}
    <link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% static "admin/css/base.css" %}{% endblock %}" />
    {% block extrastyle %}{% endblock %}
    <style>
        {% if is_popup %}
        header, footer {
            display: none;
        }
        {% endif %}
        #content-related {
            display: none;
        }
        .breadcrumbs {
            padding: 12px 8px 15px 30px;
        }
        article {
            padding: 0;
        }
        #post-breadcrumb-block {
            padding: 30px;
            padding-top: 8px;
        }
    </style>
{% endblock headcss %}

{% block headjs %}
    <script type="text/javascript">
        window.__admin_media_prefix__ = "{% filter escapejs %}{% static 'admin/' %}{% endfilter %}";
    </script>
{% endblock headjs %}

{% block bodyclass %}{% if is_popup %}popup {% endif %}{% endblock %}

{% block outer_content %}
<div id="container">

    {% if not is_popup %}
    <!-- Header -->
    <div id="header">
        {% block nav-global %}{% endblock %}
    </div>
    <!-- END Header -->
    {% endif %}

    {% block messages %}
        {% if messages %}
        <ul class="messagelist">{% for message in messages %}
          <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
        {% endfor %}</ul>
        {% endif %}
    {% endblock messages %}

    <div id="container">
        <article class="clearfix">
            {% block breadcrumbs %}
                <div class="breadcrumbs">
                <a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
                {% if title %} &rsaquo; {{ title }}{% endif %}
                </div>
            {% endblock %}
            <div id="post-breadcrumb-block">
                {% block pretitle %}{% endblock %}
                {% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
                {% block content %}
                {% block object-tools %}{% endblock %}
                {{ content }}
                {% endblock %}
                {% block sidebar %}{% endblock %}
            </div>
            <br class="clear" />
        </article>
    </div>

    {% block footer %}<div id="footer"></div>{% endblock %}
</div>
{% endblock outer_content %}

</body>
</html>
