diff --git a/module/program/control.php b/module/program/control.php index 9a5da66301..16b38013ff 100644 --- a/module/program/control.php +++ b/module/program/control.php @@ -67,9 +67,11 @@ class program extends control /* Get PM id list. */ $accounts = array(); + $hasProject = false; foreach($programs as $program) { if(!empty($program->PM) and !in_array($program->PM, $accounts)) $accounts[] = $program->PM; + if($hasProject === false and $program->type != 'program') $hasProject = true; } $PMList = $this->loadModel('user')->getListByAccounts($accounts, 'account'); @@ -92,6 +94,7 @@ class program extends control $this->view->programType = $programType; $this->view->PMList = $PMList; $this->view->progressList = $this->program->getProgressList(); + $this->view->hasProject = $hasProject; $this->display(); } diff --git a/module/program/js/browse.js b/module/program/js/browse.js index e716e7b4b2..88dd409049 100644 --- a/module/program/js/browse.js +++ b/module/program/js/browse.js @@ -67,7 +67,7 @@ function showEditCheckbox(show) $tr.find('td:first').find('[name^="projectIdList"]').parent().remove(); } }); - if(show) + if(show && hasProject) { var tableFooter = "