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

<xf:if is="$nodeTree.countChildren()">
	<div class="block">
		<div class="block-outer">
			<xf:macro id="filter_macros::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"><xf:macro template="node_list" name="node_icon" arg-node="{$node}" /></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} <xf:if is="callable($node.Data, 'getTypeHandler')"> ({{ $node.Data.TypeHandler.getTypeTitle() }})</xf:if></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>