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

<xf:pageaction>
	<xf:button href="{{ link('content-types/add') }}" icon="add">{{ phrase('add_content_type_field') }}</xf:button>
</xf:pageaction>

<xf:foreach loop="$fieldsGrouped" key="$contentType" value="$fields">
	<div class="block">
		<div class="block-container">
			<h2 class="block-header">
				<a href="{{ link('content-types/add', [], {'content_type':$contentType}) }}" class="u-pullRight"><xf:fa icon="fa-plus-circle" /></a>
				{$contentType}
			</h2>
			<div class="block-body">
				<xf:datalist>
				<xf:foreach loop="{$fields}" value="$field">
					<xf:datarow href="{{ link('content-types/edit', $field) }}"
						label="{$field.field_name}"
						hint="{$field.field_value}"
						hash="{$field.content_type}_{$field.field_name}"
						dir="auto" />
				</xf:foreach>
				</xf:datalist>
			</div>
		</div>
	</div>
</xf:foreach>