{% load pages_tags i18n adminmedia %}

<ul>
	{% for page in page_branch %}
	<li id="ordering_{{ page.id }}">
		<div class="{% cycle 'row1' 'row2' %}">
			<a href="#" class="tree-toggle" id="page-{{ page.id }}">
				<span class="icon open">+</span>
				<span class="icon close">-</span>
			</a>
			<a href="{% url admin:pages_page_change page.id %}"
				class="changelink">{{ page.title }}</a>
			<span class="ordering">
			    <img src="{% admin_media_prefix %}img/admin/arrow-up.gif" />
			    <img src="{% admin_media_prefix %}img/admin/arrow-down.gif" />
			</span>
			<select class="addlist" id="addlink-{{ page.id }}">
			    <option value="">{% trans "Add secondary" %} ...</option>
    			{% for model in page_models %}
			    <option value="{{ model.add_url }}?parent={{ page.id }}"
			        >{{ model.name }}</option>
		    	{% endfor %}
		    </select>
		</div>
		<br clear="all" />
		{% page_menu_admin page %}
	</li>
	{% endfor %}
</ul>

