{% extends "admin/change_list.html" %}
{% load admin_list i18n static %}

{% block object-tools-items %}
  <div class="btn-group">
    {% include "admin/import_export/includes/change_list_import_item.html" %}
    {% include "admin/import_export/includes/change_list_export_item.html" %}
  </div>
  {{ block.super }}
{% endblock %}


{% block extrahead %}
{{ block.super }}
<link rel="stylesheet" type="text/css" href="{% static "treeadmin/css/treeadmin.css"%}" />
<script type="text/javascript">
    var treeadmin = {
        "jQuery": django.jQuery,
        "tree_structure": {{ tree_structure|default:"null" }},
        "warning_text": "{% trans 'Confirm page change?\n\nWARNING!\nThis action may change the url and menu structure!' %}"
    };
</script>
<script type="text/javascript" src="{% static "treeadmin/js/ie_compat.js"%}"></script>
<script type="text/javascript" src="{% static "treeadmin/js/jquery.cookie.js"%}"></script>
<script type="text/javascript" src="{% static "treeadmin/js/treeadmin.js"%}"></script>

{% endblock %}

{% block filters %}
	{% if cl.has_filters %}
		<div id="changelist-filter">
			<h2>{% trans 'Shortcuts' %}</h2>
			<ul>
				<li><a id="collapse_entire_tree" href="#">{% trans 'Collapse tree' %}</a></li>
				<li><a id="open_entire_tree" href="#">{% trans 'Expand tree' %}</a></li>
			</ul>

			<h2>{% trans 'Filter' %}</h2>
			{% for spec in cl.filter_specs %}{% admin_list_filter cl spec %}{% endfor %}
		</div>
	{% endif %}
{% endblock %}
