From f164054b3ba0764c6cb6bda1d9ca1658cf7bb017 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Tue, 26 Nov 2024 16:28:09 +0800 Subject: [PATCH] * [task#132863,doing,0.4h] add release browse page config. --- module/release/config/dtable.php | 8 ++++++++ module/release/control.php | 22 +++++++++++++--------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/module/release/config/dtable.php b/module/release/config/dtable.php index 16167e1ef3..4b88476fea 100644 --- a/module/release/config/dtable.php +++ b/module/release/config/dtable.php @@ -17,6 +17,14 @@ $config->release->dtable->fieldList['id']['title'] = $lang->idAB; $config->release->dtable->fieldList['id']['name'] = 'id'; $config->release->dtable->fieldList['id']['type'] = 'id'; +$config->release->dtable->fieldList['system']['name'] = 'system'; +$config->release->dtable->fieldList['system']['title'] = $lang->release->system; +$config->release->dtable->fieldList['system']['type'] = 'shortNestedTitle'; +$config->release->dtable->fieldList['system']['fixed'] = 'left'; +$config->release->dtable->fieldList['system']['show'] = true; +$config->release->dtable->fieldList['system']['required'] = true; +$config->release->dtable->fieldList['system']['nestedToggle'] = true; + $config->release->dtable->fieldList['name']['title'] = $lang->release->name; $config->release->dtable->fieldList['name']['name'] = 'name'; $config->release->dtable->fieldList['name']['link'] = array('module' => 'release', 'method' => 'view', 'params' => 'releaseID={id}'); diff --git a/module/release/control.php b/module/release/control.php index 7b886d7bff..f409fbd9ba 100755 --- a/module/release/control.php +++ b/module/release/control.php @@ -78,17 +78,21 @@ class release extends control $releaseQuery = $type == 'bySearch' ? $this->releaseZen->getSearchQuery($queryID) : ''; $releases = $this->release->getList($productID, $branch, $type, $sort, $releaseQuery, $pager); + $children = implode(',', array_column($releases, 'releases')); + foreach($releases as $release) $release->desc = strip_tags($release->desc); - $this->view->title = $this->view->product->name . $this->lang->hyphen . $this->lang->release->browse; - $this->view->releases = $this->releaseZen->processReleaseListData($releases); - $this->view->pageSummary = $this->release->getPageSummary($releases, $type); - $this->view->type = $type; - $this->view->orderBy = $orderBy; - $this->view->param = $param; - $this->view->pager = $pager; - $this->view->showBranch = $showBranch; - $this->view->branchPairs = $this->loadModel('branch')->getPairs($productID); + $this->view->title = $this->view->product->name . $this->lang->hyphen . $this->lang->release->browse; + $this->view->releases = $this->releaseZen->processReleaseListData($releases); + $this->view->pageSummary = $this->release->getPageSummary($releases, $type); + $this->view->type = $type; + $this->view->orderBy = $orderBy; + $this->view->param = $param; + $this->view->pager = $pager; + $this->view->showBranch = $showBranch; + $this->view->branchPairs = $this->loadModel('branch')->getPairs($productID); + $this->view->appList = $this->loadModel('system')->getPairs(); + $this->view->childReleases = $this->release->getListByCondition(explode(',', $children)); $this->display(); }