<xf:title>{{ phrase('node_permissions') }}</xf:title>

<xf:if is="$nodeTree.countChildren()">
	<div class="block">
		<div class="block-outer">
			<xf:macro template="filter_macros" name="quick_filter" arg-key="nodes" arg-class="block-outer-opposite" />
		</div>
		<div class="block-container">
			<div class="block-body">
				<xf:datalist>
					<xf:foreach loop="$nodeTree.getFlattened(0)" value="$treeEntry">
						<xf:set var="$node" value="{$treeEntry.record}" />
						<xf:datarow rowclass="{{ {$customPermissions.{$node.node_id}} ? 'dataList-row--custom' : '' }}">
							<xf:cell class="dataList-cell--min"><i class="nodeIcon nodeIcon--{$node.NodeType.node_type_id}"></i></xf:cell>
							<xf:cell class="dataList-cell--link dataList-cell--main" hash="{$node.node_id}">
								<a href="{{ link('permissions/nodes', $node) }}">
									<div class="u-depth{$treeEntry.depth}">
										<div class="dataList-mainRow">{$node.title} <span class="dataList-hint" dir="auto">{$node.NodeType.title}</span></div>
									</div>
								</a>
							</xf:cell>
							<xf:action href="{{ link('nodes/edit', $node) }}">{{ phrase('edit') }}</xf:action>
						</xf:datarow>
					</xf:foreach>
				</xf:datalist>
			</div>
			<div class="block-footer">
				<span class="block-footer-counter">{{ display_totals($nodeTree.getFlattened(0)) }}</span>
			</div>
		</div>
	</div>
<xf:else />
	<div class="blockMessage">{{ phrase('no_items_have_been_created_yet') }}</div>
</xf:if>