/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
- <h1 class="headingleft">User Groups</h1>
- <div class="headingright">
- <?php if (in_array('users', $this->permission->permissions)): ?>
- <a href="/admin/users" class="button blue">Users</a>
- <?php endif; ?>
- <?php if (in_array('users_groups', $this->permission->permissions)): ?>
- <a href="/admin/users/add_group" class="button">Add Group</a>
- <?php endif; ?>
- </div>
- <?php if ($permission_groups): ?>
- <?php echo $this->pagination->create_links(); ?>
- <table class="default clear">
- <tr>
- <th><?php echo order_link('/admin/users/viewall','groupName','Group name'); ?></th>
- <th class="tiny"> </th>
- <th class="tiny"> </th>
- </tr>
- <?php foreach ($permission_groups as $group): ?>
- <tr>
- <td><?php echo (in_array('users_groups', $this->permission->permissions)) ? anchor('/admin/users/edit_group/'.$group['groupID'], $group['groupName']) : $group['groupName']; ?></td>
- <td class="tiny">
- <?php echo anchor('/admin/users/edit_group/'.$group['groupID'], 'Edit'); ?>
- </td>
- <td class="tiny"
- <?php echo anchor('/admin/users/delete_group/'.$group['groupID'], 'Delete', 'onclick="return confirm(\'Are you sure you want to delete this?\')"'); ?>
- </td>
- </tr>
- <?php endforeach; ?>
- </table>
- <?php echo $this->pagination->create_links(); ?>
- <p style="text-align: right;"><a href="#" class="button grey" id="totop">Back to top</a></p>
- <?php else: ?>
- <p class="clear">There are no permission groups set up yet.</p>
- <?php endif; ?>