{% extends "base.html" %}
{% load i18n crispy_forms_tags autobreadcrumb %}

{% block head_title %}{% current_title_from_breadcrumbs %}{% endblock %}
{% block head_more_links %}
    <link rel="stylesheet" href="{{ STATIC_URL }}uni_form/uni-form.css" type="text/css" />
    <link rel="stylesheet" href="{{ STATIC_URL }}uni_form/default.uni-form.css" type="text/css" />
    <link rel="stylesheet" href="{{ STATIC_URL }}sveedocuments/css/forms.css" type="text/css" />
    <link rel="Stylesheet" title="Normal" media="screen" type="text/css" href="{{ STATIC_URL }}sveedocuments/css/pygments.css"/>
    <link rel="stylesheet" href="{{ STATIC_URL }}sveedocuments/css/restructuredtext.css" type="text/css" />
    <link rel="Stylesheet" title="Normal" media="screen" type="text/css" href="{{ STATIC_URL }}jquery/ui/themes/smoothness/jquery-ui-1.8.17.custom.css"/>
{% endblock %}
{% block head_more_js %}
    {% get_current_language as LANGUAGE_CODE %}
    <script type="text/javascript" src="{{ STATIC_URL }}uni_form/uni-form.jquery.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL }}jquery/ui/jquery-ui-1.8.17.custom.min.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL }}jquery/ui/jquery.ui.datepicker-fr.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL }}jquery/plugins/jquery.slugify.js"></script>
    {{ form.media }}
    <script language="JavaScript" type="text/javascript">
    //<![CDATA[
    DCM_lang = "{{ LANGUAGE_CODE }}";
    $(document).ready(function() {
        $("#id_published_0").datepicker($.datepicker.regional['fr']);
        $("#id_slug").slugify("#id_title");
        // Auto set on page load...
        $("form.uniForm").uniform();
        {% if page_instance %}DJANGOCODEMIRROR_OBJECT = {
            'id': {{ page_instance.id }},
            'slug': '{{ page_instance.slug }}'
        };{% endif %}
    });
    //]]>
    </script>
{% endblock %}
{% block body_attr %} class="fixed_width relative_width"{% endblock %}

{% block action_menu %}{% if page_instance and page_instance.visible %}
<div class="document_action_menu">
    <ul class="flat_bulletlist">
        <li><a href="{% url documents-page-details page_instance.slug %}">{% trans "View on site" %}</a></li>
    </ul>
    <div class="cale"></div>
</div>{% endif %}{% endblock %}

{% block content %}
    <h2>{% current_title_from_breadcrumbs %}</h2>

    {% crispy form %}
{% endblock %}
