summaryrefslogtreecommitdiff
path: root/templates/user_assigned_modules.tpl
blob: 90c98aea830ca46d3f8ccc295648b2996a964525 (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
{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" biticon="go-up" fMove=up fPackage=$fPackage fModule=$modules.$area[ix].module_id}
												{smartlink ititle="Down" biticon="go-down" fMove=down fPackage=$fPackage fModule=$modules.$area[ix].module_id}
												{if $colkey eq 'right'}
													{smartlink ititle="Move to Left" biticon="go-previous" fMove=left fPackage=$fPackage fModule=$modules.$area[ix].module_id}
												{elseif $colkey eq 'left'}
													{smartlink ititle="Move to Right" biticon="go-next" fMove=right fPackage=$fPackage fModule=$modules.$area[ix].module_id}
												{/if}
												{if $column[ix].type ne 'P'}
													{smartlink ititle="Unassign" biticon="user-trash" onclick="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="form-group">
								{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="form-group">
							{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="form-group">
							{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="form-group submit">
							<input type="submit" class="btn btn-default" 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="form-group">
							{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="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[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="form-group submit">
							<input type="submit" class="btn btn-default" name="fSubmitAssign" value="{tr}Add Module{/tr}" />
						</div>
					{/form}
				{/jstab}
			{/if}

			{if $gBitUser->canCustomizeTheme()}
				{jstab title="Select Theme"}
					{form legend="Select Theme"}
						<div class="form-group">
							{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>
								{formhelp note="Pick the theme for your personal Homepage."}
							{/forminput}
						</div>

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