summaryrefslogtreecommitdiff
path: root/templates/admin_layout.tpl
blob: 6d04d413f2b6a9ce6dc7ad0d565d66537ab553b9 (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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
{strip}
{formfeedback hash=$feedback}

		{form legend="Create Layout for Packages and Sections" method="get"}
			<input type="hidden" name="page" value="{$page}" />
			<div class="form-group">
				{formlabel label="Customized layout" for="module_package"}
				{forminput}
					<select name="module_package" id="module_package" onchange="this.form.submit();">
						{foreach key=layoutName item=layoutDisplay from=$layoutList}
							<option value="{$layoutName}" {if $module_package == $layoutName}selected="selected"{/if}>
								{if $layoutName eq 'kernel'}
										{tr}Site Default{/tr}
									{else}
									{tr}{$layoutDisplay|capitalize}{/tr}
									{/if}
								</option>
						{/foreach}
						<option value="home" {if $module_package == 'home'}selected="selected"{/if}>{tr}User Homepages{/tr}</option>
					</select>

					<noscript>
						{formhelp note="Apply this setting before you customise and assign modules below."}
					</noscript>
				{/forminput}
			</div>

			{if $cloneLayouts and $module_package != kernel}
				<div class="form-group">
					{formlabel label="Copy existing layout" for="clone_layout"}
					{forminput}
						<ul>
							{foreach from=$cloneLayouts item=clone_layout key=clone_package}
								{if $clone_package != $module_package}
									<li><a href="{$smarty.const.KERNEL_PKG_URL}admin/index.php?page={$page}&amp;from_layout={$clone_package}&amp;to_layout={$module_package}&amp;module_package={$module_package}">{if $clone_package == kernel}{tr}Site Default{/tr}{else}{tr}{$clone_package|capitalize}{/tr}{/if}</a></li>
								{/if}
							{/foreach}
						</ul>
						{tr}to {if $module_package == kernel}Site Default{else}{$module_package|capitalize}{/if}{/tr}
					{/forminput}
				</div>
			{/if}

			<noscript>
				<div class="form-group submit">
					<input type="submit" class="btn btn-default" name="fSubmitCustomize" value="{tr}Customize{/tr}" />
				</div>
			</noscript>
		{/form}
<div class="form-group">
	<div class="col-md-7">
		<table class="width100p">
			<caption>{tr}Current Layout of '{if !$module_package || $module_package=='kernel'}Site Default{else}{$module_package|capitalize}{/if}'{/tr}</caption>
			<tr>
				{foreach from=$layoutAreas item=area key=colkey}
					{if $colkey =='top'}
						<td class="{cycle values="even,odd"} aligntop" colspan="3">
					{elseif $colkey =='bottom'}
						</tr>
						<tr>
							<td class="{cycle values="even,odd"} aligntop" colspan="3">
					{else}
						<td class="{cycle values="even,odd"} width33p aligntop">
					{/if}

						<table class="table data width100p">
							<tr>
								<th>{tr}{$colkey} area{/tr}</th>
							</tr>
							{section name=ix loop=$editLayout.$area}
								<tr>
									<td>
										{include file="bitpackage:themes/module_config_inc.tpl" modInfo=$editLayout.$area[ix] condensed=1}
									</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>
	</div>
	<div class="col-md-5">
{jstabs}
	{jstab title="Modules"}
		{form action=$smarty.server.SCRIPT_NAME legend="Assign modules to areas"}
			<input type="hidden" name="page" value="{$page}" />
			<input type="hidden" name="module_package" value="{$module_package}" />
			<div class="form-group">
				{formlabel label="Package"}
				{forminput}
					<span class="highlight">{tr}{if !$module_package || $module_package eq 'kernel'}Site Default{else}{$module_package|capitalize}{/if}{/tr}</span>
					{formhelp note="This is the package you are currently editing."}
				{/forminput}
			</div>

			{if $fEdit && $fAssign.name}
				<input type="hidden" name="assign_name" value="{$fAssign.name}" />
			{else}
				<div class="form-group">
					{formlabel label="Module" for="module_rsrc"}
					{forminput}
						{*html_options name="fAssign[module_rsrc]" id="module_rsrc" options=$allModules selected=$fAssign.name *}
						<select name="fAssign[module_rsrc]" id="module_rsrc" onchange="javascript:BitThemes.viewModuleParamsHelp( this.options[this.selectedIndex].value )">
						{foreach key=pkg item=modules from=$allModules}
							<optgroup label="{$pkg}">
								{foreach key=value item=module from=$modules}
									<option value="{$value}" {if $fAssign.name eq $value}selected="selected"{/if}>{$module.title}</option>
								{/foreach}
							</optgroup>
						{/foreach}
						</select>
						{formhelp note="Extended help can be found at the end of this page."}
					{/forminput}
				</div>
			{/if}

			<div class="form-group">
				{formlabel label="Position" for="layout_area"}
				{forminput}
					<select name="fAssign[layout_area]" id="layout_area">
						{if $gBitSystem->isFeatureActive('site_top_column')}
							<option value="t" {if $fAssign.layout_area eq 't'}selected="selected"{/if}>{tr}Top{/tr}</option>
						{/if}
						<option value="l" {if $fAssign.layout_area eq 'l'}selected="selected"{/if}>{tr}Left column{/tr}</option>
						<option value="r" {if $fAssign.layout_area eq 'r'}selected="selected"{/if}>{tr}Right column{/tr}</option>
						{if $gBitSystem->isFeatureActive('site_bottom_column')}
							<option value="b" {if $fAssign.layout_area eq 'b'}selected="selected"{/if}>{tr}Bottom{/tr}</option>
						{/if}
					</select>
					{formhelp note="Select the column this module should be displayed in."}
				{/forminput}
			</div>

			<div class="form-group">
				{formlabel label="Title" for="title"}
				{forminput}
					<input type="text" size="48" name="fAssign[title]" id="title" value="{$fAssign.title|escape}" />
					{formhelp note="Here you can override the default title used by the module. This is global for layouts in all sections. If you want to add a title just for one section, enter a module parameter below such as: title=My Title"}
				{/forminput}
			</div>

			<div class="form-group">
				{formlabel label="Order" for="pos"}
				{forminput}
					<select name="fAssign[pos]" id="pos">
						{section name=ix loop=$orders}
							<option value="{$orders[ix]|escape}" {if $fAssign.pos eq $orders[ix]}selected="selected"{/if}>{$orders[ix]}</option>
						{/section}
					</select>
					{formhelp note="Select where within the column the module should be displayed."}
				{/forminput}
			</div>

			<div class="form-group">
				{formlabel label="Cache Time" for="cache_time"}
				{forminput}
					<input type="text" size="5" name="fAssign[cache_time]" id="cache_time" value="{$fAssign.cache_time|escape}" /> seconds
					{formhelp note="This is the number of seconds the module is cached before the content is refreshed. The higher the value, the less load there is on the server. (optional)"}
				{/forminput}
			</div>

			<div class="form-group">
				{formlabel label="Rows" for="module_rows"}
				{forminput}
					<input type="text" size="5" name="fAssign[module_rows]" id="module_rows" value="{$fAssign.module_rows|escape}" />
					{formhelp note="Select what the maximum number of items are displayed. (optional - default is 10)"}
				{/forminput}
			</div>

			<div class="form-group">
				{formlabel label="Parameters" for="params"}
				{forminput}
					<input type="text" size="48" name="fAssign[params]" id="params" value="{$fAssign.params|escape}" />
					{formhelp note="Here you can enter any additional parameters the module might need. Use the http query string form, e.g. foo=123&amp;bar=ABC (optional)"}
					{foreach key=pkg item=modules from=$allModules}
						{foreach key=value item=module from=$modules}
						{if $module.params}
							<table id="themes_params_help_{$value}" class="themes_params_help" style="display:none">
								<tr>
									<th colspan=2 style="text-align:left">Options for {$module.title}</th>
								</tr>
								{foreach key=param item=data from=$module.params}
								{if $data.help}
									<tr>
										<td style="font-weight:bold; padding-right:4px">{$param}</td>
										<td>{$data.help}</td>
									</tr>
								{/if}
								{/foreach}
							</table>
						{/if}
						{/foreach}
					{/foreach}
				{/forminput}
			</div>

			<div class="form-group">
				{if $roles }
					{formlabel label="Roles" for="roles"}
					{forminput}
						<select multiple="multiple" size="5" name="roles[]" id="roles">
							{foreach from=$roles key=roleId item=role}
								<option value="{$roleId}" {if $role.selected eq 'y'}selected="selected"{/if}>{$role.role_name}</option>
							{/foreach}
						</select>
						{formhelp note="Select the roles of users who can see this module. If you select no role, the module will be visible to all users."}
					{/forminput}
				{else}
					{formlabel label="Groups" for="groups"}
					{forminput}
						<select multiple="multiple" size="5" name="groups[]" id="groups">
							{foreach from=$groups key=groupId item=group}
								<option value="{$groupId}" {if $group.selected eq 'y'}selected="selected"{/if}>{$group.group_name}</option>
							{/foreach}
						</select>
						{formhelp note="Select the groups of users who can see this module. If you select no group, the module will be visible to all users."}
					{/forminput}
				{/if}
			</div>

			<div class="form-group">
				{forminput label="checkbox"}
					<input type="checkbox" value="y" id="add_to_all" name="fAssign[add_to_all]" />Add to all Layouts
					{formhelp note="If you check this, the module will be added to all custom layouts."}
				{/forminput}
			</div>

			<div class="form-group submit">
				<input type="submit" class="btn btn-default" name="ColumnTabSubmit" value="{tr}Assign{/tr}" />
			</div>
		{/form}
	{/jstab}

	{jstab title="Center"}
		{form action=$smarty.server.SCRIPT_NAME legend="Assign content to the center area"}
			<input type="hidden" name="page" value="{$page}" />
			<input type="hidden" name="module_package" value="{$module_package}" />
			<input type="hidden" name="fAssign[layout_area]" value="c" />

			<div class="form-group">
				{formlabel label="Package"}
				{forminput}
					<span class="highlight">{tr}{if !$module_package || $module_package eq 'kernel'}Site Default{else}{$module_package|capitalize}{/if}{/tr}</span>
					{formhelp note="This is the package you are currently editing."}
				{/forminput}
			</div>

			<div class="form-group">
				{formlabel label="Center Piece" for="module"}
				{forminput}
					{if $fEdit && $fAssign.name}
						<input type="hidden" name="fAssign[module]" value="{$fAssign.module}" id="module" />{$fAssign.module}
					{else}
						{* html_options name="fAssign[module_rsrc]" id="module" values=$allCenters options=$allCenters selected=$mod *}
						<select name="fAssign[module_rsrc]" id="module" {*onchange="javascript:BitThemes.viewModuleParamsHelp( this.options[this.selectedIndex].value )"*}>
						{foreach key=pkg item=modules from=$allCenters}
							<optgroup label="{$pkg}">
								{foreach key=value item=module from=$modules}
									<option value="{$value}" {if $mod eq $value}selected="selected"{/if}>{$module.title}</option>
								{/foreach}
							</optgroup>
						{/foreach}
						</select>
					{/if}
					{formhelp note="Pick the center bit you want to display when accessing this package."}
				{/forminput}
			</div>

			<div class="form-group">
				{formlabel label="Position"}
				{forminput}
					{tr}Center{/tr}
				{/forminput}
			</div>

			<div class="form-group">
				{formlabel label="Order" for="c_ord"}
				{forminput}
					<select name="fAssign[pos]" id="c_ord">
						{section name=ix loop=$orders}
							<option value="{$orders[ix]|escape}" {if $assign_order eq $orders[ix]}selected="selected"{/if}>{$orders[ix]}</option>
						{/section}
					</select>
					{formhelp note="Select where within the column the module should be displayed."}
				{/forminput}
			</div>

			<div class="form-group">
				{formlabel label="Cache Time" for="c_cache_time"}
				{forminput}
					<input type="text" name="fAssign[cache_time]" id="c_cache_time" size="5" value="{$fAssign.cache_time|escape}" /> seconds
					{formhelp note="This is the number of seconds the module is cached before the content is refreshed. The higher the value, the less load there is on the server. (optional)"}
				{/forminput}
			</div>

			<div class="form-group">
				{formlabel label="Rows" for="c_rows"}
				{forminput}
					<input type="text" size="5" name="fAssign[module_rows]" id="c_rows" value="{$fAssign.module_rows|escape}" />
					{formhelp note="Select what the maximum number of items are displayed. (optional - default is 10)"}
				{/forminput}
			</div>

			<div class="form-group">
				{formlabel label="Parameters" for="c_params"}
				{forminput}
					<input type="text" size="48" name="fAssign[params]" id="c_params" value="{$fAssign.params|escape}" />
					{formhelp note="Here you can enter any additional parameters the module might need. (optional)"}
				{/forminput}
			</div>

			<div class="form-group">
				{if $roles }
					{formlabel label="Roles" for="c_roles"}
					{forminput}
						<select multiple="multiple" size="5" name="roles[]" id="c_roles">
							{foreach from=$roles key=roleId item=role}
								<option value="{$roleId}" {if $role.selected eq 'y'}selected="selected"{/if}>{$role.role_name}</option>
							{/foreach}
						</select>
						{formhelp note="Select the roles of users who can see this module. If you select no role, the module will be visible to all users."}
					{/forminput}
				{else}
					{formlabel label="Groups" for="c_groups"}
					{forminput}
						<select multiple="multiple" size="5" name="groups[]" id="c_groups">
							{foreach from=$groups key=groupId item=group}
								<option value="{$groupId}" {if $group.selected eq 'y'}selected="selected"{/if}>{$group.group_name}</option>
							{/foreach}
						</select>
						{formhelp note="Select the groups of users who can see this module. If you select no group, the module will be visible to all users."}
					{/forminput}
				{/if}
			</div>

			<div class="form-group submit">
				<input type="submit" class="btn btn-default" name="CenterTabSubmit" value="{tr}Assign{/tr}" />
			</div>
		{/form}
	{/jstab}

	{include file="bitpackage:themes/admin_layout_inc.tpl"}
{/jstabs}
	</div>
</div>

{/strip}