From d24ea88a1c2084af26cb072bc8a7fb6486d23156 Mon Sep 17 00:00:00 2001 From: Yagami Date: Thu, 9 Feb 2023 15:08:41 +0800 Subject: [PATCH] * Code for dtable. --- module/execution/model.php | 7 ++++++- module/execution/view/all.html.php | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/module/execution/model.php b/module/execution/model.php index 07577d865e..060ee57b4f 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1682,7 +1682,10 @@ class executionModel extends model } } - foreach($childList as $id) unset($executions[$id]); + if($this->app->moduleName != 'execution' and $this->app->methodName != 'all') + { + foreach($childList as $id) unset($executions[$id]); + } return array_values($executions); } @@ -5225,6 +5228,8 @@ class executionModel extends model $link = $execution->type == 'kanban' ? helper::createLink('execution', 'kanban', "id=$execution->id") : helper::createLink('execution', 'task', "id=$execution->id"); $execution->name = "{$this->lang->execution->typeList[$execution->type]} " . html::a($link, $execution->name); $execution->project = $execution->projectName; + $execution->parent = $execution->parent ? $execution->parent : ''; + $execution->asParent = !empty($execution->children); $execution->status = zget($this->lang->execution->statusList, $execution->status); $execution->PM = zget($users, $execution->PM); $execution->progress = $execution->hours->progress; diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php index 1f4800def6..3c7b625efd 100644 --- a/module/execution/view/all.html.php +++ b/module/execution/view/all.html.php @@ -87,6 +87,7 @@ js::set('isCNLang', !$this->loadModel('common')->checkNotCN()) const options = { height: 'auto', striped: true, + plugins: ['nested'], cols: cols, data: data, };