useradmin.smarty
2.67 KB
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
<h2>{i18n}User Management{/i18n}</h2>
<!-- FIXME inline CSS is _very_ bad. -->
<fieldset>
<legend>{i18n}Add New Users{/i18n}</legend>
<p class="descriptiveText">{i18n}To allow users access to the DMS, you need to provide them with
credentials through this section. Even if you are using an external source
of login information like <strong>LDAP</strong>, you will need to use this section
to retrieve their information from the external source.{/i18n}</p>
<p><a href="{addQS}action=addUser{/addQS}" class="ktAction ktAddUser" style="float:
left; padding-right: 0.5em;">{i18n}Add a new user{/i18n}</a><a
href="{addQS}action=addUser{/addQS}">{i18n}Add a new user{/i18n}</a></p>
</fieldset>
<!-- we roll both in here. -->
<form action="{$smarty.server.PHP_SELF}" method="POST">
<input type="hidden" name="do_search" value="1" />
<fieldset>
<legend>{i18n}Search for users{/i18n}</legend>
{capture assign=link}{addQS}show_all=1{/addQS}{/capture}
<p class="descriptiveText">{i18n arg_link=$link}Since there may be many users in the system, please
select a group from the list below, or type a few letters from the person's username
to begin. Alternatively, <a href="#link#">view all users</a> (note that this may be
very slow if you have many users).{/i18n}</p>
{foreach item=oWidget from=$search_fields}
{$oWidget->render()}
{/foreach}
<div class="form_actions">
<input type="submit" value="{i18n}search for users{/i18n}" />
</div class="form_actions">
</fieldset>
</form>
{if ($no_search === true)}
{else}
{if (!empty($search_results))}
<table class="kt_collection narrow" cellspacing="0" cellpadding="5">
<thead>
<tr>
<th>{i18n}Name{/i18n}</th>
<th>{i18n}Username{/i18n}</th>
<th>{i18n}Edit{/i18n}</th>
<th>{i18n}Delete{/i18n}</th>
<th>{i18n}Group Memberships{/i18n}</th>
<th>{i18n}Current Groups{/i18n}</th>
</tr>
</thead>
<tbody>
<!-- do we want to batch here? -->
{foreach item=oUser from=$search_results}
<tr class="{cycle values=odd,even}">
<td>{$oUser->getName()}</td>
<td>{$oUser->getUsername()}</td>
<td><a href="{addQS}action=editUser&user_id={$oUser->getId()}{/addQS}" class="ktAction ktEdit">{i18n}Edit{/i18n}</a></td>
<td><a href="{addQS}action=deleteuser&user_id={$oUser->getId()}{/addQS}" class="ktAction ktDelete">{i18n}Delete{/i18n}</a></td>
<td><a href="{addQS}action=editgroups&user_id={$oUser->getId()}{/addQS}">{i18n}Manage Groups{/i18n}</a></td>
<td class="title"><span class="descriptiveText">{$context->getGroupStringForUser($oUser)}</span></td>
</tr>
{/foreach}
</tbody>
</table>
{else}
<div class="ktError"><p>{i18n}No results for your search.{/i18n}</p></div>
{/if}
{/if}