コード例 #1
0
ファイル: _dragAndDropView.php プロジェクト: tymiles003/X2CRM
        background: -webkit-linear-gradient(top,    ' . $colorStr1 . ' 0%, ' . $colorStr2 . ' 100%);
        background: -o-linear-gradient(top,        ' . $colorStr1 . ' 0%, ' . $colorStr2 . ' 100%);
        background: -ms-linear-gradient(top,        ' . $colorStr1 . ' 0%, ' . $colorStr2 . ' 100%);
        background: linear-gradient(to bottom, ' . $colorStr1 . ' 0%, ' . $colorStr2 . ' 100%);';
}
for ($i = 0; $i < count($stages); ++$i) {
    $stage = $stages[$i];
    ?>
    <div class='stage-members'>
    <div class='stage-member-staging-area'></div>
    <?php 
    $this->widget('zii.widgets.CListView', array('pager' => array('class' => 'ext.infiniteScroll.IasPager', 'rowSelector' => '.stage-member-container', 'listViewId' => 'workflow-stage-' . ($i + 1), 'header' => '', 'options' => array('onRenderComplete' => 'js:function(){
                    x2.dragAndDropViewManager.refresh ();
                }', 'history' => false)), 'id' => 'workflow-stage-' . ($i + 1), 'dataProvider' => $this->getStageMemberDataProvider($modelType, $model->id, $dateRange, $i + 1, $users), 'itemView' => '_dragAndDropItemView', 'viewData' => array('modelTypes' => $modelTypes, 'recordNames' => $recordNames, 'dummyPartial' => false, 'recordType' => $modelType, 'workflow' => $model), 'template' => '<div class="stage-list-title" style="' . $colorGradients[$i] . '">' . '<h2>' . $stage['name'] . '</h2>
                <div class="stage-title-row">
                <div class="total-projected-stage-value">' . (is_null($stageValues[$i]) ? '' : Formatter::formatCurrency($stageValues[$i])) . '</div>
                <div class="total-stage-deals">
                    <span class="stage-deals-num">' . $stageCounts[$i] . '</span>
                    <span>' . ($stageCounts[$i] === 1 ? Yii::t('workflow', 'deal') : Yii::t('workflow', 'deals')) . '</span>
                </div>
                <img class="workflow-stage-arrow" 
                 src="' . Yii::app()->theme->getBaseUrl() . "/images/workflowStageArrow.png" . '" />
            </div>
            {pager}</div>{items}', 'itemsCssClass' => 'items stage-members-container', 'afterAjaxUpdate' => 'function (id, data) {
            x2.dragAndDropViewManager.refresh ();
        }'));
    ?>
    </div>
    <?php 
}
?>
コード例 #2
0
ファイル: _dragAndDropView.php プロジェクト: keyeMyria/CRM
        background: -webkit-linear-gradient(top,    ' . $colorStr1 . ' 0%, ' . $colorStr2 . ' 100%);
        background: -o-linear-gradient(top,        ' . $colorStr1 . ' 0%, ' . $colorStr2 . ' 100%);
        background: -ms-linear-gradient(top,        ' . $colorStr1 . ' 0%, ' . $colorStr2 . ' 100%);
        background: linear-gradient(to bottom, ' . $colorStr1 . ' 0%, ' . $colorStr2 . ' 100%);';
}
for ($i = 0; $i < count($stages); ++$i) {
    $stage = $stages[$i];
    ?>
    <div class='stage-members'>
    <div class='stage-member-staging-area'></div>
    <?php 
    $this->widget('zii.widgets.CListView', array('pager' => array('class' => 'ext.infiniteScroll.IasPager', 'rowSelector' => '.stage-member-container', 'listViewId' => 'workflow-stage-' . ($i + 1), 'header' => '', 'options' => array('onRenderComplete' => 'js:function(){
                    x2.dragAndDropViewManager.refresh ();
                }', 'history' => false)), 'id' => 'workflow-stage-' . ($i + 1), 'dataProvider' => $this->getStageMemberDataProviderMixed($model->id, $dateRange, $expectedCloseDateDateRange, $i + 1, $users, $modelType), 'itemView' => '_dragAndDropItemView', 'viewData' => array('modelTypes' => $modelTypes, 'recordNames' => $recordNames, 'dummyPartial' => false), 'template' => '<div class="stage-list-title" style="' . $colorGradients[$i] . '">' . '<h2>' . $stage['name'] . '</h2>
                <div class="stage-title-row">
                <div class="total-projected-stage-value">' . Formatter::formatCurrency($stageValues[$i][1]) . '</div>
                <div class="total-stage-deals">
                    <span class="stage-deals-num">' . $stageValues[$i][3] . '</span>
                    <span>' . ($stageValues[$i][3] === 1 ? Yii::t('workflow', 'deal') : Yii::t('workflow', 'deals')) . '</span>
                </div>
                <img class="workflow-stage-arrow" 
                 src="' . Yii::app()->theme->getBaseUrl() . "/images/workflowStageArrow.png" . '" />
            </div>
            {pager}</div>{items}', 'itemsCssClass' => 'items stage-members-container', 'afterAjaxUpdate' => 'function (id, data) {
            x2.dragAndDropViewManager.refresh ();
        }'));
    ?>
    </div>
    <?php 
}
?>
コード例 #3
0
ファイル: WorkflowController.php プロジェクト: shuvro35/X2CRM
 public function actionGetStageValue($id, $stage, $users, $modelType, $start, $end)
 {
     $modelType = self::parseModelType($modelType);
     $dateRange = self::getDateRange();
     $expectedCloseDateDateRange = self::getDateRange('expectedCloseDateStart', 'expectedCloseDateEnd', 'expectedCloseDateRange');
     $workflow = Workflow::model()->findByPk($id);
     if ($workflow !== null) {
         list($totalValue, $projectedValue, $currentAmount, $count) = Workflow::getStageValue($id, $stage, $users, $modelType, $dateRange, $expectedCloseDateDateRange);
         $this->renderPartial('_dataSummary', array('stageName' => $workflow->getStageName($stage), 'totalValue' => Formatter::formatCurrency($totalValue), 'projectedValue' => Formatter::formatCurrency($projectedValue), 'currentAmount' => Formatter::formatCurrency($currentAmount), 'count' => $count));
     }
 }
コード例 #4
0
 /**
  * Render funnel for workflow view 
  */
 public function renderFunnelView($workflowId, $dateRange, $users = '', $modelId = 0, $modelType = '')
 {
     $workflowStatus = Workflow::getWorkflowStatus($workflowId, $modelId, $modelType);
     $stageCounts = Workflow::getStageCounts($workflowStatus, $dateRange, $users, $modelType);
     $stageValues = Workflow::getStageValues($workflowStatus, $dateRange, $users, $modelType);
     $model = $this->loadModel($workflowId);
     $colors = $model->getWorkflowStageColors(sizeof($stageCounts));
     $stageNameLinks = Workflow::getStageNameLinks($workflowStatus, $dateRange, $users);
     $this->renderPartial('_funnel', array('workflowStatus' => $workflowStatus, 'recordsPerStage' => $stageCounts, 'stageCount' => sizeof($stageCounts), 'stageValues' => array_map(function ($a) {
         return is_null($a) ? '' : Formatter::formatCurrency($a);
     }, $stageValues), 'totalValue' => Formatter::formatCurrency(array_sum($stageValues)), 'stageNameLinks' => $stageNameLinks, 'colors' => $colors));
 }