groupadmin.smarty
2.2 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
<h2>{i18n}Group Administration{/i18n}</h2>
<p class="descriptiveText"><strong>FIXME</strong> Overview of groups.</p>
<p><a href="?action=addGroup" class="ktAction ktAddGroup" style="float: left; padding-right: 0.5em;">Add Group</a><a href="?action=addGroup">Add a new group</a>.</p>
<!-- we roll both in here. -->
<form action="{$smarty.server.PHP_SELF}" method="GET">
<fieldset>
<legend>{i18n}Search for groups{/i18n}</legend>
<p class="descriptiveText">{i18n}Since there may be many groups in the
system, please type a few letters from the group's name to begin.
Alternatively, <a href="?show_all=1">view all groups</a> (note that this
may be very slow if you have many groups.{/i18n}</p>
{foreach item=oWidget from=$search_fields}
{$oWidget->render()}
{/foreach}
<div class="form_actions">
<input type="submit" value="{i18n}search for groups{/i18n}" />
</div class="form_actions">
</fieldset>
</form>
<table class="listing">
<thead>
<tr>
<th>{i18n}Group Name{/i18n}</th>
<th>{i18n}Unit Name{/i18n}</th>
<th>{i18n}Edit{/i18n}</th>
<th>{i18n}Manage Users{/i18n}</th>
<th>{i18n}Manage sub-groups{/i18n}</th>
<th>{i18n}Delete{/i18n}</th>
</tr>
</thead>
<tbody>
{if (!empty($search_results))}
<!-- do we want to batch here? -->
{foreach item=oGroup from=$search_results}
<tr>
<td>{$oGroup->getName()}</td>
<td>{if (!$oGroup->hasUnit())}<span class="descriptiveText">{i18n}not part of a unit{/i18n}</span>{else}
{$context->_getUnitName($oGroup)}
{/if}</td>
<td><a href="?action=editGroup&group_id={$oGroup->getId()}"
class="ktAction ktEdit">{i18n}Edit{/i18n}</a></td>
<td><a
href="?action=manageUsers&group_id={$oGroup->getId()}">{i18n}Manage Users{/i18n}</a></td>
<td><a
href="?action=manageSubgroups&group_id={$oGroup->getId()}">{i18n}Manage sub-groups{/i18n}</a></td>
<td><a href="?action=deleteGroup&group_id={$oGroup->getId()}"
class="ktAction ktDelete">{i18n}Delete{/i18n}</a></td>
</tr>
{/foreach}
{else}
<tr>
<td colspan="7" class="ktInfo">
<p>{i18n}No search specified, or no results for your search.{/i18n}</p>
</td>
</tr>
{/if}
</tbody>
</table>