{strip}

{form}
{formfeedback hash=$feedback}

	{jstabs}
	
		{jstab title="Columns"}
			<input type="hidden" name="page" value="{$page}" />
	    	
			{legend legend="Visible Columns and Areas"}
				{formhelp warning="If checked, the column is visible."}
				{foreach from=$activeColumns key=feature item=output}
					<div class="row">
						{formlabel label=`$output.label` for=$feature}
						{forminput}
							{html_checkboxes name="$feature" values="y" checked=$gBitSystem->getConfig($feature) labels=false id=$feature}
							{formhelp hash=$output}
						{/forminput}
					</div>
				{/foreach}
			{/legend}
		{/jstab}
		
		
		{jstab title="Package"}
			
			{legend legend="Column visibility in packages"}
				{formhelp warning="If checked, the column is invisible."}
				<table id="hidecolumnsinpackages" summary="{tr}List of visible columns in packages{/tr}">
					<thead>
						<tr>
							<th>{tr}Package{/tr}</th>
							{foreach from=$hideableAreas item=areaname key=area}
								<th class="width15p">{tr}{$areaname}{/tr}</th>
							{/foreach}
						</tr>
					</thead>
					<tbody>
						{foreach from=$packageColumns item=name key=package}
							<tr class="{cycle values="odd,even"}">
								<td>{$name}</td>
								{foreach from=$hideableAreas item=areaname key=area}
									<td>
										<input type="checkbox" name="hide[{$package}_hide_{$area}_col]" value="y" {if $gBitSystem->isFeatureActive("`$package`_hide_`$area`_col")}checked="checked"{/if} />
									</td>
								{/foreach}
							</tr>
						{/foreach}
					</tbody>
				</table>
			{/legend}
		{/jstab}


		{jstab title="Mode"}
			{legend legend="Column visibility based on display mode"}
				{formhelp warning="If checked, the column is invisible."}
				<table id="hidecolumnsinmodes" summary="{tr}List of visible columns based on display mode{/tr}">
					<thead>
						<tr>
							<th>{tr}Mode{/tr}</th>
							{foreach from=$hideableAreas item=areaname key=area}
								<th class="width15p">{tr}{$areaname}{/tr}</th>
							{/foreach}
						</tr>
					</thead>
					<tbody>
						{foreach from=$displayModes item=modename key=mode}
							<tr class="{cycle values="odd,even"}">
								<td><abbr title="{$modename}"><strong>{$mode|capitalize}</strong></abbe></td>
								{foreach from=$hideableAreas item=areaname key=area}
									<td>
										<input type="checkbox" name="hide[{$mode}_hide_{$area}_col]" value="y" {if $gBitSystem->isFeatureActive("`$mode`_hide_`$area`_col")}checked="checked"{/if} />
									</td>
								{/foreach}
							</tr>
						{/foreach}
					</tbody>
				</table>
			{/legend}
		{/jstab}

				
		{jstab title="Package/Mode"}
			{legend legend="Column visibility in Packages based on Display Mode"}
				{formhelp warning="If checked, the column is invisible."}
				<table id="hidecolumnsinpackages" summary="{tr}List of visible columns in packages based on display mode{/tr}">
					<thead>
						<tr>
							<th>{tr}Package{/tr}</th>
							{foreach from=$hideableAreas item=areaname key=area}
								<th colspan="5">{tr}{$areaname}{/tr}</th>
							{/foreach}
						</tr>
					</thead>
					<tbody>
						<tr>
							<td></td>
							{foreach from=$hideableAreas item=areaname key=area name=areas}
								{foreach from=$displayModes item=modename key=mode name=modes}
									<th><abbr title="{$mode}">{$mode|replace:"display":"Di"|replace:"list":"Li"|replace:"edit":"Ed"|replace:"upload":"Up"|replace:"admin":"Ad"}</abbr></th>
								{/foreach}
							{/foreach}
						</tr>
		
						{foreach from=$packageColumns item=name key=package name=packages}
							<tr class="{cycle values='odd,even'}">
								<td>{$name}</td>
								{foreach from=$hideableAreas item=areaname key=area name=areas}
									{foreach from=$displayModes item=modename key=mode name=modes}
										<td class="{if $smarty.foreach.modes.last && !$smarty.foreach.areas.last}splitstyle{/if}">
											<input type="checkbox" name="hide[{$package}_{$mode}_hide_{$area}_col]" value="y" {if $gBitSystem->isFeatureActive("`$package`_`$mode`_hide_`$area`_col")}checked="checked"{/if} />
										</td>
									{/foreach}
								{/foreach}
							</tr>
						{/foreach}
					</tbody>
				</table>
				
				<dl>
					{foreach from=$displayModes item=modename key=mode name=modes}
						<dt><abbr title="{$mode}">{$mode|replace:"display":"Di"|replace:"list":"Li"|replace:"edit":"Ed"|replace:"upload":"Up"|replace:"admin":"Ad"}</abbr></dt>
						<dd><strong>{$mode}</strong></dd>
						<dd>{$modename}</dd>
					{/foreach}
				</dl>
				
			{/legend}
		{/jstab}
		
	{/jstabs}
	
	<div class="row submit">
		<input type="submit" name="reset_columns" value="{tr}Reset column settings{/tr}" />
		<input type="submit" name="column_control" value="{tr}Save settings{/tr}" />
	</div>

{/form}

{/strip}