/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. <div class="headingright">
  3. <?php if (in_array('users', $this->permission->permissions)): ?>
  4. <a href="/admin/users" class="button blue">Users</a>
  5. <?php endif; ?>
  6. <?php if (in_array('users_groups', $this->permission->permissions)): ?>
  7. <a href="/admin/users/add_group" class="button">Add Group</a>
  8. <?php endif; ?>
  9. </div>
  10. <?php if ($permission_groups): ?>
  11. <?php echo $this->pagination->create_links(); ?>
  12. <table class="default clear">
  13. <tr>
  14. <th><?php echo order_link('/admin/users/viewall','groupName','Group name'); ?></th>
  15. <th class="tiny">&nbsp;</th>
  16. <th class="tiny">&nbsp;</th>
  17. </tr>
  18. <?php foreach ($permission_groups as $group): ?>
  19. <tr>
  20. <td><?php echo (in_array('users_groups', $this->permission->permissions)) ? anchor('/admin/users/edit_group/'.$group['groupID'], $group['groupName']) : $group['groupName']; ?></td>
  21. <td class="tiny">
  22. <?php echo anchor('/admin/users/edit_group/'.$group['groupID'], 'Edit'); ?>
  23. </td>
  24. <td class="tiny"
  25. <?php echo anchor('/admin/users/delete_group/'.$group['groupID'], 'Delete', 'onclick="return confirm(\'Are you sure you want to delete this?\')"'); ?>
  26. </td>
  27. </tr>
  28. <?php endforeach; ?>
  29. </table>
  30. <?php echo $this->pagination->create_links(); ?>
  31. <p style="text-align: right;"><a href="#" class="button grey" id="totop">Back to top</a></p>
  32. <?php else: ?>
  33. <p class="clear">There are no permission groups set up yet.</p>
  34. <?php endif; ?>