summaryrefslogtreecommitdiff
path: root/templates/admin_layout_overview.tpl
blob: a6172d155283983e82785091504100f5ad6578ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{strip}
{assign var=tablimit value=10}

{formfeedback hash=$feedback}

{form}
	<input type="hidden" name="page" value="{$page}" />
	<input type="hidden" name="nocollapse" value="{$smarty.request.nocollapse}" />

	{foreach name=PkgLayouts from=$layouts item=layout key=module_package}
		{if $smarty.foreach.PkgLayouts.total >= $tablimit}
			<dl>
				<dt>{$smarty.foreach.PkgLayouts.iteration}</dt>
				{if !$module_package || $module_package == 'kernel'}
					<dd>{tr}Default{/tr}</dd>
				{else}
					<dd>{$module_package|capitalize}</dd>
				{/if}
			</dl>
		{/if}
	{/foreach}

	{jstabs}
		{foreach name=PkgLayouts from=$layouts item=layout key=module_package}

			{* if there are too many tabs, we only display numbers *}
			{if $smarty.foreach.PkgLayouts.total lt $tablimit}
				{if !$module_package || $module_package == 'kernel'}
					{assign var=TabTitle value="Default"}
				{else}
					{assign var=TabTitle value=$module_package|capitalize}
				{/if}
			{else}
				{assign var=TabTitle value="&nbsp;"|cat:$smarty.foreach.PkgLayouts.iteration|cat:"&nbsp;"}
			{/if}

			{jstab title=$TabTitle}

				<div class="floaticon">
					{smartlink ititle="Edit this Layout" booticon="icon-edit" page=layout module_package=$module_package}
					{smartlink ititle="Remove this Layout" booticon="icon-trash" page=$page remove_layout=$module_package ionclick="return confirm('{tr}Are you sure you want to remove this layout? This can not be undone.{/tr}')"}
				</div>

				<h1 id="{$module_package}">
					{tr}Current Layout of {if $TabTitle == 'Default'}Site Default{else}{$TabTitle}{/if}{/tr}
				</h1>

				<table class="layouts_table">
					<tr>
						{cycle values="even,odd" print=0}
						{foreach from=$layoutAreas item=area key=colkey}
							{if $colkey =='top'}
								<td class="{cycle} aligntop" colspan="3">
							{elseif $colkey =='bottom'}
								</tr>
								<tr>
									<td class="{cycle} aligntop" colspan="3">
							{else}
								<td class="{cycle} width33p aligntop">
							{/if}

								<table class="data width100p">
									<tr>
										<th>{tr}{$colkey} area{/tr}</th>
									</tr>
									{section name=ix loop=$layout.$area}
										<tr>
											<td>
												{if $roles }	
													{include file="bitpackage:themes/module_config_role_inc.tpl" modInfo=$layout.$area[ix]}
												{else}
													{include file="bitpackage:themes/module_config_inc.tpl" modInfo=$layout.$area[ix]}
												{/if}	
											</td>
										</tr>
									{sectionelse}
										<tr>
											<td colspan="3" class="aligncenter">
												{if $colkey eq 'center'}{tr}Default{/tr}{else}{tr}None{/tr}{/if}
											</td>
										</tr>
									{/section}
								</table>
							</td>

							{if $colkey =='top'}
								</tr>
								<tr>
							{/if}
						{/foreach}
					</tr>
				</table>
			{/jstab}
		{/foreach}

		{include file="bitpackage:themes/admin_layout_inc.tpl"}

	{/jstabs}

	<div class="submit">
		<input type="submit" class="btn" name="update_modules" value="{tr}Apply module settings{/tr}" />
	</div>
{/form}

{/strip}