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

<xf:pageaction>
	<xf:button href="{{ link('advertising/positions/add') }}" icon="add">{{ phrase('add_advertising_position') }}</xf:button>
</xf:pageaction>

<xf:if is="$advertisingPositions is not empty">
	<xf:form action="{{ link('advertising/positions/toggle') }}" class="block" ajax="true">
		<div class="block-outer">
			<xf:macro id="filter_macros::quick_filter" arg-key="advertising-positions" arg-class="block-outer-opposite" />
		</div>
		<div class="block-container">
			<div class="block-body">
				<xf:datalist>
					<xf:foreach loop="$advertisingPositions" value="$advertisingPosition">
						<xf:datarow
							label="{$advertisingPosition.title}"
							explain="{$advertisingPosition.description|raw}"
							href="{{ link('advertising/positions/edit', $advertisingPosition) }}"
							delete="{{ link('advertising/positions/delete', $advertisingPosition) }}">

							<xf:toggle name="active[{$advertisingPosition.position_id}]" selected="$advertisingPosition.active"
								class="dataList-cell--separated" submit="true"
								tooltip="{{ phrase('enable_disable_x', {'title': $advertisingPosition.position_id}) }}" />
						</xf:datarow>
					</xf:foreach>
				</xf:datalist>
			</div>
			<div class="block-footer">
				<span class="block-footer-counter">{{ display_totals($advertisingPositions) }}</span>
			</div>
		</div>
	</xf:form>
<xf:else />
	<div class="blockMessage">{{ phrase('no_items_have_been_created_yet') }}</div>
</xf:if>