예제 #1
0
파일: roles.php 프로젝트: sistlind/admidio
 if ($row['mem_leader'] > 0) {
     $leaderChecked = ' checked="checked" ';
 }
 // the leader of webmaster role can only be set by a webmaster
 if ($role->getValue('rol_webmaster') == 1 && !$gCurrentUser->isWebmaster()) {
     $leaderDisabled = ' disabled="disabled" ';
 }
 $columnValues = array('<input type="checkbox" id="role-' . $role->getValue('rol_id') . '" name="role-' . $role->getValue('rol_id') . '" ' . $memberChecked . $memberDisabled . ' onclick="javascript:profileJS.unMarkLeader(this);" value="1" />', '<label for="role-' . $role->getValue('rol_id') . '">' . $role->getValue('rol_name') . '</label>', $role->getValue('rol_description'));
 // if new category than display a category header
 if ($category != $role->getValue('cat_id')) {
     $block_id = 'admCategory' . $role->getValue('cat_id');
     $table->addTableBody();
     $table->addRow('', array('class' => 'admidio-group-heading', 'id' => 'group_' . $block_id));
     $table->addColumn();
     $table->addAttribute('colspan', '4', 'td');
     $table->addData('<span id="caret_' . $block_id . '" class="caret"></span>' . $role->getValue('cat_name'));
     $table->addTableBody('id', $block_id);
     $category = $role->getValue('cat_id');
 }
 $leaderRights = '<input type="checkbox" id="leader-' . $role->getValue('rol_id') . '" name="leader-' . $role->getValue('rol_id') . '" ' . $leaderChecked . $leaderDisabled . ' onclick="javascript:profileJS.markLeader(this);" value="1" />';
 // show icon that leaders have no additional rights
 if ($role->getValue('rol_leader_rights') == ROLE_LEADER_NO_RIGHTS) {
     $leaderRights .= '<img class="admidio-icon-info" src="' . THEME_PATH . '/icons/info.png"
                          alt="' . $gL10n->get('ROL_LEADER_NO_ADDITIONAL_RIGHTS') . '" title="' . $gL10n->get('ROL_LEADER_NO_ADDITIONAL_RIGHTS') . '" />
                              <img class="admidio-icon-link" src="' . THEME_PATH . '/icons/dummy.png" alt="dummy" />';
 }
 // show icon with edit user right if leader has this right
 if ($role->getValue('rol_leader_rights') == ROLE_LEADER_MEMBERS_EDIT || $role->getValue('rol_leader_rights') == ROLE_LEADER_MEMBERS_ASSIGN_EDIT) {
     $leaderRights .= '<img class="admidio-icon-info" src="' . THEME_PATH . '/icons/profile_edit.png"
                          alt="' . $gL10n->get('ROL_LEADER_EDIT_MEMBERS') . '" title="' . $gL10n->get('ROL_LEADER_EDIT_MEMBERS') . '" />';
 }