<span tal:replace="python:request.RESPONSE.setHeader('content-type','text/html;charset=utf-8')" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	tal:attributes="xml:lang here/gl_get_selected_language; lang here/gl_get_selected_language"
	tal:define="site_url here/getSitePath;">
	<head tal:define="skin_file_path python:here.getLayoutTool().getSkinFilesPath()">
		<title i18n:translate="">Pick user location</title>
		<link rel="stylesheet" type="text/css" media="all" tal:attributes="href string:${skin_file_path}/style_common" />
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
	</head>

<body>

<script type="text/javascript">
<!--
function fTreeClick(expand)
{
    document.frmSiteMap.action = '';
    document.frmSiteMap.expand.value = expand;
    document.frmSiteMap.submit();
}
//-->
</script>

<div class="pick_pop_up">

<h3 i18n:translate="">Pick user location</h3>
<p i18n:translate="">Click on a folder to select it.</p>

<form><input type=button value="Close window" onclick="window.close()" style="font-size: 85%" /></form>

<tal:block tal:define="expand python:request.get('expand', '');
						form_name python:request.get('form_name', '');
						tree python:here.getSiteMap(here.splitToList(expand), None, 0);
						expand python:here.getSiteMapTrail(expand, tree);
						expand_list python:here.splitToList(expand)">
<form name="frmSiteMap" method="post" action="">
<a tal:attributes="href string:javascript:fTreeClick('all')" i18n:translate="">Expand all</a>
<a tal:attributes="href string:javascript:fTreeClick('')" i18n:translate="">Collapse all</a>
<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)" 
				href="#"
				tal:attributes="onclick string:window.opener.createKey('${node_path}', '${form_name}');; window.close();;" 
				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" />
<input type="hidden" name="form_name" tal:attributes="value form_name" />
</form>
</tal:block>

<form><input type=button value="Close window" onclick="window.close()" style="font-size: 85%" /></form>

</div>
</body>
</html>
