<metal:block use-macro="here/standard_template_macro">
<metal:block fill-slot="body">

<tal:block define="geomap_tool here/getGeoMapTool;
					site_url here/absolute_url;
					expand python:request.get('expand', '');
					expand_list python:here.splitToList(expand);
					tree python:here.getSiteMap(expand_list, None, 0, 0);
					folder python:request.get('folder', '');
					url python:request.get('url', '')">

<h1 i18n:translate="">Suggest location</h1>

<form name="frmportlets" method="post" tal:attributes="action string:${site_url}/suggest_location_redirect">

	<h2 i18n:translate="">Step 1: Choose the folder for your location by clicking on it</h2>

	<script type="text/javascript">
	<!--
	function fTreeClick(expand)
	{
		document.frmportlets.action = '';
		document.frmportlets.expand.value = expand;
	}
	function fTreeNodeClick(node_path)
	{
		document.frmportlets.folder.value = node_path;
	}
	//-->
	</script>
	<table border="0" cellspacing="1" cellpadding="1" tal:repeat="tree_node tree">
	<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">
				<input type="image" src="misc_/Naaya/minus.gif" alt="Collapse node" i18n:attributes="alt" tal:attributes="onclick string:javascript:fTreeClick('${node_expand}')" />
			</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">
				<input type="image" src="misc_/Naaya/plus.gif" alt="Expand node" i18n:attributes="alt" tal:attributes="onclick string:javascript:fTreeClick('${node_expand}')" />
			</tal:block>
		</td>
		<td><img tal:attributes="src python:tree_node[0].icon" alt="Folder icon" /></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>
	<input type="text" name="folder" tal:attributes="value folder" size="35" readonly="readonly" />
	<input type="hidden" name="expand" tal:attributes="value expand" />

	<noscript>
		<br/>
		<label for="folder_url">Select url for the folder:</label>
		<input type="text" id="folder_url" name="url" tal:attributes="value url" size="35"/>
	</noscript>

	<h2 i18n:translate="">Step 2: Choose the content type for your location</h2>

	<select id="select_content_type" name="content_type">
		<tal:block repeat="content_type geomap_tool/list_geotaggable_types">
			<option tal:condition="content_type/geo_enabled"
				tal:attributes="value content_type/id"
				tal:content="content_type/title"/>
		</tal:block>
	</select>

	<p><input type="submit" value="Next" i18n:attributes="value" /></p>
</form>

</tal:block>

</metal:block>
</metal:block>