/** * Lists all models. */ public function actionIndex() { parent::actionIndex(); $model = new Employeestatus('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Employeestatus'])) { $model->attributes = $_GET['Employeestatus']; } if (isset($_GET['pageSize'])) { Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']); unset($_GET['pageSize']); // would interfere with pager and repetitive page size change } $this->render('index', array('model' => $model)); }
<td> <div class="row"> <?php echo $form->labelEx($model, 'employeestatusid'); ?> <?php echo $form->hiddenField($model, 'employeestatusid'); ?> <input type="text" name="employeestatus_name" id="employeestatus_name" style="width:75%" readonly value="<?php echo Employeestatus::model()->findByPk($model->employeestatusid) !== null ? Employeestatus::model()->findByPk($model->employeestatusid)->employeestatusname : ''; ?> "> <?php $this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'employeestatus_dialog', 'options' => array('title' => Yii::t('app', 'Employee Status'), 'width' => 'auto', 'autoOpen' => false, 'modal' => true))); $employeestatus = new Employeestatus('searchwfstatus'); $employeestatus->unsetAttributes(); // clear any default values if (isset($_GET['Employeestatus'])) { $employeestatus->attributes = $_GET['Employeestatus']; } $this->widget('zii.widgets.grid.CGridView', array('id' => 'employeestatus-grid', 'dataProvider' => $employeestatus->Searchwstatus(), 'filter' => $employeestatus, 'template' => '{summary}{pager}<br>{items}{pager}{summary}', 'columns' => array(array('header' => '', 'type' => 'raw', 'value' => 'CHtml::Button("V", array("name" => "send_employeestatus", "id" => "send_employeestatus", "onClick" => "$(\\"#employeestatus_dialog\\").dialog(\\"close\\"); $(\\"#employeestatus_name\\").val(\\"$data->employeestatusname\\"); $(\\"#Employee_employeestatusid\\").val(\\"$data->employeestatusid\\");"))'), array('name' => 'employeestatusid', 'visible' => false, 'value' => '$data->employeestatusid', 'htmlOptions' => array('width' => '1%')), 'employeestatusname'))); $this->endWidget('zii.widgets.jui.CJuiDialog'); echo CHtml::Button('...', array('onclick' => '$("#employeestatus_dialog").dialog("open"); return false;')); ?> <?php echo $form->error($model, 'employeestatusid'); ?> </div>