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

<xf:if is="$modification.Logs is not empty">
	<div class="block">
		<div class="block-container">
			<div class="block-body">
				<xf:datalist data-xf-init="responsive-data-list">
					<xf:datarow rowtype="header">
						<xf:cell>{{ phrase('template') }}</xf:cell>
						<xf:cell>{{ phrase('style') }}</xf:cell>
						<xf:cell>{{ phrase('status') }}</xf:cell>
						<xf:cell>{{ phrase('apply_count') }}</xf:cell>
					</xf:datarow>
					<xf:foreach loop="$modification.Logs" value="$log">
						<xf:datarow>
							<xf:cell>{$log.Template.title}</xf:cell>
							<xf:cell><xf:if is="$log.Template.style_id">{$log.Template.Style.title}<xf:else />{{ phrase('master_style') }}</xf:if></xf:cell>
							<xf:if is="$log.status == 'ok'">
								<xf:cell>OK</xf:cell>
								<xf:cell>{$log.apply_count}</xf:cell>
							<xf:else />
								<xf:cell>
									<xf:if is="$log.status == 'error_compile'">{{ phrase('compiler_error_may_be_from_another_template_modification') }}
										<xf:elseif is="$log.status == 'error_invalid_regex'" />{{ phrase('invalid_regular_expression') }}
										<xf:elseif is="$log.status == 'error_unknown_action'" />{{ phrase('unknown_action') }}
										<xf:elseif is="$log.status == 'error_invalid_callback'" />{{ phrase('invalid_callback') }}
										<xf:elseif is="$log.status == 'error_callback_failed'" />{{ phrase('callback_failed') }}
									</xf:if>
								</xf:cell>
								<xf:cell>-</xf:cell>
							</xf:if>
						</xf:datarow>
					</xf:foreach>
				</xf:datalist>
			</div>
		</div>
	</div>
<xf:else />
	<div class="blockMessage">{{ phrase('this_template_modification_does_not_match_any_templates') }}</div>
</xf:if>