{% extends 'django_epfl/base.html' %}

{% load i18n %}
{% load adminmedia %}
{% load static %}
{% load captureas %}
{% load url from future %}

{% block header %}
	{% if not is_popup %}
		{% if LANGUAGE_CODE|slice:"0:2" == 'fr' %}
			{% include 'django_epfl/template_inc/header-no-local-search.fr.html' %}
		{% else %}
			{% include 'django_epfl/template_inc/header-no-local-search.en.html' %}
		{% endif %}
	{% endif %}
{% endblock %}

{% block additional_css %}
	<link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% admin_media_prefix %}css/epfl-admin.css{% endblock %}" />
	{% block extrastyle %}{% endblock %}
{% endblock %}


{# Uses a trick to end the main-navigation div and place messages #}
{% block main-navigation %}{% if messages %}
</div>
<div>
        <ul class="messagelist">{% for message in messages %}
          <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
	{% endfor %}</ul>
        {% endif %}{% endblock %}

{% block breadcrumbs %}
	<ul id='breadcrumbs'>
		<li><a href='http://www.epfl.ch' >EPFL</a></li>
		<li><a href='/'>{% trans SITE_NAME %}</a></li>
		{% block breadcrumbs-relative %}{% endblock %}
	</ul>
{% endblock %}

{% block additional_js %}
	<script type="text/javascript">window.__admin_media_prefix__ = "{% filter escapejs %}{% admin_media_prefix %}{% endfilter %}";</script>
	{% block extrahead %}{% endblock %}
{% endblock %}


{% block title %}{% endblock %}

{% block body-class %}{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}{% endblock %}

{% block languages %}

<ul title="Choix de la langue" id="languages"> 
	{% if LANGUAGE_CODE|slice:"0:2" == 'fr' %}
	<li class="current">français</li>
	<li><a href="?ln=en{{ getvars }}">English</a></li>
	{% else %}
	<li><a href="?ln=fr{{ getvars }}">français</a></li>
	<li class='current'>English</li>
	{% endif %}
</ul>

{% endblock %}

{% block content %}{% endblock %}

{% block right_column %}
{% block sidebar %}{% endblock %}
{% endblock %}



{% block footer %}{% if user.is_active and user.is_staff and not is_popup %}
    	<ul>
    	{% block userlinks %}
    		<li><a href="http://kis-doc.epfl.ch/django">{% trans "À propos de Django @ EPFL" %}</a></li>
            {% url 'django-admindocs-docroot' as docsroot %}{% if docsroot %}<li><a href="{{ docsroot }}">{% trans 'Documentation' %}</a></li>{% endif %}
            <li>
            <a href="https://gaspar.epfl.ch/cgi-bin/gaspar-web/perso?op=chgpwd">
            {% trans 'Change password' %}</a></li>
            <li class='login'>
            {% url 'admin:logout' as logout_url %}
            {% if logout_url %}
                <a href="{{ logout_url }}">
            {% else %}
                <a href="/admin/logout/">
            {% endif %}
            {% trans 'Log out' %} ({% filter force_escape %}{% firstof user.username %}{% endfilter %})</a></li>
        {% endblock %}
        </ul>
{% endif %}{% endblock %}
