public function actionAdmin() { $model = new FacturaCombustible('search'); $model->unsetAttributes(); if (isset($_GET['FacturaCombustible'])) { $model->setAttributes($_GET['FacturaCombustible']); } $this->render('admin', array('model' => $model)); }
<?php $this->breadcrumbs = array(FacturaCombustible::label(2), Yii::t('app', 'Index')); $this->menu = array(array('label' => Yii::t('app', 'Agregar') . ' ' . FacturaCombustible::label(), 'url' => array('create')), array('label' => Yii::t('app', 'Administrar') . ' ' . FacturaCombustible::label(2), 'url' => array('admin'))); ?> <h1><?php echo GxHtml::encode(FacturaCombustible::label(2)); ?> </h1> <?php $this->widget('zii.widgets.CListView', array('dataProvider' => $dataProvider, 'emptyText' => 'No hay resultados', 'summaryText' => 'Mostrando del {start} al {end} de {count} resultado(s).', 'pager' => array('header' => '', 'prevPageLabel' => 'Anterior', 'nextPageLabel' => 'Siguiente'), 'itemView' => '_view'));
echo $form->error($model, 'iva'); ?> </div><!-- row --> <div class="row"> <?php echo $form->labelEx($model, 'especifico'); ?> <?php echo $form->textField($model, 'especifico', array('onblur' => 'calcularTotal()')); ?> <?php echo $form->error($model, 'especifico'); ?> </div><!-- row --> <?php $this->widget('ext.multimodelform.MultiModelForm', array('id' => 'id_detfactcomb', 'formConfig' => FacturaCombustible::model()->getMultiModelForm(), 'model' => $detalle, 'tableView' => true, 'validatedItems' => $detallesValidados, 'data' => $detalle->findAll('id_factura_combustible=:id_factura_combustible', array(':id_factura_combustible' => $model->id)))); ?> <div class="row"> <?php echo $form->labelEx($model, 'litros'); ?> <?php echo $form->textField($model, 'litros', array('maxlength' => 10)); ?> <?php echo $form->error($model, 'litros'); ?> </div><!-- row --> <div class="row"> <?php echo $form->labelEx($model, 'total');