<commit_before>{include file='header' pageTitle="wcf.acp.template.diff"}

<header class="contentHeader">
	<div class="contentHeaderTitle">
		<h1 class="contentTitle">{lang}wcf.acp.template.diff{/lang}</h1>
		<p class="contentHeaderDescription">{$template->templateName}</p>
	</div>
	
	{hascontent}
		<nav class="contentHeaderNavigation">
			<ul>
				{content}
					{if $diff}
						<li><a id="requestFullscreen" class="button" style="display: none;"><span class="icon icon16 fa-arrows-alt"></span> <span>{lang}wcf.global.button.fullscreen{/lang}</span></a></li>
						
						{if $parent->templateGroupID}
							<li><a href="{link controller='TemplateEdit' id=$parent->templateID}{/link}" class="button"><span class="icon icon16 fa-pencil"></span> <span>{lang}wcf.global.button.edit{/lang}</span></a></li>
						{/if}
					{/if}
					
					{event name='contentHeaderNavigation'}
				{/content}
			</ul>
		</nav>
	{/hascontent}
</header>

{include file='formError'}

<form method="post" action="{link controller='TemplateDiff'}{/link}">
	<section class="section">
		<h2 class="sectionTitle">{lang}wcf.acp.template.group{/lang}</h2>
		
		<dl>
			<dt><label for="parentID">{lang}wcf.acp.template.diff.compareWith{/lang}</label></dt>
			<dd>
				<select name="parentID" id="{lang}wcf.acp.template.group.default{/lang}ID">
					<option value="0"></option>
					{assign var=depth value=0}
					{foreach from=$templateGroupHierarchy item='templateGroup' key='templateGroupID'}
						<option{if $templateGroup[hasTemplate] !== false && $templateGroup[hasTemplate] != $templateID} value="{$templateGroup[hasTemplate]}"{if $parent->templateID == $templateGroup[hasTemplate]} selected{/if}{else} disabled{/if}>{@'&nbsp;'|str_repeat:$depth * 4}{if $templateGroupID}{$templateGroup[group]->getName()}{else}{lang}wcf.acp.template.group.default{/lang}{/if}</option>
						{assign var=depth value=$depth + 1}
					{/foreach}
				</select>
			</dd>
		</dl>
	</section>
	
	<div class="formSubmit">
		<input type="hidden" name="id" value="{$templateID}">
		<input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s">
	</div>
</form>

{if $diff}
	<div id="fullscreenContainer">
		<div class="sideBySide">
			<div class="section">
				<header class="sectionHeader">
					<h2 class="sectionTitle">
						{if $parent->templateGroupID}{$templateGroupHierarchy[$parent->templateGroupID][group]->getName()}{else}{lang}wcf.acp.template.group.default{/lang}{/if}
					</h2>
					<p class="sectionDescription">{lang}wcf.acp.template.lastModificationTime{/lang}: {@$parent->lastModificationTime|time}</p>
				</header>
				<commit_msg>Fixed wrong form field id<commit_after>{include file='header' pageTitle="wcf.acp.template.diff"}

<header class="contentHeader">
	<div class="contentHeaderTitle">
		<h1 class="contentTitle">{lang}wcf.acp.template.diff{/lang}</h1>
		<p class="contentHeaderDescription">{$template->templateName}</p>
	</div>
	
	{hascontent}
		<nav class="contentHeaderNavigation">
			<ul>
				{content}
					{if $diff}
						<li><a id="requestFullscreen" class="button" style="display: none;"><span class="icon icon16 fa-arrows-alt"></span> <span>{lang}wcf.global.button.fullscreen{/lang}</span></a></li>
						
						{if $parent->templateGroupID}
							<li><a href="{link controller='TemplateEdit' id=$parent->templateID}{/link}" class="button"><span class="icon icon16 fa-pencil"></span> <span>{lang}wcf.global.button.edit{/lang}</span></a></li>
						{/if}
					{/if}
					
					{event name='contentHeaderNavigation'}
				{/content}
			</ul>
		</nav>
	{/hascontent}
</header>

{include file='formError'}

<form method="post" action="{link controller='TemplateDiff'}{/link}">
	<section class="section">
		<h2 class="sectionTitle">{lang}wcf.acp.template.group{/lang}</h2>
		
		<dl>
			<dt><label for="parentID">{lang}wcf.acp.template.diff.compareWith{/lang}</label></dt>
			<dd>
				<select name="parentID" id="parentID">
					<option value="0"></option>
					{assign var=depth value=0}
					{foreach from=$templateGroupHierarchy item='templateGroup' key='templateGroupID'}
						<option{if $templateGroup[hasTemplate] !== false && $templateGroup[hasTemplate] != $templateID} value="{$templateGroup[hasTemplate]}"{if $parent->templateID == $templateGroup[hasTemplate]} selected{/if}{else} disabled{/if}>{@'&nbsp;'|str_repeat:$depth * 4}{if $templateGroupID}{$templateGroup[group]->getName()}{else}{lang}wcf.acp.template.group.default{/lang}{/if}</option>
						{assign var=depth value=$depth + 1}
					{/foreach}
				</select>
			</dd>
		</dl>
	</section>
	
	<div class="formSubmit">
		<input type="hidden" name="id" value="{$templateID}">
		<input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s">
	</div>
</form>

{if $diff}
	<div id="fullscreenContainer">
		<div class="sideBySide">
			<div class="section">
				<header class="sectionHeader">
					<h2 class="sectionTitle">
						{if $parent->templateGroupID}{$templateGroupHierarchy[$parent->templateGroupID][group]->getName()}{else}{lang}wcf.acp.template.group.default{/lang}{/if}
					</h2>
					<p class="sectionDescription">{lang}wcf.acp.template.lastModificationTime{/lang}: {@$parent->lastModificationTime|time}</p>
				</header>
				
{'fraction_non_alphanumeric': 0.20558424172882003, 'fraction_numerical': 0.00535475234270415, 'mean_word_length': 5.196682464454977, 'pattern_counts': {'":': 0, '<': 125, '<?xml version=': 0, '>': 143, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6032754', 'n_tokens_mistral': 2052, 'n_tokens_neox': 1755, 'n_words': 256}