From e98d1ac4ab10e0a987b9f1b0e59b40db77bf96ef Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Mon, 18 Apr 2022 10:03:47 +0800 Subject: [PATCH 1/2] * Fix bug #21763. --- module/project/control.php | 9 +++++++++ module/project/view/view.html.php | 2 ++ 2 files changed, 11 insertions(+) diff --git a/module/project/control.php b/module/project/control.php index 67d0753b65..355e900a25 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -749,6 +749,14 @@ class project extends control $this->app->loadClass('pager', $static = true); $pager = new pager(0, 30, 1); + /* Check exist extend fields. */ + $hasExtend = false; + if(!empty($this->config->bizVersion)) + { + $extend = $this->loadModel('workflowaction')->getByModuleAndAction('project', 'view'); + if(!empty($extend) and $extend->extensionType == 'extend') $hasExtend = true; + } + $this->view->title = $this->lang->project->view; $this->view->position = $this->lang->project->view; $this->view->projectID = $projectID; @@ -762,6 +770,7 @@ class project extends control $this->view->planGroup = $this->loadModel('execution')->getPlans($products); $this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), '', $linkedBranches); $this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager, 'all', $projectID); + $this->view->hasExtend = $hasExtend; $this->display(); } diff --git a/module/project/view/view.html.php b/module/project/view/view.html.php index 0fccfacce9..ec6a520af0 100644 --- a/module/project/view/view.html.php +++ b/module/project/view/view.html.php @@ -81,11 +81,13 @@ +
printExtendFields($project, 'div', "position=left&inForm=0");?>
+
createLink('action', 'comment', "objectType=project&objectID=$project->id");?> From b27e1f76d7a0285c8878597f6321de2636b9662d Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Mon, 18 Apr 2022 10:06:35 +0800 Subject: [PATCH 2/2] * Modify field name. --- module/project/control.php | 6 +++--- module/project/view/view.html.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module/project/control.php b/module/project/control.php index 355e900a25..e687df1e20 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -750,11 +750,11 @@ class project extends control $pager = new pager(0, 30, 1); /* Check exist extend fields. */ - $hasExtend = false; + $isExtended = false; if(!empty($this->config->bizVersion)) { $extend = $this->loadModel('workflowaction')->getByModuleAndAction('project', 'view'); - if(!empty($extend) and $extend->extensionType == 'extend') $hasExtend = true; + if(!empty($extend) and $extend->extensionType == 'extend') $isExtended = true; } $this->view->title = $this->lang->project->view; @@ -770,7 +770,7 @@ class project extends control $this->view->planGroup = $this->loadModel('execution')->getPlans($products); $this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), '', $linkedBranches); $this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager, 'all', $projectID); - $this->view->hasExtend = $hasExtend; + $this->view->isExtended = $isExtended; $this->display(); } diff --git a/module/project/view/view.html.php b/module/project/view/view.html.php index ec6a520af0..085887fa70 100644 --- a/module/project/view/view.html.php +++ b/module/project/view/view.html.php @@ -81,7 +81,7 @@
- +
printExtendFields($project, 'div', "position=left&inForm=0");?>