/**
  * * Gerencia todos os projetos de um dado GT
  * @param integer $id - Identificador do GT
  */
 public function actionAdminProjeto($id)
 {
     //Verifica se � um GT v�lido
     $gt = GrupoTrabalho::model()->findByPk($id);
     if ($gt == null) {
         //Dispara erro.
         throw new CHttpException(400, 'Invalid request. Please do not repeat this request again.');
     }
     $model = new Projeto('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Projeto'])) {
         $model->attributes = $_GET['Projeto'];
     }
     //Seta o grupo de trabalho - que é estático
     $model->cod_gt = $gt->cod_gt;
     $this->render('/projeto/admin', array('model' => $model));
 }
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Projeto('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Projeto'])) {
         $model->attributes = $_GET['Projeto'];
     }
     $this->render('admin', array('model' => $model));
 }