public function loadModel($id)
 {
     $model = SyscComponents::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, Yii::t('D1System.crud', 'The requested page does not exist.'));
     }
     return $model;
 }
Exemplo n.º 2
0
                    <div class="row">
            <?php 
echo $form->label($model, 'sysc_syss_id');
?>
                            <?php 
echo $form->dropDownList($model, 'sysc_syss_id', CHtml::listData(SyssSystem::model()->findAll(), 'syss_id', 'syss_ccmp_id'), array('prompt' => 'all'));
?>
                    </div>

                    <div class="row">
            <?php 
echo $form->label($model, 'sysc_sysc_id');
?>
                            <?php 
echo $form->dropDownList($model, 'sysc_sysc_id', CHtml::listData(SyscComponents::model()->findAll(), 'sysc_id', 'sysc_syss_id'), array('prompt' => 'all'));
?>
                    </div>

                    <div class="row">
            <?php 
echo $form->label($model, 'sysc_level');
?>
                            <?php 
echo $form->textField($model, 'sysc_level');
?>
                    </div>

                    <div class="row">
            <?php 
echo $form->label($model, 'sysc_is_parent');
Exemplo n.º 3
0
<?php

$this->breadcrumbs[] = Yii::t('D1SystemModule.crud', 'Sysc Components');
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('sysc-components-grid', {\ndata: \$(this).serialize()\n});\nreturn false;\n});\n");
?>

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

<?php 
$this->renderPartial("_toolbar", array("model" => $model));
$this->widget('TbGridView', array('id' => 'sysc-components-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'pager' => array('class' => 'TbPager', 'displayFirstAndLast' => true), 'columns' => array('sysc_id', array('name' => 'sysc_syss_id', 'value' => 'CHtml::value($data,\'syscSyss.syss_ccmp_id\')', 'filter' => CHtml::listData(SyssSystem::model()->findAll(), 'syss_id', 'syss_ccmp_id')), array('name' => 'sysc_sysc_id', 'value' => 'CHtml::value($data,\'syscComponents.sysc_syss_id\')', 'filter' => CHtml::listData(SyscComponents::model()->findAll(), 'sysc_id', 'sysc_syss_id')), 'sysc_level', 'sysc_is_parent', 'sysc_name', array('name' => 'sysc_sysm_id', 'value' => 'CHtml::value($data,\'syscSysm.sysm_name\')', 'filter' => CHtml::listData(SysmSysmaker::model()->findAll(), 'sysm_id', 'sysm_name')), array('class' => 'TbButtonColumn', 'viewButtonUrl' => "Yii::app()->controller->createUrl('view', array('sysc_id' => \$data->sysc_id))", 'updateButtonUrl' => "Yii::app()->controller->createUrl('update', array('sysc_id' => \$data->sysc_id))", 'deleteButtonUrl' => "Yii::app()->controller->createUrl('delete', array('sysc_id' => \$data->sysc_id))"))));