Se añade la gestión de idiomas
git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_IntranetNueva/trunk@46 77cfc57b-8ef4-1849-9df6-4a38aa5da120
This commit is contained in:
parent
54ac02d6da
commit
619cbf05e3
@ -5,9 +5,7 @@
|
|||||||
*
|
*
|
||||||
* The followings are the available columns in table 'tbl_idiomas':
|
* The followings are the available columns in table 'tbl_idiomas':
|
||||||
* @property integer $id
|
* @property integer $id
|
||||||
* @property string $idioma
|
* @property string descripcion
|
||||||
* @property string $conversacion
|
|
||||||
* @property string $lectura_traduccion
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class Idioma extends CActiveRecord
|
class Idioma extends CActiveRecord
|
||||||
@ -39,11 +37,11 @@ class Idioma extends CActiveRecord
|
|||||||
// NOTE: you should only define rules for those attributes that
|
// NOTE: you should only define rules for those attributes that
|
||||||
// will receive user inputs.
|
// will receive user inputs.
|
||||||
return array(
|
return array(
|
||||||
array('idioma', 'required'),
|
array('descripcion', 'required'),
|
||||||
array('idioma, conversacion, lectura_traduccion', 'length', 'max'=>255),
|
array('descripcion', 'length', 'max'=>255),
|
||||||
// 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, idioma, conversacion, lectura_traduccion', 'safe', 'on'=>'search'),
|
array('id, descripcion', 'safe', 'on'=>'search'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,9 +63,7 @@ class Idioma extends CActiveRecord
|
|||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
'id' => 'ID',
|
'id' => 'ID',
|
||||||
'idioma' => 'Idioma',
|
'descripcion' => 'Descripción',
|
||||||
'conversacion' => 'Conversación',
|
|
||||||
'lectura_traduccion' => 'Lectura / Traducción',
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,14 +77,15 @@ class Idioma extends CActiveRecord
|
|||||||
// should not be searched.
|
// should not be searched.
|
||||||
|
|
||||||
$criteria=new CDbCriteria;
|
$criteria=new CDbCriteria;
|
||||||
|
|
||||||
$criteria->compare('id',$this->id);
|
$criteria->compare('id',$this->id);
|
||||||
$criteria->compare('idioma',$this->idioma,true);
|
$criteria->compare('descripcion',$this->descripcion,true);
|
||||||
$criteria->compare('conversacion',$this->conversacion,true);
|
|
||||||
$criteria->compare('lectura_traduccion',$this->lectura_traduccion,true);
|
$sort = new CSort;
|
||||||
|
$sort->defaultOrder = 'descripcion ASC';
|
||||||
|
|
||||||
return new CActiveDataProvider($this, array(
|
return new CActiveDataProvider($this, array(
|
||||||
'criteria'=>$criteria,
|
'criteria'=>$criteria,
|
||||||
|
'sort' => $sort,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user