<tal:block metal:use-macro="python:here.getFormsTool().getForm('site_admin_template').macros['page']">

<h1 metal:fill-slot="title" i18n:translate="">Basket of validation</h1>

<tal:block metal:fill-slot="section">
<p i18n:translate="">
	This page displays the directory structure from this portal and shows the number of unchecked items
	and checked with the result <em i18n:name="not-ok" i18n:translate="">not OK</em> items.
</p>
<p>
	<a tal:attributes="href string:${here/getSitePath}/admin_validation_html"><strong i18n:translate="">View validation statistics</strong></a>
</p>

<h2>Validation report (tree view)</h2>

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

<tal:block tal:define="expand python:request.get('expand', '');
						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>]
<dl>
	<dt tal:repeat="tree_node tree">
		<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" i18n:attributes="alt" /></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" i18n:attributes="alt" /></a>
		</tal:block>
		<img tal:attributes="src python:tree_node[0].icon" alt="" />
		<a tal:define="node_path python:tree_node[0].absolute_url()" tal:attributes="href node_path" tal:content="python:tree_node[0].title_or_id()">folder</a>
		<tal:block tal:define="count_notchecked python:tree_node[0].count_notchecked_objects(); count_notok python:tree_node[0].count_notok_objects()"
					tal:condition="python:count_notchecked>0 or count_notok>0">
		(<span tal:condition="python:count_notchecked>0" style="color: blue"><span i18n:translate="" tal:omit-tag="">Unchecked:</span> <strong tal:content="count_notchecked" /></span>
		<span tal:condition="python:count_notok>0" style="color: red"><span i18n:translate="" tal:omit-tag="">Result not OK:</span> <strong tal:content="count_notok" /></span>)
		</tal:block>
	</dt>
</dl>
<input type="hidden" name="expand" tal:attributes="value expand" />
</form>
</tal:block>

</tal:block>

</tal:block>
