{% extends "admin/change_form.html" %}
{% load i18n %}
{% block extrastyle %}
    {{ block.super }}
    <link rel="stylesheet" href="{{MEDIA_URL}}scaffold/styles/scaffold-admin.css" type="text/css" media="screen"/>
    <style type="text/css" media="screen">
    label, input { display: inline; }
    label { padding-right: 10px;}
    </style>
{%endblock%}
{% block breadcrumbs %}
<div class="breadcrumbs">
    <a href="{%url admin:index%}">{% trans "Home" %}</a> &rsaquo; 
    <a href="{{app_index_url}}">{{app_label|capfirst}}</a> &rsaquo;      
    <a href="{{changelist_url}}">{{model_label_plural|capfirst}}</a> &rsaquo;
    <a href="{{changelist_url}}{{obj.pk}}/">{{obj.title}}</a> &rsaquo;
    {% trans 'Move'%}</em>    
</div>
{% endblock %}
{% block content %}
<div class="sections-preview">
<h4>Current {{model_label|capfirst}} Structure:</h4>
{{preview|safe}}
</div>
<form action="" method="POST" class="move-section">
{% csrf_token %}
<label>Make this {{model_label}} a &nbsp;
    <select name="relationship">
        <option value="neighbor">Neighbor</option>
        <option value="child">Child</option>
    </select>
<label>
<label> of &nbsp;
    <select name="to">
        {%for n in tree%}
        <option value="{{n.id}}">{{n}}</option>
        {%endfor%}
        <option value="TOP">[MOVE TO TOP]</option>
    </select>
</label>   
<input type="submit" value="Move" />
</form>
{%endblock%}