{% extends "admin/change_form.html" %}
{% load i18n %}

{% block object-tools-items %}
<li><a href="../../categorization/?category__id__exact={{ object_id }}" class="orderelements">{% trans "View and sort objects" %}</a></li>
{{ block.super }}
{% endblock %}


{% block after_related_objects %}
{{ block.super }}

{# Change parent for Category when collection is changed #}

<script type="text/javascript">
//<![CDATA[
$(function() {
  $("#id_parent").chainedSelect({
        parent: '#id_collection',
        url: '/{{CYCLOPE_PREFIX}}collection_categories_json',
        value: 'category_id',
        label: 'category_name'
    });

});
//]]>
</script>

{% endblock %}
