{% load static %}

<link type="text/css" rel="stylesheet" href="{% static "cmsnamedmenus/css/admin.css" %}" />

{% if not line.fields|length_is:'1' and not field.is_readonly %}
{{ field.errors }}
{% endif %}

{% if field.is_checkbox %}
    {{ field.field }}{{ field.label_tag }}
{% else %}
    {{ field.label_tag }}
    {% if field.is_readonly %}
        <p>{{ field.contents|linebreaksbr }}</p>
    {% else %}
        {{ field.field }}
    {% endif %}
{% endif %}
{% if field.field.help_text %}
    <p class="help">{{ field.field.help_text|safe }}</p>
{% endif %}


<section class="pages">
    <aside class="menu-pages dd">
        <h3>Selected Pages</h3>
    </aside>

    <aside class="available-pages dd">
        <h3>Available Pages</h3>
    </aside>
</section>

<script src="{% static "cmsnamedmenus/js/admin.js" %}"></script>
<script>
    var app = new App({
        menuPages: {{ menu_pages|safe }},
        availablePages: {{ available_pages|safe }},
        el: '.pages'
    });
</script>
