本文整理汇总了PHP中Workflow::getPipelineListItemColors方法的典型用法代码示例。如果您正苦于以下问题:PHP Workflow::getPipelineListItemColors方法的具体用法?PHP Workflow::getPipelineListItemColors怎么用?PHP Workflow::getPipelineListItemColors使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Workflow
的用法示例。
在下文中一共展示了Workflow::getPipelineListItemColors方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDragAndDropViewParams
private function getDragAndDropViewParams($id, $users = '')
{
$model = $this->loadModel($id);
$modelType = isset($_GET['modelType']) ? self::parseModelType($_GET['modelType']) : '';
$dateRange = self::getDateRange();
$expectedCloseDateDateRange = self::getDateRange('expectedCloseDateStart', 'expectedCloseDateEnd', 'expectedCloseDateRange');
$memberListContainerSelectors = array();
$stageValues = Workflow::getStageValues($model, $users, $modelType, $dateRange, $expectedCloseDateDateRange);
$stageCount = count($model->stages);
for ($i = 1; $i <= $stageCount; $i++) {
$memberListContainerSelectors[] = '#workflow-stage-' . $i . ' .items';
}
$workflowStatus = Workflow::getWorkflowStatus($id);
$stagePermissions = Workflow::getStagePermissions($workflowStatus);
$stagesWhichRequireComments = Workflow::getStageCommentRequirements($workflowStatus);
$stageNames = Workflow::getStageNames($workflowStatus);
$colors = $model->getWorkflowStageColors($stageCount, true);
return array('model' => $model, 'modelType' => $modelType, 'dateRange' => $dateRange, 'expectedCloseDateDateRange' => $expectedCloseDateDateRange, 'users' => $users, 'colors' => $colors, 'listItemColors' => Workflow::getPipelineListItemColors($colors), 'memberListContainerSelectors' => $memberListContainerSelectors, 'stagePermissions' => $stagePermissions, 'stagesWhichRequireComments' => $stagesWhichRequireComments, 'stageNames' => $stageNames, 'stageValues' => $stageValues);
}
示例2: count
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* X2Engine" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by X2Engine".
*****************************************************************************************/
Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl . '/js/WorkflowDragAndDropSortable.js', CClientScript::POS_END);
Yii::app()->clientScript->registerScriptFile($this->module->assetsUrl . '/js/WorkflowManagerBase.js', CClientScript::POS_END);
Yii::app()->clientScript->registerScriptFile($this->module->assetsUrl . '/js/DragAndDropViewManager.js', CClientScript::POS_END);
Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl . '/js/QtipManager.js', CClientScript::POS_END);
Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl . '/js/X2GridView/X2GridViewQtipManager.js', CClientScript::POS_END);
$listItemColors = Workflow::getPipelineListItemColors($colors, true);
$listItemColorCss = '';
for ($i = 1; $i <= count($listItemColors); ++$i) {
$listItemColorCss .= "#workflow-stage-{$i} .stage-member-container {\n background-color: " . $listItemColors[$i - 1][0] . ";\n }\n #workflow-stage-{$i} .stage-member-container:hover {\n background-color: " . $listItemColors[$i - 1][1] . ";\n }";
}
Yii::app()->clientScript->registerCss('stageMemberColorCss', $listItemColorCss);
$stages = $model->stages;
Yii::app()->clientScript->registerScript('dragAndDropScript', "\nx2.dragAndDropViewManager = new x2.DragAndDropViewManager ({\n workflowId: " . $model->id . ",\n currency: '" . Yii::app()->params->currency . "',\n stageCount: " . count($stages) . ",\n connectWithClass: '.stage-members-container',\n memberListContainerSelectors: " . CJSON::encode($memberListContainerSelectors) . ",\n memberContainerSelector: '.stage-member-container',\n memberContainerSelector: '.stage-member-container',\n moveFromStageAToStageBUrl: '" . Yii::app()->createUrl('/workflow/workflow/moveFromStageAToStageB') . "',\n completeStageUrl: '" . Yii::app()->createUrl('/workflow/workflow/completeStage') . "',\n revertStageUrl: '" . Yii::app()->createUrl('/workflow/workflow/revertStage') . "',\n startStageUrl: '" . Yii::app()->createUrl('/workflow/workflow/ajaxAddADeal') . "',\n ajaxGetModelAutocompleteUrl: '" . Yii::app()->controller->createUrl('ajaxGetModelAutocomplete') . "',\n stagePermissions: " . CJSON::encode($stagePermissions) . ",\n stagesWhichRequireComments: " . CJSON::encode($stagesWhichRequireComments) . " ,\n stageNames: " . CJSON::encode($stageNames) . ",\n translations: " . CJSON::encode(array('Stage {n}' => addslashes(Yii::t('workflow', 'Stage {n}')), 'Save' => addslashes(Yii::t('app', 'Save')), 'Loading...' => addslashes(Yii::t('app', 'Loading...')), 'deal' => addslashes(Yii::t('app', 'deal')), 'deals' => addslashes(Yii::t('app', 'deals')), 'Submit' => addslashes(Yii::t('app', 'Submit')), 'Comments Required' => addslashes(Yii::t('app', 'Comments Required')), 'Add a Deal' => addslashes(Yii::t('app', 'Add a Deal')), 'Edit' => addslashes(Yii::t('app', 'Edit')), 'Cancel' => addslashes(Yii::t('app', 'Cancel')), 'Close' => addslashes(Yii::t('app', 'Close')), 'No results found.' => addslashes(Yii::t('app', 'No results found.')), 'addADealError' => addslashes(Yii::t('app', 'Deal could not be added: ')), 'permissionsError' => addslashes(Yii::t('workflow', 'You do not have permission to perform that stage change.')))) . ",\n getStageDetailsUrl: '" . CHtml::normalizeUrl(array('/workflow/workflow/getStageDetails')) . "',\n stageListItemColors: " . CJSON::encode(array_map(function ($a) {
return $a[0];
}, $listItemColors)) . "\n});\n\n", CClientScript::POS_READY);
?>
<!-- dialog to contain Workflow Stage Details-->
<div id="workflowStageDetails"></div>
<!-- used to set up the add a deal form -->
示例3: getDragAndDropViewParams
private function getDragAndDropViewParams($id, $users = '')
{
$model = $this->loadModel($id);
if (isset($_GET['modelType'])) {
$modelType = $_GET['modelType'];
} elseif (!empty($model->financialModel)) {
if (X2Model::getModelName($model->financialModel)) {
$modelType = $model->financialModel;
} else {
$modelType = 'contacts';
}
} else {
$modelType = 'contacts';
}
$dateRange = self::getDateRange();
$memberListContainerSelectors = array();
$stageCount = count($model->stages);
for ($i = 1; $i <= $stageCount; $i++) {
$memberListContainerSelectors[] = '#workflow-stage-' . $i . ' .items';
}
$workflowStatus = Workflow::getWorkflowStatus($id);
$stagePermissions = Workflow::getStagePermissions($workflowStatus);
$stagesWhichRequireComments = Workflow::getStageCommentRequirements($workflowStatus);
$stageNames = Workflow::getStageNames($workflowStatus);
$colors = $model->getWorkflowStageColors($stageCount, true);
$stageCounts = Workflow::getStageCounts($workflowStatus, $dateRange, $users, $modelType);
$stageValues = Workflow::getStageValues($workflowStatus, $dateRange, $users, $modelType);
return array('model' => $model, 'modelType' => $modelType, 'dateRange' => $dateRange, 'users' => $users, 'colors' => $colors, 'listItemColors' => Workflow::getPipelineListItemColors($colors), 'memberListContainerSelectors' => $memberListContainerSelectors, 'stagePermissions' => $stagePermissions, 'stagesWhichRequireComments' => $stagesWhichRequireComments, 'stageNames' => $stageNames, 'stageCounts' => $stageCounts, 'stageValues' => $stageValues);
}