From 9a5705e068ef992d0d72e3fce29d7e077b468b66 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Wed, 9 Feb 2022 15:56:43 +0800 Subject: [PATCH] * Finish task #48863. --- extension/lite/datatable/ext/model/lite.php | 36 +++++++++++++++++++++ extension/lite/story/ext/config/lite.php | 12 +++++++ 2 files changed, 48 insertions(+) create mode 100644 extension/lite/datatable/ext/model/lite.php diff --git a/extension/lite/datatable/ext/model/lite.php b/extension/lite/datatable/ext/model/lite.php new file mode 100644 index 0000000000..2e8b415aed --- /dev/null +++ b/extension/lite/datatable/ext/model/lite.php @@ -0,0 +1,36 @@ +config->$module)) $this->loadModel($module); + if($this->session->currentProductType === 'normal') unset($this->config->$module->datatable->fieldList['branch']); + foreach($this->config->$module->datatable->fieldList as $field => $items) + { + if($field === 'branch') + { + if($this->session->currentProductType === 'branch') $this->config->$module->datatable->fieldList[$field]['title'] = $this->lang->datatable->branch; if($this->session->currentProductType === 'platform') $this->config->$module->datatable->fieldList[$field]['title'] = $this->lang->datatable->platform; + continue; } + $title = zget($this->lang->$module, $items['title'], zget($this->lang, $items['title'], $items['title'])); + $this->config->$module->datatable->fieldList[$field]['title'] = $title; + } + + if($this->config->edition != 'open' and $module != 'story') + { + $fields = $this->loadModel('workflowfield')->getList($module); + foreach($fields as $field) + { + if($field->buildin) continue; + $this->config->$module->datatable->fieldList[$field->field]['title'] = $field->name; + $this->config->$module->datatable->fieldList[$field->field]['width'] = '120'; + $this->config->$module->datatable->fieldList[$field->field]['fixed'] = 'no'; + $this->config->$module->datatable->fieldList[$field->field]['required'] = 'no'; + } + } + return $this->config->$module->datatable->fieldList; +} diff --git a/extension/lite/story/ext/config/lite.php b/extension/lite/story/ext/config/lite.php index 2c44805be7..0f3a2aef87 100644 --- a/extension/lite/story/ext/config/lite.php +++ b/extension/lite/story/ext/config/lite.php @@ -7,3 +7,15 @@ $config->story->list->exportFields = ' closedBy, closedDate, closedReason, lastEditedBy, lastEditedDate, childStories, linkStories, duplicateStory, files'; + +$config->story->datatable->defaultField = array('id', 'pri', 'title', 'openedBy', 'assignedTo', 'estimate', 'status', 'actions'); + +unset($config->story->datatable->fieldList['plan']); +unset($config->story->datatable->fieldList['source']); +unset($config->story->datatable->fieldList['sourceNote']); +unset($config->story->datatable->fieldList['stage']); +unset($config->story->datatable->fieldList['category']); +unset($config->story->datatable->fieldList['feedbackBy']); +unset($config->story->datatable->fieldList['notifyEmail']); +unset($config->story->datatable->fieldList['bugCount']); +unset($config->story->datatable->fieldList['caseCount']);