From b8244d5ff62b95a6a4d5631bb939e293ad72ea2e Mon Sep 17 00:00:00 2001 From: chaideqing Date: Wed, 21 Jun 2023 17:30:29 +0800 Subject: [PATCH] * Remove program browse bygrid. --- module/program/control.php | 33 ++--- module/program/view/browse.html.php | 14 +- module/program/view/browsebygrid.html.php | 163 ---------------------- 3 files changed, 15 insertions(+), 195 deletions(-) delete mode 100644 module/program/view/browsebygrid.html.php diff --git a/module/program/control.php b/module/program/control.php index 46ec16de7b..4f6fc2e2a4 100644 --- a/module/program/control.php +++ b/module/program/control.php @@ -53,32 +53,25 @@ class program extends control $this->program->refreshStats(); // Refresh stats fields of projects. - if($programType === 'bygrid') + if(strtolower($status) == 'bysearch') { - $programs = $this->program->getProgramStats($status, 20, $orderBy); + $programs = $this->program->getListBySearch($orderBy, (int)$param); } else { - if(strtolower($status) == 'bysearch') - { - $programs = $this->program->getListBySearch($orderBy, (int)$param); - } - else - { - /* Get top programs and projects. */ - $topObjects = $this->program->getList($status == 'unclosed' ? 'doing,suspended,wait' : $status, $orderBy, $pager, 'top'); - if(!$topObjects) $topObjects = array(0); - $programs = $this->program->getList($status, $orderBy, null, 'child', array_keys($topObjects)); + /* Get top programs and projects. */ + $topObjects = $this->program->getList($status == 'unclosed' ? 'doing,suspended,wait' : $status, $orderBy, $pager, 'top'); + if(!$topObjects) $topObjects = array(0); + $programs = $this->program->getList($status, $orderBy, null, 'child', array_keys($topObjects)); - /* Get summary. */ - $topCount = $indCount = 0; - foreach($programs as $program) - { - if($program->type == 'program' and $program->parent == 0) $topCount ++; - if($program->type == 'project' and $program->parent == 0) $indCount ++; - } - $summary = sprintf($this->lang->program->summary, $topCount, $indCount); + /* Get summary. */ + $topCount = $indCount = 0; + foreach($programs as $program) + { + if($program->type == 'program' and $program->parent == 0) $topCount ++; + if($program->type == 'project' and $program->parent == 0) $indCount ++; } + $summary = sprintf($this->lang->program->summary, $topCount, $indCount); } /* Get PM id list. */ diff --git a/module/program/view/browse.html.php b/module/program/view/browse.html.php index b4ac87b8b1..919182102f 100644 --- a/module/program/view/browse.html.php +++ b/module/program/view/browse.html.php @@ -18,9 +18,6 @@ program->checkedProjects);?> app->getClientLang());?> - - -