/** * Lists all models. */ public function actionIndex() { parent::actionIndex(); $deliveryadvicedetail = new Deliveryadvicedetail('search'); $deliveryadvicedetail->unsetAttributes(); // clear any default values if (isset($_GET['Deliveryadvicedetail'])) { $deliveryadvicedetail->attributes = $_GET['Deliveryadvicedetail']; } $product = new Product('search'); $product->unsetAttributes(); // clear any default values if (isset($_GET['Product'])) { $product->attributes = $_GET['Product']; } $unitofmeasure = new Unitofmeasure('search'); $unitofmeasure->unsetAttributes(); // clear any default values if (isset($_GET['Unitofmeasure'])) { $unitofmeasure->attributes = $_GET['Unitofmeasure']; } $sloc = new Sloc('search'); $sloc->unsetAttributes(); // clear any default values if (isset($_GET['Sloc'])) { $sloc->attributes = $_GET['Sloc']; } $requestedby = new Requestedby('search'); $requestedby->unsetAttributes(); // clear any default values if (isset($_GET['Requestedby'])) { $requestedby->attributes = $_GET['Requestedby']; } $model = new Deliveryadvice('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Deliveryadvice'])) { $model->attributes = $_GET['Deliveryadvice']; } 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, 'deliveryadvicedetail' => $deliveryadvicedetail, 'product' => $product, 'unitofmeasure' => $unitofmeasure, 'sloc' => $sloc, 'requestedby' => $requestedby)); }
echo $form->error($model, 'headernote'); ?> </div> </td> <td> <div class="row"> <?php echo $form->labelEx($model, 'deliveryadviceid'); echo $form->hiddenField($model, 'deliveryadviceid'); ?> <input type="text" name="dano" id="dano" readonly > <?php $this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'da_dialog', 'options' => array('title' => Yii::t('app', 'Request Form'), 'width' => 'auto', 'autoOpen' => false, 'modal' => true))); $deliveryadvice = new Deliveryadvice('searchwfstatus'); $deliveryadvice->unsetAttributes(); // clear any default values if (isset($_GET['Deliveryadvice'])) { $deliveryadvice->attributes = $_GET['Deliveryadvice']; } $this->widget('zii.widgets.grid.CGridView', array('id' => 'da-grid', 'dataProvider' => $deliveryadvice->searchwfstatus(), 'filter' => $deliveryadvice, 'template' => '{summary}{pager}<br>{items}{pager}{summary}', 'columns' => array(array('header' => '', 'type' => 'raw', 'value' => 'CHtml::Button("+", array("name" => "send_absschedule", "id" => "send_absschedule", "onClick" => "$(\\"#da_dialog\\").dialog(\\"close\\"); $(\\"#dano\\").val(\\"$data->dano\\"); $(\\"#Prheader_deliveryadviceid\\").val(\\"$data->deliveryadviceid\\"); generatedata2(); "))'), array('name' => 'deliveryadviceid', 'visible' => false, 'value' => '$data->deliveryadviceid'), 'dano', 'headernote', array('name' => 'dadate', 'type' => 'raw', 'value' => 'date(Yii::app()->params["dateviewfromdb"], strtotime($data->dadate))'), array('name' => 'useraccessid', 'value' => '($data->useraccess!==null)?$data->useraccess->username:""')))); $this->endWidget('zii.widgets.jui.CJuiDialog'); echo CHtml::Button('...', array('onclick' => '$.fn.yiiGridView.update("da-grid");$("#da_dialog").dialog("open"); return false;')); ?> <?php
/** * Lists all models. */ public function actionIndex() { parent::actionIndex(); $this->lookupdata(); $model = new Deliveryadvice('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Deliveryadvice'])) { $model->attributes = $_GET['Deliveryadvice']; } 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, 'deliveryadvicedetail' => $this->deliveryadvicedetail)); }