diff --git a/www/css/gridview2.css b/www/css/gridview2.css index 1e34d2a..a199ef7 100644 --- a/www/css/gridview2.css +++ b/www/css/gridview2.css @@ -237,7 +237,7 @@ tr.odd { } tr.even { - background-color: #eee; + background-color: #EEE; } tr.even.selected td { @@ -249,15 +249,24 @@ tr.odd.selected td { } tr:hover { - background-color: #DDDDDD; + background-color: #DDD; } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * DataTables cells classes */ -td.con1 { background-color: #eee; } -td.con0 { background-color: #f7f7f7; } +td.con0 { background-color: #F7F7F7; } +td.con1 { background-color: #EEE; } + +tr.selected td.con0 { background-color: #FFFCCC; } +tr.selected td.con1 { background-color: #FFFBBB; } + +tr:hover td.con0 { background-color: #EAEAEA; } +tr:hover td.con1 { background-color: #E0E0E0; } + +tr.selected:hover td.con0 { background-color: #FFFAAA; } +tr.selected:hover td.con1 { background-color: #FFF999; } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * diff --git a/www/protected/controllers/CandidatoController.php b/www/protected/controllers/CandidatoController.php index 860313e..2121c3b 100644 --- a/www/protected/controllers/CandidatoController.php +++ b/www/protected/controllers/CandidatoController.php @@ -2,360 +2,394 @@ class CandidatoController extends Controller { - /** - * @var string the default layout for the views. Defaults to '//layouts/column2', meaning - * using two-column layout. See 'protected/views/layouts/column2.php'. - */ - public $layout='//layouts/default'; + /** + * @var string the default layout for the views. Defaults to '//layouts/column2', meaning + * using two-column layout. See 'protected/views/layouts/column2.php'. + */ + public $layout='//layouts/default'; - /** - * @return array action filters - */ - public function filters() - { - return array( - 'accessControl', // perform access control for CRUD operations - ); - } - - /** - * Specifies the access control rules. - * This method is used by the 'accessControl' filter. - * @return array access control rules - */ - public function accessRules() - { + /** + * @return array action filters + */ + public function filters() + { return array( - array('allow', // allow authenticated user to perform 'create' and 'update' actions - 'actions'=>array('index','view','create','update','delete','admin'), - 'users'=>array('@'), - ), - array('deny', // deny all users - 'users'=>array('*'), - ), + 'accessControl', // perform access control for CRUD operations ); - } + } - /** - * Displays a particular model. - * @param integer $id the ID of the model to be displayed - */ - public function actionView($id) - { - $this->render('view',array( - 'model'=>$this->loadModel($id), - )); - } + /** + * Specifies the access control rules. + * This method is used by the 'accessControl' filter. + * @return array access control rules + */ + public function accessRules() + { + return array( + array('allow', // allow authenticated user to perform 'create' and 'update' actions + 'actions'=>array('index','view','create','update','delete','admin'), + 'users'=>array('@'), + ), + array('deny', // deny all users + 'users'=>array('*'), + ), + ); + } - /** - * Creates a new model. - * If creation is successful, the browser will be redirected to the 'view' page. - */ - public function actionCreate() - { - Yii::import('ext.multimodelform.MultiModelForm'); - - $model = new Candidato; - $idioma = new CandidatoIdioma(); - $titulacion = new CandidatoTitulacion(); - - $idiomasValidos = array(); - $titulacionesValidas = array(); - - // Uncomment the following line if AJAX validation is needed - //$this->performAjaxValidation($model); - - /*if(isset($_POST['Candidato'])) - { - $model->attributes=$_POST['Candidato']; - $foto=CUploadedFile::getInstance($model,'foto'); - - if ($model->validate()) - { - $foundInvalidChild = false; - $arrayIdiomas = array(); - if(isset($_POST['CandidatoIdioma'])) - { - foreach ($_POST['CandidatoIdioma'] as $idioma) - { - $CandidatoIdioma = new CandidatoIdioma; - $CandidatoIdioma->attributes = $idioma; - - if ($model->id) - $CandidatoIdioma->candidato_id = $model->id; - - if (!$CandidatoIdioma->validate()) - $foundInvalidChild = true; - - $arrayIdiomas[] = $CandidatoIdioma; - } - } - } - - if (!$foundInvalidChild && $model->save()) { - $this->guardarFoto($model->id, $foto); - - // Guardar los idiomas - foreach($arrayIdiomas as $CandidatoIdioma) - { - $CandidatoIdioma->candidato_id = $model->id; - $CandidatoIdioma->save(); - } - - Yii::app()->user->setFlash('success', "Candidato dado de alta correctamente."); - $this->redirect(array('index')); - } - }*/ - - if (isset($_POST['Candidato'])) { - $model->attributes=$_POST['Candidato']; - $foto=CUploadedFile::getInstance($model,'foto'); - - $foundInvalidChild = false; - if ($model->validate()) { - if (!MultiModelForm::validate($model, $idiomasValidos, $idiomasBorrados)) - $foundInvalidChild = true; - - if (!MultiModelForm::validate($model, $titulacionesValidas, $titulacionesBorradas)) - $foundInvalidChild = true; - } - - if (!$foundInvalidChild && $model->save() ) { - $masterValues = array ('candidato_id'=>$model->id); - - if (MultiModelForm::save($model, $idiomasValidos, $idiomasBorrados, $masterValues) && - MultiModelForm::save($model, $titulacionesValidas, $titulacionesBorradas, $masterValues)) - { - $this->guardarFoto($model->id, $foto); - Yii::app()->user->setFlash('success', "Candidato dado de alta correctamente."); - $url=$this->createUrl('index', array('id' => $model->id)); - //$this->redirect(array('index')); - $this->redirect($url); - } - } - } - - $this->render('create',array( - 'model'=>$model, - 'idioma'=>$idioma, - 'titulacion'=>$titulacion, - 'idiomasValidos'=>$idiomasValidos, - 'titulacionesValidas'=>$titulacionesValidas, + /** + * Displays a particular model. + * @param integer $id the ID of the model to be displayed + */ + public function actionView($id) + { + $this->render('view',array( + 'model'=>$this->loadModel($id), )); - } + } - /** - * Updates a particular model. - * If update is successful, the browser will be redirected to the 'view' page. - * @param integer $id the ID of the model to be updated - */ - public function actionUpdate($id) - { - Yii::import('ext.multimodelform.MultiModelForm'); - - $model=$this->loadModel($id); - $idioma=new CandidatoIdioma(); - $titulacion = new CandidatoTitulacion(); - - $idiomasValidos = array(); - $titulacionesValidas = array(); + /** + * Creates a new model. + * If creation is successful, the browser will be redirected to the 'view' page. + */ + public function actionCreate() + { + Yii::import('ext.multimodelform.MultiModelForm'); - // Uncomment the following line if AJAX validation is needed - //$this->performAjaxValidation($model); + $model = new Candidato; + $idioma = new CandidatoIdioma(); + $titulacion = new CandidatoTitulacion(); - /*if(isset($_POST['Candidato'])) - { - $foto=CUploadedFile::getInstance($model,'foto'); - $model->attributes=$_POST['Candidato']; + $idiomasValidos = array(); + $titulacionesValidas = array(); - if ($model->validate()) - { - $foundInvalidChild = false; - $arrayIdiomas = array(); - if(isset($_POST['CandidatoIdioma'])) - { - foreach ($_POST['CandidatoIdioma'] as $idioma) - { - //$CandidatoIdioma = CandidatoIdioma::model()->findB; - //CandidatoIdioma::model()->deleteAllByAttributes($arrayIdiomas) + // Uncomment the following line if AJAX validation is needed + //$this->performAjaxValidation($model); - $CandidatoIdioma->attributes = $idioma; - - - if ($model->id) - $CandidatoIdioma->candidato_id = $model->id; - - if (!$CandidatoIdioma->validate()) - $foundInvalidChild = true; - - $arrayIdiomas[] = $CandidatoIdioma; - } - } - } - - if (!$foundInvalidChild && $model->save()) { - $this->guardarFoto($model->id, $foto); - - // Guardar los idiomas - foreach($arrayIdiomas as $CandidatoIdioma) - { - $CandidatoIdioma->candidato_id = $model->id; - $CandidatoIdioma->save(); - } - - Yii::app()->user->setFlash('success', "Candidato actualizado correctamente."); - //$this->redirect(array('view','id'=>$model->id)); - } - }*/ - - if (isset($_POST['Candidato'])) { - $model->attributes=$_POST['Candidato']; - $foto=CUploadedFile::getInstance($model,'foto'); + /*if(isset($_POST['Candidato'])) + { + $model->attributes=$_POST['Candidato']; + $foto=CUploadedFile::getInstance($model,'foto'); + if ($model->validate()) + { $foundInvalidChild = false; - if ($model->validate()) { - if (!MultiModelForm::validate($model, $idiomasValidos, $idiomasBorrados)) - $foundInvalidChild = true; - - if (!MultiModelForm::validate($model, $titulacionesValidas, $titulacionesBorradas)) - $foundInvalidChild = true; - } - - if (!$foundInvalidChild && $model->save() ) { - $masterValues = array ('candidato_id'=>$model->id); - - if (MultiModelForm::save($model, $idiomasValidos, $idiomasBorrados, $masterValues) && - MultiModelForm::save($model, $titulacionesValidas, $titulacionesBorradas, $masterValues)) + $arrayIdiomas = array(); + if(isset($_POST['CandidatoIdioma'])) + { + foreach ($_POST['CandidatoIdioma'] as $idioma) { - $this->guardarFoto($model->id, $foto); - Yii::app()->user->setFlash('success', "Candidato actualizado correctamente."); - $this->redirect(array('index')); - } - } - } - - - /*if(isset($_POST['Candidato'])) { + $CandidatoIdioma = new CandidatoIdioma; + $CandidatoIdioma->attributes = $idioma; - //the value for the foreign key 'candidato_id' + if ($model->id) + $CandidatoIdioma->candidato_id = $model->id; + + if (!$CandidatoIdioma->validate()) + $foundInvalidChild = true; + + $arrayIdiomas[] = $CandidatoIdioma; + } + } + } + + if (!$foundInvalidChild && $model->save()) { + $this->guardarFoto($model->id, $foto); + + // Guardar los idiomas + foreach($arrayIdiomas as $CandidatoIdioma) + { + $CandidatoIdioma->candidato_id = $model->id; + $CandidatoIdioma->save(); + } + + Yii::app()->user->setFlash('success', "Candidato dado de alta correctamente."); + $this->redirect(array('index')); + } + }*/ + + if (isset($_POST['Candidato'])) { + $model->attributes=$_POST['Candidato']; + $foto=CUploadedFile::getInstance($model,'foto'); + + $foundInvalidChild = false; + if ($model->validate()) { + if (!MultiModelForm::validate($model, $idiomasValidos, $idiomasBorrados)) + $foundInvalidChild = true; + + if (!MultiModelForm::validate($model, $titulacionesValidas, $titulacionesBorradas)) + $foundInvalidChild = true; + } + + if (!$foundInvalidChild && $model->save() ) { $masterValues = array ('candidato_id'=>$model->id); - //Save the master model after saving valid members - if (MultiModelForm::save($idioma, $validatedIdiomas, $deleteIdiomas, $masterValues) && $model->save() ) { + if (MultiModelForm::save($model, $idiomasValidos, $idiomasBorrados, $masterValues) && + MultiModelForm::save($model, $titulacionesValidas, $titulacionesBorradas, $masterValues)) + { $this->guardarFoto($model->id, $foto); - Yii::app()->user->setFlash('success', "Candidato actualizado correctamente."); - //$this->redirect(array('view','id'=>$model->id)); + Yii::app()->user->setFlash('success', "Candidato dado de alta correctamente."); + $url=$this->createUrl('index', array('id' => $model->id)); + //$this->redirect(array('index')); + $this->redirect($url); } - }*/ - - $this->render('update',array( - 'model'=>$model, - 'idioma'=>$idioma, - 'titulacion'=>$titulacion, - 'idiomasValidos'=>$idiomasValidos, - 'titulacionesValidas'=>$titulacionesValidas, - )); - } + } + } - /** - * Deletes a particular model. - * If deletion is successful, the browser will be redirected to the 'admin' page. - * @param integer $id the ID of the model to be deleted - */ - public function actionDelete($id) - { - if(Yii::app()->request->isPostRequest) - { - // we only allow deletion via POST request - $this->loadModel($id)->delete(); - $this->borrarFoto($id); + $this->render('create',array( + 'model'=>$model, + 'idioma'=>$idioma, + 'titulacion'=>$titulacion, + 'idiomasValidos'=>$idiomasValidos, + 'titulacionesValidas'=>$titulacionesValidas, + )); + } - // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser - if(!isset($_GET['ajax'])) - $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('index')); - } - else - throw new CHttpException(400,'Invalid request. Please do not repeat this request again.'); - } + /** + * Updates a particular model. + * If update is successful, the browser will be redirected to the 'view' page. + * @param integer $id the ID of the model to be updated + */ + public function actionUpdate($id) + { + Yii::import('ext.multimodelform.MultiModelForm'); - /** - * Lists all models. - * - */ - public function actionIndex() - { + $model=$this->loadModel($id); + $idioma=new CandidatoIdioma(); + $titulacion = new CandidatoTitulacion(); + + $idiomasValidos = array(); + $titulacionesValidas = array(); + + // Uncomment the following line if AJAX validation is needed + //$this->performAjaxValidation($model); + + /*if(isset($_POST['Candidato'])) + { + $foto=CUploadedFile::getInstance($model,'foto'); + $model->attributes=$_POST['Candidato']; + + if ($model->validate()) + { + $foundInvalidChild = false; + $arrayIdiomas = array(); + if(isset($_POST['CandidatoIdioma'])) + { + foreach ($_POST['CandidatoIdioma'] as $idioma) + { + //$CandidatoIdioma = CandidatoIdioma::model()->findB; + //CandidatoIdioma::model()->deleteAllByAttributes($arrayIdiomas) + + $CandidatoIdioma->attributes = $idioma; + + + if ($model->id) + $CandidatoIdioma->candidato_id = $model->id; + + if (!$CandidatoIdioma->validate()) + $foundInvalidChild = true; + + $arrayIdiomas[] = $CandidatoIdioma; + } + } + } + + if (!$foundInvalidChild && $model->save()) { + $this->guardarFoto($model->id, $foto); + + // Guardar los idiomas + foreach($arrayIdiomas as $CandidatoIdioma) + { + $CandidatoIdioma->candidato_id = $model->id; + $CandidatoIdioma->save(); + } + + Yii::app()->user->setFlash('success', "Candidato actualizado correctamente."); + //$this->redirect(array('view','id'=>$model->id)); + } + }*/ + + if (isset($_POST['Candidato'])) { + $model->attributes=$_POST['Candidato']; + $foto=CUploadedFile::getInstance($model,'foto'); + + $foundInvalidChild = false; + if ($model->validate()) { + if (!MultiModelForm::validate($model, $idiomasValidos, $idiomasBorrados)) + $foundInvalidChild = true; + + if (!MultiModelForm::validate($model, $titulacionesValidas, $titulacionesBorradas)) + $foundInvalidChild = true; + } + + if (!$foundInvalidChild && $model->save() ) { + $masterValues = array ('candidato_id'=>$model->id); + + if (MultiModelForm::save($model, $idiomasValidos, $idiomasBorrados, $masterValues) && + MultiModelForm::save($model, $titulacionesValidas, $titulacionesBorradas, $masterValues)) + { + $this->guardarFoto($model->id, $foto); + Yii::app()->user->setFlash('success', "Candidato actualizado correctamente."); + $this->redirect(array('index')); + } + } + } + + + /*if(isset($_POST['Candidato'])) { + + //the value for the foreign key 'candidato_id' + $masterValues = array ('candidato_id'=>$model->id); + + //Save the master model after saving valid members + if (MultiModelForm::save($idioma, $validatedIdiomas, $deleteIdiomas, $masterValues) && $model->save() ) { + $this->guardarFoto($model->id, $foto); + Yii::app()->user->setFlash('success', "Candidato actualizado correctamente."); + //$this->redirect(array('view','id'=>$model->id)); + } + }*/ + + $this->render('update',array( + 'model'=>$model, + 'idioma'=>$idioma, + 'titulacion'=>$titulacion, + 'idiomasValidos'=>$idiomasValidos, + 'titulacionesValidas'=>$titulacionesValidas, + )); + } + + /** + * Deletes a particular model. + * If deletion is successful, the browser will be redirected to the 'admin' page. + * @param integer $id the ID of the model to be deleted + */ + public function actionDelete($id) + { + if(Yii::app()->request->isPostRequest) + { + // we only allow deletion via POST request + $this->loadModel($id)->delete(); + $this->borrarFoto($id); + + // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser + if(!isset($_GET['ajax'])) + $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('index')); + } + else + throw new CHttpException(400,'Invalid request. Please do not repeat this request again.'); + } + + /** + * Lists all models. + * + */ + public function actionIndex() + { + $model=new Candidato('search'); + $model->unsetAttributes(); // clear any default values + + if(isset($_GET['Candidato'])) + $model->attributes=$_GET['Candidato']; + + $this->render('index',array( + 'model'=>$model)); + } + + /** + * Manages all models. + */ + public function actionAdmin() + { $model=new Candidato('search'); $model->unsetAttributes(); // clear any default values - if(isset($_GET['Candidato'])) $model->attributes=$_GET['Candidato']; - $this->render('index',array( - 'model'=>$model)); - } + $this->render('admin',array( + 'model'=>$model, + )); + } - /** - * Manages all models. - */ - public function actionAdmin() - { - $model=new Candidato('search'); - $model->unsetAttributes(); // clear any default values - if(isset($_GET['Candidato'])) - $model->attributes=$_GET['Candidato']; + /** + * 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 the ID of the model to be loaded + */ + public function loadModel($id) + { + $model=Candidato::model()->findByPk($id); + if($model===null) + throw new CHttpException(404,'The requested page does not exist.'); - $this->render('admin',array( - 'model'=>$model, - )); - } + $model->foto = $this->buscarFoto($id); + return $model; + } - /** - * 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 the ID of the model to be loaded - */ - public function loadModel($id) - { - $model=Candidato::model()->findByPk($id); - if($model===null) - throw new CHttpException(404,'The requested page does not exist.'); - - $model->foto = $this->buscarFoto($id); - return $model; - } - - /** - * Performs the AJAX validation. - * @param CModel the model to be validated - */ - protected function performAjaxValidation($model) - { - if(isset($_POST['ajax']) && $_POST['ajax']==='candidato-form') - { - echo CActiveForm::validate($model); - Yii::app()->end(); - } - } - - private function guardarFoto($id, $foto) { - if (!is_null($foto)) { - $path = Yii::app()->basePath.'/../fotos/'; - $fichero = $id.'.jpg'; - $foto->saveAs($path.$fichero); + /** + * Performs the AJAX validation. + * @param CModel the model to be validated + */ + protected function performAjaxValidation($model) + { + if(isset($_POST['ajax']) && $_POST['ajax']==='candidato-form') + { + echo CActiveForm::validate($model); + Yii::app()->end(); } - } - - private function borrarFoto($id) { + } + + private function guardarFoto($id, $foto) { + if (!is_null($foto)) { $path = Yii::app()->basePath.'/../fotos/'; $fichero = $id.'.jpg'; - if (file_exists($path.$fichero)) - unlink($path.$fichero); + $foto->saveAs($path.$fichero); } - - private function buscarFoto($id) { - $path = Yii::app()->basePath.'/../fotos/'; - $fichero = $id.'.jpg'; - $url = Yii::app()->request->baseUrl.'/fotos/'; - return file_exists($path.$fichero) ? $url.$fichero : $url.'no_avatar.png'; + } + + private function borrarFoto($id) { + $path = Yii::app()->basePath.'/../fotos/'; + $fichero = $id.'.jpg'; + if (file_exists($path.$fichero)) + unlink($path.$fichero); + } + + private function buscarFoto($id) { + $path = Yii::app()->basePath.'/../fotos/'; + $fichero = $id.'.jpg'; + $url = Yii::app()->request->baseUrl.'/fotos/'; + return file_exists($path.$fichero) ? $url.$fichero : $url.'no_avatar.png'; + } + + /** + * Calcula el valor para la columna 'Capacidad técnica' del grid + * @param $data datos de la fila actual + * @param $row índice de la fila actual + */ + protected function gridDataColumnCapacidadTecnica($data, $row) + { + $lista = array(); + foreach ($data->capacidades as $capacidad) { + $perfil = $capacidad->perfilTecnico->descripcion; + $meses = '(' . $capacidad->meses_perfil_tecnico . ' ' . Yii::t('intranet', 'meses') . ')'; + $lista[] = $perfil . (($meses != '()') ? $meses : ''); } + $value = implode('
', $lista); + return ($value == NULL) ? CHtml::tag("span", array("class"=>"nodata"), Yii::t('intranet', 'Sin capacidades')) : $value; + } + + /** + * Calcula el valor para la columna 'Capacidad funcional' del grid + * @param $data datos de la fila actual + * @param $row índice de la fila actual + */ + protected function gridDataColumnCapacidadFuncional($data, $row) + { + $lista = array(); + /*foreach ($data->capacidades as $capacidad) { + $perfil = $capacidad->capacidadesFuncionales->perfil; + $lista[] = $perfil; + }*/ + $value = implode('
', $lista); + return ($value == NULL) ? CHtml::tag("span", array("class"=>"nodata"), Yii::t('intranet', 'Sin capacidades')) : $value; + } + } diff --git a/www/protected/migrations/m120130_120027_tbl_perfiles.php b/www/protected/migrations/m120130_120027_tbl_perfiles.php index 6a90986..9bba84e 100644 --- a/www/protected/migrations/m120130_120027_tbl_perfiles.php +++ b/www/protected/migrations/m120130_120027_tbl_perfiles.php @@ -6,12 +6,12 @@ class m120130_120027_tbl_perfiles extends CDbMigration { $this->createTable('tbl_perfiles_tecnicos', array( 'id' => 'pk', - 'perfil' => 'string NOT NULL', + 'descripcion' => 'string NOT NULL', )); $this->createTable('tbl_perfiles_funcionales', array( 'id' => 'pk', - 'perfil' => 'string NOT NULL', + 'descripcion' => 'string NOT NULL', )); } diff --git a/www/protected/migrations/m120130_120742_tbl_tecnologias.php b/www/protected/migrations/m120130_120742_tbl_tecnologias.php index d570a87..e8e1a0b 100644 --- a/www/protected/migrations/m120130_120742_tbl_tecnologias.php +++ b/www/protected/migrations/m120130_120742_tbl_tecnologias.php @@ -6,7 +6,7 @@ class m120130_120742_tbl_tecnologias extends CDbMigration { $this->createTable('tbl_tecnologias', array( 'id' => 'pk', - 'tecnologia' => 'string NOT NULL', + 'descripcion' => 'string NOT NULL', )); } diff --git a/www/protected/migrations/m120130_120838_tbl_idiomas.php b/www/protected/migrations/m120130_120838_tbl_idiomas.php index a7d18b6..d948329 100644 --- a/www/protected/migrations/m120130_120838_tbl_idiomas.php +++ b/www/protected/migrations/m120130_120838_tbl_idiomas.php @@ -6,7 +6,7 @@ class m120130_120838_tbl_idiomas extends CDbMigration { $this->createTable('tbl_idiomas', array( 'id' => 'pk', - 'idioma' => 'string NOT NULL', + 'descripcion' => 'string NOT NULL', )); } diff --git a/www/protected/migrations/m120221_104416_tbl_titulaciones.php b/www/protected/migrations/m120221_104416_tbl_titulaciones.php index 68b9e38..25258c6 100644 --- a/www/protected/migrations/m120221_104416_tbl_titulaciones.php +++ b/www/protected/migrations/m120221_104416_tbl_titulaciones.php @@ -6,7 +6,7 @@ class m120221_104416_tbl_titulaciones extends CDbMigration { $this->createTable('tbl_titulaciones', array( 'id' => 'pk', - 'titulacion' => 'string NOT NULL', + 'descripcion' => 'string NOT NULL', )); } diff --git a/www/protected/models/Candidato.php b/www/protected/models/Candidato.php index 79550f8..2fd4a3a 100644 --- a/www/protected/models/Candidato.php +++ b/www/protected/models/Candidato.php @@ -30,13 +30,27 @@ class Candidato extends CActiveRecord const GENERO_HOMBRE=0; const GENERO_MUJER=1; + private $_nombreCompleto; public $foto; - - - public function getNombreApellidos() { - return $this->nombre . ' ' . $this->apellidos; + + /** + * Devuelve el nombre completo de un candidato. + * @return string $nombreCompleto + */ + public function getNombreCompleto() + { + if(isset($this->_nombreCompleto)) { + return $this->_nombreCompleto; + } + + $this->_nombreCompleto = $this->nombre . ' ' . $this->apellidos; + return $this->_nombreCompleto; } + public function setNombreCompleto($value) + { + $this->_nombreCompleto = $value; + } /** * Devuelve la lista de géneros de un candidato. @@ -84,7 +98,7 @@ class Candidato extends CActiveRecord */ public function tableName() { - return 'tbl_candidatos'; + return 'tbl_candidatos'; } /** @@ -92,26 +106,29 @@ class Candidato extends CActiveRecord */ public function rules() { - // NOTE: you should only define rules for those attributes that - // will receive user inputs. - return array( - array('nombre, apellidos', 'required'), - array('email', 'unique'), - array('email', 'email'), - array('foto', 'file', - 'types'=>'jpg', - 'maxSize'=>1024 * 1024 * 1, // 1MB como máximo - 'tooLarge'=>'The file was larger than 1MB. Please upload a smaller file.', - 'wrongType'=>'Please upload only images in the format JPG.', - 'tooMany'=>'You can upload only 1 user photo.', - 'allowEmpty'=>'true', - ), - array('dni, estado, nombre, apellidos, email, telefono_fijo, telefono_movil, sexo, lugar_nacimiento, localidad', 'length', 'max'=>255), - array('fecha_nacimiento', 'safe'), - // The following rule is used by search(). - // Please remove those attributes that should not be searched. - array('id, estado, dni, nombreApellidos, nombre, apellidos, email, telefono_fijo, telefono_movil, sexo, fecha_nacimiento, lugar_nacimiento, localidad', 'safe', 'on'=>'search'), - ); + // NOTE: you should only define rules for those attributes that + // will receive user inputs. + return array( + array('nombre, apellidos', 'required'), + array('email', 'unique'), + array('email', 'email'), + array('foto', 'file', + 'types'=>'jpg', + 'maxSize'=>1024 * 1024 * 1, // 1MB como máximo + 'tooLarge'=>'The file was larger than 1MB. Please upload a smaller file.', + 'wrongType'=>'Please upload only images in the format JPG.', + 'tooMany'=>'You can upload only 1 user photo.', + 'allowEmpty'=>'true', + ), + array('dni, estado, nombre, apellidos, email, telefono_fijo, telefono_movil, sexo, lugar_nacimiento, localidad', 'length', 'max'=>255), + array('fecha_nacimiento', 'safe'), + // The following rule is used by search(). + // Please remove those attributes that should not be searched. + array('id, estado, dni, nombre, apellidos, email, telefono_fijo, + telefono_movil, sexo, fecha_nacimiento, lugar_nacimiento, localidad, + nombreCompleto, capacidades.', + 'safe', 'on'=>'search'), + ); } /** @@ -122,11 +139,12 @@ class Candidato extends CActiveRecord // NOTE: you may need to adjust the relation name and the related // class name for the relations automatically generated below. return array( - 'capacidades' => array(self::HAS_MANY, 'CandidatoCapacidad', 'candidato_id'), - 'idiomas' => array(self::HAS_MANY, 'CandidatoIdioma', 'candidato_id'), - 'idiomasCount' => array(self::STAT, 'CandidatoIdioma', 'candidato_id'), - 'titulaciones' => array(self::HAS_MANY, 'CandidatoTitulacion', 'candidato_id'), - 'titulacionesCount' => array(self::STAT, 'CandidatoTitulacion', 'candidato_id'), + 'capacidades' => array(self::HAS_MANY, 'CandidatoCapacidad', 'candidato_id'), + 'capacidadesCount' => array(self::STAT, 'CandidatoCapacidad', 'candidato_id'), + 'idiomas' => array(self::HAS_MANY, 'CandidatoIdioma', 'candidato_id'), + 'idiomasCount' => array(self::STAT, 'CandidatoIdioma', 'candidato_id'), + 'titulaciones' => array(self::HAS_MANY, 'CandidatoTitulacion', 'candidato_id'), + 'titulacionesCount' => array(self::STAT, 'CandidatoTitulacion', 'candidato_id'), ); } @@ -151,6 +169,8 @@ class Candidato extends CActiveRecord 'lugar_nacimiento' => 'Lugar de nacimiento', 'localidad' => 'Localidad', 'fecha_modificacion' => 'Último cambio', + + 'nombreCompleto' => 'Candidato', ); } @@ -164,6 +184,9 @@ class Candidato extends CActiveRecord // should not be searched. $criteria=new CDbCriteria; + + $criteria->with = array('capacidades'); + $criteria->together = true; $criteria->compare('id',$this->id); $criteria->compare('estado',$this->estado,true); @@ -177,14 +200,14 @@ class Candidato extends CActiveRecord $criteria->compare('fecha_nacimiento',$this->fecha_nacimiento,true); $criteria->compare('lugar_nacimiento',$this->lugar_nacimiento,true); - //$criteria->compare('nombreApellidos',$this->nombreApellidos,true); + $criteria->addSearchCondition('concat(nombre, " ", apellidos)', $this->nombreCompleto); $sort = new CSort; $sort->defaultOrder = 'nombre, apellidos ASC'; return new CActiveDataProvider($this, array( - 'criteria' => $criteria, - 'sort' => $sort, + 'criteria' => $criteria, + 'sort' => $sort, )); } diff --git a/www/protected/models/CandidatoCapacidad.php b/www/protected/models/CandidatoCapacidad.php index 473ea36..ff7e9cd 100644 --- a/www/protected/models/CandidatoCapacidad.php +++ b/www/protected/models/CandidatoCapacidad.php @@ -13,8 +13,8 @@ * The followings are the available model relations: * @property PerfilesTecnicos $perfilTecnico * @property Candidatos $candidato - * @property CandidatosCapacidadesFuncionales[] $capacidadesFuncionales - * @property CandidatosCapacidadesTecnologias[] $tecnologias + * @property CandidatoCapacidadFuncional[] $capacidadesFuncionales + * @property CandidatoCapacidadTecnologia[] $tecnologias */ class CandidatoCapacidad extends CActiveRecord { @@ -61,10 +61,10 @@ class CandidatoCapacidad extends CActiveRecord // NOTE: you may need to adjust the relation name and the related // class name for the relations automatically generated below. return array( - 'perfilTecnico' => array(self::BELONGS_TO, 'PerfilesTecnicos', 'perfil_tecnico_id'), - 'candidato' => array(self::BELONGS_TO, 'Candidatos', 'candidato_id'), - 'capacidadesFuncionales' => array(self::HAS_MANY, 'CandidatosCapacidadesFuncionales', 'capacidad_id'), - 'tecnologias' => array(self::HAS_MANY, 'CandidatosCapacidadesTecnologias', 'capacidad_id'), + 'perfilTecnico' => array(self::BELONGS_TO, 'PerfilTecnico', 'perfil_tecnico_id'), + 'candidato' => array(self::BELONGS_TO, 'Candidato', 'candidato_id'), + 'capacidadesFuncionales' => array(self::HAS_MANY, 'CandidatoCapacidadFuncional', 'capacidad_id'), + 'tecnologias' => array(self::HAS_MANY, 'CandidatoCapacidadTecnologia', 'capacidad_id'), ); } diff --git a/www/protected/models/Idioma.php b/www/protected/models/Idioma.php index d7eadc5..fdd78a0 100644 --- a/www/protected/models/Idioma.php +++ b/www/protected/models/Idioma.php @@ -66,8 +66,8 @@ class Idioma extends CActiveRecord return array( 'id' => 'ID', 'idioma' => 'Idioma', - 'conversacion' => 'Conversacion', - 'lectura_traduccion' => 'Lectura Traduccion', + 'conversacion' => 'Conversación', + 'lectura_traduccion' => 'Lectura / Traducción', ); } diff --git a/www/protected/models/PerfilFuncional.php b/www/protected/models/PerfilFuncional.php index 15e30f8..b21858c 100644 --- a/www/protected/models/PerfilFuncional.php +++ b/www/protected/models/PerfilFuncional.php @@ -5,7 +5,8 @@ * * The followings are the available columns in table 'tbl_perfiles_funcionales': * @property integer $id - * @property string $perfil + * @property string $descripcion + * */ class PerfilFuncional extends CActiveRecord { @@ -35,11 +36,11 @@ class PerfilFuncional extends CActiveRecord // NOTE: you should only define rules for those attributes that // will receive user inputs. return array( - array('perfil', 'required'), - array('perfil', 'length', 'max'=>255), + array('descripcion', 'required'), + array('descripcion', 'length', 'max'=>255), // The following rule is used by search(). // Please remove those attributes that should not be searched. - array('id, perfil', 'safe', 'on'=>'search'), + array('id, descripcion', 'safe', 'on'=>'search'), ); } @@ -51,6 +52,7 @@ class PerfilFuncional extends CActiveRecord // NOTE: you may need to adjust the relation name and the related // class name for the relations automatically generated below. return array( + //'candidatosCapacidadesFuncionales' => array(self::HAS_MANY, 'CandidatosCapacidadesFuncionales', 'funcional_id'), ); } @@ -61,7 +63,7 @@ class PerfilFuncional extends CActiveRecord { return array( 'id' => 'ID', - 'perfil' => 'Perfil', + 'descripcion' => 'Perfil funcional', ); } @@ -77,7 +79,7 @@ class PerfilFuncional extends CActiveRecord $criteria=new CDbCriteria; $criteria->compare('id',$this->id); - $criteria->compare('perfil',$this->perfil,true); + $criteria->compare('descripcion',$this->descripcion,true); return new CActiveDataProvider($this, array( 'criteria'=>$criteria, diff --git a/www/protected/models/PerfilTecnico.php b/www/protected/models/PerfilTecnico.php index 6404d97..842417c 100644 --- a/www/protected/models/PerfilTecnico.php +++ b/www/protected/models/PerfilTecnico.php @@ -5,7 +5,8 @@ * * The followings are the available columns in table 'tbl_perfiles_tecnicos': * @property integer $id - * @property string $perfil + * @property string $descripcion + * */ class PerfilTecnico extends CActiveRecord { @@ -35,11 +36,11 @@ class PerfilTecnico extends CActiveRecord // NOTE: you should only define rules for those attributes that // will receive user inputs. return array( - array('perfil', 'required'), - array('perfil', 'length', 'max'=>255), + array('descripcion', 'required'), + array('descripcion', 'length', 'max'=>255), // The following rule is used by search(). // Please remove those attributes that should not be searched. - array('id, perfil', 'safe', 'on'=>'search'), + array('id, descripcion', 'safe', 'on'=>'search'), ); } @@ -51,6 +52,7 @@ class PerfilTecnico extends CActiveRecord // NOTE: you may need to adjust the relation name and the related // class name for the relations automatically generated below. return array( + //'candidatosCapacidades' => array(self::HAS_MANY, 'CandidatosCapacidades', 'perfil_tecnico_id'), ); } @@ -61,7 +63,7 @@ class PerfilTecnico extends CActiveRecord { return array( 'id' => 'ID', - 'perfil' => 'Perfil', + 'descripcion' => 'Perfil técnico', ); } @@ -77,7 +79,7 @@ class PerfilTecnico extends CActiveRecord $criteria=new CDbCriteria; $criteria->compare('id',$this->id); - $criteria->compare('perfil',$this->perfil,true); + $criteria->compare('descripcion',$this->descripcion,true); return new CActiveDataProvider($this, array( 'criteria'=>$criteria, diff --git a/www/protected/models/Tecnologia.php b/www/protected/models/Tecnologia.php index 338a67e..e91f526 100644 --- a/www/protected/models/Tecnologia.php +++ b/www/protected/models/Tecnologia.php @@ -5,7 +5,7 @@ * * The followings are the available columns in table 'tbl_tecnologias': * @property integer $id - * @property string $tecnologia + * @property string $descripcion * * The followings are the available model relations: * @property CandidatosCapacidadesTecnologias[] $candidatosCapacidadesTecnologiases @@ -38,11 +38,11 @@ class Tecnologia extends CActiveRecord // NOTE: you should only define rules for those attributes that // will receive user inputs. return array( - array('tecnologia', 'required'), - array('tecnologia', 'length', 'max'=>255), + array('descripcion', 'required'), + array('descripcion', 'length', 'max'=>255), // The following rule is used by search(). // Please remove those attributes that should not be searched. - array('id, tecnologia', 'safe', 'on'=>'search'), + array('id, descripcion', 'safe', 'on'=>'search'), ); } @@ -54,7 +54,7 @@ class Tecnologia extends CActiveRecord // NOTE: you may need to adjust the relation name and the related // class name for the relations automatically generated below. return array( - 'candidatosCapacidadesTecnologiases' => array(self::HAS_MANY, 'CandidatosCapacidadesTecnologias', 'id_tecnologia'), + //'candidatosCapacidadesTecnologiases' => array(self::HAS_MANY, 'CandidatoCapacidadTecnologia', 'id_tecnologia'), ); } @@ -65,7 +65,7 @@ class Tecnologia extends CActiveRecord { return array( 'id' => 'ID', - 'tecnologia' => 'Tecnologia', + 'descripcion' => 'Tecnologia', ); } @@ -81,7 +81,7 @@ class Tecnologia extends CActiveRecord $criteria=new CDbCriteria; $criteria->compare('id',$this->id); - $criteria->compare('tecnologia',$this->tecnologia,true); + $criteria->compare('descripcion',$this->descripcion,true); return new CActiveDataProvider($this, array( 'criteria'=>$criteria, diff --git a/www/protected/models/Titulacion.php b/www/protected/models/Titulacion.php index 6dd70ca..352209f 100644 --- a/www/protected/models/Titulacion.php +++ b/www/protected/models/Titulacion.php @@ -5,7 +5,7 @@ * * The followings are the available columns in table 'tbl_titulaciones': * @property integer $id - * @property string $titulacion + * @property string $descripcion */ class Titulacion extends CActiveRecord { @@ -35,11 +35,11 @@ class Titulacion extends CActiveRecord // NOTE: you should only define rules for those attributes that // will receive user inputs. return array( - array('titulacion', 'required'), - array('titulacion', 'length', 'max'=>255), + array('descripcion', 'required'), + array('descripcion', 'length', 'max'=>255), // The following rule is used by search(). // Please remove those attributes that should not be searched. - array('id, titulacion', 'safe', 'on'=>'search'), + array('id, descripcion', 'safe', 'on'=>'search'), ); } @@ -61,7 +61,7 @@ class Titulacion extends CActiveRecord { return array( 'id' => 'ID', - 'titulacion' => 'Titulacion', + 'descripcion' => 'Titulacion', ); } @@ -77,7 +77,7 @@ class Titulacion extends CActiveRecord $criteria=new CDbCriteria; $criteria->compare('id',$this->id); - $criteria->compare('titulacion',$this->titulacion,true); + $criteria->compare('descripcion',$this->descripcion,true); return new CActiveDataProvider($this, array( 'criteria'=>$criteria, diff --git a/www/protected/tests/fixtures/tbl_candidatos_capacidades.php b/www/protected/tests/fixtures/tbl_candidatos_capacidades.php new file mode 100644 index 0000000..2b515e3 --- /dev/null +++ b/www/protected/tests/fixtures/tbl_candidatos_capacidades.php @@ -0,0 +1,17 @@ + array( + 'candidato_id'=>'1', + 'perfil_tecnico_id'=>'1', + 'meses_perfil_tecnico'=>'6', + 'observaciones'=>'Línea de observaciones', + ), + 'capacidad2' => array( + 'candidato_id'=>'1', + 'perfil_tecnico_id'=>'2', + 'meses_perfil_tecnico'=>'12', + 'observaciones'=>'Línea de observaciones', + ), +); +?> diff --git a/www/protected/tests/fixtures/tbl_idiomas.php b/www/protected/tests/fixtures/tbl_idiomas.php index 60e58bb..c9f565d 100644 --- a/www/protected/tests/fixtures/tbl_idiomas.php +++ b/www/protected/tests/fixtures/tbl_idiomas.php @@ -1,17 +1,12 @@ array('idioma'=>'Alemán Conversación'), - 'idioma2' => array('idioma'=>'Francés Leer/Traducción'), - 'idioma3' => array('idioma'=>'Inglés Conversación'), - 'idioma4' => array('idioma'=>'Italiano Conversación'), - 'idioma5' => array('idioma'=>'Portugués Conversación'), - 'idioma6' => array('idioma'=>'--'), - 'idioma7' => array('idioma'=>'Francés Conversación'), - 'idioma8' => array('idioma'=>'Alemán Leer/Tradución'), - 'idioma9' => array('idioma'=>'Inglés Leer/Traducción'), - 'idioma10' => array('idioma'=>'Italiano Leer/Traducción'), - 'idioma11' => array('idioma'=>'Portugués Leer/Traducción') + 'idioma1' => array('descripcion'=>'Alemán'), + 'idioma2' => array('descripcion'=>'Francés'), + 'idioma3' => array('descripcion'=>'Japonés'), + 'idioma4' => array('descripcion'=>'Inglés'), + 'idioma5' => array('descripcion'=>'Italiano'), + 'idioma6' => array('descripcion'=>'Portugués'), ); ?> diff --git a/www/protected/tests/fixtures/tbl_perfiles_funcionales.php b/www/protected/tests/fixtures/tbl_perfiles_funcionales.php index 735eef6..0773b82 100644 --- a/www/protected/tests/fixtures/tbl_perfiles_funcionales.php +++ b/www/protected/tests/fixtures/tbl_perfiles_funcionales.php @@ -1,113 +1,113 @@ array('perfil'=>'ALHAMBRA-AGENTS '), - 'funcional5' => array('perfil'=>'ALHAMBRA-ALHAMBRA '), - 'funcional6' => array('perfil'=>'ALHAMBRA-BRANCHES '), - 'funcional7' => array('perfil'=>'ALHAMBRA-CHANNELS '), - 'funcional8' => array('perfil'=>'ALHAMBRA-CONTACT CENTER'), - 'funcional9' => array('perfil'=>'ALHAMBRA-INTERMEDIARIOS'), - 'funcional10' => array('perfil'=>'ALHAMBRA-INTERNET'), - 'funcional11' => array('perfil'=>'ALHAMBRA-PORTALS'), - 'funcional12' => array('perfil'=>'ALHAMBRA-SELF SERVICES'), - 'funcional13' => array('perfil'=>'ASSET MANAGEMENT'), - 'funcional14' => array('perfil'=>'ASSET MANAGEMENT-GEST.DISCR.CAR'), - 'funcional15' => array('perfil'=>'BANCA PRIVADA '), - 'funcional16' => array('perfil'=>'BANCA PRIVADA-COMUNIC.CLIENT'), - 'funcional17' => array('perfil'=>'BANCA PRIVADA-CRIS(SIST.COME'), - 'funcional18' => array('perfil'=>'BANCA PRIVADA-DWH/MIS'), - 'funcional19' => array('perfil'=>'BANCA PRIVADA-GEST.CARTERAS'), - 'funcional20' => array('perfil'=>'CANALES-BROKER CANALS'), - 'funcional21' => array('perfil'=>'CANALES-CONTACT CENTER'), - 'funcional22' => array('perfil'=>'CANALES-CROSS CANALS'), - 'funcional23' => array('perfil'=>'CANALES-INTERNET'), - 'funcional24' => array('perfil'=>'CANALES-MOVILIDAD'), - 'funcional25' => array('perfil'=>'CANALES-CIRCUIT.CONTR.'), - 'funcional26' => array('perfil'=>'CANALES-OFICINA'), - 'funcional27' => array('perfil'=>'COMP-GLOB.PAGOS -COMP. DE PAGOS'), - 'funcional28' => array('perfil'=>'COMP-GLOB.PAGOS-COMP. GENERALES '), - 'funcional29' => array('perfil'=>'COMP-GLOB.PAGOS-COMP. DE INVERS '), - 'funcional30' => array('perfil'=>'CONSUMER FINANCE '), - 'funcional31' => array('perfil'=>'CONTROL DE CALIDAD-CALIDAD TECNICA '), - 'funcional32' => array('perfil'=>'CONTROL DE CALIDAD-CALIDAD FUNCIONAL'), - 'funcional33' => array('perfil'=>'CRM-AGENDAS'), - 'funcional34' => array('perfil'=>'CRM-CAMPAÑAS'), - 'funcional35' => array('perfil'=>'CRM-CRM'), - 'funcional36' => array('perfil'=>'CRM-GEST.INF.COMERCI'), - 'funcional37' => array('perfil'=>'CRM-INTEL.COMERCIAL'), - 'funcional41' => array('perfil'=>'CUENTAS PERSONALES-CAJA '), - 'funcional42' => array('perfil'=>'CUENTAS PERSONALES-CTAS PERSONALES '), - 'funcional43' => array('perfil'=>'CUENTAS PERSONALES-LIQ.PASIVO '), - 'funcional44' => array('perfil'=>'CUENTAS PERSONALES-SGO '), - 'funcional45' => array('perfil'=>'CUENTAS PERSONALES-PLANES '), - 'funcional46' => array('perfil'=>'CUENTAS PERSONALES-CASH POOLINGES-'), - 'funcional47' => array('perfil'=>'CUENTAS PERSONALES-FONDOS'), - 'funcional48' => array('perfil'=>'CUENTAS PERSONALES-DESCUB Y CREDITO '), - 'funcional49' => array('perfil'=>'CUENTAS PERSONALES-DEP.PL.FIJO Y LI '), - 'funcional50' => array('perfil'=>'CUENTAS PERSONALES-CAJA ALQUILER'), - 'funcional51' => array('perfil'=>'MIS(SIST.INF.GESTIÓN)-AUDITORIA'), - 'funcional52' => array('perfil'=>'MIS(SIST.INF.GESTIÓN-CUMPLIMIENTO) '), - 'funcional53' => array('perfil'=>'MIS(SIST.INF.GESTIÓN)-SATAMARTS '), - 'funcional54' => array('perfil'=>'MIS(SIST.INF.GESTIÓN-GEST ACT Y PAS) '), - 'funcional55' => array('perfil'=>'MIS(SIST.INF.GESTIÓN)-INTERVENCION '), - 'funcional56' => array('perfil'=>'MIS(SIST.INF.GESTIÓN-POS RIEGO CLIENTE) '), - 'funcional57' => array('perfil'=>'NEGOCIOS GLOBALES-BANCA Y MERC GLOBAL '), - 'funcional58' => array('perfil'=>'NEGOCIOS GLOBALES-GEST ACTIVOS '), - 'funcional59' => array('perfil'=>'NEGOCIOS GLOBALES-SEGUROS '), - 'funcional60' => array('perfil'=>'OTRAS FINANCIACIONES-TITULIZACIONES '), - 'funcional61' => array('perfil'=>'OTRAS FINANCIACIONES-LEASING RENTING '), - 'funcional62' => array('perfil'=>'OTRAS FINANCIACIONES-GEST. TITULIZACIONES '), - 'funcional63' => array('perfil'=>'OTRAS FINANCIACIONES-FACTORING'), - 'funcional64' => array('perfil'=>'OTRAS FINANCIACIONES-CREDITOS EURIBOR '), - 'funcional65' => array('perfil'=>'OTRAS FINANCIACIONES-CONFIRMING '), - 'funcional66' => array('perfil'=>'OTRAS FINANCIACION-AVALES '), - 'funcional67' => array('perfil'=>'OTRAS FINANCIACIONES '), - 'funcional69' => array('perfil'=>'PAGOS TRADICIONALES-TRASF NACIONALES '), - 'funcional70' => array('perfil'=>'PAGOS TRADICIONALES-CARTERA '), - 'funcional71' => array('perfil'=>'PAGOS TRADICIONALES-DOMICILIACIONES '), - 'funcional72' => array('perfil'=>'PAGOS TRADICIONALES-TRASF. INTERNACIONALES '), - 'funcional73' => array('perfil'=>'PAGOS Y COBROS ELECTRONICOS-EBA '), - 'funcional74' => array('perfil'=>'PAGOS Y COBROS ELECTRONICOS-SEG. CAMBIO '), - 'funcional75' => array('perfil'=>'PAGOS Y COBROS ELECTRONICOS '), - 'funcional76' => array('perfil'=>'PRESTAMOS'), - 'funcional77' => array('perfil'=>'PROCESOS'), - 'funcional78' => array('perfil'=>'PROCESOS-PROC.PRESTAMOS'), - 'funcional79' => array('perfil'=>'PROCESOS-PROC.EXTRANJERO '), - 'funcional80' => array('perfil'=>'PROCESOS-PROC.BANCA Y AHO '), - 'funcional81' => array('perfil'=>'PROCESOS-PROC.FAC.LEA'), - 'funcional82' => array('perfil'=>'PROCESOS-PROC. VENTAS '), - 'funcional83' => array('perfil'=>'RIESGOS-ADMISION'), - 'funcional84' => array('perfil'=>'RIESGOS-GEST. COBRO'), - 'funcional85' => array('perfil'=>'RIESGOS-SEGUIMIENTO '), - 'funcional86' => array('perfil'=>'RIESGOS IRREGULARES-CIRBE '), - 'funcional87' => array('perfil'=>'RIESGOS IRREGULARES'), - 'funcional88' => array('perfil'=>'SEGUROS'), - 'funcional89' => array('perfil'=>'SIST. ESTRUCTURALES-ARQ. GESTION '), - 'funcional90' => array('perfil'=>'SIST. ESTRUCTURALES-CATAL. PRODUCTOS '), - 'funcional91' => array('perfil'=>'SIST. ESTRUCTURALES-RIESGO DE CAMBIO '), - 'funcional92' => array('perfil'=>'SIST. ESTRUCTURALES-TABLAS GENERALES '), - 'funcional93' => array('perfil'=>'SIST. ESTRUCTURALES-SIST. COM CLIENTE '), - 'funcional94' => array('perfil'=>'SIST. ESTRUCTURALES-BIENES Y GARANTIAS'), - 'funcional95' => array('perfil'=>'SIST. ESTRUCTURALES-CONTROL OPERATIVO '), - 'funcional96' => array('perfil'=>'SIST. ESTRUCTURALES-CONTABILIDAD'), - 'funcional97' => array('perfil'=>'SIST. ESTRUCTURALES-COMP. GENERALES '), - 'funcional98' => array('perfil'=>'SIST. ESTRUCTURALES-BD PERDONAS'), - 'funcional99' => array('perfil'=>'SIST. INTERNOS-ACTIVOS'), - 'funcional100' => array('perfil'=>'SIST. INTERNOS-REC HUMANOS '), - 'funcional101' => array('perfil'=>'SIST. INTERNOS'), - 'funcional102' => array('perfil'=>'SIST. INTERNOS-REMUNERACIONES'), - 'funcional103' => array('perfil'=>'TARJETAS-ACQUIRANCE '), - 'funcional104' => array('perfil'=>'TARJETAS-SIST. ADMON '), - 'funcional105' => array('perfil'=>'TARJETAS-WITCHER PCAS '), - 'funcional106' => array('perfil'=>'TARJETAS'), - 'funcional107' => array('perfil'=>'MEDIOS DE PAGO-CENTRO AUTORIZADOR '), - 'funcional108' => array('perfil'=>'MEDIOS DE PAGO-TARJETAS '), - 'funcional109' => array('perfil'=>'MEDIOS DE PAGO'), - 'funcional110' => array('perfil'=>'PAGOS Y COBROS DOCUMENTARIOS-AUTORIZACION'), - 'funcional111' => array('perfil'=>'VALORES Y ACT FINANCIEROS-BROKER'), - 'funcional112' => array('perfil'=>'VALORES Y ACT FINANCIEROS-ACT. FINANCIEROS '), - 'funcional113' => array('perfil'=>'VALORES Y ACT FINANCIEROS-VALORES'), - 'funcional114' => array('perfil'=>'SWIFT'), - 'funcional115' => array('perfil'=>'0.- sin especialidad funcional'), + 'funcional4' => array('descripcion'=>'ALHAMBRA-AGENTS '), + 'funcional5' => array('descripcion'=>'ALHAMBRA-ALHAMBRA '), + 'funcional6' => array('descripcion'=>'ALHAMBRA-BRANCHES '), + 'funcional7' => array('descripcion'=>'ALHAMBRA-CHANNELS '), + 'funcional8' => array('descripcion'=>'ALHAMBRA-CONTACT CENTER'), + 'funcional9' => array('descripcion'=>'ALHAMBRA-INTERMEDIARIOS'), + 'funcional10' => array('descripcion'=>'ALHAMBRA-INTERNET'), + 'funcional11' => array('descripcion'=>'ALHAMBRA-PORTALS'), + 'funcional12' => array('descripcion'=>'ALHAMBRA-SELF SERVICES'), + 'funcional13' => array('descripcion'=>'ASSET MANAGEMENT'), + 'funcional14' => array('descripcion'=>'ASSET MANAGEMENT-GEST.DISCR.CAR'), + 'funcional15' => array('descripcion'=>'BANCA PRIVADA '), + 'funcional16' => array('descripcion'=>'BANCA PRIVADA-COMUNIC.CLIENT'), + 'funcional17' => array('descripcion'=>'BANCA PRIVADA-CRIS(SIST.COME'), + 'funcional18' => array('descripcion'=>'BANCA PRIVADA-DWH/MIS'), + 'funcional19' => array('descripcion'=>'BANCA PRIVADA-GEST.CARTERAS'), + 'funcional20' => array('descripcion'=>'CANALES-BROKER CANALS'), + 'funcional21' => array('descripcion'=>'CANALES-CONTACT CENTER'), + 'funcional22' => array('descripcion'=>'CANALES-CROSS CANALS'), + 'funcional23' => array('descripcion'=>'CANALES-INTERNET'), + 'funcional24' => array('descripcion'=>'CANALES-MOVILIDAD'), + 'funcional25' => array('descripcion'=>'CANALES-CIRCUIT.CONTR.'), + 'funcional26' => array('descripcion'=>'CANALES-OFICINA'), + 'funcional27' => array('descripcion'=>'COMP-GLOB.PAGOS -COMP. DE PAGOS'), + 'funcional28' => array('descripcion'=>'COMP-GLOB.PAGOS-COMP. GENERALES '), + 'funcional29' => array('descripcion'=>'COMP-GLOB.PAGOS-COMP. DE INVERS '), + 'funcional30' => array('descripcion'=>'CONSUMER FINANCE '), + 'funcional31' => array('descripcion'=>'CONTROL DE CALIDAD-CALIDAD TECNICA '), + 'funcional32' => array('descripcion'=>'CONTROL DE CALIDAD-CALIDAD FUNCIONAL'), + 'funcional33' => array('descripcion'=>'CRM-AGENDAS'), + 'funcional34' => array('descripcion'=>'CRM-CAMPAÑAS'), + 'funcional35' => array('descripcion'=>'CRM-CRM'), + 'funcional36' => array('descripcion'=>'CRM-GEST.INF.COMERCI'), + 'funcional37' => array('descripcion'=>'CRM-INTEL.COMERCIAL'), + 'funcional41' => array('descripcion'=>'CUENTAS PERSONALES-CAJA '), + 'funcional42' => array('descripcion'=>'CUENTAS PERSONALES-CTAS PERSONALES '), + 'funcional43' => array('descripcion'=>'CUENTAS PERSONALES-LIQ.PASIVO '), + 'funcional44' => array('descripcion'=>'CUENTAS PERSONALES-SGO '), + 'funcional45' => array('descripcion'=>'CUENTAS PERSONALES-PLANES '), + 'funcional46' => array('descripcion'=>'CUENTAS PERSONALES-CASH POOLINGES-'), + 'funcional47' => array('descripcion'=>'CUENTAS PERSONALES-FONDOS'), + 'funcional48' => array('descripcion'=>'CUENTAS PERSONALES-DESCUB Y CREDITO '), + 'funcional49' => array('descripcion'=>'CUENTAS PERSONALES-DEP.PL.FIJO Y LI '), + 'funcional50' => array('descripcion'=>'CUENTAS PERSONALES-CAJA ALQUILER'), + 'funcional51' => array('descripcion'=>'MIS(SIST.INF.GESTIÓN)-AUDITORIA'), + 'funcional52' => array('descripcion'=>'MIS(SIST.INF.GESTIÓN-CUMPLIMIENTO) '), + 'funcional53' => array('descripcion'=>'MIS(SIST.INF.GESTIÓN)-SATAMARTS '), + 'funcional54' => array('descripcion'=>'MIS(SIST.INF.GESTIÓN-GEST ACT Y PAS) '), + 'funcional55' => array('descripcion'=>'MIS(SIST.INF.GESTIÓN)-INTERVENCION '), + 'funcional56' => array('descripcion'=>'MIS(SIST.INF.GESTIÓN-POS RIEGO CLIENTE) '), + 'funcional57' => array('descripcion'=>'NEGOCIOS GLOBALES-BANCA Y MERC GLOBAL '), + 'funcional58' => array('descripcion'=>'NEGOCIOS GLOBALES-GEST ACTIVOS '), + 'funcional59' => array('descripcion'=>'NEGOCIOS GLOBALES-SEGUROS '), + 'funcional60' => array('descripcion'=>'OTRAS FINANCIACIONES-TITULIZACIONES '), + 'funcional61' => array('descripcion'=>'OTRAS FINANCIACIONES-LEASING RENTING '), + 'funcional62' => array('descripcion'=>'OTRAS FINANCIACIONES-GEST. TITULIZACIONES '), + 'funcional63' => array('descripcion'=>'OTRAS FINANCIACIONES-FACTORING'), + 'funcional64' => array('descripcion'=>'OTRAS FINANCIACIONES-CREDITOS EURIBOR '), + 'funcional65' => array('descripcion'=>'OTRAS FINANCIACIONES-CONFIRMING '), + 'funcional66' => array('descripcion'=>'OTRAS FINANCIACION-AVALES '), + 'funcional67' => array('descripcion'=>'OTRAS FINANCIACIONES '), + 'funcional69' => array('descripcion'=>'PAGOS TRADICIONALES-TRASF NACIONALES '), + 'funcional70' => array('descripcion'=>'PAGOS TRADICIONALES-CARTERA '), + 'funcional71' => array('descripcion'=>'PAGOS TRADICIONALES-DOMICILIACIONES '), + 'funcional72' => array('descripcion'=>'PAGOS TRADICIONALES-TRASF. INTERNACIONALES '), + 'funcional73' => array('descripcion'=>'PAGOS Y COBROS ELECTRONICOS-EBA '), + 'funcional74' => array('descripcion'=>'PAGOS Y COBROS ELECTRONICOS-SEG. CAMBIO '), + 'funcional75' => array('descripcion'=>'PAGOS Y COBROS ELECTRONICOS '), + 'funcional76' => array('descripcion'=>'PRESTAMOS'), + 'funcional77' => array('descripcion'=>'PROCESOS'), + 'funcional78' => array('descripcion'=>'PROCESOS-PROC.PRESTAMOS'), + 'funcional79' => array('descripcion'=>'PROCESOS-PROC.EXTRANJERO '), + 'funcional80' => array('descripcion'=>'PROCESOS-PROC.BANCA Y AHO '), + 'funcional81' => array('descripcion'=>'PROCESOS-PROC.FAC.LEA'), + 'funcional82' => array('descripcion'=>'PROCESOS-PROC. VENTAS '), + 'funcional83' => array('descripcion'=>'RIESGOS-ADMISION'), + 'funcional84' => array('descripcion'=>'RIESGOS-GEST. COBRO'), + 'funcional85' => array('descripcion'=>'RIESGOS-SEGUIMIENTO '), + 'funcional86' => array('descripcion'=>'RIESGOS IRREGULARES-CIRBE '), + 'funcional87' => array('descripcion'=>'RIESGOS IRREGULARES'), + 'funcional88' => array('descripcion'=>'SEGUROS'), + 'funcional89' => array('descripcion'=>'SIST. ESTRUCTURALES-ARQ. GESTION '), + 'funcional90' => array('descripcion'=>'SIST. ESTRUCTURALES-CATAL. PRODUCTOS '), + 'funcional91' => array('descripcion'=>'SIST. ESTRUCTURALES-RIESGO DE CAMBIO '), + 'funcional92' => array('descripcion'=>'SIST. ESTRUCTURALES-TABLAS GENERALES '), + 'funcional93' => array('descripcion'=>'SIST. ESTRUCTURALES-SIST. COM CLIENTE '), + 'funcional94' => array('descripcion'=>'SIST. ESTRUCTURALES-BIENES Y GARANTIAS'), + 'funcional95' => array('descripcion'=>'SIST. ESTRUCTURALES-CONTROL OPERATIVO '), + 'funcional96' => array('descripcion'=>'SIST. ESTRUCTURALES-CONTABILIDAD'), + 'funcional97' => array('descripcion'=>'SIST. ESTRUCTURALES-COMP. GENERALES '), + 'funcional98' => array('descripcion'=>'SIST. ESTRUCTURALES-BD PERDONAS'), + 'funcional99' => array('descripcion'=>'SIST. INTERNOS-ACTIVOS'), + 'funcional100' => array('descripcion'=>'SIST. INTERNOS-REC HUMANOS '), + 'funcional101' => array('descripcion'=>'SIST. INTERNOS'), + 'funcional102' => array('descripcion'=>'SIST. INTERNOS-REMUNERACIONES'), + 'funcional103' => array('descripcion'=>'TARJETAS-ACQUIRANCE '), + 'funcional104' => array('descripcion'=>'TARJETAS-SIST. ADMON '), + 'funcional105' => array('descripcion'=>'TARJETAS-WITCHER PCAS '), + 'funcional106' => array('descripcion'=>'TARJETAS'), + 'funcional107' => array('descripcion'=>'MEDIOS DE PAGO-CENTRO AUTORIZADOR '), + 'funcional108' => array('descripcion'=>'MEDIOS DE PAGO-TARJETAS '), + 'funcional109' => array('descripcion'=>'MEDIOS DE PAGO'), + 'funcional110' => array('descripcion'=>'PAGOS Y COBROS DOCUMENTARIOS-AUTORIZACION'), + 'funcional111' => array('descripcion'=>'VALORES Y ACT FINANCIEROS-BROKER'), + 'funcional112' => array('descripcion'=>'VALORES Y ACT FINANCIEROS-ACT. FINANCIEROS '), + 'funcional113' => array('descripcion'=>'VALORES Y ACT FINANCIEROS-VALORES'), + 'funcional114' => array('descripcion'=>'SWIFT'), + 'funcional115' => array('descripcion'=>'0.- sin especialidad funcional'), ); ?> diff --git a/www/protected/tests/fixtures/tbl_perfiles_tecnicos.php b/www/protected/tests/fixtures/tbl_perfiles_tecnicos.php index f147103..593e480 100644 --- a/www/protected/tests/fixtures/tbl_perfiles_tecnicos.php +++ b/www/protected/tests/fixtures/tbl_perfiles_tecnicos.php @@ -3,64 +3,64 @@ /**/ return array ( - 'tecnico1' => array('perfil'=>'T.-Administrador de Sistemas Host '), - 'tecnico2' => array('perfil'=>'D.-AF Plat WEB '), - 'tecnico3' => array('perfil'=>'D.-AP Plat Host '), - 'tecnico4' => array('perfil'=>'T.-Administrador de Base de Datos '), - 'tecnico5' => array('perfil'=>'D.-JP Plat Host'), - 'tecnico6' => array('perfil'=>'E.-Jefe de Sala '), - 'tecnico7' => array('perfil'=>'E.-Operador '), - 'tecnico9' => array('perfil'=>'D.-PGJR Plat Host '), - 'tecnico10' => array('perfil'=>'P.-Diseño Técnico de Pruebas '), - 'tecnico12' => array('perfil'=>'T.-Técnico de Redes '), - 'tecnico14' => array('perfil'=>'C.-Consultor Calidad y Metodología '), - 'tecnico17' => array('perfil'=>'T.-Técnico de Soporte '), - 'tecnico18' => array('perfil'=>'C.-Consultor Sectorial Mercado (Banca) '), - 'tecnico19' => array('perfil'=>'C.-Consultor'), - 'tecnico20' => array('perfil'=>'C.-Consultor Sectorial Mercado Telecom '), - 'tecnico21' => array('perfil'=>'S.-Soporte a Desarrollo Plat Host Tradicional'), - 'tecnico22' => array('perfil'=>'D.-AO Plat Host '), - 'tecnico23' => array('perfil'=>'P.-Ejecución de Pruebas'), - 'tecnico24' => array('perfil'=>'D.-AF Plat Host '), - 'tecnico25' => array('perfil'=>'D.-AO Plat WEB '), - 'tecnico26' => array('perfil'=>'D.-AP Plat WEB '), - 'tecnico27' => array('perfil'=>'D.-JP Plat WEB '), - 'tecnico28' => array('perfil'=>'S.-Soporte a Desarrollo Plat WEB '), - 'tecnico31' => array('perfil'=>'D.-AP Plat Unix '), - 'tecnico33' => array('perfil'=>'D.-PG Plat Host Tradicional'), - 'tecnico34' => array('perfil'=>'D.-PG Plat WEB '), - 'tecnico59' => array('perfil'=>'D.-PGSR Plat Host '), - 'tecnico61' => array('perfil'=>'E.- Inst. y Mantº Micro'), - 'tecnico62' => array('perfil'=>'E.- Help-Desk'), - 'tecnico63' => array('perfil'=>'T.-Técnico Seguridad'), - 'tecnico64' => array('perfil'=>'T.- Integrador'), - 'tecnico65' => array('perfil'=>'C.-Consultor Tecnología'), - 'tecnico66' => array('perfil'=>'C.-Consultor Producto'), - 'tecnico67' => array('perfil'=>'C.-Consultor Soporte a Desarrollo'), - 'tecnico68' => array('perfil'=>'C.-Consultor Seguridad'), - 'tecnico69' => array('perfil'=>'S.- Gestión Configuración'), - 'tecnico70' => array('perfil'=>'D.-JP Plat Host Unix '), - 'tecnico72' => array('perfil'=>'D.-AF Plat Unix '), - 'tecnico73' => array('perfil'=>'D.-AO Plat Unix '), - 'tecnico75' => array('perfil'=>'D.-PG Plat Unix '), - 'tecnico76' => array('perfil'=>'D.-PGSR Plat Unix '), - 'tecnico78' => array('perfil'=>'D.-PGSR Plat WEB '), - 'tecnico79' => array('perfil'=>'D.-PGJR Plat UNIX '), - 'tecnico81' => array('perfil'=>'D.-PGJR Plat WEB'), - 'tecnico83' => array('perfil'=>'E.- Planificador'), - 'tecnico84' => array('perfil'=>'P.-Analista Pruebas Host '), - 'tecnico85' => array('perfil'=>'s.-Soporte a Desarrollo Plat. Unix'), - 'tecnico87' => array('perfil'=>'P.-Analista de Pruebas Host Solaris'), - 'tecnico89' => array('perfil'=>'P.-Analista de Pruebas Web'), - 'tecnico92' => array('perfil'=>'P.-Diseño Técnico de Pruebas Host'), - 'tecnico95' => array('perfil'=>'P.-Diseño Técnico de Pruebas WEB'), - 'tecnico101' => array('perfil'=>'P.-Ejecución de Pruebas Web'), - 'tecnico104' => array('perfil'=>'A.- Sin experiencia'), - 'tecnico105' => array('perfil'=>'B.- Becario '), - 'tecnico106' => array('perfil'=>'T.-Técnico Sistemas Windows'), - 'tecnico107' => array('perfil'=>'JP - JEFE DE PROYECTO '), - 'tecnico108' => array('perfil'=>'D.-Maquetador WEB'), - 'tecnico109' => array('perfil'=>'A.- Arquitecto'), + 'tecnico1' => array('descripcion'=>'T.-Administrador de Sistemas Host '), + 'tecnico2' => array('descripcion'=>'D.-AF Plat WEB '), + 'tecnico3' => array('descripcion'=>'D.-AP Plat Host '), + 'tecnico4' => array('descripcion'=>'T.-Administrador de Base de Datos '), + 'tecnico5' => array('descripcion'=>'D.-JP Plat Host'), + 'tecnico6' => array('descripcion'=>'E.-Jefe de Sala '), + 'tecnico7' => array('descripcion'=>'E.-Operador '), + 'tecnico9' => array('descripcion'=>'D.-PGJR Plat Host '), + 'tecnico10' => array('descripcion'=>'P.-Diseño Técnico de Pruebas '), + 'tecnico12' => array('descripcion'=>'T.-Técnico de Redes '), + 'tecnico14' => array('descripcion'=>'C.-Consultor Calidad y Metodología '), + 'tecnico17' => array('descripcion'=>'T.-Técnico de Soporte '), + 'tecnico18' => array('descripcion'=>'C.-Consultor Sectorial Mercado (Banca) '), + 'tecnico19' => array('descripcion'=>'C.-Consultor'), + 'tecnico20' => array('descripcion'=>'C.-Consultor Sectorial Mercado Telecom '), + 'tecnico21' => array('descripcion'=>'S.-Soporte a Desarrollo Plat Host Tradicional'), + 'tecnico22' => array('descripcion'=>'D.-AO Plat Host '), + 'tecnico23' => array('descripcion'=>'P.-Ejecución de Pruebas'), + 'tecnico24' => array('descripcion'=>'D.-AF Plat Host '), + 'tecnico25' => array('descripcion'=>'D.-AO Plat WEB '), + 'tecnico26' => array('descripcion'=>'D.-AP Plat WEB '), + 'tecnico27' => array('descripcion'=>'D.-JP Plat WEB '), + 'tecnico28' => array('descripcion'=>'S.-Soporte a Desarrollo Plat WEB '), + 'tecnico31' => array('descripcion'=>'D.-AP Plat Unix '), + 'tecnico33' => array('descripcion'=>'D.-PG Plat Host Tradicional'), + 'tecnico34' => array('descripcion'=>'D.-PG Plat WEB '), + 'tecnico59' => array('descripcion'=>'D.-PGSR Plat Host '), + 'tecnico61' => array('descripcion'=>'E.- Inst. y Mantº Micro'), + 'tecnico62' => array('descripcion'=>'E.- Help-Desk'), + 'tecnico63' => array('descripcion'=>'T.-Técnico Seguridad'), + 'tecnico64' => array('descripcion'=>'T.- Integrador'), + 'tecnico65' => array('descripcion'=>'C.-Consultor Tecnología'), + 'tecnico66' => array('descripcion'=>'C.-Consultor Producto'), + 'tecnico67' => array('descripcion'=>'C.-Consultor Soporte a Desarrollo'), + 'tecnico68' => array('descripcion'=>'C.-Consultor Seguridad'), + 'tecnico69' => array('descripcion'=>'S.- Gestión Configuración'), + 'tecnico70' => array('descripcion'=>'D.-JP Plat Host Unix '), + 'tecnico72' => array('descripcion'=>'D.-AF Plat Unix '), + 'tecnico73' => array('descripcion'=>'D.-AO Plat Unix '), + 'tecnico75' => array('descripcion'=>'D.-PG Plat Unix '), + 'tecnico76' => array('descripcion'=>'D.-PGSR Plat Unix '), + 'tecnico78' => array('descripcion'=>'D.-PGSR Plat WEB '), + 'tecnico79' => array('descripcion'=>'D.-PGJR Plat UNIX '), + 'tecnico81' => array('descripcion'=>'D.-PGJR Plat WEB'), + 'tecnico83' => array('descripcion'=>'E.- Planificador'), + 'tecnico84' => array('descripcion'=>'P.-Analista Pruebas Host '), + 'tecnico85' => array('descripcion'=>'s.-Soporte a Desarrollo Plat. Unix'), + 'tecnico87' => array('descripcion'=>'P.-Analista de Pruebas Host Solaris'), + 'tecnico89' => array('descripcion'=>'P.-Analista de Pruebas Web'), + 'tecnico92' => array('descripcion'=>'P.-Diseño Técnico de Pruebas Host'), + 'tecnico95' => array('descripcion'=>'P.-Diseño Técnico de Pruebas WEB'), + 'tecnico101' => array('descripcion'=>'P.-Ejecución de Pruebas Web'), + 'tecnico104' => array('descripcion'=>'A.- Sin experiencia'), + 'tecnico105' => array('descripcion'=>'B.- Becario '), + 'tecnico106' => array('descripcion'=>'T.-Técnico Sistemas Windows'), + 'tecnico107' => array('descripcion'=>'JP - JEFE DE PROYECTO '), + 'tecnico108' => array('descripcion'=>'D.-Maquetador WEB'), + 'tecnico109' => array('descripcion'=>'A.- Arquitecto'), ); ?> diff --git a/www/protected/tests/fixtures/tbl_titulaciones.php b/www/protected/tests/fixtures/tbl_titulaciones.php index fda576a..cf44724 100644 --- a/www/protected/tests/fixtures/tbl_titulaciones.php +++ b/www/protected/tests/fixtures/tbl_titulaciones.php @@ -1,31 +1,31 @@ array('titulacion'=>'Ciclo G.Sup. Administración Sistemas Informático'), - 'titulacion2' => array('titulacion'=>'Diplomado en Estadística'), - 'titulacion4' => array('titulacion'=>'FPII Téc. Especialista Administrativo Comercial'), - 'titulacion5' => array('titulacion'=>'FPIII Administración de Empresas'), - 'titulacion6' => array('titulacion'=>'Informática Gestión y Sistemas (No homologado)'), - 'titulacion9' => array('titulacion'=>'Ingeniería Superior en Electrónica'), - 'titulacion10' => array('titulacion'=>'Ingeniería Superior Informática'), - 'titulacion12' => array('titulacion'=>'Ingeniería Técnica Informática Sistemas'), - 'titulacion13' => array('titulacion'=>'Ingeniería Técnica Telecomunicaciones'), - 'titulacion14' => array('titulacion'=>'Ingenieria Superior Telecomunicaciones'), - 'titulacion15' => array('titulacion'=>'Ingenieria Técnica Informática Gestión'), - 'titulacion16' => array('titulacion'=>'Licenciado en Físicas'), - 'titulacion17' => array('titulacion'=>'Licenciado en Informática'), - 'titulacion18' => array('titulacion'=>'Licenciatura C. Químicas'), - 'titulacion19' => array('titulacion'=>'Ciclo G.Sup. Desarrollo Aplicaciones'), - 'titulacion20' => array('titulacion'=>'Licenciatura Publicidad y RRPP'), - 'titulacion21' => array('titulacion'=>'Diseño Grafico (No homologado)'), - 'titulacion22' => array('titulacion'=>'FPII Informática'), - 'titulacion23' => array('titulacion'=>'ESO'), - 'titulacion24' => array('titulacion'=>'Licenciatura en Matemáticas'), - 'titulacion25' => array('titulacion'=>'Ingeniería Superior Industriales'), - 'titulacion26' => array('titulacion'=>'FPII Electrónica'), - 'titulacion27' => array('titulacion'=>'FPIII Informática y/o Electrónica'), - 'titulacion28' => array('titulacion'=>'BUP'), - 'titulacion29' => array('titulacion'=>'Licenciatura Otros'), - 'titulacion30' => array('titulacion'=>'Licenciatura en Economía'), + 'titulacion1' => array('descripcion'=>'Ciclo G.Sup. Administración Sistemas Informático'), + 'titulacion2' => array('descripcion'=>'Diplomado en Estadística'), + 'titulacion4' => array('descripcion'=>'FPII Téc. Especialista Administrativo Comercial'), + 'titulacion5' => array('descripcion'=>'FPIII Administración de Empresas'), + 'titulacion6' => array('descripcion'=>'Informática Gestión y Sistemas (No homologado)'), + 'titulacion9' => array('descripcion'=>'Ingeniería Superior en Electrónica'), + 'titulacion10' => array('descripcion'=>'Ingeniería Superior Informática'), + 'titulacion12' => array('descripcion'=>'Ingeniería Técnica Informática Sistemas'), + 'titulacion13' => array('descripcion'=>'Ingeniería Técnica Telecomunicaciones'), + 'titulacion14' => array('descripcion'=>'Ingenieria Superior Telecomunicaciones'), + 'titulacion15' => array('descripcion'=>'Ingenieria Técnica Informática Gestión'), + 'titulacion16' => array('descripcion'=>'Licenciado en Físicas'), + 'titulacion17' => array('descripcion'=>'Licenciado en Informática'), + 'titulacion18' => array('descripcion'=>'Licenciatura C. Químicas'), + 'titulacion19' => array('descripcion'=>'Ciclo G.Sup. Desarrollo Aplicaciones'), + 'titulacion20' => array('descripcion'=>'Licenciatura Publicidad y RRPP'), + 'titulacion21' => array('descripcion'=>'Diseño Grafico (No homologado)'), + 'titulacion22' => array('descripcion'=>'FPII Informática'), + 'titulacion23' => array('descripcion'=>'ESO'), + 'titulacion24' => array('descripcion'=>'Licenciatura en Matemáticas'), + 'titulacion25' => array('descripcion'=>'Ingeniería Superior Industriales'), + 'titulacion26' => array('descripcion'=>'FPII Electrónica'), + 'titulacion27' => array('descripcion'=>'FPIII Informática y/o Electrónica'), + 'titulacion28' => array('descripcion'=>'BUP'), + 'titulacion29' => array('descripcion'=>'Licenciatura Otros'), + 'titulacion30' => array('descripcion'=>'Licenciatura en Economía'), ); ?> diff --git a/www/protected/tests/unit/CandidatoCapacidadTest.php b/www/protected/tests/unit/CandidatoCapacidadTest.php new file mode 100644 index 0000000..90af8fa --- /dev/null +++ b/www/protected/tests/unit/CandidatoCapacidadTest.php @@ -0,0 +1,21 @@ + 'Candidato', + 'datos_capacidades' => 'CandidatoCapacidad', + ); + + public function testRead() { + $id = $this->datos_candidatos['candidato1']['id']; + $candidato = Candidato::model()->findByPk($id); + $this->assertTrue($candidato instanceof Candidato); + + $capacidades = $candidato->capacidades; + $this->assertEquals(2, $candidato->capacidadesCount); + $capacidad = $capacidades[0]; + $this->assertTrue($capacidad instanceof CandidatoCapacidad); + } +} +?> diff --git a/www/protected/views/candidato/_idiomas.php b/www/protected/views/candidato/_idiomas.php index 349867d..cf581d8 100644 --- a/www/protected/views/candidato/_idiomas.php +++ b/www/protected/views/candidato/_idiomas.php @@ -9,7 +9,7 @@ $idiomaFormConfig = array( 'class'=>'fullwidth', 'items'=>array_merge( array(''=>'-'), - CHtml::listData(Idioma::model()->findAll(), 'idioma', 'idioma') + CHtml::listData(Idioma::model()->findAll(), 'descripcion', 'descripcion') ), ), diff --git a/www/protected/views/candidato/_titulaciones.php b/www/protected/views/candidato/_titulaciones.php index eb3fc46..182671b 100644 --- a/www/protected/views/candidato/_titulaciones.php +++ b/www/protected/views/candidato/_titulaciones.php @@ -9,7 +9,7 @@ $titulacionFormConfig = array( 'class'=>'fullwidth', 'items'=>array_merge( array(''=>'-'), - CHtml::listData(Titulacion::model()->findAll(), 'titulacion', 'titulacion') + CHtml::listData(Titulacion::model()->findAll(), 'descripcion', 'descripcion') ), ), diff --git a/www/protected/views/candidato/index.php b/www/protected/views/candidato/index.php index 8d8ee6e..5d79187 100644 --- a/www/protected/views/candidato/index.php +++ b/www/protected/views/candidato/index.php @@ -69,56 +69,36 @@ $('.search-form form').submit(function(){ 'class' => 'head1', ), 'template'=>'{update}{delete}', - 'cssClassExpression' => '"con1"', + 'cssClassExpression' => '"con0"', ), - /*array( - 'type' => 'html', - 'name' => 'nombreApellidos', - 'value' => 'CHtml::link(CHtml::encode($data->nombreApellidos), array("update", "id"=>$data->id));', - 'headerHtmlOptions'=>array( - 'class' => 'head0 sorting', - ), - ),*/ array( - 'name' => 'id', + 'type' => 'html', + 'name' => 'nombreCompleto', + 'value' => 'CHtml::link(CHtml::encode($data->nombreCompleto), array("update", "id"=>$data->id));', 'headerHtmlOptions'=>array( - 'style' => 'width:35px;', 'class' => 'head0 sorting', - /*'colspan' => '1', - 'rowspan' => '1',*/ ), - 'cssClassExpression' => '"con0"', + 'cssClassExpression' => '"con1"', ), array( 'type' => 'html', - 'name' => 'nombre', - 'value' => 'CHtml::link(CHtml::encode($data->nombre), array("update", "id"=>$data->id));', - 'headerHtmlOptions'=>array( - 'class' => 'head1 sorting', - /*'colspan' => '1', - 'rowspan' => '2',*/ - ), + 'value'=>array($this, 'gridDataColumnCapacidadTecnica'), + 'header' => 'Capacidad técnica', + 'filter' => CHtml::listData(PerfilFuncional::model()->findAll(), 'id', 'descripcion'), 'cssClassExpression' => '"con0"', - ), + ), array( - 'type' => 'html', - 'name' => 'apellidos', - 'value' => 'CHtml::link(CHtml::encode($data->apellidos), array("update", "id"=>$data->id));', - 'headerHtmlOptions'=>array( - 'class' => 'head0 sorting', - /*'colspan' => '1', - 'rowspan' => '2',*/ - ), + 'type' => 'raw', + 'value'=>array($this, 'gridDataColumnCapacidadFuncional'), + 'header' => 'Capacidad funcional', 'cssClassExpression' => '"con1"', - ), + ), array( 'type' => 'html', 'name' => 'estado', 'value' => 'CHtml::link(CHtml::encode($data->estado), "#", array("class" => $data->cssClassEstado));', 'headerHtmlOptions'=>array( 'class' => 'head1 sorting', - /*'colspan' => '1', - 'rowspan' => '2',*/ ), 'cssClassExpression' => '"con0"', ), @@ -128,8 +108,6 @@ $('.search-form form').submit(function(){ 'value' => '($data->fecha_modificacion === NULL) ? CHtml::tag("span", array("class"=>"nodata"), "Nunca") : Time::timeAgoInWords($data->fecha_modificacion);', 'headerHtmlOptions'=>array( 'class' => 'head0 sorting', - /*'colspan' => '1', - 'rowspan' => '2',*/ ), 'cssClassExpression' => '"con1"', ),