echo $form->labelEx($model, 'estado'); ?> <?php echo $form->dropDownList($model, 'estado', array('' => '', '1' => 'Activo', '0' => 'Inactivo')); ?> <?php echo $form->error($model, 'estado'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'genero'); ?> <?php echo $form->dropDownList($model, 'genero', Usuarios::getGenero()); ?> <?php echo $form->error($model, 'genero'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'username'); ?> <?php echo $form->textField($model, 'username', array('size' => 60, 'maxlength' => 255)); ?> <?php
<?php $this->breadcrumbs = array('Usuarioses' => array('index'), 'Manage'); $this->menu = array(array('label' => 'List Usuarios', 'url' => array('index')), array('label' => 'Create Usuarios', 'url' => array('create'))); Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('usuarios-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n"); ?> <h1>Manage Usuarioses</h1> <p> You may optionally enter a comparison operator (<b><</b>, <b><=</b>, <b>></b>, <b>>=</b>, <b><></b> or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done. </p> <?php echo CHtml::link('Advanced Search', '#', array('class' => 'search-button')); ?> <div class="search-form" style="display:none"> <?php $this->renderPartial('_search', array('model' => $model)); ?> </div><!-- search-form --> <?php $mensaje = "Hola je je"; $this->widget('ext.alert.GAlert', array('mensaje' => $mensaje)); $this->widget('zii.widgets.grid.CGridView', array('id' => 'usuarios-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'ajaxUpdate' => false, 'columns' => array('id', array('name' => 'ciudad_id', 'value' => '$data->ciudad->nombre', 'filter' => Usuarios::getListCiudad()), 'nombres', 'identificacion', 'email', 'estado', array('name' => 'mi_campo', 'type' => 'raw', 'value' => 'strtoupper($data->nombres." ".$data->email)'), array('name' => 'genero', 'header' => 'Genero', 'value' => 'Usuarios::getGenero($data->genero)', 'filter' => Usuarios::getGenero()), array('name' => 'estado', 'value' => '$data->nombre_estado()'), array('class' => 'CButtonColumn', 'header' => 'Modificar', 'viewButtonUrl' => 'Yii::app()->controller->createUrl("view",array("id"=>$data->id))', 'updateButtonUrl' => 'Yii::app()->createUrl("elaboracion/orden",array("id"=>$data->id))', 'deleteButtonUrl' => 'Yii::app()->controller->createUrl("delete",array("id"=>$data->id))', 'deleteConfirmation' => 'Esta seguro que desea borrar el registro seleccionado?', 'viewButtonImageUrl' => Yii::app()->theme->baseUrl . '/images/021.png', 'updateButtonImageUrl' => Yii::app()->theme->baseUrl . '/images/017.png', 'deleteButtonImageUrl' => Yii::app()->theme->baseUrl . '/images/004.png', 'htmlOptions' => array('style' => 'width:300px!important'), 'headerHtmlOptions' => array('style' => 'width:300px!important'), 'template' => '{delete} {update} {view}'), array('class' => 'CLinkColumn', 'header' => 'Email', 'imageUrl' => Yii::app()->theme->baseUrl . '/images/029.png', 'labelExpression' => '$data->email', 'urlExpression' => '"mailto://".$data->email', 'htmlOptions' => array('style' => 'text-align:center')))));