{% extends "admin/base.html" %}
{% load i18n %}

{% block title %}PyLucid - {{ title }}{% endblock %}

{% block extrahead %}{% spaceless %}{{ block.super }}
{% if debug %}<!-- ./apps/pylucid/templates/admin/base_site.html extrahead block START -->{% endif %}
{% if Django_media_prefix and PyLucid_media_url %}
    {# django include it since http://code.djangoproject.com/changeset/12297 #}
	<script type="text/javascript" src="{{ Django_media_prefix }}js/jquery.min.js" onerror="JavaScript:alert('Error loading file [{{ Django_media_prefix }}js/jquery.min.js] !');" ></script>
	<script type="text/javascript" src="{{ PyLucid_media_url }}pylucid_js_tools.js"></script>
	{% if debug %}
	   <script type="text/javascript">var debug=true;log("debug is on");</script>
	{% else %}
	   <script type="text/javascript">var debug=false;</script>
	{% endif %}
	{% include "admin_menu/includes/superfish_extrahead.html" %}
{% else %}{# Django_media_prefix and/or PyLucid_media_url doesn't exist in e.g. 500 error #}
    <!-- Error: Can't include PyLucid JS files{% if debug %}, because Django_media_prefix and/or PyLucid_media_url is not defined!{% endif %} -->
{% endif %}
{% if debug %}<!-- ./apps/pylucid/templates/admin/base_site.html extrahead block END -->{% endif %}
{% endspaceless %}{% endblock extrahead %}


{% block extrastyle %}{% spaceless %}{{ block.super }}
{% if debug %}<!-- ./apps/pylucid/templates/admin/base_site.html extrastyle block START -->{% endif %}
{% if PyLucid_media_url %}{# stylesheets for all Django admin views #}
	<link rel="stylesheet" type="text/css" href="{{ PyLucid_media_url }}pylucid_admin.css" onerror="JavaScript:alert('Error loading file [{{ PyLucid_media_url }}pylucid_admin.css] !');"/>
{% else %}{# PyLucid_media_url doesn't exist in e.g. 500 error #}
    <!-- Error: Can't include PyLucid CSS files{% if debug %}, because PyLucid_media_url is not defined!{% endif %} -->
{% endif %}
{% if debug %}<!-- ./apps/pylucid/templates/admin/base_site.html extrastyle block END -->{% endif %}
{% endspaceless %}{% endblock extrastyle %}


{% block branding %}<a name="top" \><h1 class="admin_headline">PyLucid</h1>
<!-- page_messages -->
{% endblock %}


{% block pretitle %}
<!-- app pretitle block start -->
{% if request.user.is_authenticated %}
{% include "admin_menu/includes/pylucid_admin_menu.html" %}
{% endif %}
<!-- app pretitle block end -->
{% endblock %}


{% block footer %}
<!-- app footer block start -->
<div class="footer">
    {% trans 'page stats:' %} <!-- script_duration --> | powered by: {{ powered_by }}
</div>
<!-- app footer block end -->
{% endblock %}