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

<xf:pageaction>
	<xf:button href="{{ link('activity-summary/definitions/add') }}" icon="add">{{ phrase('add_activity_summary_definition') }}</xf:button>
</xf:pageaction>

<xf:if is="$definitions is not empty">
	<div class="block">
		<div class="block-outer">
			<xf:macro template="filter_macros" name="quick_filter" arg-key="activity-summary-definitions" arg-class="block-outer-opposite" />
		</div>
		<div class="block-container">
			<div class="block-body">
				<xf:datalist>
					<xf:foreach loop="$definitions" value="$definition">
						<xf:datarow
							label="{$definition.title}"
							hint="{$definition.definition_class}"
							explain="{$definition.description}"
							href="{{ link('activity-summary/definitions/edit', $definition) }}"
							delete="{{ link('activity-summary/definitions/delete', $definition) }}">

							<xf:action href="{{ link('activity-summary/add', null, {'definition_id': $definition.definition_id}) }}">
								{{ phrase('add_activity_summary') }}
							</xf:action>
						</xf:datarow>
					</xf:foreach>
				</xf:datalist>
			</div>
			<div class="block-footer">
				<span class="block-footer-counter">{{ display_totals($definitions) }}</span>
			</div>
		</div>
	</div>
<xf:else />
	<div class="blockMessage">{{ phrase('no_items_have_been_created_yet') }}</div>
</xf:if>