roleadmin.smarty
1.88 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
72
<h2>Role Administration</h2>
<p class="descriptiveText"><strong>FIXME</strong> Overview of roles.</p>
<div class="ktInfo"><p><strong>Note:</strong> Roles are not yet fully functional within
<strong>KnowledgeTree™</strong> 3.0</p></div>
{if ($for_edit === false)}
<form action="{$smarty.server.PHP_SELF}" method="GET">
<fieldset>
<legend>Add a Role</legend>
<input type="hidden" name="action" value="createRole" />
{foreach item=oWidget from=$add_fields}
{$oWidget->render()}
{/foreach}
<div class="form_actions">
<input type="submit" value="create new role" />
</div class="form_actions">
</fieldset>
</form>
{else}
<form action="{$smarty.server.PHP_SELF}" method="GET">
<fieldset>
<legend>Change a role's details</legend>
<input type="hidden" name="action" value="updateRole" />
<input type="hidden" name="role_id" value="{$edit_role->getId()}" />
{foreach item=oWidget from=$edit_fields}
{$oWidget->render()}
{/foreach}
<div class="form_actions">
<input type="submit" value="update role information" />
<a href="?action=main" class="ktAction ktCancel">Cancel</a>
<a href="?action=main">Cancel</a>
</div class="form_actions">
</fieldset>
</form>
{/if}
<table class="listing">
<thead>
<tr>
<th>Role Name</th>
<th>Edit</th>
<th>Delete</th>
</tr>
</thead>
<tbody>
{if (count($roles) !== 0)}
{foreach item=oRole from=$roles}
<tr>
<td>{$oRole->getName()}</td>
<td><a href="?action=editRole&role_id={$oRole->getId()}" class="ktAction ktEdit">Edit</a></td>
<td><a href="?action=deleteRole&role_id={$oRole->getId()}" class="ktAction ktDelete">Delete</a></td>
</tr>
{/foreach}
{else}
<tr>
<td class="ktInfo" colspan="3"><p>There are currently no roles created within the system.</td>
</tr>
{/if}
</tbody>
</table>