<!DOCTYPE html>
<html>
<head>
{% load admin_static brillixytags i18n %}
{% load url from future %}
    <meta charset="utf-8">
    <title>{% block title %}{{ title }} | {% trans 'Django site admin' %}{% endblock %}</title>

    {% media_for 'default' %}

    {% if LANGUAGE_BIDI %}
    <link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% static "admin/css/rtl.css" %}{% endblock %}" />
    {% endif %}

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

    {% block extrastyle %}{% endblock %}
    {% block extrahead %}{% endblock %}
</head>

<body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}">
    {% if not is_popup %}
    <!-- Header -->
    <div id="header">
        <div class="container">
            <div class="row">
                <div id="branding" class="span8">
                    {% block branding %}
                    <span class="logo">
                        <a href="{% url 'admin:index' %}">{% branding_logo %}</a>
                    </span>

                    <h1 class="title">
                        <a href="{% url 'admin:index' %}">{% branding_title %}</a>
                    </h1>
                    {% endblock %}
                </div>
                <div id="user-links" class="span4">
                    {% if user.is_active and user.is_staff %}
                    <div id="user-tools" class="pull-right">
                        {% trans 'Welcome,' %}
                        <strong>{% filter force_escape %}{{ user|user_nice_name }}{% endfilter %}</strong>.

                        {% block userlinks %}
                            <div>
                            {% url 'django-admindocs-docroot' as docsroot %}
                            {% if docsroot %}
                                <a href="{{ docsroot }}" class="btn">{% trans 'Documentation' %}</a>
                            {% endif %}

                            {% if user.has_usable_password %}
                                <a href="{% url 'admin:password_change' %}" class="btn btn-small">{% trans 'Change password' %}</a>
                            {% endif %}

                            <a href="{% url 'admin:logout' %}" class="btn btn-small">{% trans 'Log out' %}</a>
                            </div>
                        {% endblock %}
                    </div>
                    {% endif %}
                </div>
            </div>
        </div>
        <hr>

        <!-- Breadcrumbs -->
        {% if not is_popup %}
        {% block breadcrumbs %}
        <div class="container">
            <ul class="breadcrumb">
                <li>
                    <a href="{% url 'admin:index' %}" class="btn btn-primary"><i class="icon-list"></i> {% trans 'Home' %}</a>
                </li>
                
                {% block breadcrumbs-middle %}
                {% endblock %}

                {% block breadcrumbs-title %}
                    {% if title %}
                    <li><span class="divider">/</span> <strong>{{ title }}</strong></li>
                    {% endif %}
                {% endblock %}
            </ul>
        </div>
        {% endblock %}
        {% endif %}

    </div>
    <!-- END Header -->
    {% endif %}

    {% block messages %}
    {% if messages %}
    <!-- Messages -->
    <div class="messages container">
        {% for message in messages %}
        <div class="alert{% if message.tags %} alert-{{ message.tags }}{% endif %}">
            <a class="close" data-dismiss="alert">&times;</a>
            {{ message|capfirst }}
        </div>
        {% endfor %}
    </div>
    <!-- END Messages -->
    {% endif %}
    {% endblock %}
    
    <!-- Content -->
    <div id="content">
        <div class="container">
        {% block content_title %}
        {% if title %}<h1>{{ title }}</h1>{% endif %}
        {% endblock %}
        
        {% block content %}
        {% block object-tools %}{% endblock %}
        {{ content }}
        {% endblock %}
        </div>
    </div>
    <!-- END Content -->

    <!-- Footer -->
    <div id="footer">{% block footer %}{% endblock %}</div>
    <!-- END Footer -->
</body>
</html>
