/**
  * Sauvegarde les modifications d'un projet
  */
 public function save()
 {
     // Mise à jour des données en base
     $model = new Project_model();
     $model->prjidprj = $this->input->post('prjidprj');
     $model->prjlbtit = $this->input->post('title');
     $model->prjlbdes = $this->input->post('description');
     $model->update($this->db);
     $this->session->set_flashdata('message', formatInfo('Projet "' . $model->prjlbtit . '" mis à jour'));
     redirect('listprojects/index');
 }
Example #2
0
 /**
  * Affichage des infos
  */
 public function index($usridusr)
 {
     $model = User_model::getUser($this->db, $usridusr);
     $data['user'] = $model;
     $data['allProjects'] = Project_model::getAllProjects($this->db);
     $this->load->view('edituser_view', $data);
 }
Example #3
0
 /**
  * Affichage des infos
  */
 public function index($cduidcdu, $prjidprj = null)
 {
     $data['cdu'] = Cdu_model::getCdu($this->db, $cduidcdu);
     if ($prjidprj == null) {
         $data['projects'] = Project_model::getAllProjects($this->db);
     } else {
         $data['project'] = Project_model::getProject($this->db, $prjidprj);
     }
     $this->load->view('editcdu_view', $data);
 }
Example #4
0
 /**
  * Affichage des infos de la règle de gestion
  */
 public function index($rdgidrdg, $prjidprj = null)
 {
     $rdg = RdG_model::getRdG($this->db, $rdgidrdg);
     $data['rdg'] = $rdg;
     if ($prjidprj == null) {
         $data['projects'] = Project_model::getAllProjects($this->db);
     } else {
         $data['project'] = Project_model::getProject($this->db, $prjidprj);
     }
     $this->load->view('editRdG_view', $data);
 }
Example #5
0
 function getList(array $args = array())
 {
     !isset($args['type']) && ($args['type'] = 'cases');
     return parent::getList($args);
 }
Example #6
0
 /**
  * 返回相关项目列表
  */
 function projectList()
 {
     $project = new Project_model();
     $this->project_list_args = array('name' => array('heading' => '名称'), 'people' => array('heading' => '人员', 'cell' => array('class' => 'ellipsis'), 'parser' => array('function' => array($project, 'getCompiledPeople'), 'args' => array('id'))));
     $list = $this->table->setFields($this->project_list_args)->setRowAttributes(array('hash' => '{type}/{id}'))->setData($project->getList(array('people' => $this->people->id, 'limit' => 10, 'orderby' => 'project.id DESC')))->generate();
     return $list;
 }
 /**
  * Retourne l'objet à partir de l'identifiant
  * @param $db
  * @param $rdgidrdg
  * @return Project_model
  */
 static function getProject($db, $prjidprj)
 {
     $row = getProjectRow($db, $prjidprj);
     return Project_model::Project_modelFromRow($row);
 }
Example #8
0
 /**
  * Affichage des règles de gestion
  */
 public function index()
 {
     $data['rdgs'] = RdG_model::getAllRdG($this->db);
     $data['projects'] = Project_model::getAllProjects($this->db);
     $this->load->view('listRdGs_view', $data);
 }
 /**
  * Suppression d'un projet
  * @param $rdgidrdg identifiant à supprimer
  */
 function delete($prjidprj)
 {
     Project_model::delete($this->db, $prjidprj);
     $this->session->set_flashdata('message', formatInfo('Projet supprimé'));
     redirect('listprojects/index');
 }
Example #10
0
 /**
  * Affichage des Cdu
  */
 public function index()
 {
     $data['cdus'] = Cdu_model::getAllCdus($this->db);
     $data['projects'] = Project_model::getAllProjects($this->db);
     $this->load->view('listcdus_view', $data);
 }
Example #11
0
 /**
  * Liste des projets d'un user
  * @param $db
  * @return array(Project_model)
  */
 public function getProjects($db)
 {
     $ids = getUserProjectIds($db, $this->usridusr);
     $allProjects = array();
     foreach ($ids as $projectId) {
         $allProjects[] = Project_model::getProject($db, $projectId);
     }
     return $allProjects;
 }