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

<xf:pageaction if="$entries is not empty">
	<xf:button href="{{ link('logs/server-errors/clear') }}" icon="delete" overlay="true">
		{{ phrase('clear') }}
	</xf:button>
</xf:pageaction>

<xf:if is="$entries is not empty">
	<div class="block">
		<div class="block-container">
			<div class="block-body">
				<xf:datalist>
					<xf:foreach loop="$entries" value="$entry">
						<xf:datarow overlay="true"
							label="{{ $entry.message ?: '&nbsp;' }}"
							href="{{ link('logs/server-errors', $entry) }}"
							delete="{{ link('logs/server-errors/delete', $entry) }}"
							dir="auto">
							<xf:explain>
								<ul class="listInline listInline--bullet">
									<li><xf:date time="{$entry.exception_date}" /></li>
									<li>{$entry.filename}:{$entry.line}</li>
								</ul>
							</xf:explain>
						</xf:datarow>
					</xf:foreach>
				</xf:datalist>
			</div>
			<div class="block-footer">
				<span class="block-footer-counter">{{ display_totals($entries, $total) }}</span>
			</div>
		</div>

		<xf:pagenav page="{$page}" perpage="{$perPage}" total="{$total}"
			link="logs/server-error"
			wrapperclass="block-outer block-outer--after" />
	</div>
<xf:else />
	<div class="blockMessage">{{ phrase('no_errors_have_been_logged') }}</div>
</xf:if>