{% extends "base.html" %}
{% load uni_form_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 }}documents/css/forms.css" type="text/css" />
    <link rel="Stylesheet" title="Normal" media="screen" type="text/css" href="{{ STATIC_URL }}documents/css/pygments.css"/>
    <link rel="stylesheet" href="{{ STATIC_URL }}documents/css/restructuredtext.css" type="text/css" />
    <link rel="Stylesheet" title="Normal" media="screen" type="text/css" href="{{ STATIC_URL }}documents/js/jquery/ui/themes/smoothness/jquery-ui-1.8.17.custom.css"/>
{% endblock %}
{% block head_more_js %}
    <script type="text/javascript" src="{{ STATIC_URL }}uni_form/uni-form.jquery.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL }}documents/js/jquery/ui/jquery-ui-1.8.17.custom.min.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL }}documents/js/jquery/ui/jquery.ui.datepicker-fr.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL }}documents/js/jquery/plugins/jquery.slugify.js"></script>
    {{ form.media }}
    <script language="JavaScript" type="text/javascript">
    //<![CDATA[
    $(document).ready(function() {
        $("#id_slug").slugify("#id_title");
        // Auto set on page load...
        $("form.uniForm").uniform();
        {% if insert_instance %}DJANGOCODEMIRROR_OBJECT = {
            'id': {{ insert_instance.id }},
            'slug': '{{ insert_instance.slug }}'
        };{% endif %}
    });
    //]]>
    </script>
{% endblock %}

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

    {% uni_form form form.helper %}
{% endblock %}
