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

<xf:form action="{{ link('logs/search') }}" class="block">
	<div class="block-container">
		<div class="block-body">
			<xf:textboxrow type="search" name="q" value="{$q}" label="{{ phrase('search') }}" autocomplete="off" />

			<xf:formrow rowtype="input"
				label="{{ phrase('log_date_between') }}"
				hint="{{ phrase('optional') }}">

				<div class="inputGroup">
					<xf:dateinput name="start" value="{$start}" size="15" />
					<span class="inputGroup-text">-</span>
					<xf:dateinput name="end" value="{$end}" size="15" />
				</div>
			</xf:formrow>

			<xf:checkboxrow label="{{ phrase('search_logs') }}" listclass="js-contentTypes listColumns">
				<xf:hint>
					<xf:checkbox standalone="true">
						<xf:option check-all=".js-contentTypes" label="{{ phrase('select_all') }}" />
					</xf:checkbox>
				</xf:hint>
				<xf:foreach loop="$typeOptions" key="$type" value="$name">
					<xf:option name="typeChoices[]" value="{$type}" label="{$name}" selected="{{ in_array($type, $typeChoices) }}" />
				</xf:foreach>
			</xf:checkboxrow>

			<xf:submitrow submit="{{ phrase('search_logs') }}" fa="fa-file-search" />
		</div>
	</div>
</xf:form>

<xf:if is="$resultTypeSets">
	<div class="block">
		<div class="block-container">
			<h2 class="block-header">{{ phrase('search_results') }}</h2>
			<div class="block-body">
				<xf:datalist>
					<xf:foreach loop="$resultTypeSets" value="$resultType">
						{{ $resultType.render(templater()) }}
					</xf:foreach>
				</xf:datalist>
			</div>
		</div>
	</div>
</xf:if>