<commit_before>{* $Id$ *}
<form class="form-horizontal" action="tiki-admin.php?page=workspace" method="post">
	<input type="hidden" name="ticket" value="{$ticket|escape}">
	<div class="row">
		<div class="form-group col-lg-12">
			{if $prefs.workspace_ui eq "y"}
				<a class="btn btn-default btn-sm" href="{service controller=workspace action=list_templates}" title="{tr}List{/tr}">
					{icon name="list"} {tr}Workspace Templates{/tr}
				</a>
			{/if}
			<div class="pull-right">
				<input type="submit" class="btn btn-primary btn-sm" name="workspacesetprefs" title="{tr}Apply Changes{/tr}" value="{tr}Apply{/tr}" />
			</div>
		</div>
	</div>
	{tabset name="admin_workspaces_areas"}
		{tab name="{tr}Workspaces{/tr}"}
			<h2>{tr}Workspaces{/tr}</h2>

			<fieldset>
				<legend>{tr}Activate the feature{/tr}</legend>
				{preference name=workspace_ui visible="always"}
			</fieldset>

			<fieldset>
				<legend>{tr}Dependencies{/tr}</legend>
				{preference name=namespace_enabled}
				{preference name=namespace_separator}
				{preference name=namespace_force_links}
				{preference name=feature_perspective}
				{preference name=feature_categories}
				{preference name=feature_wiki}
			</fieldset>

			<fieldset>
				<legend>{tr}Advanced{/tr}</legend>
				{preference name=workspace_root_category}
			</fieldset>

			{jq}
				$('#tiki-center').on('click', '.service-dialog', function () {
					$(this).serviceDialog({
						title: $(this).text(),
						success: function () {
							if ($(this).is('.reload')) {
								$('#template-list').load($.service('workspace', 'list_templates'));
							}
						}
					});

					return false;
				});
				$('#template-list').load($.service('workspace', 'list_templates'));
			{/jq}
		{/tab}
		{tab name="{tr}Areas{/tr}"}
			<h2>{tr}Areas{/tr}</h2>

			<fieldset>
				<legend>{tr}Activate the feature{/tr}</legend>
				{preference name=feature_areas}
			</fieldset>
			{if isset($error)}
				{remarksbox type="warning" title="{tr}Error{/tr}"}{$error} {tr}Nothing was updated.{/tr}{/remarksbox}
			{/if}
			<fieldset>
				<legend>{tr}Areas{/tr}</legend>
				<div class="table-responsive">
					<table class="table">
						<tr>
							<th>{tr}On{/tr}</th>
							<th colspan="2">{tr}Category{/tr}</th>
							<th>{tr}Perspectives{/tr}</th>
							<th>{tr}Exclusive{/tr}</th>
							<th>{tr}Share Common{/tr}</th>
							<th>{tr}Description{/tr}</th>
						</tr>

						{if $areas|count}
							{foreach from=$areas item=area}
								<tr class="{cycle}{if $area.enabled neq 'y'} disabled{/if}">
									<td><input type="checkbox" name="enabled[{$area.categId}]"{if $area.enabled eq 'y'} checked="checked"{/if} class="enabledChecks"></td>
									<td>{$area.categId}</td>
									<td>{$area.categName}</td>
									<td>
										{foreach from=$area.perspectives item=persp}
											<a href="tiki-edit_perspective.php?action=edit&id={$persp.perspectiveId}" title="{tr}Edit perspective{/tr} {$persp.name}">{$persp.name}</a>{if not $persp@last},{/if}
										{/foreach}
									</td>
									<td><input type="checkbox" name="exclusive[{$area.categId}]"{if $area.exclusive eq 'y'} checked="checked"{/if}{if $area.enabled neq 'y'} disabled="disabled"{/if} class="otherChecks"></td>
									<td><input type="checkbox" name="share_common[{$area.categId}]"{if $area.share_common eq 'y'} checked="checked"{/if}{if $area.enabled neq 'y'} disabled="disabled"{/if} class="otherChecks"></td>
									<td>{$area.description}</td>
								</tr>
							{/foreach}
							{jq}
								$(".enabledChecks").click(function() {
									var checked = ! $(this).prop("checked");
									$(".otherChecks", $(this).parents("tr:first")).each(function() {
										$(this).prop("disabled", checked);
									});
								});
							{/jq}
						{else}
							<td colspan="7">{tr}No areas found. Click "Update Areas" to populate this list{/tr}</td>
						{/if}
					</table>
				</div>
			</fieldset>
			{remarksbox type="info" title="{tr}Hint{/tr}"}{tr}This tab shows you an overview of categories affected by the areas feature. <br> More help here: <a href="http://doc.tiki.org/Areas" target="tikihelp">doc.tiki.org/Areas</a> {/tr}{/remarksbox}
			<div class="form-group heading input_submit_container" style="text-align: center">
				<input type="submit" class="btn btn-primary btn-sm" name="update_areas" value="{tr}Update areas{/tr}" />
			</div>
			<div class="adminoptionboxchild" id="feature_areas_childcontainer">
				{preference name=areas_root}
			</div>

		{/tab}
	{/tabset}
	<div class="row">
		<div class="form-group col-lg-12">
			<div class="text-center">
				<input type="submit" class="btn btn-primary btn-sm" name="workspacesetprefs" title="{tr}Apply Changes{/tr}" value="{tr}Apply{/tr}" />
			</div>
		</div>
	</div>
</form><commit_msg>[FIX] fixing the action button layout to confirm with other admin sections<commit_after>{* $Id$ *}
<form class="form-horizontal" action="tiki-admin.php?page=workspace" method="post">
	<input type="hidden" name="ticket" value="{$ticket|escape}">
	<div class="clearfix margin-bottom-md">
		{if $prefs.workspace_ui eq "y"}
			<a class="btn btn-default btn-sm" href="{service controller=workspace action=list_templates}" title="{tr}List{/tr}">
				{icon name="list"} {tr}Workspace Templates{/tr}
			</a>
		{/if}
		<div class="pull-right">
			<input type="submit" class="btn btn-primary btn-sm" name="workspacesetprefs" title="{tr}Apply Changes{/tr}" value="{tr}Apply{/tr}" />
		</div>
	</div>
	{tabset name="admin_workspaces_areas"}
		{tab name="{tr}Workspaces{/tr}"}
			<h2>{tr}Workspaces{/tr}</h2>
			<fieldset>
				<legend>{tr}Activate the feature{/tr}</legend>
				{preference name=workspace_ui visible="always"}
			</fieldset>
			<fieldset>
				<legend>{tr}Dependencies{/tr}</legend>
				{preference name=namespace_enabled}
				{preference name=namespace_separator}
				{preference name=namespace_force_links}
				{preference name=feature_perspective}
				{preference name=feature_categories}
				{preference name=feature_wiki}
			</fieldset>
			<fieldset>
				<legend>{tr}Advanced{/tr}</legend>
				{preference name=workspace_root_category}
			</fieldset>
			{jq}
				$('#tiki-center').on('click', '.service-dialog', function () {
					$(this).serviceDialog({
						title: $(this).text(),
						success: function () {
							if ($(this).is('.reload')) {
								$('#template-list').load($.service('workspace', 'list_templates'));
							}
						}
					});

					return false;
				});
				$('#template-list').load($.service('workspace', 'list_templates'));
			{/jq}
		{/tab}
		{tab name="{tr}Areas{/tr}"}
			<h2>{tr}Areas{/tr}</h2>
			<fieldset>
				<legend>{tr}Activate the feature{/tr}</legend>
				{preference name=feature_areas}
			</fieldset>
			{if isset($error)}
				{remarksbox type="warning" title="{tr}Error{/tr}"}{$error} {tr}Nothing was updated.{/tr}{/remarksbox}
			{/if}
			<fieldset>
				<legend>{tr}Areas{/tr}</legend>
				<div class="table-responsive">
					<table class="table">
						<tr>
							<th>{tr}On{/tr}</th>
							<th colspan="2">{tr}Category{/tr}</th>
							<th>{tr}Perspectives{/tr}</th>
							<th>{tr}Exclusive{/tr}</th>
							<th>{tr}Share Common{/tr}</th>
							<th>{tr}Description{/tr}</th>
						</tr>
						{if $areas|count}
							{foreach from=$areas item=area}
								<tr class="{cycle}{if $area.enabled neq 'y'} disabled{/if}">
									<td><input type="checkbox" name="enabled[{$area.categId}]"{if $area.enabled eq 'y'} checked="checked"{/if} class="enabledChecks"></td>
									<td>{$area.categId}</td>
									<td>{$area.categName}</td>
									<td>
										{foreach from=$area.perspectives item=persp}
											<a href="tiki-edit_perspective.php?action=edit&id={$persp.perspectiveId}" title="{tr}Edit perspective{/tr} {$persp.name}">{$persp.name}</a>{if not $persp@last},{/if}
										{/foreach}
									</td>
									<td><input type="checkbox" name="exclusive[{$area.categId}]"{if $area.exclusive eq 'y'} checked="checked"{/if}{if $area.enabled neq 'y'} disabled="disabled"{/if} class="otherChecks"></td>
									<td><input type="checkbox" name="share_common[{$area.categId}]"{if $area.share_common eq 'y'} checked="checked"{/if}{if $area.enabled neq 'y'} disabled="disabled"{/if} class="otherChecks"></td>
									<td>{$area.description}</td>
								</tr>
							{/foreach}
							{jq}
								$(".enabledChecks").click(function() {
									var checked = ! $(this).prop("checked");
									$(".otherChecks", $(this).parents("tr:first")).each(function() {
										$(this).prop("disabled", checked);
									});
								});
							{/jq}
						{else}
							<td colspan="7">{tr}No areas found. Click "Update Areas" to populate this list{/tr}</td>
						{/if}
					</table>
				</div>
			</fieldset>
			{remarksbox type="info" title="{tr}Hint{/tr}"}{tr}This tab shows you an overview of categories affected by the areas feature. <br> More help here: <a href="http://doc.tiki.org/Areas" target="tikihelp">doc.tiki.org/Areas</a> {/tr}{/remarksbox}
			<div class="form-group heading input_submit_container" style="text-align: center">
				<input type="submit" class="btn btn-primary btn-sm" name="update_areas" value="{tr}Update areas{/tr}" />
			</div>
			<div class="adminoptionboxchild" id="feature_areas_childcontainer">
				{preference name=areas_root}
			</div>
		{/tab}
	{/tabset}
	<div class="t_navbar margin-bottom-md text-center">
		<input type="submit" class="btn btn-primary btn-sm tips" name="workspacesetprefs" title="{tr}Apply Changes{/tr}" value="{tr}Apply{/tr}" />
	</div>
</form>
{'fraction_non_alphanumeric': 0.20774869109947644, 'fraction_numerical': 0.001675392670157068, 'mean_word_length': 3.6841589014222658, 'pattern_counts': {'":': 0, '<': 181, '<?xml version=': 0, '>': 181, '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': '5884669', 'n_tokens_mistral': 4275, 'n_tokens_neox': 3332, 'n_words': 577}