Se repasa los filtros del grid
git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_IntranetNueva/trunk@78 77cfc57b-8ef4-1849-9df6-4a38aa5da120
This commit is contained in:
parent
975fb43b94
commit
b28d1c9e6f
@ -43,12 +43,11 @@ class Candidato extends CActiveRecord
|
|||||||
const GENERO_HOMBRE='Hombre';
|
const GENERO_HOMBRE='Hombre';
|
||||||
const GENERO_MUJER='Mujer';
|
const GENERO_MUJER='Mujer';
|
||||||
|
|
||||||
private $_nombreCompleto;
|
|
||||||
public $foto;
|
public $foto;
|
||||||
|
|
||||||
public $capacidad_tecnica_search;
|
public $capacidad_tecnica_search;
|
||||||
public $capacidad_funcional_search;
|
|
||||||
public $nombre_estado_search;
|
public $nombre_estado_search;
|
||||||
|
public $nombreCompleto_search;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Devuelve el nombre completo de un candidato.
|
* Devuelve el nombre completo de un candidato.
|
||||||
@ -56,17 +55,12 @@ class Candidato extends CActiveRecord
|
|||||||
*/
|
*/
|
||||||
public function getNombreCompleto()
|
public function getNombreCompleto()
|
||||||
{
|
{
|
||||||
if(isset($this->_nombreCompleto)) {
|
if(isset($this->nombreCompleto_search)) {
|
||||||
return $this->_nombreCompleto;
|
return $this->nombreCompleto_search;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_nombreCompleto = $this->nombre . ' ' . $this->apellidos;
|
$this->nombreCompleto_search = $this->nombre . ' ' . $this->apellidos;
|
||||||
return $this->_nombreCompleto;
|
return $this->nombreCompleto_search;
|
||||||
}
|
|
||||||
|
|
||||||
public function setNombreCompleto($value)
|
|
||||||
{
|
|
||||||
$this->_nombreCompleto = $value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getRangoSalarial() {
|
public function getRangoSalarial() {
|
||||||
@ -182,10 +176,10 @@ class Candidato extends CActiveRecord
|
|||||||
// 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, id_estado,
|
array('id, id_estado,
|
||||||
nombre_estado_search,
|
nombre_estado_search, nombreCompleto_search, capacidad_tecnica_search,
|
||||||
dni, nombre, apellidos, email, telefono_fijo,
|
dni, email, telefono_fijo,
|
||||||
telefono_movil, sexo, fecha_nacimiento, lugar_nacimiento,
|
telefono_movil, sexo, fecha_nacimiento, lugar_nacimiento,
|
||||||
localidad, fecha_alta, usuario_alta, fecha_modificacion,
|
localidad, fecha_alta, usuario_alta,
|
||||||
usuario_modificacion, carnet_conducir, vehiculo_propio,
|
usuario_modificacion, carnet_conducir, vehiculo_propio,
|
||||||
observaciones, salario_minimo, salario_maximo, procedencia,
|
observaciones, salario_minimo, salario_maximo, procedencia,
|
||||||
disponibilidad_incorporacion, disponibilidad_entrevistas,
|
disponibilidad_incorporacion, disponibilidad_entrevistas,
|
||||||
@ -250,7 +244,7 @@ class Candidato extends CActiveRecord
|
|||||||
'disponibilidad_viajar' => 'Disponibilidad para viajar',
|
'disponibilidad_viajar' => 'Disponibilidad para viajar',
|
||||||
'disponibilidad_proyectos_internacionales' => 'Disponibilidad para proyectos internacionales',
|
'disponibilidad_proyectos_internacionales' => 'Disponibilidad para proyectos internacionales',
|
||||||
|
|
||||||
'nombreCompleto' => 'Candidato',
|
'nombreCompleto_search' => 'Candidato',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -272,14 +266,11 @@ class Candidato extends CActiveRecord
|
|||||||
$criteria->compare( 'estados.descripcion', $this->nombre_estado_search, true );
|
$criteria->compare( 'estados.descripcion', $this->nombre_estado_search, true );
|
||||||
|
|
||||||
$criteria->compare('t.dni',$this->dni,true);
|
$criteria->compare('t.dni',$this->dni,true);
|
||||||
$criteria->compare('t.nombre',$this->nombre,true);
|
|
||||||
$criteria->compare('t.apellidos',$this->apellidos,true);
|
|
||||||
$criteria->compare('t.email',$this->email,true);
|
$criteria->compare('t.email',$this->email,true);
|
||||||
$criteria->compare('t.telefono_fijo',$this->telefono_fijo,true);
|
$criteria->compare('t.telefono_fijo',$this->telefono_fijo,true);
|
||||||
$criteria->compare('t.telefono_movil',$this->telefono_movil,true);
|
$criteria->compare('t.telefono_movil',$this->telefono_movil,true);
|
||||||
|
|
||||||
$criteria->addSearchCondition('concat(nombre, " ", apellidos)', $this->nombreCompleto);
|
$criteria->compare( 'concat(t.nombre, " ", t.apellidos)', $this->nombreCompleto_search, true );
|
||||||
|
|
||||||
$criteria->compare( 'capacidades.perfil_tecnico_id', $this->capacidad_tecnica_search, true );
|
$criteria->compare( 'capacidades.perfil_tecnico_id', $this->capacidad_tecnica_search, true );
|
||||||
|
|
||||||
$sort = new CSort();
|
$sort = new CSort();
|
||||||
@ -293,7 +284,7 @@ class Candidato extends CActiveRecord
|
|||||||
'asc' => 't.fecha_modificacion',
|
'asc' => 't.fecha_modificacion',
|
||||||
'desc' => 't.fecha_modificacion desc',
|
'desc' => 't.fecha_modificacion desc',
|
||||||
),
|
),
|
||||||
'nombreCompleto' => array(
|
'nombreCompleto_search' => array(
|
||||||
'asc' => 'concat(t.nombre, " ", t.apellidos)',
|
'asc' => 'concat(t.nombre, " ", t.apellidos)',
|
||||||
'desc' => 'concat(t.nombre, " ", t.apellidos) desc',
|
'desc' => 'concat(t.nombre, " ", t.apellidos) desc',
|
||||||
),
|
),
|
||||||
|
|||||||
@ -141,7 +141,7 @@ $this->endWidget('zii.widgets.jui.CJuiDialog');
|
|||||||
|
|
||||||
array(
|
array(
|
||||||
'type' => 'html',
|
'type' => 'html',
|
||||||
'name' => 'nombreCompleto',
|
'name' => 'nombreCompleto_search',
|
||||||
'value' => 'CHtml::link(CHtml::encode($data->nombreCompleto), array("view", "id"=>$data->id));',
|
'value' => 'CHtml::link(CHtml::encode($data->nombreCompleto), array("view", "id"=>$data->id));',
|
||||||
'headerHtmlOptions'=>array(
|
'headerHtmlOptions'=>array(
|
||||||
'class' => 'head0 sorting',
|
'class' => 'head0 sorting',
|
||||||
@ -157,7 +157,7 @@ $this->endWidget('zii.widgets.jui.CJuiDialog');
|
|||||||
'headerHtmlOptions'=>array(
|
'headerHtmlOptions'=>array(
|
||||||
'class' => 'head1 sorting',
|
'class' => 'head1 sorting',
|
||||||
),
|
),
|
||||||
// 'filter' => CHtml::listData(PerfilTecnico::model()->findAll(), 'id', 'descripcion'),
|
'filter' => CHtml::listData(PerfilTecnico::model()->findAll(), 'id', 'descripcion'),
|
||||||
'cssClassExpression' => '"con0"',
|
'cssClassExpression' => '"con0"',
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user