-

execution->createExec : $lang->execution->create;?>

+

systemMode == 'new')) ? $lang->execution->createExec : $lang->execution->create;?>

- +
+ systemMode == 'new'):?> + - + - + @@ -84,7 +86,7 @@ - + @@ -142,7 +144,7 @@ - + id == 'status' and $browseType !== 'all') $value->show = false; - if($value->show) $this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit); - } + foreach($setting as $value) + { + if($value->id == 'status' and $browseType !== 'all') $value->show = false; + if($value->id == 'teamCount' and $browseType == 'all') $value->show = false; + if($value->show) $this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit); + } ?> diff --git a/module/upgrade/model.php b/module/upgrade/model.php index da0d745d0a..46c59a8029 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -4055,6 +4055,20 @@ class upgradeModel extends model $this->dao->replace(TABLE_GROUPPRIV)->data($grouppriv)->exec(); } + $stmt = $this->dao->select('*')->from(TABLE_GROUPPRIV)->where('module')->eq('doc')->andWhere('method')->eq('createlib')->query(); + while($grouppriv = $stmt->fetch()) + { + $grouppriv->method = 'createLib'; + $this->dao->replace(TABLE_GROUPPRIV)->data($grouppriv)->exec(); + } + + $stmt = $this->dao->select('*')->from(TABLE_GROUPPRIV)->where('module')->eq('doc')->andWhere('method')->eq('editlib')->query(); + while($grouppriv = $stmt->fetch()) + { + $grouppriv->method = 'editLib'; + $this->dao->replace(TABLE_GROUPPRIV)->data($grouppriv)->exec(); + } + return true; } From 00ec6ab21a09eb0df18b0991b594b328a3abee8d Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Fri, 2 Apr 2021 14:13:23 +0800 Subject: [PATCH 9/9] * Fix error for batch create stories in project. --- module/story/control.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/story/control.php b/module/story/control.php index 39567d0591..3f9e668c5a 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -348,17 +348,17 @@ class story extends control if($executionID) { - $this->execution->setMenu($executionID); - $execution = $this->dao->findById((int)$executionID)->from(TABLE_EXECUTION)->fetch(); if($execution->type == 'project') { + $this->project->setMenu($executionID); $this->app->rawModule = 'projectstory'; $this->lang->navGroup->story = 'project'; - $this->lang->product->menu = $this->lang->menu->{$execution->model}; + $this->lang->product->menu = $this->lang->{$execution->model}->menu; } else { + $this->execution->setMenu($executionID); $this->app->rawModule = 'execution'; $this->lang->navGroup->story = 'execution'; }
execution->project;?>
execution->execName : $lang->execution->name;?>systemMode == 'new')) ? $lang->execution->execName : $lang->execution->name;?>
execution->execCode : $lang->execution->code;?>systemMode == 'new')) ? $lang->execution->execCode : $lang->execution->code;?>
execution->execType : $lang->execution->type;?>systemMode == 'new')) ? $lang->execution->execType : $lang->execution->type;?> execution->lifeTimeList, '', "class='form-control' onchange='showLifeTimeTips()'"); ?>
execution->typeDesc;?>
execution->execDesc : $lang->execution->desc;?>systemMode == 'new')) ? $lang->execution->execDesc : $lang->execution->desc;?> fetch('user', 'ajaxPrintTemplates', 'type=execution&link=desc');?> diff --git a/module/user/model.php b/module/user/model.php index 827820528b..1da428f6cf 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -2291,7 +2291,7 @@ class userModel extends model } /* Judge sprint auth. */ - if(($project->type == 'sprint' || $project->type == 'stage') && $project->acl == 'private') + if(($project->type == 'sprint' || $project->type == 'stage') && $project->acl == 'private' && $this->config->systemMode == 'new') { $parent = $this->dao->select('openedBy,PM')->from(TABLE_PROJECT)->where('id')->eq($project->project)->fetch(); $users[$parent->openedBy] = $parent->openedBy; From 6b924b4ea1bd6de4d595892daf2faa5659265eba Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Fri, 2 Apr 2021 13:47:40 +0800 Subject: [PATCH 5/9] * Fix error. --- module/custom/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/custom/control.php b/module/custom/control.php index 00b5a84737..ce5e543de9 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -540,7 +540,7 @@ class custom extends control $mode = zget($this->config->global, 'mode', 'classic'); if($mode == 'new') { - if(isset($this->config->global->upgradeStep) and $this->config->global->upgradeStep == 'mergeProgram') $this->locate($this->createLink('upgrade', 'mergeProgram')); + if(isset($this->config->global->upgradeStep) and $this->config->global->upgradeStep == 'mergeProgram') $this->locate($this->createLink('upgrade', 'mergeProgram'), 'parent'); unset($_SESSION['upgrading']); $this->locate(inlink('index')); From 3adec9139236d6d1b07f1346579f3ff3f79e8925 Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Fri, 2 Apr 2021 13:53:01 +0800 Subject: [PATCH 6/9] * Adjust the product getSwitcher link for manage module. --- module/tree/control.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/tree/control.php b/module/tree/control.php index 6a03bac340..904762e957 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -30,12 +30,12 @@ class tree extends control if($this->app->openApp == 'product') { - $this->product->setMenu($rootID);; + $this->product->setMenu($rootID, 0, 0, '', $viewType);; } else if($this->app->openApp == 'qa') { $products = $this->product->getPairs('noclosed'); - $this->loadModel('qa')->setMenu($products, $rootID);; + $this->loadModel('qa')->setMenu($products, $rootID, 0, $viewType);; } else if($this->app->openApp == 'project') { @@ -83,7 +83,7 @@ class tree extends control /* Set menu.*/ $products = $this->product->getPairs(); $this->product->saveState($rootID, $products); - $this->product->setMenu($rootID); + $this->product->setMenu($rootID, 0, 0, '', $viewType); unset($products[$rootID]); $currentProduct = key($products); From 1a026eaafd580ef00520f589e8bf61c59d7289c6 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Fri, 2 Apr 2021 14:02:21 +0800 Subject: [PATCH 7/9] * Fix bug. --- module/group/lang/resource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index 0674b5e6ee..e8a824480d 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -1013,7 +1013,7 @@ $lang->resource->doc = new stdclass(); $lang->resource->doc->index = 'index'; $lang->resource->doc->browse = 'browse'; $lang->resource->doc->createlib = 'createlib'; -$lang->resource->doc->editlib = 'editlib'; +$lang->resource->doc->editlib = 'editLib'; $lang->resource->doc->deleteLib = 'deleteLib'; $lang->resource->doc->create = 'create'; $lang->resource->doc->view = 'view'; From 4a64b9df8220c2cc6cac94c313564dd0f72dad3c Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 2 Apr 2021 14:06:34 +0800 Subject: [PATCH 8/9] * adjust for project browse style. --- config/config.php | 8 ++++---- module/custom/model.php | 3 ++- module/datatable/model.php | 24 ++++++++++++++++++++++-- module/project/config.php | 25 ++++++++++++++++++++----- module/project/css/browse.css | 1 + module/project/model.php | 2 +- module/project/view/browse.html.php | 11 ++++++----- module/upgrade/model.php | 14 ++++++++++++++ 8 files changed, 70 insertions(+), 18 deletions(-) diff --git a/config/config.php b/config/config.php index aaeef0b3ff..68f4151936 100644 --- a/config/config.php +++ b/config/config.php @@ -37,10 +37,10 @@ $config->themes['default'] = 'default'; $config->langs['zh-cn'] = '简体'; $config->langs['zh-tw'] = '繁體'; $config->langs['en'] = 'English'; -$config->langs['de'] = 'Deutsch'; -$config->langs['fr'] = 'Français'; -$config->langs['vi'] = 'Tiếng Việt'; -$config->langs['ja'] = '日本語'; +//$config->langs['de'] = 'Deutsch'; +//$config->langs['fr'] = 'Français'; +//$config->langs['vi'] = 'Tiếng Việt'; +//$config->langs['ja'] = '日本語'; /* 设备类型视图文件前缀。The prefix for view file for different device. */ $config->devicePrefix['mhtml'] = ''; diff --git a/module/custom/model.php b/module/custom/model.php index 91f7308d9c..3b51c53e50 100644 --- a/module/custom/model.php +++ b/module/custom/model.php @@ -328,7 +328,8 @@ class customModel extends model if(empty($module)) $module = 'main'; global $app, $lang, $config; - if($module == 'main') $allMenu = $lang->menu; + $allMenu = new stdclass(); + if($module == 'main' and !empty($lang->menu)) $allMenu = $lang->menu; if($module != 'main' and isset($lang->menu->$module) and isset($lang->menu->{$module}['subMenu'])) $allMenu = $lang->menu->{$module}['subMenu']; if($module == 'product' and isset($allMenu->branch)) $allMenu->branch = str_replace('@branch@', $lang->custom->branch, $allMenu->branch); $flowModule = $config->global->flow . '_' . $module; diff --git a/module/datatable/model.php b/module/datatable/model.php index d37b0db5c6..d45cc009e8 100644 --- a/module/datatable/model.php +++ b/module/datatable/model.php @@ -88,6 +88,11 @@ class datatableModel extends model $set->title = $fieldList[$id]['title']; $set->sort = isset($fieldList[$id]['sort']) ? $fieldList[$id]['sort'] : 'yes'; $set->name = isset($fieldList[$id]['name']) ? $fieldList[$id]['name'] : ''; + + if(isset($fieldList[$id]['minWidth'])) $set->minWidth = $fieldList[$id]['minWidth']; + if(isset($fieldList[$id]['maxWidth'])) $set->maxWidth = $fieldList[$id]['maxWidth']; + if(isset($fieldList[$id]['pri'])) $set->pri = $fieldList[$id]['pri']; + $setting[$key] = $set; } } @@ -152,10 +157,25 @@ class datatableModel extends model $title = isset($col->title) ? "title='$col->title'" : ''; $title = (isset($col->name) and $col->name) ? "title='$col->name'" : $title; if($id == 'id' and (int)$width < 90) $width = '90px'; - $width = "data-width='$width' style='width:$width'"; $align = $id == 'actions' ? 'text-center' : ''; - echo ""; + $style = ''; + $data = ''; + $data .= "data-width='$width'"; + $style .= "width:$width;"; + if(isset($col->minWidth)) + { + $data .= "data-minWidth='{$col->minWidth}px'"; + $style .= "min-width:{$col->minWidth}px;"; + } + if(isset($col->maxWidth)) + { + $data .= "data-maxWidth='{$col->maxWidth}px'"; + $style .= "max-width:{$col->maxWidth}px;"; + } + if(isset($col->pri)) $data .= "data-pri='{$col->pri}'"; + + echo ""; if($id == 'actions') { echo $this->lang->actions; diff --git a/module/project/config.php b/module/project/config.php index de06ba0ca8..985368c990 100644 --- a/module/project/config.php +++ b/module/project/config.php @@ -33,65 +33,80 @@ $config->project->datatable->fieldList['id']['title'] = 'ID'; $config->project->datatable->fieldList['id']['fixed'] = 'left'; $config->project->datatable->fieldList['id']['width'] = '60'; $config->project->datatable->fieldList['id']['required'] = 'yes'; +$config->project->datatable->fieldList['id']['pri'] = '1'; $config->project->datatable->fieldList['name']['title'] = 'name'; $config->project->datatable->fieldList['name']['fixed'] = 'left'; -$config->project->datatable->fieldList['name']['width'] = '180'; +$config->project->datatable->fieldList['name']['width'] = 'auto'; +$config->project->datatable->fieldList['name']['minWidth'] = '180'; $config->project->datatable->fieldList['name']['required'] = 'yes'; $config->project->datatable->fieldList['name']['sort'] = 'no'; +$config->project->datatable->fieldList['name']['pri'] = '1'; $config->project->datatable->fieldList['PM']['title'] = 'PM'; $config->project->datatable->fieldList['PM']['fixed'] = 'no'; $config->project->datatable->fieldList['PM']['width'] = '80'; $config->project->datatable->fieldList['PM']['required'] = 'yes'; $config->project->datatable->fieldList['PM']['sort'] = 'no'; +$config->project->datatable->fieldList['PM']['pri'] = '2'; $config->project->datatable->fieldList['status']['title'] = 'status'; $config->project->datatable->fieldList['status']['fixed'] = 'left'; $config->project->datatable->fieldList['status']['width'] = '80'; $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['begin']['title'] = 'begin'; $config->project->datatable->fieldList['begin']['fixed'] = 'no'; -$config->project->datatable->fieldList['begin']['width'] = '100'; +$config->project->datatable->fieldList['begin']['width'] = '90'; $config->project->datatable->fieldList['begin']['required'] = 'no'; +$config->project->datatable->fieldList['begin']['pri'] = '9'; $config->project->datatable->fieldList['end']['title'] = 'end'; $config->project->datatable->fieldList['end']['fixed'] = 'no'; -$config->project->datatable->fieldList['end']['width'] = '100'; +$config->project->datatable->fieldList['end']['width'] = '90'; $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'] = '80'; $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'; $config->project->datatable->fieldList['teamCount']['required'] = 'no'; $config->project->datatable->fieldList['teamCount']['sort'] = 'no'; +$config->project->datatable->fieldList['teamCount']['pri'] = '8'; $config->project->datatable->fieldList['estimate']['title'] = 'estimate'; $config->project->datatable->fieldList['estimate']['fixed'] = 'no'; -$config->project->datatable->fieldList['estimate']['width'] = '50'; +$config->project->datatable->fieldList['estimate']['width'] = '70'; +$config->project->datatable->fieldList['estimate']['maxWidth'] = '80'; $config->project->datatable->fieldList['estimate']['required'] = 'no'; $config->project->datatable->fieldList['estimate']['sort'] = 'no'; +$config->project->datatable->fieldList['estimate']['pri'] = '8'; $config->project->datatable->fieldList['consume']['title'] = 'consume'; $config->project->datatable->fieldList['consume']['fixed'] = 'no'; -$config->project->datatable->fieldList['consume']['width'] = '50'; +$config->project->datatable->fieldList['consume']['width'] = '70'; +$config->project->datatable->fieldList['consume']['maxWidth'] = '80'; $config->project->datatable->fieldList['consume']['required'] = 'no'; $config->project->datatable->fieldList['consume']['sort'] = 'no'; +$config->project->datatable->fieldList['consume']['pri'] = '7'; $config->project->datatable->fieldList['progress']['title'] = 'progress'; $config->project->datatable->fieldList['progress']['fixed'] = 'right'; $config->project->datatable->fieldList['progress']['width'] = '60'; $config->project->datatable->fieldList['progress']['required'] = 'no'; $config->project->datatable->fieldList['progress']['sort'] = 'no'; +$config->project->datatable->fieldList['progress']['pri'] = '6'; $config->project->datatable->fieldList['actions']['title'] = 'actions'; $config->project->datatable->fieldList['actions']['fixed'] = 'right'; $config->project->datatable->fieldList['actions']['width'] = '180'; $config->project->datatable->fieldList['actions']['required'] = 'yes'; +$config->project->datatable->fieldList['actions']['pri'] = '1'; diff --git a/module/project/css/browse.css b/module/project/css/browse.css index 26af2131ec..3c5a1c9361 100644 --- a/module/project/css/browse.css +++ b/module/project/css/browse.css @@ -2,5 +2,6 @@ .side-col {padding-right: 20px; width: 18%;} #sidebar>.cell {width: 100%;} +th.c-budget,{text-align:right;} td.c-actions {overflow: visible;} .c-actions .btn {overflow: visible;} diff --git a/module/project/model.php b/module/project/model.php index db830f76d7..e47ca9d81e 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1315,7 +1315,7 @@ class projectModel extends model if($col->show) { $title = ''; - $class = "c-$id" . (in_array($id, ['budget', 'teamCount']) ? ' c-number' : ' c-name'); + $class = "c-$id" . (in_array($id, array('budget', 'teamCount', 'estimate', 'consume')) ? ' c-number' : ''); if($id == 'id') $class .= ' cell-id'; diff --git a/module/project/view/browse.html.php b/module/project/view/browse.html.php index b3c89be249..8e3b26688d 100644 --- a/module/project/view/browse.html.php +++ b/module/project/view/browse.html.php @@ -85,11 +85,12 @@ js::set('browseType', $browseType);