/** * Lists all models. */ public function actionIndex() { parent::actionIndex(); $parent = new Orgstructure('searchwstatus'); $parent->unsetAttributes(); // clear any default values if (isset($_GET['Orgstructure'])) { $parent->attributes = $_GET['Orgstructure']; } $model = new Orgstructure('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Orgstructure'])) { $model->attributes = $_GET['Orgstructure']; } 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, 'parent' => $parent)); }
</td> <td> <?php echo $form->labelEx($model, 'orgstructureid'); ?> <?php echo $form->hiddenField($model, 'orgstructureid'); ?> <input type="text" name="structurename" id="structurename" readonly style="width:75%" value="<?php echo Orgstructure::model()->findByPk($model->orgstructureid) !== null ? Orgstructure::model()->findByPk($model->orgstructureid)->structurename : ''; ?> "> <?php $this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'orgstructure_dialog', 'options' => array('title' => Yii::t('app', 'Organization Structure'), 'width' => 'auto', 'autoOpen' => false, 'modal' => true))); $orgstructure = new Orgstructure('searchwfstatus'); $orgstructure->unsetAttributes(); // clear any default values if (isset($_GET['Orgstructure'])) { $orgstructure->attributes = $_GET['Orgstructure']; } $this->widget('zii.widgets.grid.CGridView', array('id' => 'orgstructure-grid', 'dataProvider' => $orgstructure->searchwstatus(), 'filter' => $orgstructure, 'template' => '{summary}{pager}<br>{items}{pager}{summary}', 'columns' => array(array('header' => '', 'type' => 'raw', 'value' => 'CHtml::Button("V", array("name" => "send_absstatus", "id" => "send_absstatus", "onClick" => "$(\\"#orgstructure_dialog\\").dialog(\\"close\\"); $(\\"#structurename\\").val(\\"$data->structurename\\"); $(\\"#Employee_orgstructureid\\").val(\\"$data->orgstructureid\\");"))'), array('name' => 'orgstructureid', 'visible' => false, 'value' => '$data->orgstructureid', 'htmlOptions' => array('width' => '1%')), 'structurename'))); $this->endWidget('zii.widgets.jui.CJuiDialog'); echo CHtml::Button('...', array('onclick' => '$("#orgstructure_dialog").dialog("open"); return false;')); ?> <?php echo $form->error($model, 'orgstructureid'); ?>