Incam_IntranetNueva/www/protected/extensions/PageSize/PageSize.php
david d23e585db6 - Arreglado grid de candidatos.
- Extensión SelGridView para conservar la fila seleccionada del grid en ordenación/paginación
- Arreglos menores


git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_IntranetNueva/trunk@23 77cfc57b-8ef4-1849-9df6-4a38aa5da120
2012-03-06 16:41:54 +00:00

29 lines
840 B
PHP

<?php
/**
* Simple widjet for selecting page size of gridviews
*
* @author Aruna Attanayake <aruna470@gmail.com>
* @version 1.0
*/
class PageSize extends CWidget
{
public $mPageSizeOptions = array(10=>10, 25=>25, 50=>50, 75=>75, 100=>100);
public $mPageSize = 10;
public $mGridId = '';
public $mDefPageSize = 10;
public function run()
{
Yii::app()->user->setState('pageSize', $this->mPageSize);
$this->mPageSize = null == $this->mPageSize ? $this->mDefPageSize : $this->mPageSize;
echo Yii::t('pagesize', 'Mostrar ');
echo CHtml::dropDownList('pageSize', $this->mPageSize, $this->mPageSizeOptions, array(
'onchange'=>"$.fn.yiiGridView.update('$this->mGridId',{ data:{pageSize: $(this).val() }})",
));
echo Yii::t('pagesize', ' registros');
}
}
?>