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':
|
||||
* @property integer $id
|
||||
* @property string $idioma
|
||||
* @property string $conversacion
|
||||
* @property string $lectura_traduccion
|
||||
* @property string descripcion
|
||||
*
|
||||
*/
|
||||
class Idioma extends CActiveRecord
|
||||
@ -39,11 +37,11 @@ class Idioma extends CActiveRecord
|
||||
// NOTE: you should only define rules for those attributes that
|
||||
// will receive user inputs.
|
||||
return array(
|
||||
array('idioma', 'required'),
|
||||
array('idioma, conversacion, lectura_traduccion', '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, idioma, conversacion, lectura_traduccion', 'safe', 'on'=>'search'),
|
||||
array('id, descripcion', 'safe', 'on'=>'search'),
|
||||
);
|
||||
}
|
||||
|
||||
@ -65,9 +63,7 @@ class Idioma extends CActiveRecord
|
||||
{
|
||||
return array(
|
||||
'id' => 'ID',
|
||||
'idioma' => 'Idioma',
|
||||
'conversacion' => 'Conversación',
|
||||
'lectura_traduccion' => 'Lectura / Traducción',
|
||||
'descripcion' => 'Descripción',
|
||||
);
|
||||
}
|
||||
|
||||
@ -81,14 +77,15 @@ class Idioma extends CActiveRecord
|
||||
// should not be searched.
|
||||
|
||||
$criteria=new CDbCriteria;
|
||||
|
||||
$criteria->compare('id',$this->id);
|
||||
$criteria->compare('idioma',$this->idioma,true);
|
||||
$criteria->compare('conversacion',$this->conversacion,true);
|
||||
$criteria->compare('lectura_traduccion',$this->lectura_traduccion,true);
|
||||
$criteria->compare('descripcion',$this->descripcion,true);
|
||||
|
||||
$sort = new CSort;
|
||||
$sort->defaultOrder = 'descripcion ASC';
|
||||
|
||||
return new CActiveDataProvider($this, array(
|
||||
'criteria'=>$criteria,
|
||||
'sort' => $sort,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user