Beispiel #1
0
    $this->setPageTitle(Yii::t('D2tasksModule.model', 'Projects list'));
    Yii::app()->clientScript->registerScript('re-install-date-picker', "\n        function reinstallDatePicker(id, data) {\n            filter_TtskTask_tcmn_date_range_init();\n           }\n");
    ?>

    <div class="clearfix">
        <div class="btn-toolbar pull-left">
            <div class="btn-group">
                <?php 
    if (Yii::app()->user->checkAccess('D2tasks.TtskTask.Create')) {
        $this->widget('bootstrap.widgets.TbButton', array('label' => Yii::t('D2tasksModule.crud', 'Create'), 'icon' => 'icon-plus', 'size' => 'large', 'type' => 'success', 'url' => array('create'), 'visible' => Yii::app()->user->checkAccess('D2tasks.TtskTask.*') || Yii::app()->user->checkAccess('D2tasks.TtskTask.Create')));
    }
    ?>
            </div>
            <div class="btn-group">
                <h1>
                    <i class="icon-tasks"></i>
                    <?php 
    echo Yii::t('D2tasksModule.model', 'Projects');
    ?>
            </h1>
            </div>
        </div>
    </div>

    <?php 
    Yii::beginProfile('TtskTask.view.grid');
}
$this->widget('TbGridView', array('id' => 'ttsk-task-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'template' => '{summary}{pager}{items}{pager}', 'pager' => array('class' => 'TbPager', 'displayFirstAndLast' => true), 'afterAjaxUpdate' => 'reinstallDatePicker', 'columns' => array(array('header' => Yii::t('D2tasksModule.model', 'Client'), 'name' => 'ttsk_ccmp_id', 'value' => '$data->ccmp_name', 'filter' => CHtml::listData(CcmpCompany::model()->findAll(array('order' => 'ccmp_name')), 'ccmp_id', 'itemLabel')), array('header' => Yii::t('D2tasksModule.model', 'Persons'), 'name' => 'ttsk_pprs_id', 'value' => '!empty($data->ttskPprs)?$data->ttskPprs->itemLabel:""'), array('name' => 'ttsk_name'), array('name' => 'ttsk_description'), array('name' => 'ttsk_tstt_id', 'value' => '!empty($data->ttskTstt)?$data->ttskTstt->itemLabel:""', 'filter' => CHtml::listData(TsttStatus::model()->findAll(array('limit' => 1000)), 'tstt_id', 'itemLabel')), array('header' => Yii::t('D2tasksModule.model', 'Person'), 'name' => 'person_list', 'value' => '$data->personList', 'filter' => CHtml::listData(PprsPerson::model()->getSysCompanyPersons(), 'pprs_id', 'itemLabel')), array('header' => Yii::t('D2tasksModule.model', 'Communication Plan Date'), 'value' => '$data->minPlanDate', 'filter' => $this->widget('vendor.dbrisinajumi.DbrLib.widgets.TbFilterDateRangePicker', array('model' => $model, 'attribute' => 'tcmn_date_range', 'options' => array('ranges' => array('today', 'yesterday', 'this_week', 'last_week', 'this_month', 'last_month', 'this_year'))), TRUE)), array('class' => 'TbButtonColumn', 'buttons' => array('view' => array('visible' => 'Yii::app()->user->checkAccess("D2tasks.TtskTask.View")'), 'update' => array('visible' => 'FALSE'), 'delete' => array('visible' => 'FALSE')), 'viewButtonUrl' => 'Yii::app()->controller->createUrl("view", array("ttsk_id" => $data->ttsk_id))', 'deleteButtonUrl' => 'Yii::app()->controller->createUrl("delete", array("ttsk_id" => $data->ttsk_id))', 'deleteConfirmation' => Yii::t('D2tasksModule.crud', 'Do you want to delete this item?'), 'viewButtonOptions' => array('data-toggle' => 'tooltip'), 'deleteButtonOptions' => array('data-toggle' => 'tooltip')))));
if (!$ajax) {
    Yii::endProfile('TtskTask.view.grid');
}
Beispiel #2
0
//                    "confirm" => Yii::t("D2tasksModule.crud", "Do you want to delete this item?")
//                ),
//                "visible" => (Yii::app()->request->getParam("ttsk_id")) && (Yii::app()->user->checkAccess("D2tasks.TtskTask.*") || Yii::app()->user->checkAccess("D2tasks.TtskTask.Delete"))
//            ));
?>
        </div>
    </div>
</div>



<div class="row">
    <div class="span4">

<?php 
$this->widget('TbAceDetailView', array('data' => $model, 'attributes' => array(array('name' => 'ttsk_name', 'type' => 'raw', 'value' => $this->widget('EditableField', array('model' => $model, 'attribute' => 'ttsk_name', 'url' => $this->createUrl('/d2tasks/ttskTask/editableSaver'), 'apply' => $can_edit), true)), array('name' => 'ttsk_ccmp_id', 'type' => 'raw', 'value' => $can_edit ? $this->widget('EditableField', array('model' => $model, 'type' => 'select', 'url' => $this->createUrl('/d2tasks/ttskTask/editableSaver'), 'source' => CHtml::listData(CcmpCompany::model()->findAll(array('limit' => 1000)), 'ccmp_id', 'itemLabel'), 'attribute' => 'ttsk_ccmp_id'), true) : $model->ttskCcmp->itemLabel, 'value_id' => $model->ttsk_ccmp_id, 'external_link' => array('/d2company/ccmpCompany/updateExtended', 'ccmp_id' => $model->ttsk_ccmp_id), 'external_title' => Yii::t("D2tasksModule.model", 'Show Company Data')), array('name' => 'ttsk_pprs_id', 'type' => 'raw', 'value' => $can_edit ? $this->widget('EditableField', array('model' => $model, 'type' => 'select', 'url' => $this->createUrl('/d2tasks/ttskTask/editableSaver'), 'source' => CHtml::listData(PprsPerson::model()->getSysCompanyPersons(), 'pprs_id', 'itemLabel'), 'attribute' => 'ttsk_pprs_id'), true) : $model->ttskCcmp->itemLabel, 'value_id' => $model->ttsk_pprs_id, 'external_link' => array('/d2person/pprsPerson/view', 'pprs_id' => $model->ttsk_pprs_id), 'external_title' => Yii::t("D2tasksModule.model", 'Show Person Data')), array('name' => 'ttsk_description', 'type' => 'raw', 'value' => $this->widget('EditableField', array('model' => $model, 'attribute' => 'ttsk_description', 'url' => $this->createUrl('/d2tasks/ttskTask/editableSaver'), 'apply' => $can_edit), true) . ' - '), array('name' => 'ttsk_tstt_id', 'type' => 'raw', 'value' => $can_edit ? $this->widget('EditableField', array('model' => $model, 'type' => 'select', 'url' => $this->createUrl('/d2tasks/ttskTask/editableSaver'), 'source' => CHtml::listData(TsttStatus::model()->findAll(array('limit' => 1000)), 'tstt_id', 'itemLabel'), 'attribute' => 'ttsk_tstt_id', 'success' => 'function(response, newValue) { 
                                    $.fn.yiiGridView.update(\'tsth-status-history-grid\');
                                  }'), true) : (!empty($model->ttsk_tstt_id) ? $model->ttskTstt->itemLabel : '&nbsp;')))));
$this->renderPartial('_tsth_grid', array('model' => $model));
?>
        
        
    </div>

<div class="span8">
        <?php 
$this->renderPartial('_view-relations_grids', array('modelMain' => $model, 'ajax' => false));
?>
    
    </div>
</div>