/**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new ProfileField('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['ProfileField'])) {
         $model->attributes = $_GET['ProfileField'];
     }
     $this->render('admin', array('model' => $model));
     /*
     		$dataProvider=new CActiveDataProvider('ProfileField', array(
     			'pagination'=>array(
     				'pageSize'=>Yii::app()->controller->module->fields_page_size,
     			),
     			'sort'=>array(
     				'defaultOrder'=>'position',
     			),
     		));
     
     		$this->render('admin',array(
     			'dataProvider'=>$dataProvider,
     		));//*/
 }
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     if (isset($_GET['update_sort'])) {
         $sort = explode(',', $_GET['update_sort']);
         foreach ($sort as $k => $s) {
             $pf = ProfileField::model()->findByPk($s);
             $pf->position = $k + 1;
             $pf->save();
         }
         Yii::app()->end();
     }
     $model = new ProfileField('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['ProfileField'])) {
         $model->attributes = $_GET['ProfileField'];
     }
     $this->render('admin', array('model' => $model));
     /*
     		$dataProvider=new CActiveDataProvider('ProfileField', array(
     			'pagination'=>array(
     				'pageSize'=>Yii::app()->controller->module->fields_page_size,
     			),
     			'sort'=>array(
     				'defaultOrder'=>'position',
     			),
     		));
     
     		$this->render('admin',array(
     			'dataProvider'=>$dataProvider,
     		));//*/
 }