- Comienzo de vistas para capacidades
- Añadir nuevos campos al candidato (sin terminar) git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_IntranetNueva/trunk@29 77cfc57b-8ef4-1849-9df6-4a38aa5da120
This commit is contained in:
parent
c8d5d28417
commit
c53815d4f9
@ -25,13 +25,21 @@ return array(
|
|||||||
'charset' => 'utf8',
|
'charset' => 'utf8',
|
||||||
),
|
),
|
||||||
'testdb'=>array(
|
'testdb'=>array(
|
||||||
'class' => 'CDbConnection',
|
'class' => 'CDbConnection',
|
||||||
'connectionString' => 'mysql:host=localhost;dbname=intranet_test',
|
'connectionString' => 'mysql:host=localhost;dbname=intranet_test',
|
||||||
'emulatePrepare' => true,
|
'emulatePrepare' => true,
|
||||||
'username' => 'root',
|
'username' => 'root',
|
||||||
'password' => '',
|
'password' => '',
|
||||||
'charset' => 'utf8',
|
'charset' => 'utf8',
|
||||||
),
|
),
|
||||||
|
'stagedb'=>array(
|
||||||
|
'class' => 'CDbConnection',
|
||||||
|
'connectionString' => 'mysql:host=maquetaweb.ws;dbname=maqueta_intranet_stage',
|
||||||
|
'emulatePrepare' => true,
|
||||||
|
'username' => 'maqueta_intranet',
|
||||||
|
'password' => 'intranet',
|
||||||
|
'charset' => 'utf8',
|
||||||
|
),
|
||||||
|
|
||||||
'fixture'=>array(
|
'fixture'=>array(
|
||||||
'class'=>'system.test.CDbFixtureManager',
|
'class'=>'system.test.CDbFixtureManager',
|
||||||
|
|||||||
@ -33,14 +33,14 @@ $config = array(
|
|||||||
'allowAutoLogin'=>true,
|
'allowAutoLogin'=>true,
|
||||||
),
|
),
|
||||||
// uncomment the following to enable URLs in path-format
|
// uncomment the following to enable URLs in path-format
|
||||||
'urlManager'=>array(
|
/*'urlManager'=>array(
|
||||||
'urlFormat'=>'path',
|
'urlFormat'=>'path',
|
||||||
'rules'=>array(
|
'rules'=>array(
|
||||||
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
|
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
|
||||||
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
|
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
|
||||||
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
|
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
|
||||||
),
|
),
|
||||||
),
|
),*/
|
||||||
'errorHandler'=>array(
|
'errorHandler'=>array(
|
||||||
// use 'site/error' action to display errors
|
// use 'site/error' action to display errors
|
||||||
'errorAction'=>'site/error',
|
'errorAction'=>'site/error',
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
// Set yiiPath (add extra ../../)
|
// Set yiiPath (add extra ../../)
|
||||||
//$yiiPath = dirname(__FILE__) . '/../../../yii/framework/yii.php';
|
$yiiPath = '/home/maqueta/framework/yii.php';
|
||||||
|
|
||||||
// Set YII_DEBUG and YII_TRACE_LEVEL flags
|
// Set YII_DEBUG and YII_TRACE_LEVEL flags
|
||||||
$debug = true;
|
$debug = true;
|
||||||
@ -25,9 +25,9 @@ $configSpecific = array(
|
|||||||
|
|
||||||
// Database
|
// Database
|
||||||
'db' => array(
|
'db' => array(
|
||||||
'connectionString' => 'mysql:host=STAGING_HOST;dbname=STAGING_DBNAME',
|
'connectionString' => 'mysql:host=maquetaweb.ws;dbname=maqueta_intranet_stage',
|
||||||
'username' => 'USERNAME',
|
'username' => 'maqueta_intranet',
|
||||||
'password' => 'PASSWORD',
|
'password' => 'intranet',
|
||||||
),
|
),
|
||||||
|
|
||||||
// Application Log
|
// Application Log
|
||||||
|
|||||||
48
www/protected/migrations/m120308_164418_tbl_candidatos.php
Normal file
48
www/protected/migrations/m120308_164418_tbl_candidatos.php
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class m120308_164418_tbl_candidatos extends CDbMigration
|
||||||
|
{
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
// Carnet de conducir
|
||||||
|
$this->addColumn('tbl_candidatos', 'carnet_conducir', 'string');
|
||||||
|
$this->addColumn('tbl_candidatos', 'vehiculo_propio', 'boolean');
|
||||||
|
|
||||||
|
// Observaciones
|
||||||
|
$this->addColumn('tbl_candidatos', 'observaciones', 'text');
|
||||||
|
|
||||||
|
// Rango de salarios
|
||||||
|
$this->addColumn('tbl_candidatos', 'salario_minimo', 'integer');
|
||||||
|
$this->addColumn('tbl_candidatos', 'salario_maximo', 'integer');
|
||||||
|
|
||||||
|
// Procedencia del candidato
|
||||||
|
$this->addColumn('tbl_candidatos', 'procedencia', 'string');
|
||||||
|
|
||||||
|
// Disponibilidades
|
||||||
|
$this->addColumn('tbl_candidatos', 'disponibilidad_incorporacion', 'string');
|
||||||
|
$this->addColumn('tbl_candidatos', 'disponibilidad_entrevistas', 'string');
|
||||||
|
$this->addColumn('tbl_candidatos', 'disponibilidad_guardias', 'string');
|
||||||
|
$this->addColumn('tbl_candidatos', 'disponibilidad_viajar', 'string');
|
||||||
|
$this->addColumn('tbl_candidatos', 'disponibilidad_proyectos_internacionales', 'string');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
$this->dropColumn('tbl_candidatos', 'disponibilidad_proyectos_internacionales');
|
||||||
|
$this->dropColumn('tbl_candidatos', 'disponibilidad_viajar');
|
||||||
|
$this->dropColumn('tbl_candidatos', 'disponibilidad_guardias');
|
||||||
|
$this->dropColumn('tbl_candidatos', 'disponibilidad_entrevistas');
|
||||||
|
$this->dropColumn('tbl_candidatos', 'disponibilidad_incorporacion');
|
||||||
|
|
||||||
|
$this->dropColumn('tbl_candidatos', 'procedencia');
|
||||||
|
|
||||||
|
$this->dropColumn('tbl_candidatos', 'salario_maximo');
|
||||||
|
$this->dropColumn('tbl_candidatos', 'salario_minimo');
|
||||||
|
|
||||||
|
$this->dropColumn('tbl_candidatos', 'observaciones');
|
||||||
|
|
||||||
|
$this->dropColumn('tbl_candidatos', 'vehiculo_propio');
|
||||||
|
$this->dropColumn('tbl_candidatos', 'carnet_conducir');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -19,6 +19,17 @@
|
|||||||
* @property datetime $fecha_modificacion
|
* @property datetime $fecha_modificacion
|
||||||
* @property integer $usuario_alta
|
* @property integer $usuario_alta
|
||||||
* @property integer $usuario_modificacion
|
* @property integer $usuario_modificacion
|
||||||
|
* @property string $carnet_conducir
|
||||||
|
* @property string $vehiculo_propio
|
||||||
|
* @property text $observaciones
|
||||||
|
* @property integer $salario_minimo
|
||||||
|
* @property integer $salario_maximo
|
||||||
|
* @property string $procedencia
|
||||||
|
* @property string $disponibilidad_incorporacion
|
||||||
|
* @property string $disponibilidad_entrevistas
|
||||||
|
* @property string $disponibilidad_guardias
|
||||||
|
* @property string $disponibilidad_viajar
|
||||||
|
* @property string $disponibilidad_proyectos_internacionales
|
||||||
*
|
*
|
||||||
* The followings are the available model relations:
|
* The followings are the available model relations:
|
||||||
* @property CandidatoCapacidad[] $capacidades
|
* @property CandidatoCapacidad[] $capacidades
|
||||||
@ -32,6 +43,9 @@ class Candidato extends CActiveRecord
|
|||||||
|
|
||||||
private $_nombreCompleto;
|
private $_nombreCompleto;
|
||||||
public $foto;
|
public $foto;
|
||||||
|
|
||||||
|
public $capacidad_tecnica_search;
|
||||||
|
public $capacidad_funcional_search;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Devuelve el nombre completo de un candidato.
|
* Devuelve el nombre completo de un candidato.
|
||||||
@ -120,14 +134,23 @@ class Candidato extends CActiveRecord
|
|||||||
'tooMany'=>'You can upload only 1 user photo.',
|
'tooMany'=>'You can upload only 1 user photo.',
|
||||||
'allowEmpty'=>'true',
|
'allowEmpty'=>'true',
|
||||||
),
|
),
|
||||||
array('dni, estado, nombre, apellidos, email, telefono_fijo, telefono_movil, sexo, lugar_nacimiento, localidad', 'length', 'max'=>255),
|
array('salario_minimo, salario_maximo', 'numerical',
|
||||||
|
'allowEmpty'=>'true'),
|
||||||
|
array('dni, estado, nombre, apellidos, email,
|
||||||
|
telefono_fijo, telefono_movil, sexo, lugar_nacimiento,
|
||||||
|
localidad, carnet_conducir, vehiculo_propio, procedencia,
|
||||||
|
disponibilidad_incorporacion, disponibilidad_entrevistas,
|
||||||
|
disponibilidad_guardias, disponibilidad_viajar,
|
||||||
|
disponibilidad_proyectos_internacionales',
|
||||||
|
'length', 'max'=>255),
|
||||||
|
|
||||||
array('fecha_nacimiento', 'safe'),
|
array('fecha_nacimiento', 'safe'),
|
||||||
// The following rule is used by search().
|
// The following rule is used by search().
|
||||||
// Please remove those attributes that should not be searched.
|
// Please remove those attributes that should not be searched.
|
||||||
array('id, estado, dni, nombre, apellidos, email, telefono_fijo,
|
array('id, estado, dni, nombre, apellidos, email, telefono_fijo,
|
||||||
telefono_movil, sexo, fecha_nacimiento, lugar_nacimiento, localidad,
|
telefono_movil, nombreCompleto,
|
||||||
nombreCompleto, capacidades.',
|
capacidad_tecnica_search, capacidad_funcional_search',
|
||||||
'safe', 'on'=>'search'),
|
'safe', 'on'=>'search'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,7 +192,19 @@ class Candidato extends CActiveRecord
|
|||||||
'lugar_nacimiento' => 'Lugar de nacimiento',
|
'lugar_nacimiento' => 'Lugar de nacimiento',
|
||||||
'localidad' => 'Localidad',
|
'localidad' => 'Localidad',
|
||||||
'fecha_modificacion' => 'Último cambio',
|
'fecha_modificacion' => 'Último cambio',
|
||||||
|
|
||||||
|
'carnet_conducir' => 'Carnet de conducir',
|
||||||
|
'vehiculo_propio' => 'Vehículo propio',
|
||||||
|
'observaciones' => 'Observaciones',
|
||||||
|
'salario_minimo' => 'Salario mínimo',
|
||||||
|
'salario_maximo' => 'Salario máximo',
|
||||||
|
'procedencia' => 'Procedencia',
|
||||||
|
'disponibilidad_incorporacion' => 'Disponibilidad de incorportación',
|
||||||
|
'disponibilidad_entrevistas' => 'Disponibilidad para entrevistas',
|
||||||
|
'disponibilidad_guardias' => 'Disponibilidad para guardias',
|
||||||
|
'disponibilidad_viajar' => 'Disponibilidad para viajar',
|
||||||
|
'disponibilidad_proyectos_internacionales' => 'Disponibilidad para proyectos internacionales',
|
||||||
|
|
||||||
'nombreCompleto' => 'Candidato',
|
'nombreCompleto' => 'Candidato',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -185,10 +220,10 @@ class Candidato extends CActiveRecord
|
|||||||
|
|
||||||
$criteria=new CDbCriteria;
|
$criteria=new CDbCriteria;
|
||||||
|
|
||||||
$criteria->with = array('capacidades');
|
$criteria->with = array('capacidades');//, 'capacidades.capacidadesFuncionales');
|
||||||
$criteria->together = true;
|
$criteria->together = true;
|
||||||
|
|
||||||
$criteria->compare('id',$this->id);
|
$criteria->compare('t.id',$this->id);
|
||||||
$criteria->compare('estado',$this->estado,true);
|
$criteria->compare('estado',$this->estado,true);
|
||||||
$criteria->compare('dni',$this->dni,true);
|
$criteria->compare('dni',$this->dni,true);
|
||||||
$criteria->compare('nombre',$this->nombre,true);
|
$criteria->compare('nombre',$this->nombre,true);
|
||||||
@ -196,12 +231,11 @@ class Candidato extends CActiveRecord
|
|||||||
$criteria->compare('email',$this->email,true);
|
$criteria->compare('email',$this->email,true);
|
||||||
$criteria->compare('telefono_fijo',$this->telefono_fijo,true);
|
$criteria->compare('telefono_fijo',$this->telefono_fijo,true);
|
||||||
$criteria->compare('telefono_movil',$this->telefono_movil,true);
|
$criteria->compare('telefono_movil',$this->telefono_movil,true);
|
||||||
$criteria->compare('sexo',$this->sexo,true);
|
|
||||||
$criteria->compare('fecha_nacimiento',$this->fecha_nacimiento,true);
|
|
||||||
$criteria->compare('lugar_nacimiento',$this->lugar_nacimiento,true);
|
|
||||||
|
|
||||||
$criteria->addSearchCondition('concat(nombre, " ", apellidos)', $this->nombreCompleto);
|
$criteria->addSearchCondition('concat(nombre, " ", apellidos)', $this->nombreCompleto);
|
||||||
|
|
||||||
|
$criteria->compare( 'capacidades.perfil_tecnico_id', $this->capacidad_tecnica_search, true );
|
||||||
|
//$criteria->compare( 'capacidades.capacidadesFuncionales.perfil_funcional_id', $this->capacidad_funcional_search, true );
|
||||||
$sort = new CSort;
|
$sort = new CSort;
|
||||||
$sort->defaultOrder = 'nombre, apellidos ASC';
|
$sort->defaultOrder = 'nombre, apellidos ASC';
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
* @property string $observaciones
|
* @property string $observaciones
|
||||||
*
|
*
|
||||||
* The followings are the available model relations:
|
* The followings are the available model relations:
|
||||||
* @property PerfilesTecnicos $perfilTecnico
|
* @property PerfilTecnico $perfilTecnico
|
||||||
* @property Candidatos $candidato
|
* @property Candidatos $candidato
|
||||||
* @property CandidatoCapacidadFuncional[] $capacidadesFuncionales
|
* @property CandidatoCapacidadFuncional[] $capacidadesFuncionales
|
||||||
* @property CandidatoCapacidadTecnologia[] $tecnologias
|
* @property CandidatoCapacidadTecnologia[] $tecnologias
|
||||||
|
|||||||
98
www/protected/models/CandidatoCapacidadFuncional.php
Normal file
98
www/protected/models/CandidatoCapacidadFuncional.php
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is the model class for table "tbl_candidatos_capacidades_funcionales".
|
||||||
|
*
|
||||||
|
* The followings are the available columns in table 'tbl_candidatos_capacidades_funcionales':
|
||||||
|
* @property integer $id
|
||||||
|
* @property integer $capacidad_id
|
||||||
|
* @property integer $funcional_id
|
||||||
|
* @property integer $meses_funcional
|
||||||
|
*
|
||||||
|
* The followings are the available model relations:
|
||||||
|
* @property CandidatoCapacidad $capacidad
|
||||||
|
* @property PerfilFuncional $perfilFuncional
|
||||||
|
*/
|
||||||
|
class CandidatoCapacidadFuncional extends CActiveRecord
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Returns the static model of the specified AR class.
|
||||||
|
* @param string $className active record class name.
|
||||||
|
* @return CandidatoCapacidadFuncional the static model class
|
||||||
|
*/
|
||||||
|
public static function model($className=__CLASS__)
|
||||||
|
{
|
||||||
|
return parent::model($className);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string the associated database table name
|
||||||
|
*/
|
||||||
|
public function tableName()
|
||||||
|
{
|
||||||
|
return 'tbl_candidatos_capacidades_funcionales';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array validation rules for model attributes.
|
||||||
|
*/
|
||||||
|
public function rules()
|
||||||
|
{
|
||||||
|
// NOTE: you should only define rules for those attributes that
|
||||||
|
// will receive user inputs.
|
||||||
|
return array(
|
||||||
|
array('capacidad_id, funcional_id', 'required'),
|
||||||
|
array('capacidad_id, funcional_id, meses_funcional', 'numerical', 'integerOnly'=>true),
|
||||||
|
// The following rule is used by search().
|
||||||
|
// Please remove those attributes that should not be searched.
|
||||||
|
array('id, capacidad_id, funcional_id, meses_funcional', 'safe', 'on'=>'search'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array relational rules.
|
||||||
|
*/
|
||||||
|
public function relations()
|
||||||
|
{
|
||||||
|
// NOTE: you may need to adjust the relation name and the related
|
||||||
|
// class name for the relations automatically generated below.
|
||||||
|
return array(
|
||||||
|
'capacidad' => array(self::BELONGS_TO, 'CandidatoCapacidad', 'capacidad_id'),
|
||||||
|
'perfilFuncional' => array(self::BELONGS_TO, 'PerfilFuncional', 'funcional_id'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array customized attribute labels (name=>label)
|
||||||
|
*/
|
||||||
|
public function attributeLabels()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'id' => 'ID',
|
||||||
|
'capacidad_id' => 'Capacidad',
|
||||||
|
'funcional_id' => 'Perfil funcional',
|
||||||
|
'meses_funcional' => 'Meses',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves a list of models based on the current search/filter conditions.
|
||||||
|
* @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
|
||||||
|
*/
|
||||||
|
public function search()
|
||||||
|
{
|
||||||
|
// Warning: Please modify the following code to remove attributes that
|
||||||
|
// should not be searched.
|
||||||
|
|
||||||
|
$criteria=new CDbCriteria;
|
||||||
|
|
||||||
|
$criteria->compare('id',$this->id);
|
||||||
|
$criteria->compare('capacidad_id',$this->capacidad_id);
|
||||||
|
$criteria->compare('funcional_id',$this->funcional_id);
|
||||||
|
$criteria->compare('meses_funcional',$this->meses_funcional);
|
||||||
|
|
||||||
|
return new CActiveDataProvider($this, array(
|
||||||
|
'criteria'=>$criteria,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
98
www/protected/models/CandidatoCapacidadTecnologia.php
Normal file
98
www/protected/models/CandidatoCapacidadTecnologia.php
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is the model class for table "tbl_candidatos_capacidades_tecnologias".
|
||||||
|
*
|
||||||
|
* The followings are the available columns in table 'tbl_candidatos_capacidades_tecnologias':
|
||||||
|
* @property integer $id
|
||||||
|
* @property integer $capacidad_id
|
||||||
|
* @property integer $tecnologia_id
|
||||||
|
* @property integer $meses_tecnologia
|
||||||
|
*
|
||||||
|
* The followings are the available model relations:
|
||||||
|
* @property CandidatoCapacidad $capacidad
|
||||||
|
* @property Tecnologia $tecnologia
|
||||||
|
*/
|
||||||
|
class CandidatoCapacidadTecnologia extends CActiveRecord
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Returns the static model of the specified AR class.
|
||||||
|
* @param string $className active record class name.
|
||||||
|
* @return CandidatoCapacidadTecnologia the static model class
|
||||||
|
*/
|
||||||
|
public static function model($className=__CLASS__)
|
||||||
|
{
|
||||||
|
return parent::model($className);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string the associated database table name
|
||||||
|
*/
|
||||||
|
public function tableName()
|
||||||
|
{
|
||||||
|
return 'tbl_candidatos_capacidades_tecnologias';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array validation rules for model attributes.
|
||||||
|
*/
|
||||||
|
public function rules()
|
||||||
|
{
|
||||||
|
// NOTE: you should only define rules for those attributes that
|
||||||
|
// will receive user inputs.
|
||||||
|
return array(
|
||||||
|
array('capacidad_id, tecnologia_id', 'required'),
|
||||||
|
array('capacidad_id, tecnologia_id, meses_tecnologia', 'numerical', 'integerOnly'=>true),
|
||||||
|
// The following rule is used by search().
|
||||||
|
// Please remove those attributes that should not be searched.
|
||||||
|
array('id, capacidad_id, tecnologia_id, meses_tecnologia', 'safe', 'on'=>'search'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array relational rules.
|
||||||
|
*/
|
||||||
|
public function relations()
|
||||||
|
{
|
||||||
|
// NOTE: you may need to adjust the relation name and the related
|
||||||
|
// class name for the relations automatically generated below.
|
||||||
|
return array(
|
||||||
|
'capacidad' => array(self::BELONGS_TO, 'CandidatoCapacidad', 'capacidad_id'),
|
||||||
|
'tecnologia' => array(self::BELONGS_TO, 'Tecnologia', 'tecnologia_id'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array customized attribute labels (name=>label)
|
||||||
|
*/
|
||||||
|
public function attributeLabels()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'id' => 'ID',
|
||||||
|
'capacidad_id' => 'Capacidad',
|
||||||
|
'tecnologia_id' => 'Tecnologia',
|
||||||
|
'meses_tecnologia' => 'Meses',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves a list of models based on the current search/filter conditions.
|
||||||
|
* @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
|
||||||
|
*/
|
||||||
|
public function search()
|
||||||
|
{
|
||||||
|
// Warning: Please modify the following code to remove attributes that
|
||||||
|
// should not be searched.
|
||||||
|
|
||||||
|
$criteria=new CDbCriteria;
|
||||||
|
|
||||||
|
$criteria->compare('id',$this->id);
|
||||||
|
$criteria->compare('capacidad_id',$this->capacidad_id);
|
||||||
|
$criteria->compare('tecnologia_id',$this->tecnologia_id);
|
||||||
|
$criteria->compare('meses_tecnologia',$this->meses_tecnologia);
|
||||||
|
|
||||||
|
return new CActiveDataProvider($this, array(
|
||||||
|
'criteria'=>$criteria,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
63
www/protected/views/candidato/_capacidades.php
Normal file
63
www/protected/views/candidato/_capacidades.php
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
<?php
|
||||||
|
Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/plugins/jquery-ui-1.8.16.custom.min.js');
|
||||||
|
|
||||||
|
$capacidadFormConfig = array(
|
||||||
|
'elements'=>array(
|
||||||
|
'perfil_tecnico_id'=>array(
|
||||||
|
'type'=>'dropdownlist',
|
||||||
|
'layout'=>'{input}',
|
||||||
|
'class'=>'fullwidth',
|
||||||
|
'items'=>array_merge(
|
||||||
|
array(''=>'-'),
|
||||||
|
CHtml::listData(PerfilTecnico::model()->findAll(), 'id', 'descripcion')
|
||||||
|
),
|
||||||
|
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="content nopadding ohidden">
|
||||||
|
<div class="padding1020">
|
||||||
|
<label><?php echo Yii::t('intranet', 'Capacidades'); ?></label>
|
||||||
|
|
||||||
|
<div class="marginleft150">
|
||||||
|
<?php $this->widget('ext.multimodelform.MultiModelForm',array(
|
||||||
|
'id' => 'id_capacidad', //the unique widget id
|
||||||
|
'addItemText' => '', // no quiero mostrar el enlace de añadir
|
||||||
|
'removeText' => 'Eliminar',
|
||||||
|
'removeConfirm' => '¿Desea eliminar esta capacidad?',
|
||||||
|
'tableHtmlOptions' => array(
|
||||||
|
'class' => 'sTable2 lf',
|
||||||
|
),
|
||||||
|
'tableView' => true,
|
||||||
|
'formConfig' => $capacidadFormConfig, //the form configuration array
|
||||||
|
'model' => $capacidad, //instance of the form model
|
||||||
|
|
||||||
|
//if submitted not empty from the controller,
|
||||||
|
//the form will be rendered with validation errors
|
||||||
|
'validatedItems' => $capacidadesValidas,
|
||||||
|
|
||||||
|
//array of member instances loaded from db
|
||||||
|
'data' => $capacidad->findAll('candidato_id=:candidato_id', array(':candidato_id'=>$model->id)),
|
||||||
|
|
||||||
|
'removeHtmlOptions' => array(
|
||||||
|
'class' => 'button plain',
|
||||||
|
),
|
||||||
|
));
|
||||||
|
?>
|
||||||
|
<br clear="all" />
|
||||||
|
<div class="mmf_addlink">
|
||||||
|
<?php
|
||||||
|
echo CHtml::link('Añadir capacidad', '#', array(
|
||||||
|
'class' => 'button plain',
|
||||||
|
'rel' => '.id_capacidad_copy',
|
||||||
|
'id' => 'id_capacidad',
|
||||||
|
));
|
||||||
|
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<br clear="all" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@ -173,7 +173,19 @@ Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/custom/e
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<br clear="all" />
|
<br clear="all" />
|
||||||
|
<div class="widgetbox two_third last form_default">
|
||||||
|
<h3>
|
||||||
|
<span>
|
||||||
|
<legend><?php echo Yii::t('intranet', 'Datos académicos'); ?></legend>
|
||||||
|
</span>
|
||||||
|
</h3>
|
||||||
|
<?php /*$this->renderPartial('_capacidades', array(
|
||||||
|
'model'=>$model,
|
||||||
|
'capacidad'=>$capacidad,
|
||||||
|
'capacidadesValidas'=>$capacidadesValidas,
|
||||||
|
));*/ ?>
|
||||||
|
</div>
|
||||||
|
<br clear="all" />
|
||||||
<div class="form_default">
|
<div class="form_default">
|
||||||
<button type="submit"><?php echo $model->isNewRecord ? 'Crear' : 'Guardar'; ?></button>
|
<button type="submit"><?php echo $model->isNewRecord ? 'Crear' : 'Guardar'; ?></button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -82,15 +82,18 @@ $('.search-form form').submit(function(){
|
|||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'type' => 'html',
|
'type' => 'html',
|
||||||
|
'name' => 'capacidad_tecnica_search',
|
||||||
'value'=>array($this, 'gridDataColumnCapacidadTecnica'),
|
'value'=>array($this, 'gridDataColumnCapacidadTecnica'),
|
||||||
'header' => 'Capacidad técnica',
|
'header' => 'Capacidad técnica',
|
||||||
'filter' => CHtml::listData(PerfilFuncional::model()->findAll(), 'id', 'descripcion'),
|
'filter' => CHtml::listData(PerfilTecnico::model()->findAll(), 'id', 'descripcion'),
|
||||||
'cssClassExpression' => '"con0"',
|
'cssClassExpression' => '"con0"',
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'type' => 'raw',
|
'type' => 'raw',
|
||||||
|
//'name' => 'capacidad_funcional_search',
|
||||||
'value'=>array($this, 'gridDataColumnCapacidadFuncional'),
|
'value'=>array($this, 'gridDataColumnCapacidadFuncional'),
|
||||||
'header' => 'Capacidad funcional',
|
'header' => 'Capacidad funcional',
|
||||||
|
'filter' => CHtml::listData(PerfilFuncional::model()->findAll(), 'id', 'descripcion'),
|
||||||
'cssClassExpression' => '"con1"',
|
'cssClassExpression' => '"con1"',
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
|
|||||||
@ -18,7 +18,9 @@ $this->pageTitle='Modificar candidato "' . $model->nombre . ' ' . $model->apelli
|
|||||||
'model'=>$model,
|
'model'=>$model,
|
||||||
'idioma'=>$idioma,
|
'idioma'=>$idioma,
|
||||||
'titulacion'=>$titulacion,
|
'titulacion'=>$titulacion,
|
||||||
|
//'capacidad'=>$capacidad,
|
||||||
'idiomasValidos'=>$idiomasValidos,
|
'idiomasValidos'=>$idiomasValidos,
|
||||||
'titulacionesValidas'=>$titulacionesValidas,
|
'titulacionesValidas'=>$titulacionesValidas,
|
||||||
|
//'capacidadesValidas'=>$capacidadesValidas,
|
||||||
));
|
));
|
||||||
?>
|
?>
|
||||||
Loading…
Reference in New Issue
Block a user