@@ -14,21 +14,21 @@ |
||
14 | 14 | $this->controller = "Usecases"; |
15 | 15 | } |
16 | 16 | |
17 | - public function updateAction($id=null){ |
|
17 | + public function updateAction($id = null) { |
|
18 | 18 | parent::updateAction(); |
19 | 19 | $this->response->redirect("Projets/read/$id/2"); |
20 | 20 | } |
21 | 21 | |
22 | - public function deleteAction($id = null){ |
|
22 | + public function deleteAction($id = null) { |
|
23 | 23 | $object = Usecase::findFirst("id = $id"); |
24 | 24 | $codeUseCase = $object->getCode(); |
25 | 25 | $taches = Tache::find("codeUseCase = '$codeUseCase'"); |
26 | 26 | //Deletion des taches liés avant deletion de la UseCase |
27 | - foreach($taches as $t){ |
|
27 | + foreach ($taches as $t) { |
|
28 | 28 | $t->delete(); |
29 | 29 | } |
30 | 30 | $object->delete(); |
31 | - $this->response->redirect($_SERVER['HTTP_REFERER']."/2"); |
|
31 | + $this->response->redirect($_SERVER['HTTP_REFERER'] . "/2"); |
|
32 | 32 | } |
33 | 33 | } |
34 | 34 |
@@ -14,7 +14,7 @@ |
||
14 | 14 | $this->controller = "Usecases"; |
15 | 15 | } |
16 | 16 | |
17 | - public function updateAction($id=null){ |
|
17 | + public function updateAction($id = null) { |
|
18 | 18 | parent::updateAction(); |
19 | 19 | $this->response->redirect("Projets/read/$id/2"); |
20 | 20 | } |
@@ -76,8 +76,8 @@ discard block |
||
76 | 76 | $this->jquery->getOnClick("#menu3", "Projets/usecases/$id", "#contentProjet"); |
77 | 77 | $this->jquery->getOnClick("#menu5", "Projets/messages/$id", "#contentProjet"); |
78 | 78 | |
79 | - if($redirect != null){ |
|
80 | - switch($redirect){ |
|
79 | + if ($redirect != null) { |
|
80 | + switch ($redirect) { |
|
81 | 81 | case(1): |
82 | 82 | $this->jquery->get("Projets/contributors/$id", "#contentProjet"); |
83 | 83 | break; |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | $buttonFrm = $this->jquery->bootstrap()->htmlButton("btFrm", "Nouvelle UseCase"); |
174 | 174 | $dialog->addCancelButton(); |
175 | 175 | $users = User::find(); |
176 | - $dialog->renderContent($this->view, "usecases", "frm", array("users" => $users,"id"=> $id)); |
|
176 | + $dialog->renderContent($this->view, "usecases", "frm", array("users" => $users, "id"=> $id)); |
|
177 | 177 | |
178 | 178 | $buttonFrm->onClick($dialog->jsShow()); |
179 | 179 | |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | $buttonFrmEdit = $this->jquery->bootstrap()->htmlButton("btFrmTache", "Nouvelle Tache"); |
183 | 183 | $usecases = Usecase::find(); |
184 | 184 | $dialogTaches->addCancelButton(); |
185 | - $dialogTaches->renderContent($this->view, "taches", "frm", array("usecases" => $usecases,"id"=> $id)); |
|
185 | + $dialogTaches->renderContent($this->view, "taches", "frm", array("usecases" => $usecases, "id"=> $id)); |
|
186 | 186 | $buttonFrmEdit->onClick($dialogTaches->jsShow()); |
187 | 187 | |
188 | 188 | $this->jquery->exec("$('.poids').editable()", true); |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | $contributor = array_unique($contributor, SORT_REGULAR); |
205 | 205 | |
206 | 206 | $this->view->setVar("contributors", $contributor); |
207 | - $this->view->setVar("usecases", $usecases);; |
|
207 | + $this->view->setVar("usecases", $usecases); ; |
|
208 | 208 | |
209 | 209 | } |
210 | 210 |