00001 <?php 00002 namespace Habari; 00003 if ( !defined( 'HABARI_PATH' ) ) { die('No direct access'); } 00004 ?> 00005 <?php include('header.php'); ?> 00006 <div class="container navigation"> 00007 <span class="columns seven"> 00008 <select name="navigationdropdown" onchange="navigationDropdown.changePage();" tabindex="1"> 00009 <option value="<?php echo URL::get('display_groups'); ?>"><?php _e('All Groups'); ?></option> 00010 <?php foreach ( $groups as $group_nav ): ?> 00011 <option value="<?php echo URL::get('display_group', 'id=' . $group_nav->id); ?>"<?php if ($group_nav->id == $id): ?> selected="selected"<?php endif; ?>><?php echo $group_nav->name; ?></option> 00012 <?php endforeach; ?> 00013 </select> 00014 </span> 00015 <span class="columns one or"> 00016 <?php _e('or'); ?> 00017 </span> 00018 <span class="columns seven"> 00019 <input type="search" id="search" placeholder="<?php _e('search settings'); ?>" tabindex="2" autofocus="autofocus"> 00020 </span> 00021 </div> 00022 00023 <div class="container transparent groupstats"> 00024 <p><?php echo sprintf( _n( 'Group %1$s has <strong>%2$d</strong> member', 'Group %1$s has <strong>%2$d</strong> members', count( $members ) ), "<strong>$group->name</strong>", count( $members ) ); ?></p> 00025 </div> 00026 00027 <form name="update-group" id="update-group" action="" method="post"> 00028 <div class="container settings group groupmembers" id="groupmembers"> 00029 00030 <h2><?php _e('Group Members'); ?></h2> 00031 00032 <div id="assignedusers"> 00033 <span id="currentusers"> 00034 <span> 00035 <label><strong><?php _e('Members'); ?></strong></label> 00036 </span> 00037 <span class="memberlist"></span> 00038 </span> 00039 <span id="newusers"> 00040 <span> 00041 <label><strong><?php _e('Members To Add'); ?></strong></label> 00042 </span> 00043 <span class="memberlist"></span> 00044 </span> 00045 </div> 00046 <div> 00047 <span> 00048 <span> </span> 00049 <span id="add_users" > 00050 <span><select name="assign_user" id="assign_user"></select></span> 00051 <span><input type="button" id="add_user" value="<?php _e('Add'); ?>" class="button add"></span> 00052 </span> 00053 </span> 00054 <span id="removedusers"> 00055 <span> 00056 <label><strong><?php _e('Members To Remove'); ?></strong></label> 00057 </span> 00058 <span class="memberlist"></span> 00059 </span> 00060 </div> 00061 <?php foreach ( $users as $user ): ?> 00062 <input type="hidden" name="user[<?php echo $user->id; ?>]" value="<?php echo ($user->membership) ? '1' : 0; ?>" id="user_<?php echo $user->id; ?>"> 00063 <?php endforeach; ?> 00064 00065 </div> 00066 00067 <div class="container settings group groupacl" id="groupacl"> 00068 00069 <h2><?php _e('Group Permissions'); ?></h2> 00070 00071 <?php 00072 foreach ( $grouped_tokens as $group_name => $token_group ): 00073 $crud_tokens = ( isset($token_group['crud']) ) ? $token_group['crud'] : array(); 00074 $bool_tokens = ( isset($token_group['bool']) ) ? $token_group['bool'] : array(); 00075 ?> 00076 <div class="permission-group"> 00077 <h3><?php echo $group_name; ?></h3> 00078 <?php if ( !empty( $crud_tokens ) ): ?> 00079 <table id="<?php echo $group_name; ?>-crud-permissions" class="crud-permissions"> 00080 <tr class="head"> 00081 <th><?php _e( 'Token Description' ); ?></th> 00082 <?php foreach ( $access_names as $name ): ?> 00083 <th><?php echo $access_display[$name]; ?></th> 00084 <?php endforeach; ?> 00085 </tr> 00086 <?php foreach ( $crud_tokens as $token ): ?> 00087 <tr> 00088 <td class="token_description"><strong><?php _e($token->description); ?></strong></td> 00089 <?php 00090 foreach ( $access_names as $name ): 00091 $checked = ( isset($token->access) && ACL::access_check( $token->access, $name ) ) ? ' checked' : ''; 00092 ?> 00093 <td class="token_access"> 00094 <input type="checkbox" id="token_<?php echo $token->id . '_' . $name; ?>" class="bitflag-<?php echo $name; ?>" name="tokens[<?php echo $token->id . '][' . $name; ?>]" <?php echo $checked; ?>> 00095 </td> 00096 <?php endforeach; ?> 00097 </tr> 00098 <?php endforeach; ?> 00099 </table> 00100 <?php endif; ?> 00101 <?php if ( !empty( $bool_tokens ) ): ?> 00102 <table id="<?php echo $group_name; ?>-bool-permissions" class="bool-permissions"> 00103 <tr class="head"> 00104 <th><?php _e( 'Token Description' ); ?></th> 00105 <th><?php echo $bool_access_display['allow']; ?></th> 00106 <th><?php echo $bool_access_display['deny']; ?></th> 00107 </tr> 00108 <?php foreach ( $bool_tokens as $token ): ?> 00109 <tr> 00110 <td class="token_description"><strong><?php echo $token->description; ?></strong></td> 00111 <?php $checked = ( isset($token->access) && ACL::access_check( $token->access, 'any' ) ) ? ' checked' : '';?> 00112 <td class="token_access"> 00113 <input type="checkbox" id="token_<?php echo $token->id . '_full'; ?>" class="bitflag-full" name="tokens[<?php echo $token->id; ?>][full]" <?php echo $checked; ?>> 00114 </td> 00115 <?php $checked = ( isset($token->access) && ACL::access_check( $token->access, 'deny' ) ) ? ' checked' : '';?> 00116 <td class="token_access"> 00117 <input type="checkbox" id="token_<?php echo $token->id . '_deny'; ?>" class="bitflag-deny" name="tokens[<?php echo $token->id; ?>][deny]" <?php echo $checked; ?>> 00118 </td> 00119 </tr> 00120 <?php endforeach; ?> 00121 </table> 00122 <?php endif; ?> 00123 </div> 00124 <?php endforeach; ?> 00125 00126 </div> 00127 00128 <div class="container controls transparent"> 00129 <span> 00130 <input type="submit" name="delete" value="<?php _e('Delete'); ?>" class="delete button"> 00131 </span> 00132 <span> 00133 <input type="submit" value="<?php _e('Apply'); ?>" class="button save"> 00134 </span> 00135 00136 <input type="hidden" name="id" id="id" value="<?php echo $group->id; ?>"> 00137 00138 <input type="hidden" name="nonce" id="nonce" value="<?php echo $wsse['nonce']; ?>"> 00139 <input type="hidden" name="timestamp" id="timestamp" value="<?php echo $wsse['timestamp']; ?>"> 00140 <input type="hidden" name="password_digest" id="password_digest" value="<?php echo $wsse['digest']; ?>"> 00141 00142 </div> 00143 </form> 00144 00145 <?php include('footer.php');?>