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

<xf:pageaction>
	<xf:button href="{{ link('user-groups/add') }}" icon="add">
		{{ phrase('add_user_group') }}
	</xf:button>
</xf:pageaction>

<xf:form action="{{ link('user-groups/toggle') }}" class="block" ajax="true">
	<div class="block-outer">
		<xf:macro template="filter_macros" name="quick_filter" arg-key="user-groups" arg-class="block-outer-opposite" />
	</div>
	<div class="block-container">
		<div class="block-body">
			<xf:datalist>
				<xf:foreach loop="$userGroups" value="$userGroup">
					<xf:datarow>
						<xf:main hash="{$userGroup.user_group_id}"
							href="{{ link('user-groups/edit', $userGroup) }}" label="{$userGroup.title}"
							hint="{$userGroup.user_title}" />
						<xf:delete href="{{ link('user-groups/delete', $userGroup) }}" />
					</xf:datarow>
				</xf:foreach>
			</xf:datalist>
		</div>
		<div class="block-footer">
			<span class="block-footer-counter">{{ display_totals(count($userGroups)) }}</span>
		</div>
	</div>
</xf:form>