<xf:title>{{ phrase('route_filters') }}</xf:title>
<xf:description>{{ phrase('route_filters_allow_you_to_change_standard_urls') }}</xf:description>

<xf:pageaction>
	<xf:button href="{{ link('route-filters/add') }}" icon="add">{{ phrase('add_route_filter') }}</xf:button>
</xf:pageaction>

<xf:if is="$routeFilters is not empty">
	<xf:form action="{{ link('route-filters/toggle') }}" class="block" ajax="true">
		<div class="block-outer">
			<xf:macro id="filter_macros::quick_filter" arg-key="route-filters" arg-class="block-outer-opposite" />
		</div>
		<div class="block-container">
			<div class="block-body">
				<xf:datalist>
					<xf:datarow rowtype="header">
						<xf:cell>{{ phrase('find') }}</xf:cell>
						<xf:cell>{{ phrase('replace') }}</xf:cell>
						<xf:cell>&nbsp;</xf:cell>
						<xf:cell>&nbsp;</xf:cell>
					</xf:datarow>
					<xf:foreach loop="$routeFilters" value="$routeFilter">
						<xf:datarow delete="{{ link('route-filters/delete', $routeFilter) }}">
							<xf:cell href="{{ link('route-filters/edit', $routeFilter) }}">
								{$routeFilter.find_route_readable}
							</xf:cell>
							<xf:cell href="{{ link('route-filters/edit', $routeFilter) }}">
								{$routeFilter.replace_route_readable}
							</xf:cell>
							<xf:toggle name="enabled[{$routeFilter.route_filter_id}]"
								selected="$routeFilter.enabled" class="dataList-cell--separated" submit="true"
								tooltip="{{ phrase('enable_disable_route_filter') }}" />
						</xf:datarow>
					</xf:foreach>
				</xf:datalist>
			</div>
			<div class="block-footer">
				<span class="block-footer-counter">{{ display_totals($routeFilters) }}</span>
			</div>
		</div>
	</xf:form>
<xf:else />
	<div class="blockMessage">{{ phrase('no_items_have_been_created_yet') }}</div>
</xf:if>