public function paramRules() { $workflows = Workflow::getList(false); // no "none" options $workflowIds = array_keys($workflows); $stages = count($workflowIds) ? Workflow::getStagesByNumber($workflowIds[0]) : array('---'); return array('title' => $this->title, 'modelClass' => 'modelClass', 'modelRequired' => 1, 'options' => array(array('name' => 'workflowId', 'label' => 'Process', 'type' => 'dropdown', 'options' => $workflows), array('name' => 'stageNumber', 'label' => 'Stage', 'type' => 'dependentDropdown', 'dependency' => 'workflowId', 'options' => $stages, 'optionsSource' => Yii::app()->createUrl('/workflow/workflow/getStageNames')))); }
public function paramRules() { $workflows = Workflow::getList(false); // no "none" options $workflowIds = array_keys($workflows); $stages = count($workflowIds) ? Workflow::getStages($workflowIds[0]) : array('---'); return array('title' => Yii::t('studio', $this->title), 'modelRequired' => 1, 'options' => array(array('name' => 'workflowId', 'label' => 'Workflow', 'type' => 'dropdown', 'options' => $workflows), array('name' => 'stageNumber', 'label' => 'Stage', 'type' => 'dropdown', 'options' => $stages))); }
public function paramRules() { $workflows = Workflow::getList(false); // no "none" options $workflowIds = array_keys($workflows); $stages = count($workflowIds) ? Workflow::getStagesByNumber($workflowIds[0]) : array('---'); $stages = array('' => Yii::t('app', 'Any')) + $stages; return array('title' => Yii::t('studio', $this->title), 'modelClass' => 'modelClass', 'options' => array(array('name' => 'workflowId', 'label' => Yii::t('studio', 'Process'), 'type' => 'dropdown', 'options' => $workflows), array('name' => 'stageNumber', 'label' => Yii::t('studio', 'Stage'), 'type' => 'dependentDropdown', 'dependency' => 'workflowId', 'options' => $stages, 'optional' => true, 'optionsSource' => Yii::app()->createUrl('/workflow/workflow/getStageNames')), array('name' => 'modelClass', 'label' => Yii::t('studio', 'Associated Record Type'), 'type' => 'dropdown', 'options' => X2Model::getModelTypesWhichSupportWorkflow(true)))); }
/** * Displays workflow table/funnel diagram or the pipeline * @param int $id id of the workflow record */ public function actionView($id) { // check for optional GET param, if it's not set, use the profile settings if (!isset($_GET['perStageWorkflowView'])) { $perStageWorkflowView = Yii::app()->params->profile->miscLayoutSettings['perStageWorkflowView']; } else { $perStageWorkflowView = $_GET['perStageWorkflowView']; if ($perStageWorkflowView !== Yii::app()->params->profile->miscLayoutSettings['perStageWorkflowView']) { $perStageWorkflowView = $perStageWorkflowView === 'true' ? true : false; Profile::setMiscLayoutSetting('perStageWorkflowView', $perStageWorkflowView, true); } } $users = isset($_GET['users']) ? $_GET['users'] : ''; if (isset($_GET['stage']) && is_numeric($_GET['stage'])) { $viewStage = $_GET['stage']; } else { $viewStage = null; } // add workflow to user's recent item list User::addRecentItem('w', $id, Yii::app()->user->getId()); $workflows = Workflow::getList(false); // no "none" options $this->render('view', array_merge(array('perStageWorkflowView' => $perStageWorkflowView, 'workflows' => $workflows), $perStageWorkflowView ? $this->getPerStageViewParams($id, $viewStage, $users) : $this->getDragAndDropViewParams($id, $users))); }
</b></div> <div class="detail-form"><?php echo $form->hiddenField($model, 'accountName'); $this->widget('zii.widgets.jui.CJuiAutoComplete', array('name' => 'companyAutoComplete', 'value' => $model->accountName, 'source' => $this->createUrl('contacts/getTerms'), 'htmlOptions' => array('size' => 35, 'maxlength' => 100, 'tabindex' => 3), 'options' => array('minLength' => '2', 'select' => 'js:function( event, ui ) { $("#' . CHtml::activeId($model, 'accountId') . '").val(ui.item.id); $(this).val(ui.item.value); $("#' . CHtml::activeId($model, 'accountName') . '").val(ui.item.value); return false; }'))); echo $form->hiddenField($model, 'accountId'); ?> </div> </td> </tr> <?php $workflowList = Workflow::getList(); ?> <tr id="workflow-row"> <td class="label" width="20%"><?php echo $model->getAttributeLabel('status'); ?> </td> <td id="status" onclick="showField(this,true);"> <div class="detail-field"><?php echo Yii::t('quotes', $model->status); ?> </div> <div class="detail-form"><?php echo $form->dropDownList($model, 'status', Quote::statusList()); ?> </div>
} ?> <div class="ccm-ui" id="ccm-permission-detail"> <form id="ccm-permissions-detail-form" onsubmit="return ccm_submitPermissionsDetailForm()" method="post" action="<?php echo $permissionKey->getPermissionAssignmentObject()->getPermissionKeyToolsURL(); ?> "> <input type="hidden" name="paID" value="<?php echo $pa->getPermissionAccessID(); ?> " /> <? $workflows = Workflow::getList();?> <? Loader::element('permission/message_list'); ?> <? $tabs = array(); if ($permissionKey->hasCustomOptionsForm() || ($permissionKey->canPermissionKeyTriggerWorkflow() && count($workflows) > 0)) { ?> <? $tabs[] = array('access-types', t('Access'), true); if ($permissionKey->canPermissionKeyTriggerWorkflow() && count($workflows) > 0) { $tabs[] = array('workflow', t('Workflow')); } if ($permissionKey->hasCustomOptionsForm()) { $tabs[] = array('custom-options', t('Details')); }
public function view() { $workflows = Workflow::getList(); $this->set('workflows', $workflows); }
public function paramRules() { $workflows = Workflow::getList(false); // no "none" options return array('title' => Yii::t('studio', $this->title), 'modelClass' => 'modelClass', 'options' => array(array('name' => 'workflowId', 'label' => Yii::t('studio', 'Process'), 'type' => 'dropdown', 'options' => $workflows), array('name' => 'modelClass', 'label' => Yii::t('studio', 'Associated Record Type'), 'type' => 'dropdown', 'options' => X2Model::getModelTypesWhichSupportWorkflow(true)))); }
public function renderWorkflowSelector() { $workflowList = Workflow::getList(); echo CHtml::dropDownList('workflowId', $this->getCurrentWorkflow(), $workflowList, array('ajax' => array('type' => 'GET', 'url' => CHtml::normalizeUrl(array('/workflow/workflow/getWorkflow', 'modelId' => $this->model->id, 'type' => $this->getAssociationType())), 'update' => '#workflow-diagram', 'data' => array('workflowId' => 'js:$(this).val()')), 'id' => 'workflowSelector', 'class' => 'x2-select')); }