1{title help="Theme Control"}{tr}Theme Control:{/tr} {tr}Sections{/tr}{/title}
2<div class="t_navbar btn-group">
3	{button href="tiki-theme_control.php" class="btn btn-primary" _text="{tr}Control by Categories{/tr}"}
4	{button href="tiki-theme_control_objects.php" class="btn btn-primary" _text="{tr}Control by Objects{/tr}"}
5</div>
6<h2>{tr}Assign themes to sections{/tr}</h2>
7<form action="tiki-theme_control_sections.php" method="post" class="form-inline" role="form">
8	<div class="form-group row">
9		<label for="section">{tr}Section{/tr}</label>
10		<select name="section" class="form-control form-control-sm">
11			{foreach key=sec item=ix from=$sections}
12				<option value="{$sec|escape}" {if $a_section eq $sec}selected="selected"{/if}>{$sec}</option>
13			{/foreach}
14		</select>
15	</div>
16	<div class="form-group row">
17		<label for="theme">{tr}Theme{/tr}</label>
18		<select name="theme" class="form-control form-control-sm">
19			{foreach from=$themes key=theme item=theme_name}
20				<option value="{$theme|escape}">{$theme_name}</option>
21			{/foreach}
22		</select>
23	</div>
24	<input type="submit" class="btn btn-primary" name="assign" value="{tr}Assign{/tr}">
25</form>
26
27<h2>{tr}Assigned sections{/tr}</h2>
28<form action="tiki-theme_control_sections.php" method="post" role="form" class="form">
29	<div class="table-responsive">
30		<table class="table">
31			<tr>
32				<th>
33					<button type="submit" class="btn btn-danger btn-sm" name="delete" title="{tr}Delete selected{/tr}">
34						{icon name="delete"}
35					</button>
36				</th>
37				<th>
38					<a href="tiki-theme_control_sections.php?offset={$offset}&amp;sort_mode={if $sort_mode eq 'section_desc'}section_asc{else}section_desc{/if}">
39						{tr}Section{/tr}
40					</a>
41				</th>
42				<th>
43					<a href="tiki-theme_control_sections.php?offset={$offset}&amp;sort_mode={if $sort_mode eq 'theme_desc'}theme_asc{else}theme_desc{/if}">
44						{tr}Theme{/tr}
45					</a>
46				</th>
47			</tr>
48			{section name=user loop=$channels}
49				<tr>
50					<td class="checkbox-cell">
51						<div class="form-check">
52							<input type="checkbox" class="form-check-input" name="sec[{$channels[user].section}]">
53						</div>
54					</td>
55					<td class="text">
56						{$channels[user].section}
57					</td>
58					<td class="text">
59						{$channels[user].theme}
60					</td>
61				</tr>
62			{/section}
63		</table>
64	</div>
65</form>
66