From 42dc526b171e32b365883b1ae7d4fcefa7922f98 Mon Sep 17 00:00:00 2001 From: chentao Date: Tue, 18 Jul 2023 11:11:48 +0800 Subject: [PATCH] * Correct the edit link for each stage of the waterfall and waterfallplus model projects. --- module/project/ui/execution.html.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/module/project/ui/execution.html.php b/module/project/ui/execution.html.php index dc8ef3a73b..119587cc88 100644 --- a/module/project/ui/execution.html.php +++ b/module/project/ui/execution.html.php @@ -57,6 +57,20 @@ $config->projectExecution->dtable->fieldList['actions']['menu'] = $config->proje $executions = $this->execution->generateRow($executionStats, $users, $avatarList); $executions = initTableData($executions, $config->projectExecution->dtable->fieldList, $this->project); +/* Generate data table fields. */ +$fnGenerateCols = function() use ($config, $project) +{ + $fieldList = $config->projectExecution->dtable->fieldList; + + /* waterfall & waterfallplus model with different edit link. */ + if(in_array($project->model, array('waterfall', 'waterfallplus'))) + { + $fieldList['actions']['actionsMap']['edit']['url'] = createLink('programplan', 'edit', "stageID={rawID}&projectID={projectID}"); + } + + return array_values($fieldList); +}; + /* zin: Define the feature bar on main menu. */ $checked = $this->cookie->showTask ? 'checked' : ''; $productMenuLink = createLink( @@ -118,7 +132,7 @@ toolbar dtable ( set::userMap($users), - set::cols(array_values($config->projectExecution->dtable->fieldList)), + set::cols($fnGenerateCols()), set::data($executions), set::checkable($canBatchAction), set::fixedLeftWidth('44%'),