summaryrefslogtreecommitdiff
path: root/templates/user_assigned_modules.tpl
blob: 1296e334b4a16a35222e71d38eaa83c626b0fa7c (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
{strip}
<div class="floaticon">{bithelp}</div>

<div class="admin user modules">
	<div class="header">
		<h1>{tr}Configure Homepage Layout{/tr}</h1>
	</div>

	<div class="body">

		{if $gBitUser->canCustomizeLayout()}
			<table style="width:100%" cellpadding="5" cellspacing="0" border="0">
				<caption>{tr}Your HomePage Layout{/tr}</caption>
				<tr>
					{foreach from=$layoutAreas item=area key=colkey }
						<td style="width:33%" valign="top">
							<table class="table data" style="width:100%">
								<caption>{tr}{$colkey} column{/tr}</caption>
								<tr>
									<th>{tr}Module{/tr}</th>
								</tr>
								{section name=ix loop=$modules.$area}
									<tr class="{cycle values="even,odd"}">
										<td>
											{tr}Position {$modules.$area[ix].ord}{/tr}<br />
											{$modules.$area[ix].name}
											<div style="text-align:center;">
												{smartlink ititle="Up" booticon="icon-arrow-up" fMove=up fPackage=$fPackage fModule=$modules.$area[ix].module_id}
												{smartlink ititle="Down" booticon="icon-arrow-down" fMove=down fPackage=$fPackage fModule=$modules.$area[ix].module_id}
												{if $colkey eq 'right'}
													{smartlink ititle="Move to Left" booticon="icon-arrow-left" fMove=left fPackage=$fPackage fModule=$modules.$area[ix].module_id}
												{elseif $colkey eq 'left'}
													{smartlink ititle="Move to Right" booticon="icon-arrow-right" fMove=right fPackage=$fPackage fModule=$modules.$area[ix].module_id}
												{/if}
												{if $column[ix].type ne 'P'}
													{smartlink ititle="Unassign" booticon="icon-trash" ionclick="return confirm('Are you sure you want to remove `$modules.$area[ix].name`?');" fMove=unassign fPackage=$fPackage fModule=$modules.$area[ix].module_id}
												{/if}
											</div>
										</td>
									</tr>
								{sectionelse}
									<tr class="{cycle values="even,odd"}" >
										<td colspan="3" align="center">
											{if $colkey eq 'center'}{tr}Default{/tr}{else}{tr}None{/tr}{/if}
										</td>
									</tr>
								{/section}
							</table>
						</td>
					{/foreach}
				</tr>
			</table>
		{/if}

		{jstabs}
			{if $gBitUser->canCustomizeLayout()}
				{jstab title="Assign Side Piece"}
					{form legend="Assign Side Piece"}
						{if $fEdit && $fAssign.name}
							<input type="hidden" name="assign_name" value="{$fAssign.name}" />{$assign.name}
						{else}
							<div class="control-group column-group gutters">
								{formlabel label="Module" for="module_rsrc"}
								{forminput}
									<select name="fAssign[module_rsrc]">
										{section name=ix loop=$assignables.border}
											<option value="{$assignables.border[ix].module_rsrc|escape}">{$assignables.border[ix].name}</option>
										{sectionelse}
											<option>{tr}No records found{/tr}</option>
										{/section}
									</select>
								{/forminput}
							</div>
						{/if}

						<div class="control-group column-group gutters">
							{formlabel label="Position" for="pos"}
							{forminput}
								<select name="fAssign[pos]" id="pos">
									<option value="l" {if $fAssign.pos eq 'l'}selected="selected"{/if}>{tr}left column{/tr}</option>
									<option value="r" {if $fAssign.pos eq 'r'}selected="selected"{/if}>{tr}right column{/tr}</option>
								</select>
								{formhelp note="Select the column this module should be displayed in."}
							{/forminput}
						</div>

						<div class="control-group column-group gutters">
							{formlabel label="Order" for="ord"}
							{forminput}
								<select name="fAssign[ord]" id="ord">
									{section name=ix loop=$orders}
										<option value="{$orders[ix]|escape}" {if $fAssign.ord 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="control-group submit">
							<input type="submit" class="ink-button" name="fSubmitAssign" value="{tr}Add Module{/tr}" />
						</div>
					{/form}
				{/jstab}

				{jstab title="Assign center piece"}
					{form legend="Assign center piece"}
						<input type="hidden" name="fAssign[pos]" value="c" />

						<div class="control-group column-group gutters">
							{formlabel label="Center Piece" for="module"}
							{forminput}
								<select name="fAssign[module_rsrc]">
									{section name=ix loop=$assignables.center}
										<option value="{$assignables.center[ix].module_rsrc|escape}">{$assignables.center[ix].name}</option>
									{sectionelse}
										<option>{tr}No records found{/tr}</option>
									{/section}
								</select>
								{formhelp note="Pick the center bit you want to display when accessing this package."}
							{/forminput}
						</div>

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

						<div class="control-group column-group gutters">
							{formlabel label="Order" for="c_ord"}
							{forminput}
								<select name="fAssign[ord]" 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="control-group submit">
							<input type="submit" class="ink-button" name="fSubmitAssign" value="{tr}Add Module{/tr}" />
						</div>
					{/form}
				{/jstab}
			{/if}

			{if $gBitUser->canCustomizeTheme()}
				{jstab title="Select Theme"}
					{form legend="Select Theme"}
						<div class="control-group column-group gutters">
							{formlabel label="Theme" for="style"}
							{forminput}
								<select name="style" id="style">
									{section name=ix loop=$styles}
										<option value="{$styles[ix]|escape}" {if $assignStyle eq $styles[ix]}selected="selected"{/if}>{$styles[ix]}</option>
									{/section}
								</select>
{if $gBitUser->hasPermission('bit_p_create_css')}
	&nbsp; <strong>{tr}OR{/tr}</strong> &nbsp;
	<a href="{$smarty.const.USERS_PKG_URL}theme.php?fUseCustomTheme=1">Use your custom theme >></a>
{/if}
								{formhelp note="Pick the theme for your personal Homepage."}
							{/forminput}
						</div>

					<div class="control-group submit">
						<input type="submit" class="ink-button" value="{tr}Apply Theme{/tr}" name="fSubmitSetTheme">
					</div>
					{/form}
				{/jstab}
			{/if}
		{/jstabs}
	</div><!-- end .body -->
</div><!-- end .usermodules -->

{/strip}


{* old code. left here in case we need something... xing
for instance, i don't know where the page heading stuff is used.

<table width="100%">
{if $gBitSystem->isFeatureActive( 'users_layouts' ) or $gBitSystem->getConfig('users_layouts') eq 'h'}

{if $canassign eq 'y'}
<tr>
	<td valign="top">

<form action="{$smarty.const.USERS_PKG_URL}assigned_modules.php" method="post">
<table class="panel">
<caption>{tr}Assign Left Column{/tr}</caption>
<tr>
	<td>{tr}Module{/tr}:</td>
	<td>
		<select name="fAssign[module_rsrc]">
		{section name=ix loop=$assignables.border}
		<option value="{$assignables.border[ix].module_rsrc|escape}">{$assignables.border[ix].name}</option>
		{sectionelse}
			<option>{tr}No records found{/tr}</option>
		{/section}
		</select>
	</td>
</tr>
<tr>
	<td>
{tr}Column{/tr}:</td><td>
	<input type="hidden" name="fAssign[pos]" value="l" />
	{tr}left{/tr}
	</td>
</tr>
<tr>
	<td>{tr}Order{/tr}:</td>
	<td>
	<select name="fAssign[ord]">
	{section name=ix loop=$orders}
		<option value="{$orders[ix]|escape}">{$orders[ix]}</option>
	{/section}
	</select>
	</td>
</tr>
<tr class="panelsubmitrow">
	<td colspan="2"><input type="submit" class="ink-button" name="fSubmitAssign" value="{tr}assign{/tr}" /></td>
</tr>
</table>
</form>

	</td>
	<td valign="top">

<form action="{$smarty.const.USERS_PKG_URL}assigned_modules.php" method="post">
<table class="panel">
<caption>{tr}Assign Center Column{/tr}</caption>
<tr>
	<td>{tr}Center Piece{/tr}:</td>
	<td>
		<select name="fAssign[module_rsrc]">
		{section name=ix loop=$assignables.center}
		<option value="{$assignables.center[ix].module_rsrc|escape}">{$assignables.center[ix].name}</option>
		{sectionelse}
			<option>{tr}No records found{/tr}</option>
		{/section}
		</select>
	</td>
</tr>
<tr>
	<td>{tr}Column{/tr}:</td>
	<td>{tr}Center{/tr}
		<input type="hidden" name="fAssign[pos]" value="c" />
	</td>
</tr>
<tr>
	<td>{tr}Order{/tr}:</td>
	<td>
	<select name="fAssign[ord]">
	{section name=ix loop=$orders}
		<option value="{$orders[ix]|escape}">{$orders[ix]}</option>
	{/section}
	</select>
	</td>
</tr>
<tr class="panelsubmitrow">
	<td colspan="2"><input type="submit" class="ink-button" name="fSubmitAssign" value="{tr}assign{/tr}" /></td>
</tr>
</table>
</form>

	</td>
	<td valign="top">

<form action="{$smarty.const.USERS_PKG_URL}assigned_modules.php" method="post">
<table class="panel">
<caption>{tr}Assign Right Column{/tr}</caption>
<tr>
	<td>{tr}Module{/tr}:</td>
	<td>
		<select name="fAssign[module_rsrc]">
		{section name=ix loop=$assignables.border}
		<option value="{$assignables.border[ix].module_rsrc|escape}">{$assignables.border[ix].name}</option>
		{/section}
		</select>
	</td>
</tr>
<tr>
	<td>
{tr}Column{/tr}:</td><td>
	<input type="hidden" name="fAssign[pos]" value="r" />
{tr}right{/tr}
	</td>
</tr>
<tr>
	<td>{tr}Order{/tr}:</td>
	<td>
	<select name="fAssign[ord]">
	{section name=ix loop=$orders}
		<option value="{$orders[ix]|escape}">{$orders[ix]}</option>
	{sectionelse}
		<option>{tr}No records found{/tr}</option>
	{/section}
	</select>
	</td>
</tr>
<tr class="panelsubmitrow">
	<td colspan="2"><input type="submit" class="ink-button" name="fSubmitAssign" value="{tr}assign{/tr}" /></td>
</tr>
</table>
</form>

{/if}

	</td>
</tr>
<tr><td colspan="3"><hr /></td></tr>
{/if}
<tr>
	<td colspan="2" valign="top">

	<form action="{$smarty.const.USERS_PKG_URL}assigned_modules.php" method="post">
<table class="panel">
<caption>{tr}Enter Homepage Heading{/tr}</caption>
<tr><td>{tr}Enter a maximum of 250 characters. You can include Wiki syntax.{/tr}</td></tr>
<tr>
	<td><textarea name="homeHeaderData" cols="50" rows="3">{$homeHeaderData}</textarea></td>
</tr>
<tr class="panelsubmitrow">
	<td><input type="submit" class="ink-button" name="fSubmitSetHeading" value="{tr}Set Heading{/tr}" /></td>
</tr>
</table>
	</form>
</td>
<td style="vertical-align:top;">
{if $gBitSystem->isFeatureActive( 'users_themes' ) || $gBitSystem->getConfig('users_themes') eq 'h' }

	<form method="POST" action="{$smarty.const.USERS_PKG_URL}assigned_modules.php">
	<table class="panel">
		<caption>{tr}Select Theme for your Homepage{/tr}</caption>
		<tr><td>
		<select name="style">
		{section name=ix loop=$styles}
			<option value="{$styles[ix]|escape}" {if $assignStyle eq $styles[ix]}selected="selected"{/if}>{$styles[ix]}</option>
		{/section}
		</select>
		</td><td>
		<input type="submit" class="ink-button" value="Change Theme" name="fSubmitSetTheme">
		</td></tr></table>
	</form>
{/if}
	</td>
</tr>
</table>

*}