1{title help="User Contacts Prefs"}{tr}User Contacts Preferences{/tr}{/title}
2
3{include file='tiki-mytiki_bar.tpl'}
4<div class="t_navbar mb-4">
5	{button href="tiki-contacts.php" class="btn btn-info" _icon_name="users" _text="{tr}Contacts{/tr}"}
6</div>
7
8{tabset name="contact_prefs"}
9	{tab name="{tr}Options{/tr}"}
10		<h2>{tr}Options{/tr}</h2>
11		<form method='post' action='tiki-user_contacts_prefs.php'>
12			<div class="form-group row">
13				<label class="col-sm-4">{tr}Default View:{/tr}</label>
14				<div class="col-sm-8">
15					<input type='radio' name='user_contacts_default_view' value='list' {if $user_contacts_default_view eq 'list'}checked="checked"{/if}>
16					{tr}List View{/tr}
17				</div>
18				<div class="col-sm-8 offset-sm-4">
19					<input type='radio' name='user_contacts_default_view' value='group' {if $user_contacts_default_view neq 'list'}checked="checked"{/if}>
20					{tr}Group View{/tr}
21				</div>
22			</div>
23			<div class="form-group row">
24				<input type='submit' class="btn btn-primary" name='prefs' value="{tr}Change preferences{/tr}">
25			</div>
26		</form>
27	{/tab}
28
29	{tab name="{tr}Manage Fields{/tr}"}
30		<h2>{tr}Manage Fields{/tr}</h2>
31		<form method='post' action='tiki-user_contacts_prefs.php'>
32			<div class="table-responsive">
33				<table class="table">
34					<tr>
35						<th colspan="2">{tr}Order{/tr}</th>
36						<th>{tr}Field{/tr}</th>
37						<th></th>
38					</tr>
39
40					{foreach from=$exts item=ext key=k name=e}
41						<tr>
42							<td width="2%">
43								{if not $smarty.foreach.e.first}
44									<a href="?ext_up={$ext.fieldId}" class="tips" title=":{tr}Up{/tr}">
45										{icon name='up'}</a>
46								{/if}
47							</td>
48							<td width="2%">
49								{if not $smarty.foreach.e.last}
50									<a href="?ext_down={$ext.fieldId}" class="tips" title=":{tr}Down{/tr}">
51										{icon name='down'}
52									</a>
53								{/if}
54							</td>
55							<td>{tr}{$ext.fieldname|escape}{/tr}</td>
56							<td class="action">
57								{if $ext.flagsPublic eq 'y'}
58									<a href="?ext_private={$ext.fieldId}" style="margin-left:20px;" class="tips" title=":{tr}Private{/tr}">
59										{icon name='user'}
60									</a>
61								{else}
62									<a href="?ext_public={$ext.fieldId}" style="margin-left:20px;" class="tips" title=":{tr}Public{/tr}">
63										{icon name='group'}
64									</a>
65								{/if}
66								{if $ext.show eq 'y'}
67									<a href="?ext_hide={$ext.fieldId}" style="margin-left:20px;" class="tips" title=":{tr}Hide{/tr}">
68										{icon name='ban'}
69									</a>
70								{else}
71									<a href="?ext_show={$ext.fieldId}" style="margin-left:20px;" class="tips" title=":{tr}Show{/tr}">
72										{icon name='view'}
73									</a>
74								{/if}
75								<a href="?ext_remove={$ext.fieldId}" style="margin-left:20px;" class="tips" title=":{tr}Remove{/tr}">
76									{icon name='remove'}
77								</a>
78							</td>
79						</tr>
80					{/foreach}
81				</table>
82			</div>
83			<div class="form-group row">
84				<label class="col-form-label col-sm-1">{tr}Add:{/tr}</label>
85				<div class="input-group col-sm-7">
86					<input type='text' class="form-control" name='ext_add' />
87					<div class="input-group-append">
88						<input type='submit' class="btn btn-primary" name='add_fields' value="{tr}Add{/tr}">
89					</div>
90				</div>
91			</div>
92		</form>
93	{/tab}
94{/tabset}
95