コード例 #1
0
ファイル: usersView.php プロジェクト: tamtrong/testlink
    // 	break;
    case 'order_by_role':
    case 'order_by_login':
        $orderBy->type = $args->operation;
        $orderBy->dir = $args->order_by_dir;
        $args->user_order_by = $args->operation;
        $order_by_clause = get_order_by_clause($orderBy);
        $the_k = $args->operation . "_dir";
        $args->order_by_dir[$the_k] = $args->order_by_dir[$the_k] == 'asc' ? 'desc' : 'asc';
        break;
    default:
        $order_by_dir['order_by_login_dir'] = 'desc';
        break;
}
// $body_onload = "onload=\"toggleRowByClass('hide_inactive_users','inactive_user','table-row')\"";
$order_by_clause = get_order_by_clause($orderBy);
$users = getAllUsersRoles($db, $order_by_clause);
$highlight = initialize_tabsmenu();
$highlight->view_users = 1;
$smarty = new TLSmarty();
$smarty->assign('highlight', $highlight);
$smarty->assign('user_feedback', $user_feedback);
$smarty->assign('user_order_by', $args->user_order_by);
$smarty->assign('order_by_role_dir', $args->order_by_dir['order_by_role_dir']);
$smarty->assign('order_by_login_dir', $args->order_by_dir['order_by_login_dir']);
$smarty->assign('role_colour', getRoleColourCfg($db));
$smarty->assign('update_title_bar', 0);
$smarty->assign('reload', 0);
$smarty->assign('users', $users);
$smarty->assign('result', $sqlResult);
$smarty->assign('action', $action);
コード例 #2
0
ファイル: usersView.php プロジェクト: moraesmv/testlink-code
function initializeGui(&$dbHandler, &$argsObj, $orderBy)
{
    $guiObj = new stdClass();
    $guiObj->highlight = initialize_tabsmenu();
    $guiObj->highlight->view_users = 1;
    $guiObj->update_title_bar = 0;
    $guiObj->reload = 0;
    $guiObj->user_order_by = $argsObj->user_order_by;
    $guiObj->order_by_role_dir = $argsObj->order_by_dir['order_by_role_dir'];
    $guiObj->order_by_login_dir = $argsObj->order_by_dir['order_by_login_dir'];
    $guiObj->checked_hide_inactive_users = $argsObj->checked_hide_inactive_users;
    $guiObj->base_href = $argsObj->basehref;
    $guiObj->body_onload = $argsObj->body_onload;
    $guiObj->role_colour = tlRole::getRoleColourCfg($dbHandler);
    $guiObj->users = tlUser::getAllUsersRoles($dbHandler, get_order_by_clause($orderBy));
    $guiObj->grants = $argsObj->currentUser->getGrantsForUserMgmt($dbHandler, $argsObj->tproject_id);
    $guiObj->tproject_id = $argsObj->tproject_id;
    return $guiObj;
}