From d326a7e84228019d9a0613347faf48added08e03 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Thu, 12 Aug 2021 18:13:02 +0800 Subject: [PATCH 1/2] * Add the language item. --- module/action/lang/de.php | 1 + module/action/lang/en.php | 1 + module/action/lang/fr.php | 1 + module/action/lang/vi.php | 1 + module/action/lang/zh-cn.php | 1 + module/action/lang/zh-tw.php | 1 + 6 files changed, 6 insertions(+) diff --git a/module/action/lang/de.php b/module/action/lang/de.php index 39249727fd..5f3b3a78d1 100644 --- a/module/action/lang/de.php +++ b/module/action/lang/de.php @@ -194,6 +194,7 @@ $lang->action->label->activated = 'activated '; $lang->action->label->blocked = 'blocked '; $lang->action->label->resolved = 'resolved '; $lang->action->label->reviewed = 'reviewed '; +$lang->action->label->recalled = 'recalled'; $lang->action->label->moved = 'moved '; $lang->action->label->confirmed = 'Confirm Story'; $lang->action->label->bugconfirmed = 'Confirmed'; diff --git a/module/action/lang/en.php b/module/action/lang/en.php index 217aa624dc..7f2d8f82e6 100755 --- a/module/action/lang/en.php +++ b/module/action/lang/en.php @@ -200,6 +200,7 @@ $lang->action->label->activated = 'activated '; $lang->action->label->blocked = 'blocked '; $lang->action->label->resolved = 'resolved '; $lang->action->label->reviewed = 'reviewed '; +$lang->action->label->recalled = 'recalled'; $lang->action->label->moved = 'moved '; $lang->action->label->confirmed = 'confirmed Story '; $lang->action->label->bugconfirmed = 'confirmed'; diff --git a/module/action/lang/fr.php b/module/action/lang/fr.php index e207f0cb31..2f41d48fcc 100644 --- a/module/action/lang/fr.php +++ b/module/action/lang/fr.php @@ -194,6 +194,7 @@ $lang->action->label->activated = 'a activé '; $lang->action->label->blocked = 'a bloqué '; $lang->action->label->resolved = 'a résolu '; $lang->action->label->reviewed = 'a revu '; +$lang->action->label->recalled = 'recalled'; $lang->action->label->moved = 'a déplacé '; $lang->action->label->confirmed = 'a confirmé Story '; $lang->action->label->bugconfirmed = 'a confirmé le Bug '; diff --git a/module/action/lang/vi.php b/module/action/lang/vi.php index 6013682393..fc057746cc 100644 --- a/module/action/lang/vi.php +++ b/module/action/lang/vi.php @@ -194,6 +194,7 @@ $lang->action->label->activated = 'activated '; $lang->action->label->blocked = 'blocked '; $lang->action->label->resolved = 'resolved '; $lang->action->label->reviewed = 'reviewed '; +$lang->action->label->recalled = 'recalled'; $lang->action->label->moved = 'moved '; $lang->action->label->confirmed = 'confirmed Story '; $lang->action->label->bugconfirmed = 'Đã xác nhận'; diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php index b3a652334b..ed8a3a787d 100755 --- a/module/action/lang/zh-cn.php +++ b/module/action/lang/zh-cn.php @@ -200,6 +200,7 @@ $lang->action->label->activated = '激活了'; $lang->action->label->blocked = '阻塞了'; $lang->action->label->resolved = '解决了'; $lang->action->label->reviewed = '评审了'; +$lang->action->label->recalled = '撤销评审'; $lang->action->label->moved = '移动了'; $lang->action->label->confirmed = "确认了{$lang->SRCommon}"; $lang->action->label->bugconfirmed = '确认了'; diff --git a/module/action/lang/zh-tw.php b/module/action/lang/zh-tw.php index 26957c65cd..2ac478afd3 100755 --- a/module/action/lang/zh-tw.php +++ b/module/action/lang/zh-tw.php @@ -200,6 +200,7 @@ $lang->action->label->activated = '激活了'; $lang->action->label->blocked = '阻塞了'; $lang->action->label->resolved = '解決了'; $lang->action->label->reviewed = '評審了'; +$lang->action->label->recalled = '撤銷評審'; $lang->action->label->moved = '移動了'; $lang->action->label->confirmed = "確認了{$lang->SRCommon}"; $lang->action->label->bugconfirmed = '確認了'; From 152d7743916328be4e676ebd1a31c47b7abee93d Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Thu, 12 Aug 2021 18:13:28 +0800 Subject: [PATCH 2/2] * Task#41216. --- module/common/lang/menu.php | 8 ++++---- module/doc/control.php | 6 +++--- module/doc/model.php | 39 +++++++++++++++++++------------------ 3 files changed, 27 insertions(+), 26 deletions(-) diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php index ce273b17eb..9d3c892a4b 100644 --- a/module/common/lang/menu.php +++ b/module/common/lang/menu.php @@ -337,7 +337,7 @@ $lang->doc->menu->my = array('link' => "{$lang->doc->my}|doc|browse|brows $lang->doc->menu->collect = array('link' => "{$lang->doc->favorite}|doc|browse|browseTyp=collectedbyme", 'alias' => 'collect'); $lang->doc->menu->product = array('link' => "{$lang->doc->product}|doc|tableContents|type=product", 'alias' => 'showfiles,product'); if($config->systemMode == 'new') $lang->doc->menu->project = array('link' => "{$lang->doc->project}|doc|tableContents|type=project", 'alias' => 'showfiles,project'); -if($config->systemMode == 'classic') $lang->doc->menu->execution = array('link' => "{$lang->doc->execution}|doc|tableContents|type=execution", 'alias' => 'showfiles,execution'); +$lang->doc->menu->execution = array('link' => "{$lang->doc->execution}|doc|tableContents|type=execution", 'alias' => 'showfiles,execution'); $lang->doc->menu->custom = array('link' => "{$lang->doc->custom}|doc|tableContents|type=custom", 'alias' => 'custom'); $lang->doc->dividerMenu = ',product,'; @@ -349,12 +349,12 @@ $lang->doc->menuOrder[15] = 'my'; $lang->doc->menuOrder[20] = 'collect'; $lang->doc->menuOrder[25] = 'product'; if($config->systemMode == 'new') $lang->doc->menuOrder[30] = 'project'; -if($config->systemMode == 'classic') $lang->doc->menuOrder[30] = 'execution'; -$lang->doc->menuOrder[35] = 'custom'; +$lang->doc->menuOrder[35] = 'execution'; +$lang->doc->menuOrder[40] = 'custom'; $lang->doc->menu->product['subMenu'] = new stdclass(); if($config->systemMode == 'new') $lang->doc->menu->project['subMenu'] = new stdclass(); -if($config->systemMode == 'classic') $lang->doc->menu->execution['subMenu'] = new stdclass(); +$lang->doc->menu->execution['subMenu'] = new stdclass(); $lang->doc->menu->custom['subMenu'] = new stdclass(); /* Report menu.*/ diff --git a/module/doc/control.php b/module/doc/control.php index 35f930da6f..a3747d9951 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -168,9 +168,9 @@ class doc extends control } $libTypeList = $this->lang->doc->libTypeList; - if(empty($products)) unset($libTypeList['product']); - if(empty($projects)) unset($libTypeList['project']); - if(empty($executions) or ($this->config->systemMode == 'new' and $this->app->openApp == 'doc')) unset($libTypeList['execution']); + if(empty($products)) unset($libTypeList['product']); + if(empty($projects)) unset($libTypeList['project']); + if(empty($executions)) unset($libTypeList['execution']); $this->view->groups = $this->loadModel('group')->getPairs(); $this->view->users = $this->user->getPairs('nocode'); diff --git a/module/doc/model.php b/module/doc/model.php index 56dd28616c..aeef94ec90 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -1105,11 +1105,7 @@ class docModel extends model ->where('deleted')->eq(0) ->andWhere($type)->eq($objectID) ->beginIF(!empty($appendLib))->orWhere('id')->eq($appendLib)->fi() - ->beginIF($type == 'project') - ->andWhere('(execution')->eq(0) - ->orWhere('main')->eq(0) - ->markRight(1) - ->fi() + ->beginIF($type == 'project')->andWhere('execution')->eq(0)->fi() ->orderBy('`order`, id') ->fetchAll('id'); } @@ -1206,6 +1202,8 @@ class docModel extends model } elseif($objectType == 'execution') { + $projectPairs = $this->dao->select('id,name')->from(TABLE_PROJECT)->where('type')->eq('project')->fetchPairs('id'); + $executions = $this->dao->select('*')->from(TABLE_EXECUTION) ->where('deleted')->eq(0) ->andWhere('type')->in('sprint,stage') @@ -1216,6 +1214,8 @@ class docModel extends model $orderedExecutions = array(); foreach($executions as $id => $execution) { + $execution->name = zget($projectPairs, $execution->project) . '/' . $execution->name; + if($execution->status != 'done' and $execution->status != 'closed' and $execution->PM == $this->app->user->account) { $myObjects[$id] = $execution->name; @@ -2013,22 +2013,23 @@ class docModel extends model { if($type != 'custom' and $type != 'book' and empty($objects)) return ''; - $output = ''; - $closedProjectsHtml = ''; - $closedProjects = array(); - $maxHeight = ($type == 'project' and $this->app->openApp == 'doc') ? '260px' : '290px'; - $class = ($type == 'project' and $this->app->openApp == 'doc') ? 'col-left' : ''; + $output = ''; + $closedObjectsHtml = ''; + $closedObjects = array(); + $maxHeight = (in_array($type, array('project','execution')) and $this->app->openApp == 'doc') ? '260px' : '290px'; + $class = (in_array($type, array('project','execution')) and $this->app->openApp == 'doc') ? 'col-left' : ''; $currentMethod = $this->app->getMethodName(); $methodName = in_array($currentMethod, array('tablecontents', 'showfiles')) ? 'tablecontents' : 'objectLibs'; + $objectTitle = $type == 'execution' ? substr($objects[$objectID], strpos($objects[$objectID], '/') + 1) : $objects[$objectID]; if($this->app->openApp == 'doc' and $type != 'custom' and $type != 'book') { $output = <<
-