From 51fb885b08d057a520ae4b00a18073ecb2e2e865 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Wed, 28 Sep 2022 15:10:49 +0800 Subject: [PATCH 1/2] * Finish task #70482. --- module/product/view/project.html.php | 20 ++++++++++++-------- module/program/view/project.html.php | 1 + module/project/config.php | 14 +++++++------- module/project/view/browsebylist.html.php | 2 +- 4 files changed, 21 insertions(+), 16 deletions(-) diff --git a/module/product/view/project.html.php b/module/product/view/project.html.php index 2037c8943c..edc33bec4e 100644 --- a/module/product/view/project.html.php +++ b/module/product/view/project.html.php @@ -49,11 +49,13 @@ execution->name;?> + + project->status;?> + project->PM;?> + project->budget;?> project->begin;?> project->end;?> - project->status;?> - project->budget;?> project->estimate;?> project->consume;?> project->progress;?> @@ -79,20 +81,22 @@ } ?> + + processStatus('project', $project);?> + + + + PM]) ? $PMList[$project->PM]->id : ''?> PM)) echo html::a($this->createLink('user', 'profile', "userID=$userID", '', true), zget($users, $project->PM), '', "data-toggle='modal' data-type='iframe' data-width='800'");?> - begin;?> - end;?> - processStatus('project', $project);?> - - - app->getClientLang(), array('zh-cn','zh-tw')) ? round((float)$project->budget / 10000, 2) . $this->lang->project->tenThousand : round((float)$project->budget, 2);?> budget != 0 ? zget($this->lang->project->currencySymbol, $project->budgetUnit) . ' ' . $projectBudget : $this->lang->project->future;?> budget != 0 ? 'text-right' : 'text-center';?> + begin;?> + end;?> hours->totalEstimate . $lang->execution->workHourUnit;?> hours->totalConsumed . $lang->execution->workHourUnit;?> diff --git a/module/program/view/project.html.php b/module/program/view/project.html.php index 3f18a3b0b4..519b40d5de 100644 --- a/module/program/view/project.html.php +++ b/module/program/view/project.html.php @@ -54,6 +54,7 @@ $canBatchEdit = common::hasPriv('project', 'batchEdit'); foreach($setting as $value) { if($value->id == 'projectStatus' and $browseType !== 'all') $value->show = false; + if($value->id == 'status' and strpos('all,undone', $browseType) === false) $value->show = false; if($value->show) $this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit); } ?> diff --git a/module/project/config.php b/module/project/config.php index db2d222cdb..3aa217d11c 100644 --- a/module/project/config.php +++ b/module/project/config.php @@ -33,7 +33,7 @@ $config->project->sortFields->budget = 'budget'; global $lang; $config->project->datatable = new stdclass(); -$config->project->datatable->defaultField = array('id', 'name', 'PM', 'status', 'begin', 'end', 'budget', 'progress', 'actions'); +$config->project->datatable->defaultField = array('id', 'name', 'status', 'PM', 'budget', 'begin', 'end', 'progress', 'actions'); $config->project->datatable->fieldList['id']['title'] = 'ID'; $config->project->datatable->fieldList['id']['fixed'] = 'left'; @@ -74,6 +74,12 @@ $config->project->datatable->fieldList['status']['required'] = 'no'; $config->project->datatable->fieldList['status']['sort'] = 'yes'; $config->project->datatable->fieldList['status']['pri'] = '2'; +$config->project->datatable->fieldList['budget']['title'] = 'budget'; +$config->project->datatable->fieldList['budget']['fixed'] = 'no'; +$config->project->datatable->fieldList['budget']['width'] = '100'; +$config->project->datatable->fieldList['budget']['required'] = 'yes'; +$config->project->datatable->fieldList['budget']['pri'] = '3'; + $config->project->datatable->fieldList['begin']['title'] = 'begin'; $config->project->datatable->fieldList['begin']['fixed'] = 'no'; $config->project->datatable->fieldList['begin']['width'] = '115'; @@ -86,12 +92,6 @@ $config->project->datatable->fieldList['end']['width'] = '100'; $config->project->datatable->fieldList['end']['required'] = 'no'; $config->project->datatable->fieldList['end']['pri'] = '3'; -$config->project->datatable->fieldList['budget']['title'] = 'budget'; -$config->project->datatable->fieldList['budget']['fixed'] = 'no'; -$config->project->datatable->fieldList['budget']['width'] = '100'; -$config->project->datatable->fieldList['budget']['required'] = 'yes'; -$config->project->datatable->fieldList['budget']['pri'] = '3'; - $config->project->datatable->fieldList['teamCount']['title'] = 'teamCount'; $config->project->datatable->fieldList['teamCount']['fixed'] = 'no'; $config->project->datatable->fieldList['teamCount']['width'] = '70'; diff --git a/module/project/view/browsebylist.html.php b/module/project/view/browsebylist.html.php index 04fce604f3..6294bfa540 100644 --- a/module/project/view/browsebylist.html.php +++ b/module/project/view/browsebylist.html.php @@ -106,7 +106,7 @@ id == 'status' and strpos(',all,bysearch,', ",$browseType,") === false) $value->show = false; + if($value->id == 'status' and strpos(',all,bysearch,undone,', ",$browseType,") === false) $value->show = false; if($value->id == 'teamCount' and $browseType == 'all') $value->show = false; if(commonModel::isTutorialMode() && ($value->id == 'PM' || $value->id == 'budget' || $value->id == 'teamCount')) $value->show = false; if($value->show) $this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit); From c96db5b857dc93393fb5a85c382ede78771e3985 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Wed, 28 Sep 2022 15:31:44 +0800 Subject: [PATCH 2/2] * Finish task #70482. --- module/program/view/project.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/program/view/project.html.php b/module/program/view/project.html.php index 519b40d5de..77117be746 100644 --- a/module/program/view/project.html.php +++ b/module/program/view/project.html.php @@ -54,7 +54,7 @@ $canBatchEdit = common::hasPriv('project', 'batchEdit'); foreach($setting as $value) { if($value->id == 'projectStatus' and $browseType !== 'all') $value->show = false; - if($value->id == 'status' and strpos('all,undone', $browseType) === false) $value->show = false; + if($value->id == 'status' and strpos('all,unclosed', $browseType) === false) $value->show = false; if($value->show) $this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit); } ?>