</div> <?php } if (!empty($grid_warning)) { ?> <div class="alert alert-warning"><?php echo $grid_warning; ?> </div> <?php } if (!empty($modelMain->vtlsTrailerServices)) { $model = new VtlsTrailerService(); $model->vtls_vtrl_id = $modelMain->primaryKey; // render grid view $this->widget('TbGridView', array('id' => 'vtls-trailer-service-grid', 'dataProvider' => $model->search(), 'template' => '{summary}{items}', 'summaryText' => ' ', 'htmlOptions' => array('class' => 'rel-grid-view'), 'columns' => array(array('class' => 'editable.EditableColumn', 'name' => 'vtls_vsrv_id', 'editable' => array('type' => 'select', 'url' => $this->createUrl('//trucks/vtlsTrailerService/editableSaver'), 'source' => CHtml::listData(VsrvServices::model()->findAll(array('limit' => 1000)), 'vsrv_id', 'itemLabel'))), array('class' => 'editable.EditableColumn', 'name' => 'vtls_notes', 'editable' => array('type' => 'textarea', 'url' => $this->createUrl('//trucks/vtlsTrailerService/editableSaver'))), array('header' => Yii::t('TrucksModule.model', 'Exp.Postion'), 'type' => 'raw', 'value' => '!empty($data->vtls_fixr_id)? $data->vtlsFixr->fixrFiit->fiitFinv->finv_number. " ". CHtml::link( "<i class=\\"icon-external-link\\"></i>", array( "/d2fixr/FixrFiitXRef/viewFinv", "finv_id"=>$data->vtlsFixr->fixrFiit->fiit_finv_id ), array("target" => "_blank") ) :"-"')))); } Yii::endProfile('vtls_vtrl_id.view.grid'); } if (!$ajax || $ajax == 'vtrd-trailer-doc-grid') {
public function loadModel($id) { $m = VsrvServices::model(); // apply scope, if available $scopes = $m->scopes(); if (isset($scopes[$this->scope])) { $m->{$this->scope}(); } $model = $m->findByPk($id); if ($model === null) { throw new CHttpException(404, Yii::t('TrucksModule.crud_static', 'The requested page does not exist.')); } return $model; }