/** * 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'); }
/** * 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); }
/** * 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); }
/** * 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); }
function getList(array $args = array()) { !isset($args['type']) && ($args['type'] = 'cases'); return parent::getList($args); }
/** * 返回相关项目列表 */ 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); }
/** * 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'); }
/** * 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); }
/** * 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; }