{% extends 'admin/change_list.html' %}

{% block extrastyle %}
    {{ block.super }}
    <link rel="stylesheet" href="{{ STATIC_URL }}django_mptt_admin/css/jqtree.css">
    <link rel="stylesheet" href="{{ STATIC_URL }}django_mptt_admin/css/django_mptt_admin.css">
{% endblock %}

{% block extrahead %}
    {{ block.super }}
    <script src="{{ STATIC_URL }}django_mptt_admin/js/jquery-1.9.1.min.js"></script>
    <script src="{{ STATIC_URL }}django_mptt_admin/js/jquery.cookie.js"></script>
    <script src="{{ STATIC_URL }}django_mptt_admin/js/tree.jquery.js"></script>
    <script src="{{ STATIC_URL }}django_mptt_admin/js/django_mptt_admin.js"></script>
    <script>
        jQuery(function() {
            var auto_open = {{ tree_auto_open }};

            initTree(jQuery('#tree'), auto_open);
        });
    </script>
{% endblock %}

{% block search %}{% endblock %}

{% block result_list %}
    <div id="tree" data-url="{{ tree_json_url }}"></div>
{% endblock %}

{% block pagination %}{% endblock %}

{% block object-tools-items %}
    {{ block.super }}
    <li>
        <a href="{{ grid_url }}">Grid view</a>
    </li>
{% endblock %}