addon-panel.php
1 year ago
current-subject.php
1 year ago
main-panel.php
1 year ago
security-audit.php
7 months ago
subject-panel-advanced.php
1 year ago
subject-panel.php
1 year ago
subject-panel.php
84 lines
| 1 | <?php /** @version 7.0.0 **/ ?> |
| 2 | |
| 3 | <?php if (defined('AAM_KEY')) { ?> |
| 4 | <div class="metabox-holder main-metabox"> |
| 5 | <div class="postbox"> |
| 6 | <h3 class="hndle"> |
| 7 | <span><?php echo __('Users/Roles Manager', 'advanced-access-manager'); ?></span> |
| 8 | </h3> |
| 9 | <div class="inside" id="user-role-manager-inside"> |
| 10 | <div class="aam-postbox-inside"> |
| 11 | <ul class="nav nav-tabs" role="tablist"> |
| 12 | <?php $active = 0; ?> |
| 13 | <?php if (current_user_can('aam_manage_roles')) { ?> |
| 14 | <li role="presentation" class="<?php echo (!$active++ ? 'active ' : ''); ?>text-center"><a href="#roles" aria-controls="roles" role="tab" data-toggle="tab"><i class="icon-users"></i><span class="aam-subject-title"><?php echo __('Roles', 'advanced-access-manager'); ?></span></a></li> |
| 15 | <?php } ?> |
| 16 | <?php if (current_user_can('aam_manage_users')) { ?> |
| 17 | <li role="presentation" class="<?php echo (!$active++ ? 'active ' : ''); ?>text-center"><a href="#users" aria-controls="users" role="tab" data-toggle="tab"><i class="icon-user"></i><span class="aam-subject-title"><?php echo __('Users', 'advanced-access-manager'); ?></span></a></li> |
| 18 | <?php } ?> |
| 19 | <?php if (current_user_can('aam_manage_visitors')) { ?> |
| 20 | <li role="presentation" class="<?php echo (!$active++ ? 'active ' : ''); ?>text-center"><a href="#visitor" aria-controls="visitor" role="tab" data-toggle="tab"><i class="icon-user-secret"></i><span class="aam-subject-title"><?php echo __('Visitor', 'advanced-access-manager'); ?></span></a></li> |
| 21 | <?php } ?> |
| 22 | <?php if (current_user_can('aam_manage_default')) { ?> |
| 23 | <li role="presentation" class="<?php echo (!$active++ ? 'active ' : ''); ?>text-center"><a href="#default" aria-controls="default" role="tab" data-toggle="tab" class="text-danger"><i class="icon-asterisk"></i><span class="aam-subject-title"><?php echo __('Default', 'advanced-access-manager'); ?></span></a></li> |
| 24 | <?php } ?> |
| 25 | <?php if ($active === 0) { ?> |
| 26 | <li role="presentation" class="active text-center"><a href="#none" aria-controls="none" role="tab" data-toggle="tab" class="text-muted"><i class="icon-asterisk"></i><span class="aam-subject-title"><?php echo __('None', 'advanced-access-manager'); ?></span></a></li> |
| 27 | <?php } ?> |
| 28 | </ul> |
| 29 | <div class="tab-content"> |
| 30 | <?php $active = 0; ?> |
| 31 | <?php if (current_user_can('aam_manage_roles')) { ?> |
| 32 | <div role="tabpanel" class="tab-pane<?php echo (!$active++ ? ' active' : ''); ?>" id="roles"> |
| 33 | <table id="role-list" class="table table-striped table-bordered"> |
| 34 | <thead> |
| 35 | <tr> |
| 36 | <th>ID</th> |
| 37 | <th>Users</th> |
| 38 | <th width="60%"><?php echo __('Role', 'advanced-access-manager'); ?></th> |
| 39 | <th><?php echo __('Action', 'advanced-access-manager'); ?></th> |
| 40 | <th>Level</th> |
| 41 | </tr> |
| 42 | </thead> |
| 43 | <tbody></tbody> |
| 44 | </table> |
| 45 | </div> |
| 46 | <?php } ?> |
| 47 | <?php if (current_user_can('aam_manage_users')) { ?> |
| 48 | <div role="tabpanel" class="tab-pane<?php echo (!$active++ ? ' active' : ''); ?>" id="users"> |
| 49 | <table id="user-list" class="table table-striped table-bordered"> |
| 50 | <thead> |
| 51 | <tr> |
| 52 | <th>ID</th> |
| 53 | <th>Roles</th> |
| 54 | <th width="60%"><?php echo __('Username', 'advanced-access-manager'); ?></th> |
| 55 | <th><?php echo __('Action', 'advanced-access-manager'); ?></th> |
| 56 | <th>Level</th> |
| 57 | <th>Expiration</th> |
| 58 | </tr> |
| 59 | </thead> |
| 60 | <tbody></tbody> |
| 61 | </table> |
| 62 | </div> |
| 63 | <?php } ?> |
| 64 | <?php if (current_user_can('aam_manage_visitors')) { ?> |
| 65 | <div role="tabpanel" class="tab-pane<?php echo (!$active++ ? ' active' : ''); ?>" id="visitor"> |
| 66 | <?php echo static::loadPartial('visitor-subject-tab', $params); ?> |
| 67 | </div> |
| 68 | <?php } ?> |
| 69 | <?php if (current_user_can('aam_manage_default')) { ?> |
| 70 | <div role="tabpanel" class="tab-pane<?php echo (!$active++ ? ' active' : ''); ?>" id="default"> |
| 71 | <?php echo static::loadPartial('default-subject-tab', $params); ?> |
| 72 | </div> |
| 73 | <?php } ?> |
| 74 | <?php if ($active === 0) { ?> |
| 75 | <div role="tabpanel" class="tab-pane active" id="none"> |
| 76 | <p class="alert alert-warning"><?php echo __('You are not allowed to manage any of the existing users, roles, visitors or default access settings.', 'advanced-access-manager'); ?></p> |
| 77 | </div> |
| 78 | <?php } ?> |
| 79 | </div> |
| 80 | </div> |
| 81 | </div> |
| 82 | </div> |
| 83 | </div> |
| 84 | <?php } |