public function actionVerificarUsuarios() { $model = new UsuarioEmpresa('search'); $modelEstudiantes = new UsuarioEstudiante('BusquedaAlumnosInactivos'); $modelUnitec = new UsuarioUnitec('BusquedaUnitecInactivos'); $modelUsuarioEmpresa = new ContactoEmpresa('BusquedaUsuariosEmpresaInactivos'); $empresa = new ContactoEmpresa(); $carrerasPorUsuarioUnitec = new CarreraPorUsuarioUnitec('BusquedaPrueba'); $Practicas = new PracticaProfesional('BusquedaPracticasInactivas'); $model->unsetAttributes(); $modelEstudiantes->unsetAttributes(); $modelUnitec->unsetAttributes(); $modelUsuarioEmpresa->unsetAttributes(); $carrerasPorUsuarioUnitec->unsetAttributes(); $Practicas->unsetAttributes(); if (isset($_GET['UsuarioEmpresa'])) { $model->attributes = $_GET['UsuarioEmpresa']; } if (isset($_GET['UsuarioEstudiante'])) { $modelEstudiantes->attributes = $_GET['UsuarioEstudiante']; } if (isset($_GET['UsuarioUnitec'])) { $modelUnitec->attributes = $_GET['UsuarioUnitec']; } if (isset($_GET['ContactoEmpresa'])) { $modelUsuarioEmpresa->attributes = $_GET['ContactoEmpresa']; } if (isset($_GET['CarreraPorUsuarioUnitec'])) { $carrerasPorUsuarioUnitec->attributes = $_GET['CarreraPorUsuarioUnitec']; } if (isset($_GET['BusquedaPracticasInactivas'])) { $Practicas->attributes = $_GET['BusquedaPracticasInactivas']; } $this->render('verificarUsuarios', array('model' => $model, 'modelEstudiantes' => $modelEstudiantes, 'modelUnitec' => $modelUnitec, 'modelUsuarioEmpresa' => $modelUsuarioEmpresa, 'empresa' => $empresa, 'carrerasPorUsuarioUnitec' => $carrerasPorUsuarioUnitec, 'Practicas' => $Practicas)); }
/** * Returns the data model based on the primary key given in the GET variable. * If the data model is not found, an HTTP exception will be raised. * @param integer $id the ID of the model to be loaded * @return UsuarioEmpresa the loaded model * @throws CHttpException */ public function loadModel($id) { $model = UsuarioEmpresa::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
<div id ="usuariosEmpresasTab" class="profile-edit tab-pane fade"> <h2 class ="heading-md">Panel de Verificación de usuarios Empresariales</h2> <p>Abajo se encuentran nuevos usuarios de empresas ya creadas. UTILIZA LOS FILTROS para realizar búsquedas.</p> </br> <?php $this->widget('booster.widgets.TbExtendedGridView', array("id" => 'test4', 'type' => 'striped bordered', 'dataProvider' => $modelUsuarioEmpresa->BusquedaUsuariosEmpresaInactivos(), 'filter' => $modelUsuarioEmpresa, 'emptyText' => 'No se encontraron registros', 'columns' => array(array('name' => 'NombreCompleto', 'type' => 'raw', 'value' => 'CHtml::encode($data->NombreCompleto) '), array('name' => 'UsuarioEmpresa_IdUsuarioEmpresa', 'type' => 'raw', 'header' => 'Empresa', 'filter' => ContactoEmpresa::model()->EmpresasContactoEmpresaInactivos(), 'value' => 'CHtml::Link($data->usuarioEmpresa->NombreEmpresa)'), array('name' => 'TelefonoCelular', 'type' => 'raw', 'value' => 'CHtml::encode($data->TelefonoCelular)'), array('name' => 'PuestoEmpresa', 'type' => 'raw', 'value' => 'CHtml::encode($data->PuestoEmpresa)'), array('class' => 'CButtonColumn', 'template' => '{Email} ', 'header' => 'Email', 'htmlOptions' => array('encodeLabel' => false), 'buttons' => array('Email' => array('url' => 'Yii::app()->createUrl("UsuarioUnitec/EnviarCorreoEmpresa", array("CorreoEmpresa"=>$data->CorreoElectronico))', 'label' => ' <div class="row text-center"> <i class="fa fa-envelope" ></i> </div> ', 'options' => array('rel' => 'tooltip', 'data-toggle' => 'tooltip', 'title' => 'Enviar Correo Electrónico')))), array('class' => 'CButtonColumn', 'template' => '{Verificar} ', 'header' => 'Verificar', 'htmlOptions' => array('encodeLabel' => false), 'buttons' => array('Verificar' => array('url' => 'Yii::app()->createUrl("UsuarioUnitec/VerificarUsuarioEmpresa", array("Activar"=>$data->IdContactoEmpresa))', 'label' => ' <div class="row text-center"> <i class="fa fa-check-square-o" ></i> Verificar </div>', 'options' => array('rel' => 'tooltip', 'data-toggle' => 'tooltip', 'title' => 'Verificar Empresa', 'confirm' => '¿Seguro que desea verificar esta usuario?'))))))); ?> <!-- <?php $this->widget('zii.widgets.grid.CGridView', array('dataProvider' => $modelUsuarioEmpresa->BusquedaUsuariosEmpresaInactivos(), 'filter' => $modelUsuarioEmpresa, 'htmlOptions' => array('class' => 'table-responsive'), 'columns' => array(array('name' => 'NombreCompleto', 'type' => 'raw', 'value' => 'CHtml::encode($data->NombreCompleto) '), array('name' => 'UsuarioEmpresa_IdUsuarioEmpresa', 'type' => 'raw', 'header' => 'Empresa', 'filter' => CHtml::listData(UsuarioEmpresa::model()->findAll(array('order' => 'NombreEmpresa')), 'IdUsuarioEmpresa', 'NombreEmpresa'), 'value' => 'CHtml::Link($data->usuarioEmpresa->NombreEmpresa)'), array('name' => 'TelefonoCelular', 'type' => 'raw', 'value' => 'CHtml::encode($data->TelefonoCelular)'), array('name' => 'PuestoEmpresa', 'type' => 'raw', 'value' => 'CHtml::encode($data->PuestoEmpresa)'), array('class' => 'CButtonColumn', 'template' => '{Email} ', 'header' => 'Email', 'htmlOptions' => array('encodeLabel' => false), 'buttons' => array('Email' => array('url' => 'Yii::app()->createUrl("UsuarioUnitec/EnviarCorreoEmpresa", array("CorreoEmpresa"=>$data->CorreoElectronico))', 'label' => ' <div class="row text-center"> <i class="fa fa-envelope" ></i> </div> ', 'options' => array('rel' => 'tooltip', 'data-toggle' => 'tooltip', 'title' => 'Enviar Correo Electrónico')))), array('class' => 'CButtonColumn', 'template' => '{Verificar} ', 'header' => 'Verificar', 'htmlOptions' => array('encodeLabel' => false), 'buttons' => array('Verificar' => array('url' => 'Yii::app()->createUrl("UsuarioUnitec/VerificarUsuarioEmpresa", array("Activar"=>$data->IdContactoEmpresa))', 'label' => ' <div class="row text-center"> <i class="fa fa-check-square-o" ></i> Verificar </div>', 'options' => array('rel' => 'tooltip', 'data-toggle' => 'tooltip', 'title' => 'Verificar Empresa', 'confirm' => '¿Seguro que desea verificar esta usuario?'))))))); ?> --> </div> <div id ="passwordTab" class="profile-edit tab-pane fade"> <h2 class ="heading-md">Panel de Verificación de Alumnos</h2> <p>Abajo se encuentran los alumnos de las carreras que tu asesoras. UTILIZA LOS FILTROS para realizar búsquedas.</p> </br> <?php $this->widget('booster.widgets.TbExtendedGridView', array("id" => 'PanelVerificacionAlumnos', 'type' => 'striped bordered', 'dataProvider' => $modelEstudiantes->BusquedaAlumnosInactivos(), 'filter' => $modelEstudiantes, 'emptyText' => 'No se encontraron registros', 'columns' => array(array('name' => 'Nombre', 'type' => 'raw', 'value' => 'CHtml::encode($data->NombreCompleto)'), array('name' => 'NumeroDeCuenta', 'type' => 'raw', 'value' => 'CHtml::encode($data->NumeroDeCuenta)'), array('name' => 'Carrera_IdCarrera', 'type' => 'raw', 'filter' => UsuarioUnitec::model()->CarrerasPorJefe(), 'value' => 'CHtml::encode($data->carrera->NombreCarrera)'), array('class' => 'CButtonColumn', 'template' => '{Verificar} ', 'header' => 'Verificar', 'htmlOptions' => array('encodeLabel' => false), 'buttons' => array('Verificar' => array('url' => 'Yii::app()->createUrl("UsuarioUnitec/VerificarAlumnos", array("Activar"=>$data->IdUsuarioEstudiante))', 'label' => ' <div class="row text-center"> <i class="fa fa-check-square-o" ></i> Verificar </div>', 'options' => array('rel' => 'tooltip', 'data-toggle' => 'tooltip', 'title' => 'Verificar Empresa', 'confirm' => '¿Seguro que desea verificar este alumno?')))))));