<tal:block metal:use-macro="template/macro_manage_add/macros/page">

<tal:block metal:fill-slot="description">
	Fill the properties in the form below and click <strong>Add</strong>.
</tal:block>

<tal:block metal:fill-slot="custom_properties">
<script type="text/javascript">
<!--
function fTreeClick(expand)
{
	document.frmAdd.action = '';
	document.frmAdd.expand.value = expand;
	document.frmAdd.submit();
}
function fTreeNodeClick(node_path)
{
	document.frmAdd.pointer.value = node_path;
}
//-->
</script>
<tr>
	<td class="form-label" style="vertical-align: top">Site map</td>
	<td>
		<tal:block tal:define="expand python:request.get('expand', ''); expand_list python:here.splitToList(expand); tree python:here.getSiteMap(expand_list, None, 1)">
		<table border="0" cellspacing="1" cellpadding="1" width="100%">
			<tr tal:repeat="tree_node tree">
				<td>
					<table border="0" cellspacing="1" cellpadding="1">
						<tr>
							<td>
								<img tal:repeat="i python:range(0, tree_node[2])" src="misc_/Naaya/square.gif" alt="" />
								<tal:block tal:condition="python:tree_node[1]==-1">
									<img src="misc_/Naaya/square.gif" alt="" />
								</tal:block>
								<tal:block tal:define="node_expand python:here.processCollapse(expand_list, tree_node[0].absolute_url(1))"
									tal:condition="python:tree_node[1]==0">
									<a tal:attributes="onclick string:javascript:fTreeClick('${node_expand}')"><img src="misc_/Naaya/minus.gif" alt="Collapse" /></a>
								</tal:block>
								<tal:block tal:define="node_expand python:here.processExpand(expand_list, tree_node[0].absolute_url(1))"
									tal:condition="python:tree_node[1]==1">
									<a tal:attributes="onclick string:javascript:fTreeClick('${node_expand}')"><img src="misc_/Naaya/plus.gif" alt="Expand" /></a>
								</tal:block>
							</td>
							<td><img tal:attributes="src python:tree_node[0].icon" alt="" /></td>
							<td><a tal:define="node_path python:tree_node[0].absolute_url(1)" tal:attributes="href string:javascript:fTreeNodeClick('${node_path}')" tal:content="python:tree_node[0].title_or_id()">folder</a></td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
		<input type="hidden" name="expand" tal:attributes="value expand" />
		</tal:block>
	</td>
</tr>
<tr>
	<td class="form-label" style="vertical-align: top">Item</td>
	<td><input type="text" name="pointer" size="50" readonly="readonly" tal:attributes="value python:request.get('pointer', '')" /></td>
</tr>
</tal:block>

</tal:block>
