unitadmin.smarty
1.4 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
<h2>Unit Administration</h2>
<p class="descriptiveText"><strong>FIXME</strong> Overview of units.</p>
{if ($for_edit === false)}
<form action="{$smarty.server.PHP_SELF}" method="GET">
<fieldset>
<legend>Add a unit</legend>
<input type="hidden" name="action" value="createUnit" />
{foreach item=oWidget from=$add_fields}
{$oWidget->render()}
{/foreach}
<div class="form_actions">
<input type="submit" value="create new unit" />
</div class="form_actions">
</fieldset>
</form>
{else}
<form action="{$smarty.server.PHP_SELF}" method="GET">
<fieldset>
<legend>Change a unit's details</legend>
<input type="hidden" name="action" value="updateUnit" />
<input type="hidden" name="unit_id" value="{$edit_unit->getId()}" />
{foreach item=oWidget from=$edit_fields}
{$oWidget->render()}
{/foreach}
<div class="form_actions">
<input type="submit" value="update unit information" />
</div class="form_actions">
</fieldset>
</form>
{/if}
<table class="listing">
<thead>
<tr>
<th>Unit Name</th>
<th>Edit</th>
<th>Manage Members</th>
</tr>
</thead>
<tbody>
{foreach item=oUnit from=$unit_list}
<tr>
<td>{$oUnit->getName()}</td>
<td><a href="?action=editGroup&unit_id={$oUnit->getId()}" class="ktAction ktEdit">Edit</a></td>
<!-- <td><a href="?action=manageMembers&unit_id={$oUnit->getId()}">Manage Members</a></td> -->
</tr>
{/foreach}
</tbody>
</table>