예제 #1
0
 function actionWorkers()
 {
     $model = new Worker('search');
     $model->unsetAttributes();
     if (isset($_GET["Worker"])) {
         $model->attributes = $_GET["Worker"];
     }
     $menuitem[] = array('label' => "Добавить департамент", 'url' => array('department/create'));
     $menuitem[] = array('label' => "Добавить должность", 'url' => array('position/create'));
     $menuitem[] = array('label' => "Добавить работника", 'url' => array('main/addWorker'));
     $this->menu = $menuitem;
     $this->render('workers', array('model' => $model));
 }
예제 #2
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Worker('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Worker'])) {
         $model->attributes = $_GET['Worker'];
     }
     $this->render('admin', array('model' => $model));
 }