diff --git a/module/program/control.php b/module/program/control.php index 9ffbb2f0ce..205bc79bdb 100644 --- a/module/program/control.php +++ b/module/program/control.php @@ -285,6 +285,42 @@ class program extends control $this->display(); } + /** + * Suspend a program. + * + * @param int $programID + * @access public + * @return void + */ + public function PGMSuspend($programID) + { + $this->lang->navGroup->program = 'program'; + $program = $this->program->getPGMByID($programID); + + if(!empty($_POST)) + { + $this->loadModel('action'); + $changes = $this->project->suspend($programID); + if(dao::isError()) die(js::error(dao::getError())); + + if($this->post->comment != '' or !empty($changes)) + { + $actionID = $this->action->create('program', $programID, 'Suspended', $this->post->comment); + $this->action->logHistory($actionID, $changes); + } + $this->executeHooks($programID); + die(js::reload('parent.parent')); + } + + $this->view->title = $this->lang->project->suspend; + $this->view->position[] = $this->lang->project->suspend; + $this->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->actions = $this->loadModel('action')->getList('project', $programID); + $this->view->project = $program; + + $this->display('project', 'suspend'); + } + /** * Delete a program. * diff --git a/module/program/css/pgmbrowse.css b/module/program/css/pgmbrowse.css index 40e1322986..3b1a7d7f3d 100644 --- a/module/program/css/pgmbrowse.css +++ b/module/program/css/pgmbrowse.css @@ -1,2 +1,3 @@ #mainMenu .pull-left .checkbox-primary {display: inline-block; margin-left: 10px;} .main-table tbody>tr>td:first-child, .main-table thead>tr>th:first-child {padding-left: 8px;} +.table tbody>tr>td .dropdown, .table thead>tr>th .dropdown {display: inline-block; line-height: 1;} diff --git a/module/program/view/pgmbrowsebylist.html.php b/module/program/view/pgmbrowsebylist.html.php index c53dfef7ad..f069d378f8 100644 --- a/module/program/view/pgmbrowsebylist.html.php +++ b/module/program/view/pgmbrowsebylist.html.php @@ -13,7 +13,7 @@