当前位置: 首页>>代码示例>>PHP>>正文


PHP DataGrid::__construct方法代码示例

本文整理汇总了PHP中DataGrid::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP DataGrid::__construct方法的具体用法?PHP DataGrid::__construct怎么用?PHP DataGrid::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataGrid的用法示例。


在下文中一共展示了DataGrid::__construct方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($siteID, $parameters)
 {
     /* Pager configuration. */
     $this->_tableWidth = 915;
     $this->_defaultAlphabeticalSortBy = 'lastName';
     $this->ajaxMode = false;
     $this->showExportCheckboxes = true;
     //BOXES WILL NOT APPEAR UNLESS SQL ROW exportID IS RETURNED!
     $this->showActionArea = true;
     $this->showChooseColumnsBox = true;
     $this->allowResizing = true;
     $this->dateCriterion = '';
     if (isset($parameters['period']) && !empty($parameters['period'])) {
         $this->dateCriterion .= ' AND activity.date_created >= ' . $parameters['period'] . ' ';
     } else {
         if (isset($parameters['startDate']) && !empty($parameters['startDate'])) {
             $this->dateCriterion .= ' AND activity.date_created >= \'' . $parameters['startDate'] . '\' ';
         }
         if (isset($parameters['endDate']) && !empty($parameters['endDate'])) {
             $this->dateCriterion .= ' AND activity.date_created <= \'' . $parameters['endDate'] . '\' ';
         }
     }
     $this->defaultSortBy = 'dateCreatedSort';
     $this->defaultSortDirection = 'DESC';
     $this->_defaultColumns = array(array('name' => 'Date', 'width' => 110), array('name' => 'First Name', 'width' => 85), array('name' => 'Last Name', 'width' => 75), array('name' => 'Regarding', 'width' => 125), array('name' => 'Activity', 'width' => 65), array('name' => 'Notes', 'width' => 240), array('name' => 'Entered By', 'width' => 60));
     $this->_db = DatabaseConnection::getInstance();
     $this->_siteID = $siteID;
     $this->_assignedCriterion = "";
     $this->_dataItemIDColumn = 'company.company_id';
     $this->_classColumns = array('Date' => array('pagerRender' => 'return $rsData[\'dateCreated\'];', 'sortableColumn' => 'dateCreatedSort', 'pagerWidth' => 110, 'pagerOptional' => true, 'alphaNavigation' => true, 'filterHaving' => 'dateCreated'), 'First Name' => array('pagerRender' => 'if ($rsData[\'dataItemType\']==' . DATA_ITEM_CANDIDATE . ') {$ret = \'<img src="images/mru/candidate.gif" height="12" alt="" />\';} else if ($rsData[\'dataItemType\']==' . DATA_ITEM_CONTACT . ') {$ret = \'<img src="images/mru/contact.gif" height="12">\';} else {$ret = \'<img src="images/mru/blank.gif">\';} if ($rsData[\'isHot\'] == 1) $className =  \'jobLinkHot\'; else $className = \'jobLinkCold\'; if ($rsData[\'dataItemType\']==' . DATA_ITEM_CANDIDATE . ') {return $ret.\'&nbsp;<a href="' . CATSUtility::getIndexName() . '?m=candidates&amp;a=show&amp;candidateID=\'.$rsData[\'dataItemID\'].\'" class="\'.$className.\'" title="\'.htmlspecialchars(InfoString::make($rsData[\'dataItemType\'],$rsData[\'dataItemID\'],$rsData[\'siteID\'])).\'">\'.htmlspecialchars($rsData[\'firstName\']).\'</a>\';} else {return  $ret.\'&nbsp;<a href="' . CATSUtility::getIndexName() . '?m=contacts&amp;a=show&amp;contactID=\'.$rsData[\'dataItemID\'].\'" class="\'.$className.\'" title="\'.htmlspecialchars(InfoString::make($rsData[\'dataItemType\'],$rsData[\'dataItemID\'],$rsData[\'siteID\'])).\'">\'.htmlspecialchars($rsData[\'firstName\']).\'</a>\';}', 'sortableColumn' => 'firstName', 'pagerWidth' => 85, 'pagerOptional' => false, 'alphaNavigation' => true, 'filterHaving' => 'firstName'), 'Last Name' => array('pagerRender' => 'if ($rsData[\'isHot\'] == 1) $className =  \'jobLinkHot\'; else $className = \'jobLinkCold\'; if ($rsData[\'dataItemType\']==' . DATA_ITEM_CANDIDATE . ') {return \'<a href="' . CATSUtility::getIndexName() . '?m=candidates&amp;a=show&amp;candidateID=\'.$rsData[\'dataItemID\'].\'" class="\'.$className.\'" title="\'.htmlspecialchars(InfoString::make($rsData[\'dataItemType\'],$rsData[\'dataItemID\'],$rsData[\'siteID\'])).\'"> \'.htmlspecialchars($rsData[\'lastName\']).\'</a>\';} else {return \'<a href="' . CATSUtility::getIndexName() . '?m=contacts&amp;a=show&amp;contactID=\'.$rsData[\'dataItemID\'].\'" class="\'.$className.\'" title="\'.htmlspecialchars(InfoString::make($rsData[\'dataItemType\'],$rsData[\'dataItemID\'],$rsData[\'siteID\'])).\'"> \'.htmlspecialchars($rsData[\'lastName\']).\'</a>\';}', 'sortableColumn' => 'lastName', 'pagerWidth' => 75, 'pagerOptional' => false, 'alphaNavigation' => true, 'filterHaving' => 'lastName'), 'Regarding' => array('pagerRender' => 'if ($rsData[\'jobIsHot\'] == 1) $className =  \'jobLinkHot\'; else $className = \'jobLinkCold\'; if ($rsData[\'companyIsHot\'] == 1) $companyClassName =  \'jobLinkHot\'; else $companyClassName = \'jobLinkCold\';  if ($rsData[\'regardingJobTitle\'] == \'\') {$ret = \'General\'; } else {$ret = \'<a href="' . CATSUtility::getIndexName() . '?m=joborders&amp;a=show&amp;jobOrderID=\'.$rsData[\'jobOrderID\'].\'" class="\'.$className.\'">\'.htmlspecialchars($rsData[\'regardingJobTitle\']).\'</a>\'; if($rsData[\'regardingCompanyName\'] != \'\') {$ret .= \' <a href="' . CATSUtility::getIndexName() . '?m=companies&amp;a=show&amp;companyID=\'.$rsData[\'companyID\'].\'" class="\'.$companyClassName.\'">(\'.htmlspecialchars($rsData[\'regardingCompanyName\']).\')\';}} return $ret;', 'sortableColumn' => 'regarding', 'pagerWidth' => 125, 'pagerOptional' => true, 'alphaNavigation' => true, 'filterHaving' => 'regarding'), 'Activity' => array('pagerRender' => '$ret = $rsData[\'typeDescription\']; return $ret;', 'sortableColumn' => 'typeDescription', 'pagerWidth' => 65, 'pagerOptional' => true, 'alphaNavigation' => true, 'filter' => 'activity_type.short_description'), 'Notes' => array('pagerRender' => 'return $rsData[\'notes\'];', 'sortableColumn' => 'notes', 'pagerWidth' => 240, 'pagerOptional' => true, 'alphaNavigation' => true, 'filterHaving' => 'notes'), 'Entered By' => array('pagerRender' => 'return StringUtility::makeInitialName($rsData[\'enteredByFirstName\'], $rsData[\'enteredByLastName\'], false, LAST_NAME_MAXLEN);', 'exportRender' => 'return $rsData[\'enteredByFirstName\'] . " " .$rsData[\'enteredByLastName\'];', 'sortableColumn' => 'enteredBySort', 'pagerWidth' => 60, 'alphaNavigation' => true, 'filter' => 'CONCAT(entered_by_user.last_name, entered_by_user.first_name)'));
     parent::__construct("activity:ActivityDataGrid", $parameters);
 }
开发者ID:PublicityPort,项目名称:OpenCATS,代码行数:32,代码来源:dataGrids.php

示例2: __construct

 public function __construct($siteID, $parameters, $misc)
 {
     /* Pager configuration. */
     $this->_tableWidth = 915;
     $this->_defaultAlphabeticalSortBy = 'Description';
     $this->ajaxMode = false;
     $this->showExportCheckboxes = true;
     //BOXES WILL NOT APPEAR UNLESS SQL ROW exportID IS RETURNED!
     $this->showActionArea = true;
     $this->showChooseColumnsBox = true;
     $this->allowResizing = true;
     $this->defaultSortBy = 'description';
     $this->defaultSortDirection = 'DESC';
     $this->_defaultColumns = array(array('name' => 'Attachments', 'width' => 10), array('name' => 'Name', 'width' => 255), array('name' => 'Jobs', 'width' => 40), array('name' => 'City', 'width' => 90), array('name' => 'State', 'width' => 50), array('name' => 'Phone', 'width' => 85), array('name' => 'Owner', 'width' => 65), array('name' => 'Created', 'width' => 60), array('name' => 'Modified', 'width' => 60));
     $this->_classColumns = array('Count' => array('select' => 'number_entries as numberEntries', 'pagerRender' => 'return $rsData[\'numberEntries\'];', 'pagerWidth' => 45, 'alphaNavigation' => false, 'pagerOptional' => true, 'sortableColumn' => 'number_entries', 'filter' => 'number_entries', 'filterTypes' => '===>=<'), 'Description' => array('select' => '', 'pagerRender' => 'return \'<a href="' . CATSUtility::getIndexName() . '?m=lists&amp;a=showList&amp;savedListID=\'.$rsData[\'savedListID\'].\'">\'.htmlspecialchars($rsData[\'description\']).\'</a>\';', 'sortableColumn' => 'description', 'pagerWidth' => 355, 'pagerOptional' => false, 'filter' => 'saved_list.description'), 'List Type' => array('pagerRender' => 'return ($rsData[\'isDynamic\']==1?\'Dynamic\':\'Static\');', 'sortableColumn' => 'isDynamic', 'pagerWidth' => 75, 'pagerOptional' => true, 'filter' => 'data_item_type.short_description'), 'Data Type' => array('select' => 'data_item_type.short_description AS dataItemTypeSortDesc', 'join' => 'LEFT JOIN data_item_type on data_item_type.data_item_type_id = saved_list.data_item_type', 'pagerRender' => 'return ($rsData[\'dataItemTypeSortDesc\']);', 'sortableColumn' => 'dataItemTypeSortDesc', 'pagerWidth' => 75, 'pagerOptional' => true, 'filter' => 'data_item_type.short_description'), 'Owner' => array('select' => 'owner_user.first_name AS ownerFirstName,' . 'owner_user.last_name AS ownerLastName,' . 'CONCAT(owner_user.last_name, owner_user.first_name) AS ownerSort', 'join' => 'LEFT JOIN user AS owner_user ON saved_list.created_by = owner_user.user_id', 'pagerRender' => 'return StringUtility::makeInitialName($rsData[\'ownerFirstName\'], $rsData[\'ownerLastName\'], false, LAST_NAME_MAXLEN);', 'exportRender' => 'return $rsData[\'ownerFirstName\'] . " " .$rsData[\'ownerLastName\'];', 'sortableColumn' => 'ownerSort', 'pagerWidth' => 75, 'alphaNavigation' => true, 'filter' => 'CONCAT(owner_user.first_name, owner_user.last_name)'), 'Created' => array('select' => 'DATE_FORMAT(saved_list.date_created, \'%m-%d-%y\') AS dateCreated', 'pagerRender' => 'return $rsData[\'dateCreated\'];', 'sortableColumn' => 'dateCreatedSort', 'pagerWidth' => 60, 'filterHaving' => 'DATE_FORMAT(saved_list.date_created, \'%m-%d-%y\')'), 'Modified' => array('select' => 'DATE_FORMAT(saved_list.date_modified, \'%m-%d-%y\') AS dateModified', 'pagerRender' => 'return $rsData[\'dateModified\'];', 'sortableColumn' => 'dateModifiedSort', 'pagerWidth' => 60, 'pagerOptional' => true, 'filterHaving' => 'DATE_FORMAT(saved_list.date_modified, \'%m-%d-%y\')'));
     $this->_defaultColumns = array(array('name' => 'Count', 'width' => 45), array('name' => 'Description', 'width' => 355), array('name' => 'Data Type', 'width' => 75), array('name' => 'List Type', 'width' => 75), array('name' => 'Owner', 'width' => 75), array('name' => 'Created', 'width' => 60), array('name' => 'Modified', 'width' => 60));
     parent::__construct("lists:ListsDataGrid", $parameters, $misc);
 }
开发者ID:rankinp,项目名称:OpenCATS,代码行数:18,代码来源:dataGrids.php

示例3: __construct

    public function __construct($instanceName, $siteID, $parameters, $misc = 0)
    {
        $this->_db = DatabaseConnection::getInstance();
        $this->_siteID = $siteID;
        $this->_assignedCriterion = "";
        $this->_dataItemIDColumn = 'candidate.candidate_id';
        $this->_classColumns = array('Attachments' => array('select' => 'IF(candidate_joborder_submitted.candidate_joborder_id, 1, 0) AS submitted,
                                                IF(attachment_id, 1, 0) AS attachmentPresent', 'pagerRender' => 'if ($rsData[\'submitted\'] == 1)
                                                    {
                                                        $return = \'<img src="images/job_orders.gif" alt="" width="16" height="16" title="Submitted for a Job Order" />\';
                                                    }
                                                    else
                                                    {
                                                        $return = \'<img src="images/mru/blank.gif" alt="" width="16" height="16" />\';
                                                    }

                                                    if ($rsData[\'attachmentPresent\'] == 1)
                                                    {
                                                        $return .= \'<img src="images/paperclip.gif" alt="" width="16" height="16" title="Attachment Present" />\';
                                                    }
                                                    else
                                                    {
                                                        $return .= \'<img src="images/mru/blank.gif" alt="" width="16" height="16" />\';
                                                    }

                                                    return $return;
                                                   ', 'join' => 'LEFT JOIN attachment
                                                        ON candidate.candidate_id = attachment.data_item_id
														AND attachment.data_item_type = ' . DATA_ITEM_CANDIDATE . '
                                                    LEFT JOIN candidate_joborder AS candidate_joborder_submitted
                                                        ON candidate_joborder_submitted.candidate_id = candidate.candidate_id
                                                        AND candidate_joborder_submitted.status >= ' . PIPELINE_STATUS_SUBMITTED . '
                                                        AND candidate_joborder_submitted.site_id = ' . $this->_siteID . '
                                                        AND candidate_joborder_submitted.status != ' . PIPELINE_STATUS_NOTINCONSIDERATION, 'pagerWidth' => 34, 'pagerOptional' => true, 'pagerNoTitle' => true, 'sizable' => false, 'exportable' => false, 'filterable' => false), 'First Name' => array('select' => 'candidate.first_name AS firstName', 'pagerRender' => 'if ($rsData[\'isHot\'] == 1) $className =  \'jobLinkHot\'; else $className = \'jobLinkCold\'; return \'<a href="' . CATSUtility::getIndexName() . '?m=candidates&amp;a=show&amp;candidateID=\'.$rsData[\'candidateID\'].\'" class="\'.$className.\'">\'.htmlspecialchars($rsData[\'firstName\']).\'</a>\';', 'sortableColumn' => 'firstName', 'pagerWidth' => 75, 'pagerOptional' => false, 'alphaNavigation' => true, 'filter' => 'candidate.first_name'), 'Last Name' => array('select' => 'candidate.last_name AS lastName', 'sortableColumn' => 'lastName', 'pagerRender' => 'if ($rsData[\'isHot\'] == 1) $className =  \'jobLinkHot\'; else $className = \'jobLinkCold\'; return \'<a href="' . CATSUtility::getIndexName() . '?m=candidates&amp;a=show&amp;candidateID=\'.$rsData[\'candidateID\'].\'" class="\'.$className.\'">\'.htmlspecialchars($rsData[\'lastName\']).\'</a>\';', 'pagerWidth' => 85, 'pagerOptional' => false, 'alphaNavigation' => true, 'filter' => 'candidate.last_name'), 'E-Mail' => array('select' => 'candidate.email1 AS email1', 'sortableColumn' => 'email1', 'pagerWidth' => 80, 'filter' => 'candidate.email1'), '2nd E-Mail' => array('select' => 'candidate.email2 AS email2', 'sortableColumn' => 'email2', 'pagerWidth' => 80, 'filter' => 'candidate.email2'), 'Home Phone' => array('select' => 'candidate.phone_home AS phoneHome', 'sortableColumn' => 'phoneHome', 'pagerWidth' => 80, 'filter' => 'candidate.phone_home'), 'Cell Phone' => array('select' => 'candidate.phone_cell AS phoneCell', 'sortableColumn' => 'phoneCell', 'pagerWidth' => 80, 'filter' => 'candidate.phone_cell'), 'Work Phone' => array('select' => 'candidate.phone_work AS phoneWork', 'sortableColumn' => 'phoneWork', 'pagerWidth' => 80), 'Address' => array('select' => 'candidate.address AS address', 'sortableColumn' => 'address', 'pagerWidth' => 250, 'alphaNavigation' => true, 'filter' => 'candidate.address'), 'City' => array('select' => 'candidate.city AS city', 'sortableColumn' => 'city', 'pagerWidth' => 80, 'alphaNavigation' => true, 'filter' => 'candidate.city'), 'State' => array('select' => 'candidate.state AS state', 'sortableColumn' => 'state', 'filterType' => 'dropDown', 'pagerWidth' => 50, 'alphaNavigation' => true, 'filter' => 'candidate.state'), 'Zip' => array('select' => 'candidate.zip AS zip', 'sortableColumn' => 'zip', 'pagerWidth' => 50, 'filter' => 'candidate.zip'), 'Misc Notes' => array('select' => 'candidate.notes AS notes', 'sortableColumn' => 'notes', 'pagerWidth' => 300, 'filter' => 'candidate.notes'), 'Web Site' => array('select' => 'candidate.web_site AS webSite', 'pagerRender' => 'return \'<a href="\'.htmlspecialchars($rsData[\'webSite\']).\'">\'.htmlspecialchars($rsData[\'webSite\']).\'</a>\';', 'sortableColumn' => 'webSite', 'pagerWidth' => 80, 'filter' => 'candidate.web_site'), 'Key Skills' => array('select' => 'candidate.key_skills AS keySkills', 'pagerRender' => 'return substr(trim($rsData[\'keySkills\']), 0, 30) . (strlen(trim($rsData[\'keySkills\'])) > 30 ? \'...\' : \'\');', 'sortableColumn' => 'keySkills', 'pagerWidth' => 210, 'filter' => 'candidate.key_skills'), 'Recent Status' => array('select' => '(
                                                    SELECT
                                                        CONCAT(
                                                            \'<a href="' . CATSUtility::getIndexName() . '?m=joborders&amp;a=show&amp;jobOrderID=\',
                                                            joborder.joborder_id,
                                                            \'" title="\',
                                                            joborder.title,
                                                            \' (\',
                                                            company.name,
                                                            \')">\',
                                                            candidate_joborder_status.short_description,
                                                            \'</a>\'
                                                        )
                                                    FROM
                                                        candidate_joborder
                                                    LEFT JOIN candidate_joborder_status
                                                        ON candidate_joborder_status.candidate_joborder_status_id = candidate_joborder.status
                                                    LEFT JOIN joborder
                                                        ON joborder.joborder_id = candidate_joborder.joborder_id
                                                    LEFT JOIN company
                                                        ON joborder.company_id = company.company_id
                                                    WHERE
                                                        candidate_joborder.candidate_id = candidate.candidate_id
                                                    ORDER BY
                                                        candidate_joborder.date_modified DESC
                                                    LIMIT 1
                                                ) AS lastStatus
                                                ', 'sort' => 'lastStatus', 'pagerRender' => 'return $rsData[\'lastStatus\'];', 'exportRender' => 'return $rsData[\'lastStatus\'];', 'pagerWidth' => 140, 'exportable' => false, 'filterHaving' => 'lastStatus', 'filterTypes' => '=~'), 'Recent Status (Extended)' => array('select' => '(
                                                    SELECT
                                                        CONCAT(
                                                            candidate_joborder_status.short_description,
                                                            \'<br />\',
                                                            \'<a href="' . CATSUtility::getIndexName() . '?m=companies&amp;a=show&amp;companyID=\',
                                                            company.company_id,
                                                            \'">\',
                                                            company.name,
                                                            \'</a> - \',
                                                            \'<a href="' . CATSUtility::getIndexName() . '?m=joborders&amp;a=show&amp;jobOrderID=\',
                                                            joborder.joborder_id,
                                                            \'">\',
                                                            joborder.title,
                                                            \'</a>\'
                                                        )
                                                    FROM
                                                        candidate_joborder
                                                    LEFT JOIN candidate_joborder_status
                                                        ON candidate_joborder_status.candidate_joborder_status_id = candidate_joborder.status
                                                    LEFT JOIN joborder
                                                        ON joborder.joborder_id = candidate_joborder.joborder_id
                                                    LEFT JOIN company
                                                        ON joborder.company_id = company.company_id
                                                    WHERE
                                                        candidate_joborder.candidate_id = candidate.candidate_id
                                                    ORDER BY
                                                        candidate_joborder.date_modified DESC
                                                    LIMIT 1
                                                ) AS lastStatusLong
                                                ', 'sortableColumn' => 'lastStatusLong', 'pagerRender' => 'return $rsData[\'lastStatusLong\'];', 'pagerWidth' => 310, 'exportable' => false, 'filterable' => false), 'Source' => array('select' => 'candidate.source AS source', 'sortableColumn' => 'source', 'pagerWidth' => 140, 'alphaNavigation' => true, 'filter' => 'candidate.source'), 'Available' => array('select' => 'DATE_FORMAT(candidate.date_available, \'%m-%d-%y\') AS dateAvailable', 'sortableColumn' => 'dateAvailable', 'pagerWidth' => 60), 'Current Employer' => array('select' => 'candidate.current_employer AS currentEmployer', 'sortableColumn' => 'currentEmployer', 'pagerWidth' => 125, 'alphaNavigation' => true, 'filter' => 'candidate.current_employer'), 'Current Pay' => array('select' => 'candidate.current_pay AS currentPay', 'sortableColumn' => 'currentPay', 'pagerWidth' => 125, 'filter' => 'candidate.current_pay', 'filterTypes' => '===>=<'), 'Desired Pay' => array('select' => 'candidate.desired_pay AS desiredPay', 'sortableColumn' => 'desiredPay', 'pagerWidth' => 125, 'filter' => 'candidate.desired_pay', 'filterTypes' => '===>=<'), 'Can Relocate' => array('select' => 'candidate.can_relocate AS canRelocate', 'pagerRender' => 'return ($rsData[\'canRelocate\'] == 0 ? \'No\' : \'Yes\');', 'exportRender' => 'return ($rsData[\'canRelocate\'] == 0 ? \'No\' : \'Yes\');', 'sortableColumn' => 'canRelocate', 'pagerWidth' => 80, 'filter' => 'candidate.can_relocate'), 'Owner' => array('select' => 'owner_user.first_name AS ownerFirstName,' . 'owner_user.last_name AS ownerLastName,' . 'CONCAT(owner_user.last_name, owner_user.first_name) AS ownerSort', 'join' => 'LEFT JOIN user AS owner_user ON candidate.owner = owner_user.user_id', 'pagerRender' => 'return StringUtility::makeInitialName($rsData[\'ownerFirstName\'], $rsData[\'ownerLastName\'], false, LAST_NAME_MAXLEN);', 'exportRender' => 'return $rsData[\'ownerFirstName\'] . " " .$rsData[\'ownerLastName\'];', 'sortableColumn' => 'ownerSort', 'pagerWidth' => 75, 'alphaNavigation' => true, 'filter' => 'CONCAT(owner_user.first_name, owner_user.last_name)'), 'Created' => array('select' => 'DATE_FORMAT(candidate.date_created, \'%m-%d-%y\') AS dateCreated', 'pagerRender' => 'return $rsData[\'dateCreated\'];', 'sortableColumn' => 'dateCreatedSort', 'pagerWidth' => 60, 'filterHaving' => 'DATE_FORMAT(candidate.date_created, \'%m-%d-%y\')'), 'Modified' => array('select' => 'DATE_FORMAT(candidate.date_modified, \'%m-%d-%y\') AS dateModified', 'pagerRender' => 'return $rsData[\'dateModified\'];', 'sortableColumn' => 'dateModifiedSort', 'pagerWidth' => 60, 'pagerOptional' => false, 'filterHaving' => 'DATE_FORMAT(candidate.date_modified, \'%m-%d-%y\')'), 'Added To List' => array('select' => 'DATE_FORMAT(saved_list_entry.date_created, \'%m-%d-%y\') AS dateAddedToList,
                                                     saved_list_entry.date_created AS dateAddedToListSort', 'pagerRender' => 'return $rsData[\'dateAddedToList\'];', 'sortableColumn' => 'dateAddedToListSort', 'pagerWidth' => 60, 'pagerOptional' => false, 'filterable' => false, 'exportable' => false), 'OwnerID' => array('select' => '', 'filter' => 'candidate.owner', 'pagerOptional' => false, 'filterable' => false, 'filterDescription' => 'Only My Candidates'), 'IsHot' => array('select' => '', 'filter' => 'candidate.is_hot', 'pagerOptional' => false, 'filterable' => false, 'filterDescription' => 'Only Hot Candidates'));
        if (US_ZIPS_ENABLED) {
            $this->_classColumns['Near Zipcode'] = array('select' => 'candidate.zip AS zip', 'filter' => 'candidate.zip', 'pagerOptional' => false, 'filterTypes' => '=@');
        }
        /* Extra fields get added as columns here. */
        $candidates = new Candidates($this->_siteID);
        $extraFieldsRS = $candidates->extraFields->getSettings();
        foreach ($extraFieldsRS as $index => $data) {
            $fieldName = $data['fieldName'];
//.........这里部分代码省略.........
开发者ID:PublicityPort,项目名称:OpenCATS,代码行数:101,代码来源:Candidates.php

示例4: __construct

 public function __construct($instanceName, $siteID, $parameters, $misc = 0)
 {
     $this->_db = DatabaseConnection::getInstance();
     $this->_siteID = $siteID;
     $this->_assignedCriterion = "";
     $this->_dataItemIDColumn = 'contact.contact_id';
     $this->_classColumns = array('First Name' => array('select' => 'contact.first_name AS firstName', 'pagerRender' => 'if ($rsData[\'isHot\'] == 1) $className =  \'jobLinkHot\'; else $className = \'jobLinkCold\'; return \'<a href="' . CATSUtility::getIndexName() . '?m=contacts&amp;a=show&amp;contactID=\'.$rsData[\'contactID\'].\'" class="\'.$className.\'">\'.htmlspecialchars($rsData[\'firstName\']).\'</a>\';', 'sortableColumn' => 'firstName', 'pagerWidth' => 75, 'pagerOptional' => false, 'alphaNavigation' => true, 'filter' => 'contact.first_name'), 'Last Name' => array('select' => 'contact.last_name AS lastName', 'sortableColumn' => 'lastName', 'pagerRender' => 'if ($rsData[\'isHot\'] == 1) $className =  \'jobLinkHot\'; else $className = \'jobLinkCold\'; return \'<a href="' . CATSUtility::getIndexName() . '?m=contacts&amp;a=show&amp;contactID=\'.$rsData[\'contactID\'].\'" class="\'.$className.\'">\'.htmlspecialchars($rsData[\'lastName\']).\'</a>\';', 'pagerWidth' => 85, 'pagerOptional' => false, 'alphaNavigation' => true, 'filter' => 'contact.last_name'), 'Company' => array('select' => 'company.name AS name,' . 'company.company_id as companyID', 'pagerRender' => 'if ($rsData[\'isHot\'] == 1) $className =  \'jobLinkHot\'; else $className = \'jobLinkCold\'; return \'<a href="' . CATSUtility::getIndexName() . '?m=companies&amp;a=show&amp;companyID=\'.$rsData[\'companyID\'].\'" class="\'.$className.\'">\'.htmlspecialchars($rsData[\'name\']).\'</a>\';', 'sortableColumn' => 'name', 'pagerWidth' => 60, 'pagerOptional' => true, 'alphaNavigation' => true, 'filter' => 'company.name'), 'Title' => array('select' => 'contact.title AS title', 'sortableColumn' => 'title', 'pagerWidth' => 140, 'alphaNavigation' => true, 'pagerOptional' => true, 'filter' => 'contact.title'), 'Department' => array('select' => 'company_department.company_department_id AS companyDepartmentID, company_department.name as department', 'join' => 'LEFT JOIN company_department on company_department.company_department_id = contact.company_department_id', 'sortableColumn' => 'department', 'pagerWidth' => 120, 'alphaNavigation' => true, 'pagerOptional' => true, 'filter' => 'company_department.department'), 'Work Phone' => array('select' => 'contact.phone_work AS workPhone', 'sortableColumn' => 'workPhone', 'pagerWidth' => 140, 'alphaNavigation' => false, 'pagerOptional' => true, 'filter' => 'contact.work_phone'), 'Cell Phone' => array('select' => 'contact.phone_cell AS cellPhone', 'sortableColumn' => 'cellPhone', 'pagerWidth' => 140, 'alphaNavigation' => false, 'pagerOptional' => true, 'filter' => 'contact.phone_cell'), 'Other Phone' => array('select' => 'contact.phone_other AS otherPhone', 'sortableColumn' => 'otherPhone', 'pagerWidth' => 140, 'alphaNavigation' => false, 'pagerOptional' => true, 'filter' => 'contact.phone_other'), 'E-Mail' => array('select' => 'contact.email1 AS email1', 'sortableColumn' => 'email1', 'pagerWidth' => 80, 'filter' => 'contact.email1'), '2nd E-Mail' => array('select' => 'contact.email2 AS email2', 'sortableColumn' => 'email2', 'pagerWidth' => 80, 'filter' => 'contact.email2'), 'Address' => array('select' => 'contact.address AS address', 'sortableColumn' => 'address', 'pagerWidth' => 250, 'alphaNavigation' => true, 'filter' => 'contact.address'), 'City' => array('select' => 'contact.city AS city', 'sortableColumn' => 'city', 'pagerWidth' => 80, 'alphaNavigation' => true, 'filter' => 'contact.city'), 'State' => array('select' => 'contact.state AS state', 'sortableColumn' => 'state', 'filterType' => 'dropDown', 'pagerWidth' => 50, 'alphaNavigation' => true, 'filter' => 'contact.state'), 'Zip' => array('select' => 'contact.zip AS zip', 'sortableColumn' => 'zip', 'pagerWidth' => 50, 'filter' => 'contact.zip'), 'Misc Notes' => array('select' => 'contact.notes AS notes', 'sortableColumn' => 'notes', 'pagerWidth' => 300, 'filter' => 'contact.notes'), 'Created' => array('select' => 'DATE_FORMAT(contact.date_created, \'%m-%d-%y\') AS dateCreated', 'pagerRender' => 'return $rsData[\'dateCreated\'];', 'sortableColumn' => 'dateCreatedSort', 'pagerWidth' => 60, 'filterHaving' => 'DATE_FORMAT(contact.date_created, \'%m-%d-%y\')'), 'Modified' => array('select' => 'DATE_FORMAT(contact.date_modified, \'%m-%d-%y\') AS dateModified', 'pagerRender' => 'return $rsData[\'dateModified\'];', 'sortableColumn' => 'dateModifiedSort', 'pagerWidth' => 60, 'pagerOptional' => false, 'filterHaving' => 'DATE_FORMAT(contact.date_modified, \'%m-%d-%y\')'), 'OwnerID' => array('select' => '', 'filter' => 'contact.owner', 'pagerOptional' => false, 'filterable' => false, 'filterDescription' => 'Only My Contacts'), 'IsHot' => array('select' => '', 'filter' => 'contact.is_hot', 'pagerOptional' => false, 'filterable' => false, 'filterDescription' => 'Only Hot Contacts'));
     if (US_ZIPS_ENABLED) {
         $this->_classColumns['Near Zipcode'] = array('select' => 'contact.zip AS zip', 'filter' => 'contact.zip', 'pagerOptional' => false, 'filterTypes' => '=@');
     }
     /* Extra fields get added as columns here. */
     $contacts = new Contacts($this->_siteID);
     $extraFieldsRS = $contacts->extraFields->getSettings();
     foreach ($extraFieldsRS as $index => $data) {
         $fieldName = $data['fieldName'];
         if (!isset($this->_classColumns[$fieldName])) {
             $columnDefinition = $contacts->extraFields->getDataGridDefinition($index, $data, $this->_db);
             /* Return false for extra fields that should not be columns. */
             if ($columnDefinition !== false) {
                 $this->_classColumns[$fieldName] = $columnDefinition;
             }
         }
     }
     parent::__construct($instanceName, $parameters, $misc);
 }
开发者ID:Hassanj343,项目名称:candidats,代码行数:25,代码来源:Contacts.php

示例5: __construct

 /**
  * @param array $array The data.
  */
 public function __construct(array $array)
 {
     $source = new \SpoonDatagridSourceArray($array);
     parent::__construct($source);
 }
开发者ID:bwgraves,项目名称:forkcms,代码行数:8,代码来源:DataGridArray.php

示例6: __construct

    public function __construct($instanceName, $siteID, $parameters, $misc)
    {
        $this->_db = DatabaseConnection::getInstance();
        $this->_siteID = $siteID;
        $this->_assignedCriterion = "";
        $this->_dataItemIDColumn = 'company.company_id';
        $this->_classColumns = array('Attachments' => array('select' => 'IF(attachment_id, 1, 0) AS attachmentPresent', 'pagerRender' => '
                                                    if ($rsData[\'attachmentPresent\'] == 1)
                                                    {
                                                        $return = \'<img src="images/paperclip.gif" alt="" width="16" height="16" title="Attachment Present" />\';
                                                    }
                                                    else
                                                    {
                                                        $return = \'<img src="images/mru/blank.gif" alt="" width="16" height="16" />\';
                                                    }

                                                    return $return;
                                                   ', 'pagerWidth' => 10, 'pagerOptional' => true, 'pagerNoTitle' => true, 'sizable' => false, 'exportable' => false, 'filterable' => false), 'Name' => array('select' => 'company.name AS name', 'pagerRender' => 'if ($rsData[\'isHot\'] == 1) $className =  \'jobLinkHot\'; else $className = \'jobLinkCold\'; return \'<a href="' . CATSUtility::getIndexName() . '?m=companies&amp;a=show&amp;companyID=\'.$rsData[\'companyID\'].\'" class="\'.$className.\'">\'.htmlspecialchars($rsData[\'name\']).\'</a>\';', 'sortableColumn' => 'name', 'pagerWidth' => 60, 'pagerOptional' => false, 'alphaNavigation' => true, 'filter' => 'company.name'), 'Jobs' => array('select' => '(
                                                            SELECT
                                                                COUNT(*)
                                                            FROM
                                                                joborder
                                                            WHERE
                                                                company_id = company.company_id
                                                            AND
                                                                site_id = ' . $this->_siteID . '
                                                        ) AS jobs', 'pagerRender' => 'if ($rsData[\'jobs\'] != 0) {return $rsData[\'jobs\'];} else {return \'\';}', 'sortableColumn' => 'jobs', 'pagerWidth' => 40, 'filterHaving' => 'jobs', 'filterTypes' => '===>=<'), 'Phone' => array('select' => 'company.phone1 AS phone', 'sortableColumn' => 'phone', 'pagerWidth' => 80, 'filter' => 'company.phone1'), 'Phone 2' => array('select' => 'company.phone2 AS phone2', 'sortableColumn' => 'phone2', 'pagerWidth' => 80, 'filter' => 'company.phone2'), 'City' => array('select' => 'company.city AS city', 'sortableColumn' => 'city', 'pagerWidth' => 80, 'alphaNavigation' => true, 'filter' => 'company.city'), 'State' => array('select' => 'company.state AS state', 'sortableColumn' => 'state', 'filterType' => 'dropDown', 'pagerWidth' => 50, 'alphaNavigation' => true, 'filter' => 'company.state'), 'Zip' => array('select' => 'company.zip AS zip', 'sortableColumn' => 'zip', 'pagerWidth' => 50, 'filter' => 'company.zip'), 'Web Site' => array('select' => 'company.url AS webSite', 'pagerRender' => 'return \'<a href="\'.htmlspecialchars($rsData[\'webSite\']).\'" target="_blank">\'.htmlspecialchars($rsData[\'webSite\']).\'</a>\';', 'sortableColumn' => 'webSite', 'pagerWidth' => 80, 'filter' => 'company.url'), 'Owner' => array('select' => 'owner_user.first_name AS ownerFirstName,' . 'owner_user.last_name AS ownerLastName,' . 'CONCAT(owner_user.last_name, owner_user.first_name) AS ownerSort', 'pagerRender' => 'return StringUtility::makeInitialName($rsData[\'ownerFirstName\'], $rsData[\'ownerLastName\'], false, LAST_NAME_MAXLEN);', 'exportRender' => 'return $rsData[\'ownerFirstName\'] . " " .$rsData[\'ownerLastName\'];', 'sortableColumn' => 'ownerSort', 'pagerWidth' => 75, 'alphaNavigation' => true, 'filter' => 'CONCAT(owner_user.first_name, owner_user.last_name)'), 'Contact' => array('select' => 'contact.first_name AS contactFirstName,' . 'contact.last_name AS contactLastName,' . 'CONCAT(contact.last_name, contact.first_name) AS contactSort,' . 'contact.contact_id AS contactID', 'pagerRender' => 'return \'<a href="' . CATSUtility::getIndexName() . '?m=contacts&amp;a=show&amp;contactID=\'.$rsData[\'contactID\'].\'">\'.StringUtility::makeInitialName($rsData[\'contactFirstName\'], $rsData[\'contactLastName\'], false, LAST_NAME_MAXLEN).\'</a>\';', 'exportRender' => 'return $rsData[\'contactFirstName\'] . " " .$rsData[\'contactLastName\'];', 'sortableColumn' => 'contactSort', 'pagerWidth' => 75, 'alphaNavigation' => true, 'filter' => 'CONCAT(contact.first_name, contact.last_name)'), 'Created' => array('select' => 'DATE_FORMAT(company.date_created, \'%m-%d-%y\') AS dateCreated', 'pagerRender' => 'return $rsData[\'dateCreated\'];', 'sortableColumn' => 'dateCreatedSort', 'pagerWidth' => 60, 'filterHaving' => 'DATE_FORMAT(company.date_created, \'%m-%d-%y\')'), 'Modified' => array('select' => 'DATE_FORMAT(company.date_modified, \'%m-%d-%y\') AS dateModified', 'pagerRender' => 'return $rsData[\'dateModified\'];', 'sortableColumn' => 'dateModifiedSort', 'pagerWidth' => 60, 'pagerOptional' => false, 'filterHaving' => 'DATE_FORMAT(company.date_modified, \'%m-%d-%y\')'), 'Misc Notes' => array('select' => 'company.notes AS notes', 'sortableColumn' => 'notes', 'pagerWidth' => 300, 'filter' => 'company.notes'), 'OwnerID' => array('select' => '', 'filter' => 'company.owner', 'pagerOptional' => false, 'filterable' => false, 'filterDescription' => 'Only My Companies'), 'IsHot' => array('select' => '', 'filter' => 'company.is_hot', 'pagerOptional' => false, 'filterable' => false, 'filterDescription' => 'Only Hot Companies'));
        if (US_ZIPS_ENABLED) {
            $this->_classColumns['Near Zipcode'] = array('select' => 'company.zip AS zip', 'filter' => 'company.zip', 'pagerOptional' => false, 'filterTypes' => '=@');
        }
        /* Extra fields get added as columns here. */
        $companies = new Companies($this->_siteID);
        $extraFieldsRS = $companies->extraFields->getSettings();
        foreach ($extraFieldsRS as $index => $data) {
            $fieldName = $data['fieldName'];
            if (!isset($this->_classColumns[$fieldName])) {
                $columnDefinition = $companies->extraFields->getDataGridDefinition($index, $data, $this->_db);
                /* Return false for extra fields that should not be columns. */
                if ($columnDefinition !== false) {
                    $this->_classColumns[$fieldName] = $columnDefinition;
                }
            }
        }
        parent::__construct($instanceName, $parameters, $misc);
    }
开发者ID:rankinp,项目名称:OpenCATS,代码行数:45,代码来源:Companies.php

示例7: __construct

    public function __construct($instanceName, $siteID, $parameters, $misc)
    {
        $this->_db = DatabaseConnection::getInstance();
        $this->_siteID = $siteID;
        $this->_assignedCriterion = "";
        $this->_dataItemIDColumn = 'joborder.joborder_id';
        $this->_classColumns = array('Attachments' => array('select' => 'IF(attachment_id, 1, 0) AS attachmentPresent', 'pagerRender' => '
                                                    if ($rsData[\'attachmentPresent\'] == 1)
                                                    {
                                                        $return = \'<img src="images/paperclip.gif" alt="" width="16" height="16" title="Attachment Present" />\';
                                                    }
                                                    else
                                                    {
                                                        $return = \'<img src="images/mru/blank.gif" alt="" width="16" height="16" />\';
                                                    }

                                                    return $return;
                                                   ', 'pagerWidth' => 10, 'pagerOptional' => true, 'pagerNoTitle' => true, 'sizable' => false, 'exportable' => false, 'filterable' => false), 'ID' => array('pagerRender' => 'return $rsData[\'jobOrderID\'];', 'sortableColumn' => 'jobOrderID', 'pagerWidth' => 33, 'pagerOptional' => true, 'alphaNavigation' => false, 'exportColumnHeaderText' => 'id', 'filter' => 'joborder.joborder_id', 'filterTypes' => '===>=<'), 'Company Job ID' => array('select' => 'joborder.client_job_id AS cpyJobID', 'sortableColumn' => 'cpyJobID', 'pagerWidth' => 65, 'pagerOptional' => true, 'alphaNavigation' => false, 'exportColumnHeaderText' => 'Company Job id', 'columnHeaderText' => 'Cpy Job ID', 'filter' => 'joborder.client_job_id', 'filterTypes' => '===>=<'), 'Title' => array('select' => 'joborder.title AS title', 'pagerRender' => 'if ($rsData[\'isHot\'] == 1) $className =  \'jobLinkHot\'; else $className = \'jobLinkCold\'; return \'<a href="' . CATSUtility::getIndexName() . '?m=joborders&amp;a=show&amp;jobOrderID=\'.$rsData[\'jobOrderID\'].\'" class="\'.$className.\'">\'.htmlspecialchars($rsData[\'title\']).\'</a>\';', 'sortableColumn' => 'title', 'pagerWidth' => 165, 'pagerOptional' => false, 'alphaNavigation' => true, 'filter' => 'joborder.title'), 'Company' => array('select' => 'company.name AS companyName,
                                                          company.company_id AS companyID', 'pagerRender' => 'return \'<a href="' . CATSUtility::getIndexName() . '?m=companies&amp;a=show&amp;companyID=\'.$rsData[\'companyID\'].\'">\'.htmlspecialchars($rsData[\'companyName\']).\'</a>\';', 'sortableColumn' => 'companyName', 'pagerWidth' => 125, 'pagerOptional' => true, 'alphaNavigation' => true, 'filter' => 'company.name'), 'Department' => array('select' => 'company_department.name AS department', 'join' => 'LEFT JOIN company_department ON company_department.company_department_id = joborder.company_department_id', 'pagerRender' => 'return $rsData[\'department\'];', 'sortableColumn' => 'department', 'pagerWidth' => 95, 'pagerOptional' => true, 'alphaNavigation' => true, 'filter' => 'company_department.name'), 'Type' => array('select' => 'joborder.type AS type', 'pagerRender' => 'return $rsData[\'type\'];', 'sortableColumn' => 'type', 'pagerWidth' => 45, 'pagerOptional' => true, 'alphaNavigation' => false, 'exportRender' => 'return $rsData[\'type\'];', 'filter' => 'joborder.type'), 'Status' => array('select' => 'joborder.status AS status', 'pagerRender' => 'return $rsData[\'status\'];', 'exportRender' => 'return $rsData[\'status\'];', 'sortableColumn' => 'status', 'pagerWidth' => 45, 'pagerOptional' => true, 'alphaNavigation' => false, 'filter' => 'joborder.status'), 'Age' => array('select' => 'DATEDIFF(NOW(), joborder.date_created) AS daysOld', 'pagerRender' => 'return $rsData[\'daysOld\'];', 'sortableColumn' => 'daysOld', 'pagerWidth' => 45, 'pagerOptional' => true, 'alphaNavigation' => false, 'filterHaving' => 'daysOld', 'filterTypes' => '===>=<'), 'Created' => array('select' => 'DATE_FORMAT(joborder.date_created, \'%m-%d-%y\') AS dateCreated', 'pagerRender' => 'return $rsData[\'dateCreated\'];', 'sortableColumn' => 'dateCreatedSort', 'pagerWidth' => 60, 'filterHaving' => 'DATE_FORMAT(joborder.date_created, \'%m-%d-%y\')'), 'Modified' => array('select' => 'DATE_FORMAT(joborder.date_modified, \'%m-%d-%y\') AS dateModified', 'pagerRender' => 'return $rsData[\'dateModified\'];', 'sortableColumn' => 'dateModifiedSort', 'pagerWidth' => 60, 'pagerOptional' => true, 'filterHaving' => 'DATE_FORMAT(joborder.date_modified, \'%m-%d-%y\')'), 'Not Contacted' => array('select' => '(
                                                              SELECT
                                                                  COUNT(*)
                                                              FROM
                                                                  candidate_joborder
                                                              WHERE
                                                                  joborder_id = joborder.joborder_id
                                                              AND
                                                                  (status = ' . PIPELINE_STATUS_NOCONTACT . ' OR status = ' . PIPELINE_STATUS_NOSTATUS . ')
                                                              AND
                                                                  site_id = ' . $this->_siteID . '
                                                          ) AS notContacted', 'pagerRender' => 'return $rsData[\'notContacted\'];', 'sortableColumn' => 'notContacted', 'columnHeaderText' => 'NC', 'pagerWidth' => 25, 'filterHaving' => 'notContacted', 'filterTypes' => '===>=<'), 'Submitted' => array('select' => '(
                                                            SELECT
                                                                COUNT(*)
                                                            FROM
                                                                candidate_joborder_status_history
                                                            WHERE
                                                                joborder_id = joborder.joborder_id
                                                            AND
                                                                status_to = ' . PIPELINE_STATUS_SUBMITTED . '
                                                            AND
                                                                site_id = ' . $this->_siteID . '
                                                        ) AS submitted', 'pagerRender' => 'return $rsData[\'submitted\'];', 'sortableColumn' => 'submitted', 'columnHeaderText' => 'S', 'pagerWidth' => 25, 'filterHaving' => 'submitted', 'filterTypes' => '===>=<'), 'Pipeline' => array('select' => '(
                                                            SELECT
                                                                COUNT(*)
                                                            FROM
                                                                candidate_joborder
                                                            WHERE
                                                                joborder_id = joborder.joborder_id
                                                            AND
                                                                site_id = ' . $this->_siteID . '
                                                        ) AS pipeline', 'pagerRender' => 'return $rsData[\'pipeline\'];', 'sortableColumn' => 'pipeline', 'columnHeaderText' => 'P', 'pagerWidth' => 25, 'filterHaving' => 'pipeline', 'filterTypes' => '===>=<'), 'Interviews' => array('select' => '(
                                                             SELECT
                                                                 COUNT(*)
                                                             FROM
                                                                 candidate_joborder_status_history
                                                             WHERE
                                                                 joborder_id = joborder.joborder_id
                                                             AND
                                                                 status_to = ' . PIPELINE_STATUS_INTERVIEWING . '
                                                             AND
                                                                 site_id = ' . $this->_siteID . '
                                                         ) AS interviewingCount', 'pagerRender' => 'return $rsData[\'interviewingCount\'];', 'sortableColumn' => 'interviewingCount', 'columnHeaderText' => 'I', 'pagerWidth' => 25, 'filterHaving' => 'interviewingCount', 'filterTypes' => '===>=<'), 'Recruiter' => array('select' => 'recruiter_user.first_name AS recruiterFirstName,' . 'recruiter_user.last_name AS recruiterLastName,' . 'CONCAT(recruiter_user.last_name, recruiter_user.first_name) AS recruiterSort', 'join' => 'LEFT JOIN user AS recruiter_user ON joborder.recruiter = recruiter_user.user_id', 'pagerRender' => 'return StringUtility::makeInitialName($rsData[\'recruiterFirstName\'], $rsData[\'recruiterLastName\'], false, LAST_NAME_MAXLEN);', 'exportRender' => 'return $rsData[\'recruiterFirstName\'] . " " .$rsData[\'recruiterLastName\'];', 'sortableColumn' => 'recruiterSort', 'pagerWidth' => 75, 'alphaNavigation' => true, 'filter' => 'CONCAT(recruiter_user.first_name, recruiter_user.last_name)'), 'Contact' => array('select' => 'contact.first_name AS contactFirstName,' . 'contact.last_name AS contactLastName,' . 'CONCAT(contact.last_name, contact.first_name) AS contactSort,' . 'contact.contact_id AS contactID', 'pagerRender' => 'return \'<a href="' . CATSUtility::getIndexName() . '?m=contacts&amp;a=show&amp;contactID=\'.$rsData[\'contactID\'].\'">\'.StringUtility::makeInitialName($rsData[\'contactFirstName\'], $rsData[\'contactLastName\'], false, LAST_NAME_MAXLEN).\'</a>\';', 'exportRender' => 'return $rsData[\'contactFirstName\'] . " " .$rsData[\'contactLastName\'];', 'sortableColumn' => 'contactSort', 'pagerWidth' => 75, 'alphaNavigation' => true, 'filter' => 'CONCAT(contact.first_name, contact.last_name)'), 'Contact Phone' => array('select' => 'contact.phone_work AS contactPhone', 'pagerRender' => 'return $rsData[\'contactPhone\'];', 'exportRender' => 'return $rsData[\'contactPhone\'];', 'sortableColumn' => 'contactPhone', 'pagerWidth' => 85, 'alphaNavigation' => false, 'filter' => 'contact.phone_work'), 'City' => array('select' => 'joborder.city AS locationCity', 'pagerRender' => 'return $rsData[\'locationCity\'];', 'exportRender' => 'return $rsData[\'locationCity\'];', 'sortableColumn' => 'locationCity', 'pagerWidth' => 65, 'alphaNavigation' => true, 'filter' => 'joborder.city'), 'State' => array('select' => 'joborder.state AS locationState', 'pagerRender' => 'return $rsData[\'locationState\'];', 'exportRender' => 'return $rsData[\'locationState\'];', 'sortableColumn' => 'locationState', 'pagerWidth' => 65, 'alphaNavigation' => true, 'filter' => 'joborder.state'), 'Max Rate' => array('select' => 'joborder.rate_max AS maxRate', 'pagerRender' => 'return $rsData[\'maxRate\'];', 'exportRender' => 'return $rsData[\'maxRate\'];', 'sortableColumn' => 'maxRate', 'pagerWidth' => 85, 'alphaNavigation' => false, 'filter' => 'joborder.rate_max', 'filterTypes' => '===>=<'), 'Salary' => array('select' => 'joborder.salary AS salary', 'pagerRender' => 'return $rsData[\'salary\'];', 'exportRender' => 'return $rsData[\'salary\'];', 'sortableColumn' => 'salary', 'pagerWidth' => 85, 'alphaNavigation' => false, 'filter' => 'joborder.salary', 'filterTypes' => '===>=<'), 'Duration' => array('select' => 'joborder.duration AS duration', 'pagerRender' => 'return $rsData[\'duration\'];', 'exportRender' => 'return $rsData[\'duration\'];', 'sortableColumn' => 'duration', 'pagerWidth' => 85, 'alphaNavigation' => false, 'filter' => 'joborder.duration', 'filterTypes' => '===>=<'), 'Openings' => array('select' => 'joborder.openings_available AS openingsAvailable', 'pagerRender' => 'return $rsData[\'openingsAvailable\'];', 'exportRender' => 'return $rsData[\'openingsAvailable\'];', 'sortableColumn' => 'openingsAvailable', 'pagerWidth' => 85, 'alphaNavigation' => false, 'filter' => 'joborder.openings_available', 'filterTypes' => '===>=<'), 'Misc Notes' => array('select' => 'joborder.notes AS notes', 'sortableColumn' => 'notes', 'pagerWidth' => 300, 'filter' => 'joborder.notes'), 'OwnerID' => array('select' => '', 'filter' => 'joborder.owner, joborder.recruiter', 'filterInList' => true, 'pagerOptional' => false, 'filterable' => false, 'filterDescription' => 'Only My Job Orders'), 'IsHot' => array('select' => '', 'filter' => 'joborder.is_hot', 'pagerOptional' => false, 'filterable' => false, 'filterDescription' => 'Only Hot Job Orders'));
        if (!eval(Hooks::get('JOBORDERS_DATAGRID_COLUMNS'))) {
            return;
        }
        /* Extra fields get added as columns here. */
        $jobOrders = new JobOrders($this->_siteID);
        $extraFieldsRS = $jobOrders->extraFields->getSettings();
        foreach ($extraFieldsRS as $index => $data) {
            $fieldName = $data['fieldName'];
            if (!isset($this->_classColumns[$fieldName])) {
                $columnDefinition = $jobOrders->extraFields->getDataGridDefinition($index, $data, $this->_db);
                /* Return false for extra fields that should not be columns. */
                if ($columnDefinition !== false) {
                    $this->_classColumns[$fieldName] = $columnDefinition;
                }
            }
        }
        parent::__construct($instanceName, $parameters, $misc);
    }
开发者ID:Hassanj343,项目名称:candidats,代码行数:79,代码来源:JobOrders.php


注:本文中的DataGrid::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。