{# Used for MP and NS trees #}
{% extends "admin/change_list.html" %}
{% load admin_list admin_tree static %}

{% block extrastyle %}
    {{ block.super }}
    <link rel="stylesheet" type="text/css" href="{% static 'treebeard/treebeard-admin.css' %}" />
{% endblock %}

{% block extrahead %}
    {{ block.super }}
    <script src="{% url 'admin:jsi18n' %}"></script>
    <script data-csrftoken="{{ csrf_token }}" src="{% static 'treebeard/treebeard-admin.js' %}"></script>
{% endblock %}

{% block result_list %}
    {% if action_form and actions_on_top and cl.show_admin_actions %}{% admin_actions %}{% endif %}
    {% result_tree cl %}
    <input type="hidden" id="has-filters" value="{{ filtered|yesno:"1,0" }}"/>
    <input type="hidden" id="has-change-permission" value="{{ has_change_permission|yesno:"1,0" }}"/>
    {% tree_context cl as node_context %}
    {{ node_context|json_script:"tree-context" }}
    {% if action_form and actions_on_bottom and cl.show_admin_actions %}{% admin_actions %}{% endif %}
{% endblock %}
