/**
  * Lists all models.
  */
 public function actionIndex()
 {
     $this->hasPrivilege(Acl::ACTION_VIEW);
     $this->pageTitle = Lang::t(Common::pluralize($this->resourceLabel));
     $searchModel = UsersView::model()->searchModel(array(), $this->settings[Constants::KEY_PAGINATION], 'username', Users::model()->getFetchCondition());
     $this->render('index', array('model' => $searchModel));
 }
Example #2
0
 /**
  * Lists all models.
  */
 public function actionIndex($dept_id = NULL)
 {
     $this->hasPrivilege(Acl::ACTION_VIEW);
     $this->pageTitle = Lang::t(Common::pluralize($this->resourceLabel));
     $dept_model = NULL;
     if (!empty($dept_id)) {
         $dept_model = Dept::model()->loadModel($dept_id);
         $this->pageDescription = $this->pageTitle;
         $this->pageTitle = $dept_model->name;
         $this->activeTab = 7;
     }
     if (!empty(Controller::$dept_id)) {
         $dept_id = Controller::$dept_id;
     }
     $searchModel = UsersView::model()->searchModel(array('dept_id' => $dept_id), $this->settings[Constants::KEY_PAGINATION], 'username', Users::model()->getFetchCondition());
     $this->render('index', array('model' => $searchModel, 'dept_model' => $dept_model));
 }