public function actionAdmin()
 {
     $model = new DetalleReparacion('search');
     $model->unsetAttributes();
     if (isset($_GET['DetalleReparacion'])) {
         $model->setAttributes($_GET['DetalleReparacion']);
     }
     $this->render('admin', array('model' => $model));
 }
Exemplo n.º 2
0
 public function getMultiModelForm()
 {
     $criteria = new CDbCriteria();
     $criteria->order = 'nombre ASC';
     $memberFormConfig = array('elements' => array('id_detalle_reparacion' => array('type' => 'dropdownlist', 'items' => array('' => '---') + GxHtml::listDataEx(DetalleReparacion::model()->findAllAttributes(null, true, $criteria))), 'id_marca' => array('type' => 'dropdownlist', 'items' => array('' => '---') + GxHtml::listDataEx(MarcasRepuestos::model()->findAllAttributes(null, true))), 'precio_unitario' => array('type' => 'text', 'maxlength' => 11, 'size' => 12, 'onblur' => 'subtotal()', 'onkeypress' => 'if (event.keyCode == 13){subtotal()};'), 'cantidad' => array('type' => 'text', 'maxlength' => 7, 'size' => 7, 'onblur' => 'subtotal();', 'onkeypress' => 'if (event.keyCode == 13){subtotal()};'), 'subtotal' => array('type' => 'text', 'maxlength' => 11, 'size' => 11), 'observacion' => array('type' => 'textarea', 'cols' => 15, 'row' => 3)));
     return $memberFormConfig;
 }
Exemplo n.º 3
0
<?php

$this->breadcrumbs = array(DetalleReparacion::label(2), Yii::t('app', 'Index'));
$this->menu = array(array('label' => Yii::t('app', 'Agregar') . ' ' . DetalleReparacion::label(), 'url' => array('create')), array('label' => Yii::t('app', 'Administrar') . ' ' . DetalleReparacion::label(2), 'url' => array('admin')));
?>

<h1><?php 
echo GxHtml::encode(DetalleReparacion::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'));