Пример #1
0
 public function run()
 {
     $ld = StflFlow::model()->listData($this->model->tableName(), $this->field, $this->actual_stst_id);
     $data = array();
     foreach ($ld as $row) {
         if (Yii::app()->user->checkAccess($row['stfa_authitem'])) {
             $data[$row['stst_id']] = $row['stst_code'];
         }
     }
     $this->render('listbox', array('id' => $this->id, 'model' => $this->model, 'field' => $this->field, 'data' => $data, 'htmlOptions' => $this->htmlOptions));
 }
Пример #2
0
 public function loadModel($id)
 {
     $model = StflFlow::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, Yii::t('D1StatusModule.crud', 'The requested page does not exist.'));
     }
     return $model;
 }
Пример #3
0
                    <div class="row">
            <?php 
echo $form->label($model, 'stlg_id');
?>
                            <?php 
echo $form->textField($model, 'stlg_id', array('size' => 10, 'maxlength' => 10));
?>
                    </div>

                    <div class="row">
            <?php 
echo $form->label($model, 'stlg_stfl_id');
?>
                            <?php 
echo $form->dropDownList($model, 'stlg_stfl_id', CHtml::listData(StflFlow::model()->findAll(), 'stfl_id', 'stfl_name'), array('prompt' => 'all'));
?>
                    </div>

                    <div class="row">
            <?php 
echo $form->label($model, 'stlg_record_id');
?>
                            <?php 
echo $form->textField($model, 'stlg_record_id', array('size' => 20, 'maxlength' => 20));
?>
                    </div>

                    <div class="row">
            <?php 
echo $form->label($model, 'stlg_user_id');
Пример #4
0
<?php

$this->breadcrumbs[] = Yii::t('D1StatusModule.crud', 'Stsf States Flows');
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\$('.search-form').toggle();\nreturn false;\n});\n\$('.search-form form').submit(function(){\n\$.fn.yiiGridView.update('stsf-states-flow-grid', {\ndata: \$(this).serialize()\n});\nreturn false;\n});\n");
?>

<?php 
$this->widget("TbBreadcrumbs", array("links" => $this->breadcrumbs));
?>
<h1>
    <?php 
echo Yii::t('D1StatusModule.crud', 'Stsf States Flows');
?>
 <small><?php 
echo Yii::t('D1StatusModule.crud', 'Manage');
?>
</small>
</h1>

<?php 
$this->renderPartial("_toolbar", array("model" => $model));
$this->widget('TbGridView', array('id' => 'stsf-states-flow-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'pager' => array('class' => 'TbPager', 'displayFirstAndLast' => true), 'columns' => array(array('name' => 'stsf_stfl_id', 'value' => 'CHtml::value($data,\'stsfStfl.stfl_name\')', 'filter' => CHtml::listData(StflFlow::model()->findAll(), 'stfl_id', 'stfl_name')), array('name' => 'stsf_prev_stst_id', 'value' => 'CHtml::value($data,\'stsfPrevStst.stst_name\')', 'filter' => CHtml::listData(StstState::model()->findAll(), 'stst_id', 'stst_name')), array('name' => 'stsf_next_stst_id', 'value' => 'CHtml::value($data,\'stsfNextStst.stst_name\')', 'filter' => CHtml::listData(StstState::model()->findAll(), 'stst_id', 'stst_name')), array('class' => 'TbButtonColumn', 'viewButtonUrl' => "Yii::app()->controller->createUrl('view', array('stsf_id' => \$data->stsf_id))", 'updateButtonUrl' => "Yii::app()->controller->createUrl('update', array('stsf_id' => \$data->stsf_id))", 'deleteButtonUrl' => "Yii::app()->controller->createUrl('delete', array('stsf_id' => \$data->stsf_id))"))));
Пример #5
0
<?php

$this->breadcrumbs[] = Yii::t('D1StatusModule.crud', 'Stlg Logs');
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\$('.search-form').toggle();\nreturn false;\n});\n\$('.search-form form').submit(function(){\n\$.fn.yiiGridView.update('stlg-log-grid', {\ndata: \$(this).serialize()\n});\nreturn false;\n});\n");
?>

<?php 
$this->widget("TbBreadcrumbs", array("links" => $this->breadcrumbs));
?>
<h1>
    <?php 
echo Yii::t('D1StatusModule.crud', 'Stlg Logs');
?>
 <small><?php 
echo Yii::t('D1StatusModule.crud', 'Manage');
?>
</small>
</h1>

<?php 
$this->renderPartial("_toolbar", array("model" => $model));
$this->widget('TbGridView', array('id' => 'stlg-log-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'pager' => array('class' => 'TbPager', 'displayFirstAndLast' => true), 'columns' => array(array('name' => 'stlg_stfl_id', 'value' => 'CHtml::value($data,\'stlgStfl.stfl_name\')', 'filter' => CHtml::listData(StflFlow::model()->findAll(), 'stfl_id', 'stfl_name')), 'stlg_record_id', array('name' => 'stlg_user_id', 'value' => 'CHtml::value($data,\'stlgUser.username\')', 'filter' => CHtml::listData(SUsers::model()->findAll(), 'id', 'username')), array('name' => 'stlg_stst_id', 'value' => 'CHtml::value($data,\'stlgStst.stst_name\')', 'filter' => CHtml::listData(StstState::model()->findAll(), 'stst_id', 'stst_name')), 'stlg_datetime', array('class' => 'TbButtonColumn', 'viewButtonUrl' => "Yii::app()->controller->createUrl('view', array('stlg_id' => \$data->stlg_id))", 'updateButtonUrl' => "Yii::app()->controller->createUrl('update', array('stlg_id' => \$data->stlg_id))", 'deleteButtonUrl' => "Yii::app()->controller->createUrl('delete', array('stlg_id' => \$data->stlg_id))"))));