PageRenderTime 429ms CodeModel.GetById 221ms app.highlight 12ms RepoModel.GetById 190ms app.codeStats 1ms

/halogy/application/modules/users/views/groups.php

https://bitbucket.org/haloweb/halogy-1.0/
PHP | 45 lines | 34 code | 11 blank | 0 comment | 3 complexity | 8473f863bd39451b199201a56b99f4f0 MD5 | raw file
 1<h1 class="headingleft">User Groups</h1>
 2
 3<div class="headingright">
 4
 5	<?php if (in_array('users', $this->permission->permissions)): ?>
 6		<a href="/admin/users" class="button blue">Users</a>
 7	<?php endif; ?>
 8
 9	<?php if (in_array('users_groups', $this->permission->permissions)): ?>
10		<a href="/admin/users/add_group" class="button">Add Group</a>
11	<?php endif; ?>
12</div>
13
14<?php if ($permission_groups): ?>
15
16<?php echo $this->pagination->create_links(); ?>
17
18<table class="default clear">
19	<tr>
20		<th><?php echo order_link('/admin/users/viewall','groupName','Group name'); ?></th>
21		<th class="tiny">&nbsp;</th>
22		<th class="tiny">&nbsp;</th>		
23	</tr>
24<?php foreach ($permission_groups as $group): ?>
25	<tr>
26		<td><?php echo (in_array('users_groups', $this->permission->permissions)) ? anchor('/admin/users/edit_group/'.$group['groupID'], $group['groupName']) : $group['groupName']; ?></td>
27		<td class="tiny">
28			<?php echo anchor('/admin/users/edit_group/'.$group['groupID'], 'Edit'); ?>
29		</td>
30		<td class="tiny"
31			<?php echo anchor('/admin/users/delete_group/'.$group['groupID'], 'Delete', 'onclick="return confirm(\'Are you sure you want to delete this?\')"'); ?>
32		</td>
33	</tr>
34<?php endforeach; ?>
35</table>
36
37<?php echo $this->pagination->create_links(); ?>
38
39<p style="text-align: right;"><a href="#" class="button grey" id="totop">Back to top</a></p>
40
41<?php else: ?>
42
43<p class="clear">There are no permission groups set up yet.</p>
44
45<?php endif; ?>