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


PHP Formatter::formatDate方法代码示例

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


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

示例1: renderDate

 public function renderDate($field, array $htmlOptions = array())
 {
     $model = $this->owner;
     $fieldName = $field->fieldName;
     $oldDateVal = $model->{$fieldName};
     $model->{$fieldName} = Formatter::formatDate($model->{$fieldName}, 'medium');
     Yii::import('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker');
     $pickerOptions = array('dateFormat' => Formatter::formatDatePicker(), 'changeMonth' => false, 'changeYear' => false);
     if (Yii::app()->getLanguage() === 'fr') {
         $pickerOptions['monthNamesShort'] = Formatter::getPlainAbbrMonthNames();
     }
     $input = Yii::app()->controller->widget('CJuiDateTimePicker', array('model' => $model, 'attribute' => $fieldName, 'mode' => 'date', 'options' => $pickerOptions, 'htmlOptions' => array_merge(array('title' => $field->attributeLabel, 'class' => 'x2-mobile-datepicker'), $htmlOptions), 'language' => Yii::app()->language == 'en' ? '' : Yii::app()->getLanguage()), true);
     $model->{$fieldName} = $oldDateVal;
     return $input;
 }
开发者ID:tymiles003,项目名称:X2CRM,代码行数:15,代码来源:MobileFieldInputRenderer.php

示例2: renderModelInput

    public static function renderModelInput(CModel $model, $field, $htmlOptions = array())
    {
        if (!$field->asa('CommonFieldsBehavior')) {
            throw new Exception('$field must have CommonFieldsBehavior');
        }
        if ($field->required) {
            if (isset($htmlOptions['class'])) {
                $htmlOptions['class'] .= ' x2-required';
            } else {
                $htmlOptions = array_merge(array('class' => 'x2-required'), $htmlOptions);
            }
        }
        $fieldName = $field->fieldName;
        if (!isset($field)) {
            return null;
        }
        switch ($field->type) {
            case 'text':
                return CHtml::activeTextArea($model, $field->fieldName, array_merge(array('title' => $field->attributeLabel), array_merge(array('encode' => false), $htmlOptions)));
            case 'date':
                $oldDateVal = $model->{$fieldName};
                $model->{$fieldName} = Formatter::formatDate($model->{$fieldName}, 'medium');
                Yii::import('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker');
                $pickerOptions = array('dateFormat' => Formatter::formatDatePicker(), 'changeMonth' => false, 'changeYear' => true);
                if (Yii::app()->getLanguage() === 'fr') {
                    $pickerOptions['monthNamesShort'] = Formatter::getPlainAbbrMonthNames();
                }
                $input = Yii::app()->controller->widget('CJuiDateTimePicker', array('model' => $model, 'attribute' => $fieldName, 'mode' => 'date', 'options' => $pickerOptions, 'htmlOptions' => array_merge(array('title' => $field->attributeLabel), $htmlOptions), 'language' => Yii::app()->language == 'en' ? '' : Yii::app()->getLanguage()), true);
                $model->{$fieldName} = $oldDateVal;
                return $input;
            case 'dateTime':
                $oldDateTimeVal = $model->{$fieldName};
                $pickerOptions = array('dateFormat' => Formatter::formatDatePicker('medium'), 'timeFormat' => Formatter::formatTimePicker(), 'ampm' => Formatter::formatAMPM(), 'changeMonth' => true, 'changeYear' => true);
                if (Yii::app()->getLanguage() === 'fr') {
                    $pickerOptions['monthNamesShort'] = Formatter::getPlainAbbrMonthNames();
                }
                $model->{$fieldName} = Formatter::formatDateTime($model->{$fieldName});
                Yii::import('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker');
                $input = Yii::app()->controller->widget('CJuiDateTimePicker', array('model' => $model, 'attribute' => $fieldName, 'mode' => 'datetime', 'options' => $pickerOptions, 'htmlOptions' => array_merge(array('title' => $field->attributeLabel), $htmlOptions), 'language' => Yii::app()->language == 'en' ? '' : Yii::app()->getLanguage()), true);
                $model->{$fieldName} = $oldDateTimeVal;
                return $input;
            case 'dropdown':
                // Note: if desired to translate dropdown options, change the seecond argument to
                // $model->module
                $om = $field->getDropdownOptions();
                $multi = (bool) $om['multi'];
                $dropdowns = $om['options'];
                $curVal = $multi ? CJSON::decode($model->{$field->fieldName}) : $model->{$field->fieldName};
                $ajaxArray = array();
                if ($field instanceof Fields) {
                    $dependencyCount = X2Model::model('Dropdowns')->countByAttributes(array('parent' => $field->linkType));
                    $fieldDependencyCount = X2Model::model('Fields')->countByAttributes(array('modelName' => $field->modelName, 'type' => 'dependentDropdown', 'linkType' => $field->linkType));
                    if ($dependencyCount > 0 && $fieldDependencyCount > 0) {
                        $ajaxArray = array('ajax' => array('type' => 'GET', 'url' => Yii::app()->controller->createUrl('/site/dynamicDropdown'), 'data' => 'js:{
                                "val":$(this).val(),
                                "dropdownId":"' . $field->linkType . '",
                                "field":true, "module":"' . $field->modelName . '"
                            }', 'success' => '
                                function(data){
                                    if(data){
                                        data=JSON.parse(data);
                                        if(data[0] && data[1]){
                                            $("#' . $field->modelName . '_"+data[0]).html(data[1]);
                                        }
                                    }
                                }'));
                    }
                }
                $htmlOptions = array_merge($htmlOptions, $ajaxArray, array('title' => $field->attributeLabel));
                if ($multi) {
                    $multiSelectOptions = array();
                    if (!is_array($curVal)) {
                        $curVal = array();
                    }
                    foreach ($curVal as $option) {
                        $multiSelectOptions[$option] = array('selected' => 'selected');
                    }
                    $htmlOptions = array_merge($htmlOptions, array('options' => $multiSelectOptions, 'multiple' => 'multiple'));
                } elseif ($field->includeEmpty) {
                    $htmlOptions = array_merge($htmlOptions, array('empty' => Yii::t('app', "Select an option")));
                }
                return CHtml::activeDropDownList($model, $field->fieldName, $dropdowns, $htmlOptions);
            case 'dependentDropdown':
                return CHtml::activeDropDownList($model, $field->fieldName, array('' => '-'), array_merge(array('title' => $field->attributeLabel), $htmlOptions));
            case 'link':
                $linkSource = null;
                $linkId = '';
                $name = '';
                if (class_exists($field->linkType)) {
                    // Create a model for autocompletion:
                    if (!empty($model->{$fieldName})) {
                        list($name, $linkId) = Fields::nameAndId($model->{$fieldName});
                        $linkModel = X2Model::getLinkedModelMock($field->linkType, $name, $linkId, true);
                    } else {
                        $linkModel = X2Model::model($field->linkType);
                    }
                    if ($linkModel instanceof X2Model && $linkModel->asa('X2LinkableBehavior') instanceof X2LinkableBehavior) {
                        $linkSource = Yii::app()->controller->createUrl($linkModel->autoCompleteSource);
                        $linkId = $linkModel->id;
                        $oldLinkFieldVal = $model->{$fieldName};
//.........这里部分代码省略.........
开发者ID:tymiles003,项目名称:X2CRM,代码行数:101,代码来源:X2Model.php

示例3: array

 * 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".
 *****************************************************************************************/
// drag and drop CSS always gets loaded, this prevents layout thrashing when the UI changes
Yii::app()->clientScript->registerCssFile($this->module->assetsUrl . '/css/dragAndDrop.css');
Yii::app()->clientScript->registerCssFile($this->module->assetsUrl . '/css/view.css');
Yii::app()->clientScript->registerResponsiveCssFile($this->module->assetsUrl . '/css/responsiveDetailView.css');
Yii::app()->clientScript->registerCssFile(Yii::app()->theme->baseUrl . '/css/workflowFunnel.css');
Yii::app()->clientScript->registerPackages(array('X2History' => array('baseUrl' => Yii::app()->request->baseUrl, 'js' => array('js/X2History.js'), 'depends' => array('history', 'auxlib'))), true);
Yii::app()->clientScript->registerScript('getWorkflowStage', "\n\nx2.WorkflowViewManager = (function () {\n\nfunction WorkflowViewManager (argsDict) {\n    argsDict = typeof argsDict === 'undefined' ? {} : argsDict;\n    var defaultArgs = {\n        perStageWorkflowView: true,\n        workflowId: {$model->id}\n    };\n    auxlib.applyArgs (this, defaultArgs, argsDict);\n\n    this._init ();\n}\n\n/**\n * @param Number modelId (optional)\n */\nWorkflowViewManager._getQueryString = function (modelId, ajax) {\n    var ajax = typeof ajax === 'undefined' ? true : ajax; \n    var modelId = typeof modelId === 'undefined' ? x2.workflowViewManager.workflowId : modelId; \n\n    return (\n        (ajax ? 'workflowAjax=true&' : '') + 'id=' + modelId +\n        '&start=" . Formatter::formatDate($dateRange['start']) . "' +\n        '&end=" . Formatter::formatDate($dateRange['end']) . "' +\n        '&range=" . $dateRange['range'] . "' +\n        '&users=" . $users . "' +\n        '&modelType=" . urlencode($modelType) . "');\n};\n\n/**\n * Requests stage member grids via AJAX \n */\nWorkflowViewManager.getStageMembers = function (stage) {\n\t\$.ajax({\n\t\turl: '" . CHtml::normalizeUrl(array('/workflow/workflow/getStageMembers')) . "',\n\t\ttype: 'GET',\n\t\tdata: \n            WorkflowViewManager._getQueryString () + '&stage=' + stage,\n\t\tsuccess: function(response) {\n\t\t\tif(response === '') return;\n            \$('#workflow-gridview').html(response);\n            \$('#workflow-gridview').removeClass ('x2-layout-island');\n            \$('#workflow-gridview').removeClass ('x2-layout-island-merge-bottom');\n            \$('#content .x2-layout-island-merge-top-bottom').\n                removeClass ('x2-layout-island-merge-top-bottom').\n                addClass ('x2-layout-island-merge-top');\n            \$.ajax({\n                url: '" . CHtml::normalizeUrl(array('/workflow/workflow/getStageValue')) . "',\n                data: \n                    WorkflowViewManager._getQueryString () + '&stage=' + stage,\n                success: function(response) {\n                    \$('#data-summary-box').html(response);\n                }\n            });\n\t\t}\n\t});\n};\n\n/**\n * Depresses button in interface selection button group corresponding to currently selected\n * interface\n * @param bool perStageWorkflowView\n */\nWorkflowViewManager.prototype._updateChangeUIButtons = function (perStageWorkflowView) {\n    \$('#interface-selection').children ().removeClass ('disabled-link');\n    if (perStageWorkflowView) {\n        \$('#per-stage-view-button').addClass ('disabled-link');\n        \$('#workflow-filters').hide ();\n        \$('#add-a-deal-button').hide ();\n    } else {\n        \$('#drag-and-drop-view-button').addClass ('disabled-link');\n        \$('#workflow-filters').show ();\n        \$('#add-a-deal-button').show ();\n    }\n};\n\n/**\n * @param bool perStageWorkflowView \n * @param Number workflowId (optional)\n */\nWorkflowViewManager.prototype._changeUI = function (perStageWorkflowView, workflowId) {\n    var that = this;\n    \$.ajax ({\n        url: '" . CHtml::normalizeUrl(array('/workflow/workflow/changeUI')) . "',                 \n\t\ttype: 'GET',\n\t\tdata: \n            WorkflowViewManager._getQueryString (workflowId) + \n            '&perStageWorkflowView=' + perStageWorkflowView,\n        success: function (data) {\n            if (data !== '') {\n                that._pushState (workflowId, perStageWorkflowView);\n                \$('.page-title').siblings ().remove ();\n                \$('.page-title').after (\$('<div>'));\n                \$('.page-title').next ().replaceWith (data);\n                that._updateChangeUIButtons (perStageWorkflowView);\n                that.perStageWorkflowView = perStageWorkflowView;\n                x2.forms.initializeMultiselectDropdowns ();\n            }\n        }\n    });\n};\n\n/**\n * Push browser state to preserve back button funtionality across ajax loaded pages\n */\nWorkflowViewManager.prototype._pushState =  function (workflowId, perStageWorkflowView) {\n    var newUrl = window.location.href.replace (/workflow\\/\\d+/, 'workflow/' + workflowId);\n    newUrl = newUrl.replace (/id=\\d+/, 'id=' + workflowId);\n    perStageWorkflowViewGETParamVal = perStageWorkflowView ? 'true' : 'false';\n    newUrl = newUrl.replace (\n        /perStageWorkflowView=[^&]+/, 'perStageWorkflowView=' + perStageWorkflowViewGETParamVal);\n\n    x2.history.pushState (\n        { workflowId: workflowId, \n          perStageWorkflowView: perStageWorkflowView }, '', newUrl);\n};\n\nWorkflowViewManager.prototype._setUpWorkflowSelection = function () {\n    var that = this;\n\n    \$('#title-bar-workflow-select').unbind ('click._setUpWorkflowSelection')\n        .bind ('click._setUpWorkflowSelection', function () {\n\n            var workflowId = \$(this).val ();\n            if (workflowId !== that.workflowId) {\n                that._changeUI (that.perStageWorkflowView, workflowId);\n            }\n            that.workflowId = workflowId;\n        });\n        \n    x2.history.bind (function () {\n        var state = window.History.getState ();\n\n        workflowId = state.data.workflowId;\n        perStageWorkflowView = state.data.perStageWorkflowView;\n\n        that._changeUI (perStageWorkflowView, workflowId);\n        \$('#title-bar-workflow-select').val (workflowId);\n        if (typeof workflowId !== 'undefined') {\n            that.workflowId = workflowId;\n        } \n        return false;\n    });\n\n};\n\n/**\n * Unselect pipeline/funnel menu item and selects funnel/pipeline menu item, respectively.\n * @param object menuItem the currently selected menu item <li> element\n * @param bool pipeline\n */\nWorkflowViewManager.prototype._swapViewMenuItems = function (menuItem, pipeline) {\n    var pipeline = typeof pipeline === 'undefined' ? false : pipeline; \n\n    \$(menuItem).children ().first ().replaceWith (\$('<span>', {\n        html: \$(menuItem).children ().first ().html (),\n        id: \$(menuItem).children ().first ().attr ('id')\n    }));\n    if (pipeline) {\n        \$(menuItem).next ().children ().first ().replaceWith (\$('<a>', {\n            html: \$(menuItem).next ().children ().first ().html (),\n            id: \$(menuItem).next ().children ().first ().attr ('id'),\n            href: '#',\n        }));\n    } else {\n        \$(menuItem).prev ().children ().first ().replaceWith (\$('<a>', {\n            html: \$(menuItem).prev ().children ().first ().html (),\n            id: \$(menuItem).prev ().children ().first ().attr ('id'),\n            href: '#'\n        }));\n    }\n};\n\n\n\n/**\n * Set up behavior of interface selection buttons \n */\nWorkflowViewManager.prototype._setUpUIChangeBehavior = function () {\n    var that = this;\n    \$('#interface-selection a').click (function (evt) {\n        evt.preventDefault ();\n        var id = \$(this).attr ('id');                                                \n\n        if (id === 'per-stage-view-button') {\n            if (!that.perStageWorkflowView) {\n                that._swapViewMenuItems (\$('#funnel-view-menu-item').closest ('li'), true);\n                that._changeUI (true, that.workflowId);\n            }\n        } else { // id === 'drag-and-drop-view-button\n            if (that.perStageWorkflowView) {\n                that._swapViewMenuItems (\$('#pipeline-view-menu-item').closest ('li'), false);\n                that._changeUI (false, that.workflowId);\n            }\n        }\n\n        return false;\n    });\n    \$('#funnel-view-menu-item').closest ('li').click (function (evt) {\n        if (!that.perStageWorkflowView) {\n            that._swapViewMenuItems (this, true);\n            that._changeUI (true, that.workflowId);\n        }\n        return false;\n    });\n    \$('#pipeline-view-menu-item').closest ('li').click (function (evt) {\n        if (that.perStageWorkflowView) {\n            that._swapViewMenuItems (this, false);\n            that._changeUI (false, that.workflowId);\n        }\n        return false;\n    });\n};\n\nWorkflowViewManager.prototype._init = function () {\n    this._setUpUIChangeBehavior ();\n    this._setUpWorkflowSelection ();\n};\n\nreturn WorkflowViewManager;\n\n}) ();\n\n\$(function () { \n    x2.workflowViewManager = new x2.WorkflowViewManager ({\n        perStageWorkflowView: " . ($perStageWorkflowView ? 'true' : 'false') . "\n    }); \n});\n\n\n", CClientScript::POS_HEAD);
Yii::app()->clientScript->registerX2Flashes();
$this->setPageTitle(Yii::t('workflow', 'View {process}', array('{process}' => Modules::displayName(false))));
$menuOptions = array('index', 'create', 'edit', 'funnel', 'pipeline', 'delete');
$this->insertMenu($menuOptions, $model);
// Handle disabling links for workflow views
$unsetUrlIndex = $perStageWorkflowView ? 4 : 3;
unset($this->actionMenu[3]['url'], $this->actionMenu[4]['url']);
$this->actionMenu[$unsetUrlIndex]['url'] = '#';
?>
<div id='content-container-inner'>
<div class="responsive-page-title page-title icon workflow ">
    <h2><span class="no-bold">
        <?php 
echo Yii::t('workflow', '{process}:', array('{process}' => Modules::displayName(false)));
?>
开发者ID:tymiles003,项目名称:X2CRM,代码行数:31,代码来源:view.php

示例4: getStageNameLinks

 /**
  * Helper method for the workflow view.  
  * @return array links for each of the workflow stages. When clicked, the details of a 
  *  particular stage will be shown
  */
 public static function getStageNameLinks(&$workflowStatus, $dateRange, $expectedCloseDateDateRange, $users)
 {
     $links = array();
     $stageCount = count($workflowStatus['stages']);
     for ($i = 1; $i <= $stageCount; $i++) {
         $links[] = CHtml::link($workflowStatus['stages'][$i]['name'], array('/workflow/workflow/view', 'id' => $workflowStatus['id'], 'stage' => $i, 'start' => Formatter::formatDate($dateRange['start']), 'end' => Formatter::formatDate($dateRange['end']), 'range' => $dateRange['range'], 'expectedCloseDateStart' => Formatter::formatDate($expectedCloseDateDateRange['start']), 'expectedCloseDateEnd' => Formatter::formatDate($expectedCloseDateDateRange['end']), 'expectedCloseDateEnd' => Formatter::formatDate($expectedCloseDateDateRange['range']), $users), array('onclick' => 'x2.WorkflowViewManager.getStageMembers(' . $i . '); return false;', 'title' => addslashes($workflowStatus['stages'][$i]['name'])));
     }
     return $links;
 }
开发者ID:keyeMyria,项目名称:CRM,代码行数:14,代码来源:Workflow.php

示例5: array

	<div class="row">
		<div class="cell">
			<?php 
echo CHtml::label(Yii::t('charts', 'Start Date'), 'startDate');
?>
			<?php 
Yii::import('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker');
$this->widget('CJuiDateTimePicker', array('name' => 'start', 'value' => Formatter::formatDate($dateRange['start']), 'mode' => 'date', 'options' => array('dateFormat' => Formatter::formatDatePicker()), 'htmlOptions' => array('id' => 'startDate', 'width' => 20), 'language' => Yii::app()->language == 'en' ? '' : Yii::app()->getLanguage()));
?>
		</div>
		<div class="cell">
			<?php 
echo CHtml::label(Yii::t('charts', 'End Date'), 'startDate');
?>
			<?php 
$this->widget('CJuiDateTimePicker', array('name' => 'end', 'value' => Formatter::formatDate($dateRange['end']), 'mode' => 'date', 'options' => array('dateFormat' => Formatter::formatDatePicker()), 'htmlOptions' => array('id' => 'endDate', 'width' => 20), 'language' => Yii::app()->language == 'en' ? '' : Yii::app()->getLanguage()));
?>
		</div>
		<div class="cell">
			<?php 
echo CHtml::label(Yii::t('charts', 'Date Range'), 'range');
?>
			<?php 
echo CHtml::dropDownList('range', $dateRange['range'], array('custom' => Yii::t('charts', 'Custom'), 'thisWeek' => Yii::t('charts', 'This Week'), 'thisMonth' => Yii::t('charts', 'This Month'), 'lastWeek' => Yii::t('charts', 'Last Week'), 'lastMonth' => Yii::t('charts', 'Last Month'), 'thisYear' => Yii::t('charts', 'This Year'), 'lastYear' => Yii::t('charts', 'Last Year')), array('id' => 'dateRange'));
?>
		</div>
		<div class="cell">
			<?php 
echo CHtml::submitButton(Yii::t('charts', 'Go'), array('class' => 'x2-button', 'style' => 'margin-top:13px;'));
?>
		</div>
开发者ID:tymiles003,项目名称:X2CRM,代码行数:31,代码来源:leadVolume.php

示例6: array

?>
    </div>
</div>

<div class="row">
    <div class="cell dialog-cell">
        <?php 
echo $form->label($model, $isEvent ? 'startDate' : 'dueDate', array('class' => 'dialog-label'));
$defaultDate = Formatter::formatDate($model->dueDate, 'medium');
$model->dueDate = Formatter::formatDateTime($model->dueDate);
//format date from DATETIME
Yii::import('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker');
$this->widget('CJuiDateTimePicker', array('model' => $model, 'attribute' => 'dueDate', 'mode' => 'datetime', 'options' => array('dateFormat' => Formatter::formatDatePicker('medium'), 'timeFormat' => Formatter::formatTimePicker(), 'defaultDate' => $defaultDate, 'ampm' => Formatter::formatAMPM()), 'language' => Yii::app()->language == 'en' ? '' : Yii::app()->getLanguage(), 'htmlOptions' => array('onClick' => "\$('#ui-datepicker-div').css('z-index', '10020');", 'id' => 'dialog-Actions_dueDate', 'readonly' => 'readonly', 'onChange' => 'giveSaveButtonFocus();')));
if ($isEvent) {
    echo $form->label($model, 'endDate', array('class' => 'dialog-label'));
    $defaultDate = Formatter::formatDate($model->completeDate, 'medium');
    $model->completeDate = Formatter::formatDateTime($model->completeDate);
    //format date from DATETIME
    $this->widget('CJuiDateTimePicker', array('model' => $model, 'attribute' => 'completeDate', 'mode' => 'datetime', 'options' => array('dateFormat' => Formatter::formatDatePicker('medium'), 'timeFormat' => Formatter::formatTimePicker(), 'defaultDate' => $defaultDate, 'ampm' => Formatter::formatAMPM()), 'language' => Yii::app()->language == 'en' ? '' : Yii::app()->getLanguage(), 'htmlOptions' => array('onClick' => "\$('#ui-datepicker-div').css('z-index', '10020');", 'id' => 'dialog-Actions_startDate', 'readonly' => 'readonly', 'onChange' => 'giveSaveButtonFocus();')));
}
?>


        <?php 
echo $form->label($model, 'allDay', array('class' => 'dialog-label'));
?>
        <?php 
echo $form->checkBox($model, 'allDay', array('onChange' => 'giveSaveButtonFocus();'));
?>
    </div>
开发者ID:dsyman2,项目名称:X2CRM,代码行数:30,代码来源:editAction.php

示例7: array

 * 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".
 *****************************************************************************************/
?>

<div class="cell">
    <?php 
echo CHtml::label($this->startDateLabel, $this->startDateName);
Yii::import('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker');
$this->widget('CJuiDateTimePicker', array('name' => $this->startDateName, 'value' => Formatter::formatDate($this->startDateValue), 'mode' => 'date', 'options' => array('dateFormat' => Formatter::formatDatePicker(), 'changeMonth' => true, 'changeYear' => true), 'htmlOptions' => array('class' => 'start-date', 'width' => 20), 'language' => Yii::app()->language == 'en' ? '' : Yii::app()->getLanguage()));
?>
</div>
<div class="cell">
    <?php 
echo CHtml::label($this->endDateLabel, $this->endDateName);
$this->widget('CJuiDateTimePicker', array('name' => $this->endDateName, 'value' => Formatter::formatDate($this->endDateValue), 'mode' => 'date', 'options' => array('dateFormat' => Formatter::formatDatePicker(), 'changeMonth' => true, 'changeYear' => true), 'htmlOptions' => array('class' => 'end-date', 'width' => 20), 'language' => Yii::app()->language == 'en' ? '' : Yii::app()->getLanguage()));
?>
</div>
<div class="cell">
    <?php 
echo CHtml::label($this->dateRangeLabel, $this->dateRangeName);
echo CHtml::dropDownList($this->dateRangeName, $this->dateRangeValue, array('custom' => Yii::t('charts', 'Custom'), 'thisWeek' => Yii::t('charts', 'This Week'), 'thisMonth' => Yii::t('charts', 'This Month'), 'lastWeek' => Yii::t('charts', 'Last Week'), 'lastMonth' => Yii::t('charts', 'Last Month'), 'thisYear' => Yii::t('charts', 'This Year'), 'lastYear' => Yii::t('charts', 'Last Year'), 'all' => Yii::t('charts', 'All Time')), array('class' => 'date-range'));
?>
</div>

开发者ID:tymiles003,项目名称:X2CRM,代码行数:29,代码来源:dateRangeInputsWidget.php

示例8: array

}
?>
		</td>
	</tr>
	<tr>
		<td class="label"><?php 
echo CHtml::label(Yii::t('workflow', 'Completed'), 'completeDate');
?>
</td>
		<td class="text-field">
			<span><?php 
echo $model->completeDate;
?>
</span>
			<?php 
$model->completeDate = Formatter::formatDate($model->completeDate);
if ($editable) {
    $this->widget('CJuiDateTimePicker', array('model' => $model, 'attribute' => 'completeDate', 'mode' => 'date', 'options' => array('dateFormat' => Formatter::formatDatePicker(), 'changeMonth' => true, 'changeYear' => true, 'minDate' => $minDate, 'maxDate' => '0'), 'htmlOptions' => array('title' => Yii::t('actions', 'Complete Date')), 'language' => Yii::app()->language == 'en' ? '' : Yii::app()->getLanguage()));
}
?>
		</td>
	</tr>
	<tr>
		<td class="label"><?php 
echo CHtml::label(Yii::t('workflow', 'Completed By'), 'completedBy');
?>
</td>
		<td class="text-field">
			<span><?php 
if (!empty($model->completedBy) && $model->complete == 'Yes' && isset($users[$model->completedBy])) {
    echo $users[$model->completedBy];
开发者ID:dsyman2,项目名称:X2CRM,代码行数:31,代码来源:_workflowDetail.php

示例9: array

 * 
 * 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".
 *****************************************************************************************/
?>
<div id='per-stage-view-container-first' class='x2-layout-island x2-layout-island-merge-top-bottom'>
    <?php 
$this->renderFunnelView($model->id, $dateRange, $expectedCloseDateDateRange, $users, null, $modelType);
//$workflowStatus = Workflow::getWorkflowStatus($model->id, 0, $modelType);	// true = include dropdowns
//echo Workflow::renderWorkflowStats($workflowStatus, $modelType);
?>
    <?php 
$this->renderPartial('_processStatus', array('dateRange' => $dateRange, 'expectedCloseDateDateRange' => $expectedCloseDateDateRange, 'model' => $model, 'modelType' => $modelType, 'users' => $users));
?>
</div>
<div id="workflow-gridview" class='x2-layout-island x2-layout-island-merge-top' 
 style="clear:both;">
    <?php 
if (isset($viewStage)) {
    // display grids for individual stages
    echo Yii::app()->controller->getStageMembers($model->id, $viewStage, Formatter::formatDate($dateRange['start']), Formatter::formatDate($dateRange['end']), $dateRange['range'], Formatter::formatDate($expectedCloseDateDateRange['start']), Formatter::formatDate($expectedCloseDateDateRange['end']), $expectedCloseDateDateRange['range'], $users, $modelType);
} else {
    // display information about all stages
    $this->widget('zii.widgets.grid.CGridView', array('baseScriptUrl' => Yii::app()->request->baseUrl . '/themes/' . Yii::app()->theme->name . '/css/gridview', 'template' => '{items}{pager}', 'dataProvider' => X2Model::model('WorkflowStage')->search($model->id), 'columns' => array(array('name' => 'stageNumber', 'header' => '#', 'headerHtmlOptions' => array('style' => 'width:8%;')), array('name' => 'name', 'type' => 'raw'), array('name' => 'requirePrevious', 'value' => 'Yii::t("app",($data->requirePrevious? "Yes" : "No"))', 'type' => 'raw', 'headerHtmlOptions' => array('style' => 'width:15%;')), array('name' => 'requireComment', 'value' => 'Yii::t("app",($data->requireComment? "Yes" : "No"))', 'type' => 'raw', 'headerHtmlOptions' => array('style' => 'width:15%;')), array('name' => 'conversionRate', 'headerHtmlOptions' => array('style' => 'width:15%;')), array('name' => 'value', 'headerHtmlOptions' => array('style' => 'width:15%;')))));
}
?>
</div>
开发者ID:dsyman2,项目名称:X2CRM,代码行数:30,代码来源:_perStageView.php


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