Exemplo n.º 1
0
    $arSelect[] = "IBLOCK_SECTION_ID";
}
$arResult["ELEMENTS_HEADERS"][] = array("id" => "IBLOCK_SECTION_ID", "name" => GetMessage("CC_BLL_COLUMN_SECTION"), "default" => true, "sort" => false);
if (count($arDocumentTemplates) > 0) {
    $arSelect[] = "CREATED_BY";
    $arResult["ELEMENTS_HEADERS"][] = array("id" => "BIZPROC", "name" => GetMessage("CC_BLL_COLUMN_BIZPROC"), "default" => true, "sort" => false);
}
if ($arResult["PROCESSES"] && $arResult["USE_COMMENTS"]) {
    $arResult["ELEMENTS_HEADERS"][] = array("id" => "COMMENTS", "name" => GetMessage("CC_BLL_COMMENTS"), "default" => true, "sort" => false, 'hideName' => true, 'iconCls' => 'bp-comments-icon');
}
if (empty($grid_columns)) {
    foreach ($arResult["ELEMENTS_HEADERS"] as $elementHeader) {
        $columnGrid[] = $elementHeader["id"];
    }
    $columns = implode(',', $columnGrid);
    $grid_options->SetColumns($columns);
    $grid_options->Save();
}
/* FILTER */
$sections = array('' => GetMessage("CC_BLL_ANY"));
foreach ($arResult["~LIST_SECTIONS"] as $id => $name) {
    $sections[$id] = $name;
}
$arResult["FILTER"] = array(array("id" => "list_section_id", "name" => GetMessage("CC_BLL_SECTION"), "type" => "list", "items" => $sections, "filtered" => $arResult["SECTION_ID"] !== false, "filter_value" => $arResult["SECTION_ID"], "value" => $arResult["SECTION_ID"]));
$i = 1;
$arFilterable = array();
$arCustomFilter = array();
$arDateFilter = array();
foreach ($arListFields as $FIELD_ID => $arField) {
    if ($arField["TYPE"] == "ACTIVE_FROM" || $arField["TYPE"] == "ACTIVE_TO") {
        $arResult["FILTER"][$i] = array("id" => "DATE_" . $FIELD_ID, "name" => htmlspecialcharsex($arField["NAME"]), "type" => "date");
Exemplo n.º 2
0
 * @copyright 2001-2014 Bitrix
 */
/**
 * Bitrix vars
 *
 * @global CUser $USER
 */
define("NO_KEEP_STATISTIC", true);
define("NO_AGENT_STATISTIC", true);
define("NOT_CHECK_PERMISSIONS", true);
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php";
if ($USER->IsAuthorized() && check_bitrix_sessid()) {
    //get saved columns and sorting from user settings
    $gridOptions = new CGridOptions($_REQUEST["GRID_ID"]);
    if ($_REQUEST["action"] == "showcolumns") {
        $gridOptions->SetColumns($_REQUEST["columns"]);
    } elseif ($_REQUEST["action"] == "settheme") {
        $gridOptions->SetTheme($_REQUEST["theme"]);
    } elseif ($_REQUEST["action"] == "savesettings") {
        CUtil::decodeURIComponent($_POST);
        $gridOptions->SetViewSettings($_POST['view_id'], $_POST);
        if ($_REQUEST["set_default_settings"] == "Y" && $USER->CanDoOperation('edit_other_settings')) {
            $gridOptions->SetDefaultView($_POST);
            if ($_REQUEST["delete_users_settings"] == "Y") {
                $gridOptions->ResetDefaultView();
            }
        }
    } elseif ($_REQUEST["action"] == "delview") {
        $gridOptions->DeleteView($_REQUEST['view_id']);
    } elseif ($_REQUEST["action"] == "setview") {
        $gridOptions->SetView($_REQUEST["view_id"]);