- loadModel('program')->getSwapper($this->program->getPairs(), $this->session->program, $app->rawModule, $app->rawMethod);?>
- loadModel('custom')->getSwapper();?>
+ loadModel('program')->getSwitcher($this->program->getPairs(), $this->session->program, $app->rawModule, $app->rawMethod);?>
+ loadModel('custom')->getModeSwitcher();?>
diff --git a/module/custom/model.php b/module/custom/model.php
index 44843e9782..41612151ec 100644
--- a/module/custom/model.php
+++ b/module/custom/model.php
@@ -362,13 +362,13 @@ class customModel extends model
}
/**
- * Get system swapper.
+ * Get system mode switcher.
* @param string $module
* @param string $method
* @access public
* @return array
*/
- public function getSwapper()
+ public function getModeSwitcher()
{
$current = (isset($_COOKIE['systemModel']) and $_COOKIE['systemModel'] == 'scrum') ? 'Scrum' : 'CMMI';
$link = (isset($_COOKIE['systemModel']) and $_COOKIE['systemModel'] == 'scrum') ? html::a(helper::createLink('custom', 'setwaterfall'), 'CMMI') : html::a(helper::createLink('custom', 'setscrum'), 'Scrum');
diff --git a/module/program/model.php b/module/program/model.php
index 41c5a902b7..9920264bf7 100644
--- a/module/program/model.php
+++ b/module/program/model.php
@@ -441,7 +441,7 @@ class programModel extends model
* @access private
* @return void
*/
- public function getSwapper($programs, $programID, $currentModule, $currentMethod, $extra = '')
+ public function getSwitcher($programs, $programID, $currentModule, $currentMethod, $extra = '')
{
$this->loadModel('project');
$currentProgramName = '';
From 77d8f2255fe9505cfdf65102e56d6796e86284fb Mon Sep 17 00:00:00 2001
From: leiyong <1549684884@qq.com>
Date: Mon, 31 Aug 2020 16:52:09 +0800
Subject: [PATCH 03/36] * Finish task#7736.
---
config/zentaopms.php | 19 ++++++++++++++++++
framework/router.class.php | 11 ++++++++---
module/action/lang/zh-cn.php | 22 ++++++++++-----------
module/block/control.php | 21 +++++++++-----------
module/block/lang/zh-cn.php | 10 +++++-----
module/bug/lang/zh-cn.php | 8 ++++----
module/common/lang/zh-cn.php | 6 +++---
module/issue/model.php | 26 -------------------------
module/product/lang/zh-cn.php | 6 +++---
module/productplan/lang/zh-cn.php | 32 +++++++++++++++----------------
module/project/lang/zh-cn.php | 12 ++++++------
module/report/lang/zh-cn.php | 8 ++++----
module/score/lang/zh-cn.php | 4 ++--
module/story/lang/zh-cn.php | 18 ++++++++---------
14 files changed, 99 insertions(+), 104 deletions(-)
diff --git a/config/zentaopms.php b/config/zentaopms.php
index 96cde431d3..142812cecf 100644
--- a/config/zentaopms.php
+++ b/config/zentaopms.php
@@ -109,6 +109,25 @@ $config->hourPointCommonList['vi'][0] = 'giờ';
$config->hourPointCommonList['vi'][1] = 'điểm';
$config->hourPointCommonList['vi'][2] = 'function point';
+/* Plan common list. */
+$config->planCommonList['zh-cn'][0] = '计划';
+$config->planCommonList['zh-cn'][1] = '排期';
+
+$config->planCommonList['zh-tw'][0] = '计划';
+$config->planCommonList['zh-tw'][1] = '排期';
+
+$config->planCommonList['en'][0] = 'Plan';
+$config->planCommonList['en'][1] = 'Schedule';
+
+$config->planCommonList['de'][0] = 'Plan';
+$config->planCommonList['de'][1] = 'Schedule';
+
+$config->planCommonList['fr'][0] = 'Plan';
+$config->planCommonList['fr'][1] = 'Schedule';
+
+$config->planCommonList['vi'][0] = 'Plan';
+$config->planCommonList['vi'][1] = 'Schedule';
+
$config->manualUrl['home'] = 'https://www.zentao.net/book/zentaopmshelp.html?fullScreen=zentao';
$config->manualUrl['int'] = 'https://www.zentao.pm/book/zentaomanual/zentao-installation-11.html?fullScreen=zentao';
diff --git a/framework/router.class.php b/framework/router.class.php
index bcccb694a7..447def58b8 100755
--- a/framework/router.class.php
+++ b/framework/router.class.php
@@ -146,7 +146,7 @@ class router extends baseRouter
}
}
- $productCommon = $storyCommon = $hourCommon = 0;
+ $productCommon = $storyCommon = $hourCommon = $planCommon = 0;
$projectCommon = empty($this->config->isINT) ? 0 : 1;
foreach($commonSettings as $setting)
@@ -166,16 +166,21 @@ class router extends baseRouter
if($this->session->program)
{
$template = $this->dbh->query('SELECT template FROM' . TABLE_PROJECT . "WHERE id = {$this->session->program}")->fetch();
- if($template->template == 'waterfall') $projectCommon = 2;
+ if($template->template == 'waterfall')
+ {
+ $projectCommon = 2;
+ $planCommon = 1;
+ }
}
$config->storyCommon = $storyCommon;
- /* Set productCommon, projectCommon, storyCommon and hourCommon. Default english lang. */
+ /* Set productCommon, projectCommon, storyCommon, hourCommon and planCommon. Default english lang. */
$lang->productCommon = isset($this->config->productCommonList[$this->clientLang][(int)$productCommon]) ? $this->config->productCommonList[$this->clientLang][(int)$productCommon] : $this->config->productCommonList['en'][(int)$productCommon];
$lang->projectCommon = isset($this->config->projectCommonList[$this->clientLang][(int)$projectCommon]) ? $this->config->projectCommonList[$this->clientLang][(int)$projectCommon] : $this->config->projectCommonList['en'][(int)$projectCommon];
$lang->storyCommon = isset($this->config->storyCommonList[$this->clientLang][(int)$storyCommon]) ? $this->config->storyCommonList[$this->clientLang][(int)$storyCommon] : $this->config->storyCommonList['en'][(int)$storyCommon];
$lang->hourCommon = isset($this->config->hourPointCommonList[$this->clientLang][(int)$hourCommon]) ? $this->config->hourPointCommonList[$this->clientLang][(int)$hourCommon] : $this->config->hourPointCommonList['en'][(int)$hourCommon];
+ $lang->planCommon = isset($this->config->planCommonList[$this->clientLang][(int)$planCommon]) ? $this->config->planCommonList[$this->clientLang][(int)$planCommon] : $this->config->planCommonList['en'][(int)$planCommon];
if($storyCommon == 0 and isset($URAndSR))
{
diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php
index 23e10a7383..e18718e023 100755
--- a/module/action/lang/zh-cn.php
+++ b/module/action/lang/zh-cn.php
@@ -66,7 +66,7 @@ $lang->action->periods['lastmonth'] = $lang->action->dynamic->lastMonth;
$lang->action->objectTypes['product'] = $lang->productCommon;
$lang->action->objectTypes['story'] = $lang->storyCommon;
-$lang->action->objectTypes['productplan'] = '计划';
+$lang->action->objectTypes['productplan'] = $lang->planCommon;
$lang->action->objectTypes['release'] = '发布';
$lang->action->objectTypes['program'] = '项目';
$lang->action->objectTypes['project'] = $lang->projectCommon;
@@ -179,8 +179,8 @@ $lang->action->label->fromlib = '从用例库导入';
$lang->action->label->totask = '转任务';
$lang->action->label->svncommited = '提交代码';
$lang->action->label->gitcommited = '提交代码';
-$lang->action->label->linked2plan = '关联计划';
-$lang->action->label->unlinkedfromplan = '移除计划';
+$lang->action->label->linked2plan = "关联{$lang->planCommon}";
+$lang->action->label->unlinkedfromplan = "移除{$lang->planCommon}";
$lang->action->label->changestatus = '修改状态';
$lang->action->label->marked = '编辑了';
$lang->action->label->linked2project = "关联{$lang->projectCommon}";
@@ -246,8 +246,8 @@ $lang->action->dynamicAction->product['deleted'] = '删除' . $lang->p
$lang->action->dynamicAction->product['closed'] = '关闭' . $lang->productCommon;
$lang->action->dynamicAction->product['undeleted'] = '还原' . $lang->productCommon;
$lang->action->dynamicAction->product['hidden'] = '隐藏' . $lang->productCommon;
-$lang->action->dynamicAction->productplan['opened'] = '创建计划';
-$lang->action->dynamicAction->productplan['edited'] = '编辑计划';
+$lang->action->dynamicAction->productplan['opened'] = "创建{$lang->planCommon}";
+$lang->action->dynamicAction->productplan['edited'] = "编辑{$lang->planCommon}";
$lang->action->dynamicAction->release['opened'] = '创建发布';
$lang->action->dynamicAction->release['edited'] = '编辑发布';
$lang->action->dynamicAction->release['changestatus'] = '修改发布状态';
@@ -260,8 +260,8 @@ $lang->action->dynamicAction->story['reviewed'] = "评审{$lang->stor
$lang->action->dynamicAction->story['closed'] = "关闭{$lang->storyCommon}";
$lang->action->dynamicAction->story['assigned'] = "指派{$lang->storyCommon}";
$lang->action->dynamicAction->story['changed'] = "变更{$lang->storyCommon}";
-$lang->action->dynamicAction->story['linked2plan'] = "{$lang->storyCommon}关联计划";
-$lang->action->dynamicAction->story['unlinkedfromplan'] = "计划移除{$lang->storyCommon}";
+$lang->action->dynamicAction->story['linked2plan'] = "{$lang->storyCommon}关联{$lang->planCommon}";
+$lang->action->dynamicAction->story['unlinkedfromplan'] = "{$lang->planCommon}移除{$lang->storyCommon}";
$lang->action->dynamicAction->story['linked2release'] = "{$lang->storyCommon}关联发布";
$lang->action->dynamicAction->story['unlinkedfromrelease'] = "发布移除{$lang->storyCommon}";
$lang->action->dynamicAction->story['linked2build'] = "{$lang->storyCommon}关联版本";
@@ -326,8 +326,8 @@ $lang->action->dynamicAction->bug['deleted'] = '删除Bug';
$lang->action->dynamicAction->bug['confirmed'] = "确认{$lang->storyCommon}变更";
$lang->action->dynamicAction->bug['tostory'] = "转{$lang->storyCommon}";
$lang->action->dynamicAction->bug['totask'] = '转任务';
-$lang->action->dynamicAction->bug['linked2plan'] = 'Bug关联计划';
-$lang->action->dynamicAction->bug['unlinkedfromplan'] = '计划移除Bug';
+$lang->action->dynamicAction->bug['linked2plan'] = "Bug关联{$lang->planCommon}";
+$lang->action->dynamicAction->bug['unlinkedfromplan'] = "{$lang->planCommon}移除Bug";
$lang->action->dynamicAction->bug['linked2release'] = 'Bug关联发布';
$lang->action->dynamicAction->bug['unlinkedfromrelease'] = '发布移除Bug';
$lang->action->dynamicAction->bug['linked2bug'] = 'Bug关联版本';
@@ -384,7 +384,7 @@ $lang->action->dynamicAction->entry['edited'] = '编辑应用';
/* 用来生成相应对象的链接。*/
$lang->action->label->product = $lang->productCommon . '|product|view|productID=%s';
-$lang->action->label->productplan = '计划|productplan|view|productID=%s';
+$lang->action->label->productplan = "{$lang->planCommon}|productplan|view|productID=%s";
$lang->action->label->release = '发布|release|view|productID=%s';
$lang->action->label->story = "{$lang->storyCommon}|story|view|storyID=%s";
$lang->action->label->program = "项目|program|browse|";
@@ -425,7 +425,7 @@ $lang->action->search->objectTypeList['doclib'] = '文档库';
$lang->action->search->objectTypeList['todo'] = '待办';
$lang->action->search->objectTypeList['build'] = '版本';
$lang->action->search->objectTypeList['release'] = '发布';
-$lang->action->search->objectTypeList['productplan'] = '计划';
+$lang->action->search->objectTypeList['productplan'] = $lang->planCommon;
$lang->action->search->objectTypeList['branch'] = '分支';
$lang->action->search->objectTypeList['testsuite'] = '套件';
$lang->action->search->objectTypeList['caselib'] = '公共库';
diff --git a/module/block/control.php b/module/block/control.php
index 6e3120bd6f..03c9c0a6ca 100644
--- a/module/block/control.php
+++ b/module/block/control.php
@@ -1333,20 +1333,17 @@ class block extends control
*/
public function printScrumdynamicBlock()
{
- $projects = $this->loadModel('project')->getPairs();
- $products = $this->loadModel('product')->getPairs();
+ $projects = $this->loadModel('project')->getPairs();
+ $products = $this->loadModel('product')->getPairs();
$actions = array();
- if(!empty($projects) || !empty($products))
- {
- $actions = $this->dao->select('*')->from(TABLE_ACTION)
- ->beginIF($projects && $products)->where('project')->in(array_keys($projects))->orWhere('product')->in(array_keys($products))->fi()
- ->beginIF($projects && empty($products))->where('project')->in(array_keys($projects))->fi()
- ->beginIF(empty($projects) && $products)->where('product')->in(array_keys($products))->fi()
- ->orderBy('date_desc')
- ->limit(10)
- ->fetchAll();
- }
+ $actions = $this->dao->select('*')->from(TABLE_ACTION)
+ ->where('project')->eq($this->session->program)
+ ->beginIF($projects)->markLeft()->orWhere('project')->in(array_keys($projects))->fi()->markRight()
+ ->beginIF($products)->markLeft()->orWhere('product')->in(array_keys($products))->fi()->markRight()
+ ->orderBy('date_desc')
+ ->limit(10)
+ ->fetchAll();
$this->view->actions = empty($actions) ? array() : $this->loadModel('action')->transformActions($actions);
$this->view->users = $this->loadModel('user')->getPairs('noletter');
diff --git a/module/block/lang/zh-cn.php b/module/block/lang/zh-cn.php
index 1c7b445fda..45e21deca9 100644
--- a/module/block/lang/zh-cn.php
+++ b/module/block/lang/zh-cn.php
@@ -103,7 +103,7 @@ $lang->block->default['waterfall']['program']['2']['block'] = 'waterfallestimat
$lang->block->default['waterfall']['program']['2']['source'] = 'program';
$lang->block->default['waterfall']['program']['2']['grid'] = 4;
-$lang->block->default['waterfall']['program']['3']['title'] = '项目计划';
+$lang->block->default['waterfall']['program']['3']['title'] = "项目{$lang->planCommon}";
$lang->block->default['waterfall']['program']['3']['block'] = 'waterfallgantt';
$lang->block->default['waterfall']['program']['3']['source'] = 'program';
$lang->block->default['waterfall']['program']['3']['grid'] = 8;
@@ -319,7 +319,7 @@ $lang->block->availableBlocks->case = '我的用例';
$lang->block->availableBlocks->story = "我的{$lang->storyCommon}";
$lang->block->availableBlocks->product = $lang->productCommon . '列表';
$lang->block->availableBlocks->project = $lang->projectCommon . '列表';
-$lang->block->availableBlocks->plan = '计划列表';
+$lang->block->availableBlocks->plan = "{$lang->planCommon}列表";
$lang->block->availableBlocks->release = '发布列表';
$lang->block->availableBlocks->build = '版本列表';
$lang->block->availableBlocks->testtask = '测试版本列表';
@@ -350,7 +350,7 @@ $lang->block->modules['waterfall']['index'] = new stdclass();
$lang->block->modules['waterfall']['index']->availableBlocks = new stdclass();
$lang->block->modules['waterfall']['index']->availableBlocks->waterfallreport = '项目周报';
$lang->block->modules['waterfall']['index']->availableBlocks->waterfallestimate = '估算';
-$lang->block->modules['waterfall']['index']->availableBlocks->waterfallgantt = '计划甘特图';
+$lang->block->modules['waterfall']['index']->availableBlocks->waterfallgantt = "项目{$lang->planCommon}";
$lang->block->modules['waterfall']['index']->availableBlocks->waterfallprogress = '到目前为止项目进展趋势图';
$lang->block->modules['waterfall']['index']->availableBlocks->waterfallissue = '项目问题';
$lang->block->modules['waterfall']['index']->availableBlocks->waterfallrisk = '项目风险';
@@ -361,7 +361,7 @@ $lang->block->modules['product']->availableBlocks->statistic = $lang->productCom
$lang->block->modules['product']->availableBlocks->overview = $lang->productCommon . '总览';
$lang->block->modules['product']->availableBlocks->list = $lang->productCommon . '列表';
$lang->block->modules['product']->availableBlocks->story = "{$lang->storyCommon}列表";
-$lang->block->modules['product']->availableBlocks->plan = '计划列表';
+$lang->block->modules['product']->availableBlocks->plan = "{$lang->storyCommon}列表";
$lang->block->modules['product']->availableBlocks->release = '发布列表';
$lang->block->modules['project'] = new stdclass();
$lang->block->modules['project']->availableBlocks = new stdclass();
@@ -522,7 +522,7 @@ $lang->block->gridOptions[4] = '右侧';
$lang->block->flowchart = array();
$lang->block->flowchart['admin'] = array('管理员', '维护公司', '添加用户', '维护权限');
-$lang->block->flowchart['product'] = array($lang->productCommon . '经理', '创建' . $lang->productCommon, '维护模块', '维护计划', "维护{$lang->storyCommon}", '创建发布');
+$lang->block->flowchart['product'] = array($lang->productCommon . '经理', '创建' . $lang->productCommon, '维护模块', "维护{$lang->planCommon}", "维护{$lang->storyCommon}", '创建发布');
$lang->block->flowchart['project'] = array($lang->projectCommon . '经理', '创建' . $lang->projectCommon, '维护团队', '关联' . $lang->productCommon, "关联{$lang->storyCommon}", '分解任务');
$lang->block->flowchart['dev'] = array('研发人员', '领取任务和Bug', '更新状态', '完成任务和Bug');
$lang->block->flowchart['tester'] = array('测试人员', '撰写用例', '执行用例', '提交Bug', '验证Bug', '关闭Bug');
diff --git a/module/bug/lang/zh-cn.php b/module/bug/lang/zh-cn.php
index dd8851bc5d..a924e0c9a7 100644
--- a/module/bug/lang/zh-cn.php
+++ b/module/bug/lang/zh-cn.php
@@ -14,7 +14,7 @@ $lang->bug->common = 'Bug';
$lang->bug->id = 'Bug编号';
$lang->bug->product = '所属' . $lang->productCommon;
$lang->bug->branch = '分支/平台';
-$lang->bug->productplan = '所属计划';
+$lang->bug->productplan = '所属' . $lang->planCommon;
$lang->bug->module = '所属模块';
$lang->bug->moduleAB = '模块';
$lang->bug->project = '所属' . $lang->projectCommon;
@@ -58,7 +58,7 @@ $lang->bug->resolvedBuild = '解决版本';
$lang->bug->resolvedDate = '解决日期';
$lang->bug->resolvedDateAB = '解决日期';
$lang->bug->deadline = '截止日期';
-$lang->bug->plan = '所属计划';
+$lang->bug->plan = '所属' . $lang->planCommon;
$lang->bug->closedBy = '由谁关闭';
$lang->bug->closedDate = '关闭日期';
$lang->bug->duplicateBug = '重复ID';
@@ -372,8 +372,8 @@ $lang->bug->action = new stdclass();
$lang->bug->action->resolved = array('main' => '$date, 由
$actor 解决,方案为
$extra $appendLink。', 'extra' => 'resolutionList');
$lang->bug->action->tostory = array('main' => '$date, 由
$actor 转为
' .$lang->storyCommon. ',编号为
$extra。');
$lang->bug->action->totask = array('main' => '$date, 由
$actor 导入为
任务,编号为
$extra。');
-$lang->bug->action->linked2plan = array('main' => '$date, 由
$actor 关联到计划
$extra。');
-$lang->bug->action->unlinkedfromplan = array('main' => '$date, 由
$actor 从计划
$extra 移除。');
+$lang->bug->action->linked2plan = array('main' => '$date, 由
$actor 关联到' . $lang->planCommon . '
$extra。');
+$lang->bug->action->unlinkedfromplan = array('main' => '$date, 由
$actor 从' . $lang->planCommon . '
$extra 移除。');
$lang->bug->action->linked2build = array('main' => '$date, 由
$actor 关联到版本
$extra。');
$lang->bug->action->unlinkedfrombuild = array('main' => '$date, 由
$actor 从版本
$extra 移除。');
$lang->bug->action->linked2release = array('main' => '$date, 由
$actor 关联到发布
$extra。');
diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php
index 6a3bd2ddbb..de7b92c4df 100755
--- a/module/common/lang/zh-cn.php
+++ b/module/common/lang/zh-cn.php
@@ -175,7 +175,7 @@ $lang->searchObjects['product'] = $lang->productCommon;
$lang->searchObjects['user'] = '用户';
$lang->searchObjects['build'] = '版本';
$lang->searchObjects['release'] = '发布';
-$lang->searchObjects['productplan'] = $lang->productCommon . '计划';
+$lang->searchObjects['productplan'] = $lang->productCommon . $lang->planCommon;
$lang->searchObjects['testtask'] = '测试单';
$lang->searchObjects['doc'] = '文档';
$lang->searchObjects['caselib'] = '用例库';
@@ -240,7 +240,7 @@ $lang->product = new stdclass();
$lang->product->menu = new stdclass();
$lang->product->menu->story = array('link' => "{$lang->storyCommon}|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story');
-$lang->product->menu->plan = array('link' => '计划|productplan|browse|productID=%s', 'subModule' => 'productplan');
+$lang->product->menu->plan = array('link' => "{$lang->planCommon}|productplan|browse|productID=%s", 'subModule' => 'productplan');
$lang->product->menu->release = array('link' => '发布|release|browse|productID=%s', 'subModule' => 'release');
$lang->product->menu->roadmap = '路线图|product|roadmap|productID=%s';
$lang->product->menu->project = "{$lang->projectCommon}|product|project|status=all&productID=%s";
@@ -866,7 +866,7 @@ $lang->budget->menu = $lang->workestimation->menu;
$lang->programplan->menu->gantt = array('link' => '甘特图|programplan|browse|programID={PROGRAM}&productID={PRODUCT}&type=gantt');
$lang->programplan->menu->lists = array('link' => '阶段列表|programplan|browse|programID={PROGRAM}&productID={PRODUCT}&type=lists', 'alias' => 'create');
-$lang->waterfallproduct->menu->plan = array('link' => '排期|productplan|browse|productID={PRODUCT}', 'subModule' => 'productplan');
+$lang->waterfallproduct->menu->plan = array('link' => "{$lang->planCommon}|productplan|browse|productID={PRODUCT}", 'subModule' => 'productplan');
$lang->waterfallproduct->menu->requirement = '用户需求|product|browse|product={PRODUCT}&branch=&browseType=unclosed&queryID=0&storyType=requirement';
$lang->waterfallproduct->menu->story = '软件需求|product|browse|product={PRODUCT}&branch=&browseType=unclosed&queryID=0&storyType=story';
$lang->waterfallproduct->menu->track = '跟踪矩阵|story|track|product={PRODUCT}';
diff --git a/module/issue/model.php b/module/issue/model.php
index c77deb4534..1898f95602 100644
--- a/module/issue/model.php
+++ b/module/issue/model.php
@@ -153,32 +153,6 @@ class issueModel extends model
return $this->dao->select('id,name')->from(TABLE_ACTIVITY)->where('deleted')->eq('0')->orderBy('id_desc')->fetchPairs();
}
- /**
- * Create an issue.
- *
- * @access public
- * @return bool
- */
- public function create()
- {
- $now = helper::now();
- $data = fixer::input('post')
- ->add('createdBy', $this->app->user->account)
- ->add('createdDate', $now)
- ->add('program', $this->session->program)
- ->remove('labels,files')
- ->addIF($this->post->assignedTo, 'assignedBy', $this->app->user->account)
- ->addIF($this->post->assignedTo, 'assignedDate', $now)
- ->stripTags($this->config->issue->editor->create['id'], $this->config->allowedTags)
- ->get();
-
- $this->dao->insert(TABLE_ISSUE)->data($data)->batchCheck($this->config->issue->create->requiredFields, 'notempty')->exec();
- $issueID = $this->dao->lastInsertID();
- $this->loadModel('file')->saveUpload('issue', $issueID);
-
- return $issueID;
- }
-
/**
* Update an issue.
*
diff --git a/module/product/lang/zh-cn.php b/module/product/lang/zh-cn.php
index 936944966f..007cecde83 100644
--- a/module/product/lang/zh-cn.php
+++ b/module/product/lang/zh-cn.php
@@ -34,7 +34,7 @@ $lang->product->exportAction = "导出{$lang->productCommon}";
$lang->product->basicInfo = '基本信息';
$lang->product->otherInfo = '其他信息';
-$lang->product->plans = '计划数';
+$lang->product->plans = "{$lang->planCommon}数";
$lang->product->releases = '发布数';
$lang->product->docs = '文档数';
$lang->product->bugs = '相关Bug';
@@ -87,7 +87,7 @@ $lang->product->release = '发布';
$lang->product->allRelease = '所有发布';
$lang->product->maintain = '维护中';
$lang->product->latestDynamic = '最新动态';
-$lang->product->plan = '计划';
+$lang->product->plan = $lang->planCommon;
$lang->product->iteration = '版本迭代';
$lang->product->iterationInfo = '迭代 %s 次';
$lang->product->iterationView = '查看详情';
@@ -105,7 +105,7 @@ $lang->product->changedStory = '已变更';
$lang->product->willClose = '待关闭';
$lang->product->closedStory = '已关闭';
$lang->product->unclosed = '未关闭';
-$lang->product->unplan = '未计划';
+$lang->product->unplan = "未{$lang->planCommon}";
$lang->product->viewByUser = '按用户查看';
$lang->product->allStory = '所有';
diff --git a/module/productplan/lang/zh-cn.php b/module/productplan/lang/zh-cn.php
index aacd26f4d3..eda2c1a561 100644
--- a/module/productplan/lang/zh-cn.php
+++ b/module/productplan/lang/zh-cn.php
@@ -9,13 +9,13 @@
* @version $Id: zh-cn.php 4659 2013-04-17 06:45:08Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
-$lang->productplan->common = $lang->productCommon . '计划';
-$lang->productplan->browse = "浏览计划";
-$lang->productplan->index = "计划列表";
-$lang->productplan->create = "创建计划";
-$lang->productplan->edit = "编辑计划";
-$lang->productplan->delete = "删除计划";
-$lang->productplan->view = "计划详情";
+$lang->productplan->common = $lang->productCommon . $lang->planCommon;
+$lang->productplan->browse = "浏览{$lang->planCommon}";
+$lang->productplan->index = "{$lang->planCommon}列表";
+$lang->productplan->create = "创建{$lang->planCommon}";
+$lang->productplan->edit = "编辑{$lang->planCommon}";
+$lang->productplan->delete = "删除{$lang->planCommon}";
+$lang->productplan->view = "{$lang->planCommon}详情";
$lang->productplan->bugSummary = "本页共
%s 个Bug";
$lang->productplan->basicInfo = '基本信息';
$lang->productplan->batchEdit = '批量编辑';
@@ -28,21 +28,21 @@ $lang->productplan->batchUnlinkStory = "批量移除{$lang->storyCommon}";
$lang->productplan->linkedStories = $lang->storyCommon;
$lang->productplan->unlinkedStories = "未关联{$lang->storyCommon}";
$lang->productplan->updateOrder = '排序';
-$lang->productplan->createChildren = "创建子计划";
+$lang->productplan->createChildren = "创建子{$lang->planCommon}";
$lang->productplan->linkBug = "关联Bug";
$lang->productplan->unlinkBug = "移除Bug";
$lang->productplan->batchUnlinkBug = "批量移除Bug";
$lang->productplan->linkedBugs = 'Bug';
$lang->productplan->unlinkedBugs = '未关联Bug';
-$lang->productplan->unexpired = '未过期计划';
-$lang->productplan->all = '所有计划';
+$lang->productplan->unexpired = "未过期{$lang->planCommon}";
+$lang->productplan->all = "所有{$lang->planCommon}";
-$lang->productplan->confirmDelete = "您确认删除该计划吗?";
+$lang->productplan->confirmDelete = "您确认删除该{$lang->planCommon}吗?";
$lang->productplan->confirmUnlinkStory = "您确认移除该{$lang->storyCommon}吗?";
$lang->productplan->confirmUnlinkBug = "您确认移除该Bug吗?";
-$lang->productplan->noPlan = '暂时没有计划。';
-$lang->productplan->cannotDeleteParent = '不能删除父计划';
+$lang->productplan->noPlan = "暂时没有{$lang->planCommon}。";
+$lang->productplan->cannotDeleteParent = "不能删除父{$lang->planCommon}";
$lang->productplan->id = '编号';
$lang->productplan->product = $lang->productCommon;
@@ -51,15 +51,15 @@ $lang->productplan->title = '名称';
$lang->productplan->desc = '描述';
$lang->productplan->begin = '开始日期';
$lang->productplan->end = '结束日期';
-$lang->productplan->last = '上次计划';
+$lang->productplan->last = "上次{$lang->planCommon}";
$lang->productplan->future = '待定';
$lang->productplan->stories = "{$lang->storyCommon}数";
$lang->productplan->bugs = 'Bug数';
$lang->productplan->hour = $lang->hourCommon;
$lang->productplan->project = $lang->projectCommon;
-$lang->productplan->parent = "父计划";
+$lang->productplan->parent = "父{$lang->planCommon}";
$lang->productplan->parentAB = "父";
-$lang->productplan->children = "子计划";
+$lang->productplan->children = "子{$lang->planCommon}";
$lang->productplan->childrenAB = "子";
$lang->productplan->order = "排序";
$lang->productplan->deleted = "已删除";
diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php
index a66a6b6442..31f3800558 100644
--- a/module/project/lang/zh-cn.php
+++ b/module/project/lang/zh-cn.php
@@ -120,7 +120,7 @@ $lang->project->aclList['custom'] = "自定义白名单(团队成员和白名
$lang->project->storyPoint = '故事点';
$lang->project->burnByList['left'] = '按剩余工时查看';
-$lang->project->burnByList['estimate'] = '按计划工时查看';
+$lang->project->burnByList['estimate'] = "按{$lang->planCommon}工时查看";
$lang->project->burnByList['storyPoint'] = '按故事点查看';
/* 方法列表。*/
@@ -142,8 +142,8 @@ $lang->project->doc = '文档列表';
$lang->project->doclib = '文档库列表';
$lang->project->manageProducts = '关联' . $lang->productCommon;
$lang->project->linkStory = "关联{$lang->storyCommon}";
-$lang->project->linkStoryByPlan = '按照计划关联';
-$lang->project->linkPlan = '关联计划';
+$lang->project->linkStoryByPlan = "按照{$lang->planCommon}关联";
+$lang->project->linkPlan = "关联{$lang->planCommon}";
$lang->project->unlinkStoryTasks = "未关联{$lang->storyCommon}任务";
$lang->project->linkedProducts = '已关联';
$lang->project->unlinkedProducts = '未关联';
@@ -172,7 +172,7 @@ $lang->project->unlinkStory = "移除{$lang->storyCommon}";
$lang->project->unlinkStoryAB = "移除{$lang->storyCommon}";
$lang->project->batchUnlinkStory = "批量移除{$lang->storyCommon}";
$lang->project->importTask = '转入任务';
-$lang->project->importPlanStories = "按计划关联{$lang->storyCommon}";
+$lang->project->importPlanStories = "按{$lang->planCommon}关联{$lang->storyCommon}";
$lang->project->importBug = '导入Bug';
$lang->project->updateOrder = "{$lang->projectCommon}排序";
$lang->project->tree = '树状图';
@@ -182,7 +182,7 @@ $lang->project->treeOnlyTask = '树状图只看任务';
$lang->project->treeOnlyStory = "树状图只看{$lang->storyCommon}";
$lang->project->storyKanban = "{$lang->storyCommon}看板";
$lang->project->storySort = "{$lang->storyCommon}排序";
-$lang->project->importPlanStory = '创建' . $lang->projectCommon . '成功!\n是否导入计划关联的相关' . $lang->storyCommon . '?';
+$lang->project->importPlanStory = '创建' . $lang->projectCommon . '成功!\n是否导入' . $lang->planCommon . '关联的相关' . $lang->storyCommon . '?';
$lang->project->iteration = '版本迭代';
$lang->project->iterationInfo = '迭代%s次';
$lang->project->viewAll = '查看所有';
@@ -225,7 +225,7 @@ $lang->project->aboveAllProduct = "以上所有{$lang->productCommon}";
$lang->project->aboveAllProject = "以上所有{$lang->projectCommon}";
/* 页面提示。*/
-$lang->project->linkStoryByPlanTips = "此操作会将所选计划下面的{$lang->storyCommon}全部关联到此{$lang->projectCommon}中";
+$lang->project->linkStoryByPlanTips = "此操作会将所选{$lang->planCommon}下面的{$lang->storyCommon}全部关联到此{$lang->projectCommon}中";
$lang->project->selectProject = "请选择{$lang->projectCommon}";
$lang->project->beginAndEnd = '起止时间';
$lang->project->begin = '开始日期';
diff --git a/module/report/lang/zh-cn.php b/module/report/lang/zh-cn.php
index a04d085be2..5443d2fad2 100644
--- a/module/report/lang/zh-cn.php
+++ b/module/report/lang/zh-cn.php
@@ -71,7 +71,7 @@ $lang->report->taskTotal = "总任务数";
$lang->report->manhourTotal = "总工时";
$lang->report->validRate = "有效率";
$lang->report->validRateTips = "方案为已解决或延期/状态为已解决或已关闭";
-$lang->report->unplanned = '未计划';
+$lang->report->unplanned = "未{$lang->planCommon}";
$lang->report->workday = '每天工时';
$lang->report->diffDays = '工作日天数';
@@ -82,7 +82,7 @@ $lang->report->typeList['line'] = '折线图';
$lang->report->conditions = '筛选条件:';
$lang->report->closedProduct = '关闭' . $lang->productCommon;
-$lang->report->overduePlan = '过期计划';
+$lang->report->overduePlan = "过期{$lang->planCommon}";
/* daily reminder. */
$lang->report->idAB = 'ID';
@@ -112,7 +112,7 @@ $lang->report->annualData->consumed = "累计工时数";
$lang->report->annualData->foundBugs = "累计创建Bug数";
$lang->report->annualData->createdCases = "累计创建用例数";
$lang->report->annualData->involvedProducts = "累计参与{$lang->productCommon}数";
-$lang->report->annualData->createdPlans = "累计创建计划数";
+$lang->report->annualData->createdPlans = "累计创建{$lang->planCommon}数";
$lang->report->annualData->createdStories = "累计创建{$lang->storyCommon}数";
$lang->report->annualData->productOverview = "{$lang->productCommon}创建{$lang->storyCommon}数及占比";
@@ -128,7 +128,7 @@ $lang->report->annualData->finishedTask = '完成任务数';
$lang->report->annualData->foundBug = '创建Bug数';
$lang->report->annualData->resolvedBug = '解决Bug数';
$lang->report->annualData->productName = "{$lang->productCommon}名称";
-$lang->report->annualData->planCount = '计划数';
+$lang->report->annualData->planCount = "{$lang->planCommon}数";
$lang->report->annualData->storyCount = "{$lang->storyCommon}数";
$lang->report->annualData->qaData = "累计创建Bug数和创建用例数";
diff --git a/module/score/lang/zh-cn.php b/module/score/lang/zh-cn.php
index 5e50da199c..eef81db114 100644
--- a/module/score/lang/zh-cn.php
+++ b/module/score/lang/zh-cn.php
@@ -36,7 +36,7 @@ $lang->score->modules['testcase'] = '用例';
$lang->score->modules['testtask'] = '测试单';
$lang->score->modules['build'] = 'Build';
$lang->score->modules['project'] = '项目';
-$lang->score->modules['productplan'] = '计划';
+$lang->score->modules['productplan'] = $lang->planCommon;
$lang->score->modules['release'] = '发布';
$lang->score->modules['block'] = '区块';
$lang->score->modules['search'] = '搜索';
@@ -74,7 +74,7 @@ $lang->score->methods['testcase']['create'] = '创建用例';
$lang->score->methods['build']['create'] = '创建版本';
$lang->score->methods['project']['create'] = '创建项目';
$lang->score->methods['project']['close'] = '项目完成';
-$lang->score->methods['productplan']['create'] = '创建计划';
+$lang->score->methods['productplan']['create'] = "创建{$lang->planCommon}";
$lang->score->methods['release']['create'] = '创建发布';
$lang->score->methods['block']['set'] = '区块自定义设置';
$lang->score->methods['search']['saveQuery'] = '保存搜索条件';
diff --git a/module/story/lang/zh-cn.php b/module/story/lang/zh-cn.php
index bd7fff2550..3d7f65429c 100644
--- a/module/story/lang/zh-cn.php
+++ b/module/story/lang/zh-cn.php
@@ -59,7 +59,7 @@ $lang->story->zeroTask = "只列零任务{$lang->storyCommon}";
$lang->story->reportChart = "统计报表";
$lang->story->reportAction = "统计报表";
$lang->story->copyTitle = "同{$lang->storyCommon}名称";
-$lang->story->batchChangePlan = "批量修改计划";
+$lang->story->batchChangePlan = "批量修改{$lang->planCommon}";
$lang->story->batchChangeBranch = "批量修改分支";
$lang->story->batchChangeStage = "批量修改阶段";
$lang->story->batchAssignTo = "批量指派";
@@ -109,8 +109,8 @@ $lang->story->rejectedReason = '拒绝原因';
$lang->story->reviewedBy = '由谁评审';
$lang->story->reviewedDate = '评审时间';
$lang->story->version = '版本号';
-$lang->story->plan = '所属计划';
-$lang->story->planAB = '计划';
+$lang->story->plan = "所属{$lang->planCommon}";
+$lang->story->planAB = $lang->planCommon;
$lang->story->comment = '备注';
$lang->story->children = "子{$lang->storyCommon}";
$lang->story->childrenAB = "子";
@@ -153,7 +153,7 @@ $lang->story->statusList['changed'] = '已变更';
$lang->story->stageList[''] = '';
$lang->story->stageList['wait'] = '未开始';
-$lang->story->stageList['planned'] = '已计划';
+$lang->story->stageList['planned'] = "已{$lang->planCommon}";
$lang->story->stageList['projected'] = '已立项';
$lang->story->stageList['developing'] = '研发中';
$lang->story->stageList['developed'] = '研发完毕';
@@ -252,8 +252,8 @@ $lang->story->form->file = "附件,如果该{$lang->storyCommon}有相关
$lang->story->action = new stdclass();
$lang->story->action->reviewed = array('main' => '$date, 由
$actor 记录评审结果,结果为
$extra。', 'extra' => 'reviewResultList');
$lang->story->action->closed = array('main' => '$date, 由
$actor 关闭,原因为
$extra $appendLink。', 'extra' => 'reasonList');
-$lang->story->action->linked2plan = array('main' => '$date, 由
$actor 关联到计划
$extra。');
-$lang->story->action->unlinkedfromplan = array('main' => '$date, 由
$actor 从计划
$extra 移除。');
+$lang->story->action->linked2plan = array('main' => '$date, 由
$actor 关联到' . $lang->planCommon . '
$extra。');
+$lang->story->action->unlinkedfromplan = array('main' => '$date, 由
$actor 从' . $lang->planCommon . '
$extra 移除。');
$lang->story->action->linked2project = array('main' => '$date, 由
$actor 关联到' . $lang->projectCommon . '
$extra。');
$lang->story->action->unlinkedfromproject = array('main' => '$date, 由
$actor 从' . $lang->projectCommon . '
$extra 移除。');
$lang->story->action->linked2build = array('main' => '$date, 由
$actor 关联到版本
$extra。');
@@ -275,7 +275,7 @@ $lang->story->report->value = "{$lang->storyCommon}数";
$lang->story->report->charts['storysPerProduct'] = $lang->productCommon . "{$lang->storyCommon}数量";
$lang->story->report->charts['storysPerModule'] = "模块{$lang->storyCommon}数量";
$lang->story->report->charts['storysPerSource'] = "按{$lang->storyCommon}来源统计";
-$lang->story->report->charts['storysPerPlan'] = '按计划进行统计';
+$lang->story->report->charts['storysPerPlan'] = "按{$lang->planCommon}进行统计";
$lang->story->report->charts['storysPerStatus'] = '按状态进行统计';
$lang->story->report->charts['storysPerStage'] = '按所处阶段进行统计';
$lang->story->report->charts['storysPerPri'] = '按优先级进行统计';
@@ -307,7 +307,7 @@ $lang->story->report->storysPerChange = new stdclass();
$lang->story->report->storysPerProduct->item = $lang->productCommon;
$lang->story->report->storysPerModule->item = '模块';
$lang->story->report->storysPerSource->item = '来源';
-$lang->story->report->storysPerPlan->item = '计划';
+$lang->story->report->storysPerPlan->item = $lang->planCommon;
$lang->story->report->storysPerStatus->item = '状态';
$lang->story->report->storysPerStage->item = '阶段';
$lang->story->report->storysPerPri->item = '优先级';
@@ -333,7 +333,7 @@ $lang->story->report->storysPerChange->graph = new stdclass();
$lang->story->report->storysPerProduct->graph->xAxisName = $lang->productCommon;
$lang->story->report->storysPerModule->graph->xAxisName = '模块';
$lang->story->report->storysPerSource->graph->xAxisName = '来源';
-$lang->story->report->storysPerPlan->graph->xAxisName = '计划';
+$lang->story->report->storysPerPlan->graph->xAxisName = $lang->planCommon;
$lang->story->report->storysPerStatus->graph->xAxisName = '状态';
$lang->story->report->storysPerStage->graph->xAxisName = '所处阶段';
$lang->story->report->storysPerPri->graph->xAxisName = '优先级';
From 5154d3bc0d7c007434e9f3bbd8254d8e4ae04b4d Mon Sep 17 00:00:00 2001
From: hufangzhou <746775970@qq.com>
Date: Mon, 31 Aug 2020 17:16:44 +0800
Subject: [PATCH 04/36] * Finish task#7764.
---
module/block/control.php | 10 +++---
module/block/view/sprintblock.html.php | 44 ++++++++++++++++++++++++++
2 files changed, 49 insertions(+), 5 deletions(-)
create mode 100644 module/block/view/sprintblock.html.php
diff --git a/module/block/control.php b/module/block/control.php
index 03c9c0a6ca..0cb08a9091 100644
--- a/module/block/control.php
+++ b/module/block/control.php
@@ -1108,14 +1108,14 @@ class block extends control
*/
public function printWaterfallReportBlock()
{
- $this->loadModel('program');
$program = $this->loadModel('project')->getByID($this->session->program);
$today = helper::today();
- $date = date('Ymd', strtotime($this->loadModel('weekly')->getThisMonday($today)));
+ $date = date('Ymd', strtotime('this week Monday'));
$begin = $program->begin;
- $weeks = $this->weekly->getWeekPairs($begin);
+ $weeks = $this->loadModel('weekly')->getWeekPairs($begin);
$current = zget($weeks, $date, '');
- $task = $this->dao->select("
+
+ $task = $this->dao->select("
sum(consumed) as totalConsumed,
sum(if(status != 'cancel' and status != 'closed', `left`, 0)) as totalLeft")
->from(TABLE_TASK)->where('program')->eq($this->session->program)
@@ -1304,7 +1304,7 @@ class block extends control
* @access public
* @return void
*/
- public function printScrumprojectBlock()
+ public function printSprintBlock()
{
$status = $this->dao->select('status, count(*) as count')->from(TABLE_PROJECT)
->where('deleted')->eq(0)
diff --git a/module/block/view/sprintblock.html.php b/module/block/view/sprintblock.html.php
new file mode 100644
index 0000000000..6cc721b8cf
--- /dev/null
+++ b/module/block/view/sprintblock.html.php
@@ -0,0 +1,44 @@
+
+ * @package block
+ * @version $Id$
+ * @link http://www.zentao.net
+ */
+?>
+total): ?>
+
block->emptyTip;?>
+
+
+
+
+
+
block->allProject;?>
+ createLink('project', 'all', 'status=all')?>
+
total ? html::a($projectLink, $summary->total) : 0;?>
+
+
+
+
+ -
+
+ doing;?>
+
+ block->doingProject;?>
+
+ -
+
+ closed;?>
+
+ block->finishProject;?>
+
+
+
+
+
From 4908bc492dda9e920d1088fb5a1a70638c0fdff8 Mon Sep 17 00:00:00 2001
From: hufangzhou <746775970@qq.com>
Date: Mon, 31 Aug 2020 17:17:25 +0800
Subject: [PATCH 05/36] * Finish task#7757.
---
module/block/lang/en.php | 30 +++++++++++++++---------------
module/block/lang/zh-cn.php | 28 ++++++++++++++--------------
2 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/module/block/lang/en.php b/module/block/lang/en.php
index 4377c67713..52e9b3e7dd 100644
--- a/module/block/lang/en.php
+++ b/module/block/lang/en.php
@@ -153,7 +153,7 @@ $lang->block->default['scrum']['program']['5']['block'] = 'scrumproduct';
$lang->block->default['scrum']['program']['5']['grid'] = 4;
$lang->block->default['scrum']['program']['6']['title'] = $lang->projectCommon . ' Overview';
-$lang->block->default['scrum']['program']['6']['block'] = 'scrumproject';
+$lang->block->default['scrum']['program']['6']['block'] = 'sprint';
$lang->block->default['scrum']['program']['6']['grid'] = 4;
$lang->block->default['scrum']['program']['7']['title'] = 'Dynamic';
@@ -334,7 +334,7 @@ $lang->block->modules['scrum']['index'] = new stdclass();
$lang->block->modules['scrum']['index']->availableBlocks = new stdclass();
$lang->block->modules['scrum']['index']->availableBlocks->scrumoverall = $lang->projectCommon . ' Overall';
$lang->block->modules['scrum']['index']->availableBlocks->scrumlist = $lang->projectCommon . ' List';
-$lang->block->modules['scrum']['index']->availableBlocks->scrumproject = $lang->projectCommon . ' Overview';
+$lang->block->modules['scrum']['index']->availableBlocks->sprint = $lang->projectCommon . ' Overview';
$lang->block->modules['scrum']['index']->availableBlocks->scrumproduct = $lang->productCommon . ' Overview';
$lang->block->modules['scrum']['index']->availableBlocks->scrumtest = 'Test Version';
$lang->block->modules['scrum']['index']->availableBlocks->scrumroadmap = $lang->productCommon . ' Rode Map';
@@ -472,19 +472,19 @@ $lang->block->typeList->testtask['done'] = 'Done';
$lang->block->typeList->testtask['all'] = 'All';
$lang->block->modules['program']->moreLinkList = new stdclass();
-$lang->block->modules['program']->moreLinkList->recentprogram = 'program|browse|';
-$lang->block->modules['program']->moreLinkList->statistic = 'program|browse|';
-$lang->block->modules['program']->moreLinkList->program = 'program|browse|';
-$lang->block->modules['program']->moreLinkList->waterfallreport = 'weekly|index|';
-$lang->block->modules['program']->moreLinkList->waterfallestimate = 'workestimation|index|';
-$lang->block->modules['program']->moreLinkList->waterfallissue = 'issue|browse|';
-$lang->block->modules['program']->moreLinkList->waterfallrisk = 'risk|browse|';
-$lang->block->modules['program']->moreLinkList->scrumlist = 'project|all|';
-$lang->block->modules['program']->moreLinkList->scrumroadmap = 'product|all|';
-$lang->block->modules['program']->moreLinkList->scrumtest = 'testtask|browse|';
-$lang->block->modules['program']->moreLinkList->scrumproduct = 'product|all|';
-$lang->block->modules['program']->moreLinkList->scrumproject = 'project|all|';
-$lang->block->modules['program']->moreLinkList->scrumdynamic = 'company|dynamic|';
+$lang->block->modules['program']->moreLinkList->recentprogram = 'program|browse|';
+$lang->block->modules['program']->moreLinkList->statistic = 'program|browse|';
+$lang->block->modules['program']->moreLinkList->program = 'program|browse|';
+$lang->block->modules['program']->moreLinkList->cmmireport = 'weekly|index|';
+$lang->block->modules['program']->moreLinkList->cmmiestimate = 'workestimation|index|';
+$lang->block->modules['program']->moreLinkList->cmmiissue = 'issue|browse|';
+$lang->block->modules['program']->moreLinkList->cmmirisk = 'risk|browse|';
+$lang->block->modules['program']->moreLinkList->scrumlist = 'project|all|';
+$lang->block->modules['program']->moreLinkList->scrumroadmap = 'product|all|';
+$lang->block->modules['program']->moreLinkList->scrumtest = 'testtask|browse|';
+$lang->block->modules['program']->moreLinkList->scrumproduct = 'product|all|';
+$lang->block->modules['program']->moreLinkList->sprint = 'project|all|';
+$lang->block->modules['program']->moreLinkList->scrumdynamic = 'company|dynamic|';
$lang->block->modules['product']->moreLinkList = new stdclass();
$lang->block->modules['product']->moreLinkList->list = 'product|all|product=&line=0&status=%s';
diff --git a/module/block/lang/zh-cn.php b/module/block/lang/zh-cn.php
index 45e21deca9..45aa122671 100644
--- a/module/block/lang/zh-cn.php
+++ b/module/block/lang/zh-cn.php
@@ -160,7 +160,7 @@ $lang->block->default['scrum']['program']['5']['block'] = 'scrumproduct';
$lang->block->default['scrum']['program']['5']['grid'] = 4;
$lang->block->default['scrum']['program']['6']['title'] = $lang->projectCommon . '总览';
-$lang->block->default['scrum']['program']['6']['block'] = 'scrumproject';
+$lang->block->default['scrum']['program']['6']['block'] = 'sprint';
$lang->block->default['scrum']['program']['6']['grid'] = 4;
$lang->block->default['scrum']['program']['7']['title'] = '最新动态';
@@ -342,7 +342,7 @@ $lang->block->modules['scrum']['index']->availableBlocks = new stdclass();
$lang->block->modules['scrum']['index']->availableBlocks->scrumoverall = '项目整体情况';
$lang->block->modules['scrum']['index']->availableBlocks->scrumlist = $lang->projectCommon . '列表';
$lang->block->modules['scrum']['index']->availableBlocks->scrumroadmap = $lang->productCommon . '路线图';
-$lang->block->modules['scrum']['index']->availableBlocks->scrumproject = $lang->projectCommon . '总览';
+$lang->block->modules['scrum']['index']->availableBlocks->sprint = $lang->projectCommon . '总览';
$lang->block->modules['scrum']['index']->availableBlocks->scrumproduct = $lang->productCommon . '总览';
$lang->block->modules['scrum']['index']->availableBlocks->scrumtest = '待测版本';
@@ -479,18 +479,18 @@ $lang->block->typeList->testtask['done'] = '已测版本';
$lang->block->typeList->testtask['all'] = '全部';
$lang->block->modules['program']->moreLinkList = new stdclass();
-$lang->block->modules['program']->moreLinkList->recentprogram = 'program|browse|';
-$lang->block->modules['program']->moreLinkList->statistic = 'program|browse|';
-$lang->block->modules['program']->moreLinkList->program = 'program|browse|';
-$lang->block->modules['program']->moreLinkList->waterfallreport = 'weekly|index|';
-$lang->block->modules['program']->moreLinkList->waterfallestimate = 'workestimation|index|';
-$lang->block->modules['program']->moreLinkList->waterfallissue = 'issue|browse|';
-$lang->block->modules['program']->moreLinkList->waterfallrisk = 'risk|browse|';
-$lang->block->modules['program']->moreLinkList->scrumlist = 'project|all|';
-$lang->block->modules['program']->moreLinkList->scrumtest = 'testtask|browse|';
-$lang->block->modules['program']->moreLinkList->scrumproduct = 'product|all|';
-$lang->block->modules['program']->moreLinkList->scrumproject = 'project|all|';
-$lang->block->modules['program']->moreLinkList->scrumdynamic = 'company|dynamic|';
+$lang->block->modules['program']->moreLinkList->recentprogram = 'program|browse|';
+$lang->block->modules['program']->moreLinkList->statistic = 'program|browse|';
+$lang->block->modules['program']->moreLinkList->program = 'program|browse|';
+$lang->block->modules['program']->moreLinkList->cmmireport = 'weekly|index|';
+$lang->block->modules['program']->moreLinkList->cmmiestimate = 'workestimation|index|';
+$lang->block->modules['program']->moreLinkList->cmmiissue = 'issue|browse|';
+$lang->block->modules['program']->moreLinkList->cmmirisk = 'risk|browse|';
+$lang->block->modules['program']->moreLinkList->scrumlist = 'project|all|';
+$lang->block->modules['program']->moreLinkList->scrumtest = 'testtask|browse|';
+$lang->block->modules['program']->moreLinkList->scrumproduct = 'product|all|';
+$lang->block->modules['program']->moreLinkList->sprint = 'project|all|';
+$lang->block->modules['program']->moreLinkList->scrumdynamic = 'company|dynamic|';
$lang->block->modules['product']->moreLinkList = new stdclass();
$lang->block->modules['product']->moreLinkList->list = 'product|all|product=&line=0&status=%s';
From 1cec43544127d7e3a8be8fa52aab1aa19743edbe Mon Sep 17 00:00:00 2001
From: hufangzhou <746775970@qq.com>
Date: Mon, 31 Aug 2020 17:18:13 +0800
Subject: [PATCH 06/36] * Finish task#7749.
---
framework/base/router.class.php | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/framework/base/router.class.php b/framework/base/router.class.php
index 87efe14d70..80dd51529c 100644
--- a/framework/base/router.class.php
+++ b/framework/base/router.class.php
@@ -840,16 +840,16 @@ class baseRouter
}
}
- /**
- * 从Get里取progarm id 设置到session中
- * Set program id into session.
- *
+ /**
+ * 从Get里取progarm id 设置到session中。
+ * Get progarm id from Get and set it to session.
+ *
* @access public
* @return void
*/
public function setProgram()
- {
- if(isset($_GET['pgm'])) $this->session->set('program', $_GET['pgm']); //Set program into session.
+ {
+ if(isset($_GET['pgm'])) $this->session->set('program', $_GET['pgm']); //Set program id into session.
}
/**
From ef02c8fc684e07c16743fbffbb03658922291cea Mon Sep 17 00:00:00 2001
From: hufangzhou <746775970@qq.com>
Date: Mon, 31 Aug 2020 17:22:18 +0800
Subject: [PATCH 07/36] * Finish task#7740.
---
module/upgrade/control.php | 7 +++++++
module/upgrade/model.php | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/module/upgrade/control.php b/module/upgrade/control.php
index 04e5e83825..52a6b0fe11 100644
--- a/module/upgrade/control.php
+++ b/module/upgrade/control.php
@@ -150,6 +150,13 @@ class upgrade extends control
$this->display();
}
+ /**
+ * Merge program.
+ *
+ * @param string $type
+ * @access public
+ * @return void
+ */
public function mergeProgram($type = 'productline')
{
if($_POST)
diff --git a/module/upgrade/model.php b/module/upgrade/model.php
index 0a6c0d69c2..31800fd2df 100644
--- a/module/upgrade/model.php
+++ b/module/upgrade/model.php
@@ -3175,7 +3175,7 @@ class upgradeModel extends model
$this->saveLogs($this->dao->get());
return !dao::isError();
}
-
+
/**
* Add unique key to team table.
*
From 1de312892a468379bdf9bf571e52eaaea694ab73 Mon Sep 17 00:00:00 2001
From: hufangzhou <746775970@qq.com>
Date: Mon, 31 Aug 2020 17:26:11 +0800
Subject: [PATCH 08/36] * Finish task#7729.
---
module/doc/control.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/module/doc/control.php b/module/doc/control.php
index b2d425559a..df3cab5819 100644
--- a/module/doc/control.php
+++ b/module/doc/control.php
@@ -302,7 +302,7 @@ class doc extends control
if(!$docResult or dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$docID = $docResult['id'];
- $files = isset($docResult['files']) ? $docResult['files'] : '';
+ $files = zget($docResult, 'files', '');
$lib = $this->doc->getLibByID($this->post->lib);
if($docResult['status'] == 'exists')
{
From 245f1992dc0bb8a32b1f3853ac33611fde8d0c8b Mon Sep 17 00:00:00 2001
From: hufangzhou <746775970@qq.com>
Date: Mon, 31 Aug 2020 17:36:36 +0800
Subject: [PATCH 09/36] * Finish task#7715.
---
module/block/view/scrumoverallblock.html.php | 1 +
module/block/view/waterfallreportblock.html.php | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/module/block/view/scrumoverallblock.html.php b/module/block/view/scrumoverallblock.html.php
index ef533f30c9..5b142d3228 100644
--- a/module/block/view/scrumoverallblock.html.php
+++ b/module/block/view/scrumoverallblock.html.php
@@ -22,6 +22,7 @@
.hours-statistics{position: relative; padding: 0px 5px 5px; display: table-cell;text-align: center;}
.hours-statistics > small {display: block; color: #A6AAB8;}
.hours-statistics > span {display: block; color: #3c4353; font-weight: bold;}
+.tile-amount{font-size: 20px;}
diff --git a/module/block/view/waterfallreportblock.html.php b/module/block/view/waterfallreportblock.html.php
index 6143d27255..dcdc07e99e 100644
--- a/module/block/view/waterfallreportblock.html.php
+++ b/module/block/view/waterfallreportblock.html.php
@@ -8,8 +8,8 @@
.block-waterfallreport .col-right .tile { width: 20%;}
.block-waterfallreport .col-right .tile .tile-title{font-weight: 700;}
.block-waterfallreport .progress {position: absolute; left: 45px; top: 90px; right: 40px;}
-.block-waterfallreport .progress-num{font-size: 26px; font-weight: 700}
-.block-waterfallreport .col-right .tile-amount{font-size: 22px; font-weight: 700}
+.block-waterfallreport .progress-num{font-size: 20px; font-weight: 700}
+.block-waterfallreport .col-right .tile-amount{font-size: 20px}
From 1fb8b2cba4628b5bef5ba561f0d5b794453c219e Mon Sep 17 00:00:00 2001
From: holan20180123 <56391770@qq.com>
Date: Mon, 31 Aug 2020 17:38:43 +0800
Subject: [PATCH 10/36] * Finish task #7730.
---
module/group/view/browse.html.php | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/module/group/view/browse.html.php b/module/group/view/browse.html.php
index e0f8f212a6..b947e3cf23 100644
--- a/module/group/view/browse.html.php
+++ b/module/group/view/browse.html.php
@@ -42,30 +42,30 @@
desc;?> |
|
- role != 'pgmadmin'):?>
+ role == 'pgmadmin';?>
+
group->managepriv = $lang->group->managePrivByGroup;?>
- id", $group, 'list', 'eye', '', 'iframe', true);?>
+ id", $group, 'list', 'eye', '', "iframe $disabled", true);?>
id", $group, 'list', 'lock');?>
group->managemember = $lang->group->manageMember;?>
- id", $group, 'list', 'persons', '', 'iframe', 'yes', "data-width='90%'");?>
- id", $group, 'list', '', '', 'iframe', 'yes', "data-width='550'");?>
- id", $group, 'list', '', '', 'iframe', 'yes', "data-width='550'");?>
+
+ id", $group, 'list', 'persons');?>
+
+ id", $group, 'list', 'persons', '', "iframe", true, "data-width='90%'");?>
+
+ id", $group, 'list', '', '', "iframe $disabled", true, "data-width='550'");?>
+ id", $group, 'list', '', '', "iframe $disabled", true, "data-width='550'");?>
createLink('group', 'delete', "groupID=$group->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"groupList\", confirmDelete)", '', '', "title='{$lang->group->delete}' class='btn'");
}
+ elseif($isPgmAdmin)
+ {
+ echo "";
+ }
?>
-
- id", $group, 'list', 'eye', '', 'disabled');?>
- id", $group, 'list', 'lock');?>
- group->managemember = $lang->group->manageMember;?>
- id", $group, 'list', 'persons');?>
- id", $group, 'list', '', '', 'disabled');?>
- id", $group, 'list', '', '', 'disabled');?>
- ";?>
-
|
From e7cbe56f2621521e18f94c1005c29001ff9f8efe Mon Sep 17 00:00:00 2001
From: holan20180123 <56391770@qq.com>
Date: Mon, 31 Aug 2020 17:39:26 +0800
Subject: [PATCH 11/36] * Adjust batchCreate testcase.
---
module/my/view/testcase.html.php | 4 ++--
module/testcase/model.php | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/module/my/view/testcase.html.php b/module/my/view/testcase.html.php
index 2b2a0ac5c6..9fee7ebd3b 100644
--- a/module/my/view/testcase.html.php
+++ b/module/my/view/testcase.html.php
@@ -83,8 +83,8 @@
product&branch=$case->branch&extra=caseID=$caseID,version=$case->version,runID=$runID", $case, 'list', 'bug', '', '', '', '', '', $case->program);
common::printIcon('testcase', 'create', "productID=$case->product&branch=$case->branch&moduleID=$case->module&from=testcase¶m=$caseID", $case, 'list', 'copy', '', '', '', '', '', $case->program);
- common::printIcon('testtask', 'runCase', "runID=$runID&caseID=$caseID&version=$case->version", '', 'list', 'play', '', 'iframe', '', "data-width='95%'", '', $case->program);
- common::printIcon('testtask', 'results', "runID=$runID&caseID=$caseID", '', 'list', 'list-alt', '', 'iframe', '', "data-width='95%'", '', $case->program);
+ common::printIcon('testtask', 'runCase', "runID=$runID&caseID=$caseID&version=$case->version", '', 'list', 'play', '', 'iframe', true, "data-width='95%'", '', $case->program);
+ common::printIcon('testtask', 'results', "runID=$runID&caseID=$caseID", '', 'list', 'list-alt', '', 'iframe', true, "data-width='95%'", '', $case->program);
common::printIcon('testcase', 'edit', "caseID=$caseID", $case, 'list', 'edit', '', '', '', '', '', $case->program);
?>
diff --git a/module/testcase/model.php b/module/testcase/model.php
index bc91bc963c..6f97eb33e2 100644
--- a/module/testcase/model.php
+++ b/module/testcase/model.php
@@ -226,6 +226,7 @@ class testcaseModel extends model
$data[$i] = new stdclass();
$data[$i]->product = $productID;
+ $data[$i]->program = $this->session->program;
$data[$i]->branch = $cases->branch[$i];
$data[$i]->module = $cases->module[$i];
$data[$i]->type = $cases->type[$i];
From 29a975bbb03d9d9dcfcbbdc2915d00451c1258b0 Mon Sep 17 00:00:00 2001
From: hufangzhou <746775970@qq.com>
Date: Mon, 31 Aug 2020 17:40:56 +0800
Subject: [PATCH 12/36] * Modify the getScrumprojectParams method to
getSprintParams method
---
module/block/model.php | 2 +-
module/block/view/scrumprojectblock.html.php | 44 --------------------
2 files changed, 1 insertion(+), 45 deletions(-)
delete mode 100644 module/block/view/scrumprojectblock.html.php
diff --git a/module/block/model.php b/module/block/model.php
index e1386f0abd..3ddb2e3438 100644
--- a/module/block/model.php
+++ b/module/block/model.php
@@ -936,7 +936,7 @@ class blockModel extends model
* @access public
* @return string
*/
- public function getScrumprojectParams($module = '')
+ public function getSprintParams($module = '')
{
$params->num['name'] = $this->lang->block->num;
$params->num['control'] = 'input';
diff --git a/module/block/view/scrumprojectblock.html.php b/module/block/view/scrumprojectblock.html.php
deleted file mode 100644
index 0ee6f555d9..0000000000
--- a/module/block/view/scrumprojectblock.html.php
+++ /dev/null
@@ -1,44 +0,0 @@
-
- * @package block
- * @version $Id$
- * @link http://www.zentao.net
- */
-?>
-total): ?>
-
block->emptyTip;?>
-
-
-
-
-
-
block->allProject;?>
- createLink('project', 'all', 'status=all')?>
-
total ? html::a($projectLink, $summary->total) : 0;?>
-
-
-
-
- -
-
- doing;?>
-
- block->doingProject;?>
-
- -
-
- closed;?>
-
- block->finishProject;?>
-
-
-
-
-
From 0a79ea5850c1a2e30247b0836d4d64479e23fa53 Mon Sep 17 00:00:00 2001
From: tianshujie98
Date: Mon, 31 Aug 2020 17:47:12 +0800
Subject: [PATCH 13/36] * Finish task #7760,7759.
---
module/design/control.php | 39 ++++++++++++++++++
module/design/lang/en.php | 27 +++++++------
module/design/lang/zh-cn.php | 25 ++++++------
module/design/model.php | 55 +++++++++++++++++++++-----
module/design/view/browse.html.php | 12 +++---
module/design/view/linkcommit.html.php | 3 +-
module/design/view/viewcommit.html.php | 54 +++++++++++++++++++++++++
7 files changed, 174 insertions(+), 41 deletions(-)
create mode 100644 module/design/view/viewcommit.html.php
diff --git a/module/design/control.php b/module/design/control.php
index 74373af463..a3ece72f64 100644
--- a/module/design/control.php
+++ b/module/design/control.php
@@ -264,6 +264,28 @@ class design extends control
$this->display();
}
+ /**
+ * Unlink commit.
+ *
+ * @param int $designID
+ * @param int $commitID
+ * @param string $confirm
+ * @access public
+ * @return void
+ */
+ public function unlinkCommit($designID = 0, $commitID = 0, $confirm = 'no')
+ {
+ if($confirm == 'no')
+ {
+ die(js::confirm($this->lang->design->confirmUnlink, inlink('unlinkCommit', "designID=$designID&commitID=$commitID&confirm=yes")));
+ }
+ else
+ {
+ $this->design->unlinkCommit($designID, $commitID);
+ die(js::reload('parent'));
+ }
+ }
+
/**
* A version of the code base.
*
@@ -278,6 +300,23 @@ class design extends control
header("location:" . $repoURL);
}
+ /**
+ * View a design's commit.
+ *
+ * @param int $designID
+ * @access public
+ * @return void
+ */
+ public function viewCommit($designID = 0)
+ {
+ $this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->submission;
+ $this->view->position[] = $this->lang->design->submission;
+
+ $this->view->design = $this->design->getCommit($designID);
+
+ $this->display();
+ }
+
/**
* Delete a design.
*
diff --git a/module/design/lang/en.php b/module/design/lang/en.php
index 9979ec2d85..dcecacf229 100644
--- a/module/design/lang/en.php
+++ b/module/design/lang/en.php
@@ -38,17 +38,19 @@ $lang->design->basicInfo = 'Basic Information';
$lang->design->noAssigned = 'Unassigned';
/* Action list. */
-$lang->design->common = 'Design';
-$lang->design->create = 'Create Design';
-$lang->design->batchCreate = 'Batch Create';
-$lang->design->edit = 'Edit';
-$lang->design->delete = 'Delete';
-$lang->design->view = 'View';
-$lang->design->browse = 'List';
-$lang->design->commit = 'Link Commit';
-$lang->design->submit = 'Submit Review';
-$lang->design->assignTo = 'Assign';
-$lang->design->revision = 'Linked Code';
+$lang->design->common = 'Design';
+$lang->design->create = 'Create Design';
+$lang->design->batchCreate = 'Batch Create';
+$lang->design->edit = 'Edit';
+$lang->design->delete = 'Delete';
+$lang->design->view = 'View';
+$lang->design->browse = 'List';
+$lang->design->viewCommit = 'View Commit';
+$lang->design->linkCommit = 'Link Commit';
+$lang->design->unlinkCommit = 'Unlink Commit';
+$lang->design->submit = 'Submit Review';
+$lang->design->assignTo = 'Assign';
+$lang->design->revision = 'Linked Code';
/* Field value. */
$lang->design->typeList = array();
@@ -69,4 +71,5 @@ $lang->design->featureBar += $lang->design->typeList;
$lang->design->errorSelection = 'No record selected!';
$lang->design->noDesign = 'No record.';
$lang->design->noCommit = 'No record commited.';
-$lang->design->confirmDelete = 'Do you want to delete this design?';
+$lang->design->confirmDelete = 'Do you want to delete this design?';
+$lang->design->confirmUnlink = 'Are you sure you want to remove this submission?';
diff --git a/module/design/lang/zh-cn.php b/module/design/lang/zh-cn.php
index 7b8cb6bae4..264fd1909c 100644
--- a/module/design/lang/zh-cn.php
+++ b/module/design/lang/zh-cn.php
@@ -38,17 +38,19 @@ $lang->design->basicInfo = '基本信息';
$lang->design->noAssigned = '未指派';
/* 动作列表. */
-$lang->design->common = '设计';
-$lang->design->create = '创建设计';
-$lang->design->batchCreate = '批量创建';
-$lang->design->edit = '变更';
-$lang->design->delete = '删除';
-$lang->design->view = '设计概况';
-$lang->design->browse = '浏览列表';
-$lang->design->linkCommit = '关联提交';
-$lang->design->submit = '提交评审';
-$lang->design->assignTo = '指派';
-$lang->design->revision = '查看关联代码';
+$lang->design->common = '设计';
+$lang->design->create = '创建设计';
+$lang->design->batchCreate = '批量创建';
+$lang->design->edit = '变更';
+$lang->design->delete = '删除';
+$lang->design->view = '设计概况';
+$lang->design->browse = '浏览列表';
+$lang->design->viewCommit = '查看提交';
+$lang->design->linkCommit = '关联提交';
+$lang->design->unlinkCommit = '取消关联';
+$lang->design->submit = '提交评审';
+$lang->design->assignTo = '指派';
+$lang->design->revision = '查看关联代码';
/* 字段取值. */
$lang->design->typeList = array();
@@ -70,3 +72,4 @@ $lang->design->errorSelection = '还没有选中记录!';
$lang->design->noDesign = '暂时没有记录';
$lang->design->noCommit = '暂时没有提交记录';
$lang->design->confirmDelete = '您确定要删除这个设计吗?';
+$lang->design->confirmUnlink = '您确定要移除这个提交吗?';
diff --git a/module/design/model.php b/module/design/model.php
index 009ec8dfbd..95368ab2f5 100644
--- a/module/design/model.php
+++ b/module/design/model.php
@@ -172,8 +172,6 @@ class designModel extends model
*/
public function linkCommit($designID = 0, $repoID = 0)
{
- $this->dao->delete()->from(TABLE_RELATION)->where('AType')->eq('design')->andWhere('AID')->eq($designID)->andWhere('BType')->eq('commit')->andWhere('relation')->eq('completedin')->exec();
- $this->dao->delete()->from(TABLE_RELATION)->where('AType')->eq('commit')->andWhere('BID')->eq($designID)->andWhere('BType')->eq('design')->andWhere('relation')->eq('completedfrom')->exec();
$revisions = $_POST['revision'];
foreach($revisions as $revision)
@@ -199,12 +197,40 @@ class designModel extends model
$this->dao->replace(TABLE_RELATION)->data($data)->autoCheck()->exec();
}
$design = new stdclass();
- $design->commit = implode(",", $revisions);
+ $design->commit = $this->dao->select('commit')->from(TABLE_DESIGN)->where('id')->eq($designID)->fetch('commit');
+
+ if($design->commit)
+ {
+ $design->commit = implode(",", $revisions) . "," . $design->commit;
+ }
+ else
+ {
+ $design->commit = implode(",", $revisions);
+ }
+
$design->commitDate = helper::now();
$design->commitBy = $this->app->user->account;
$this->dao->update(TABLE_DESIGN)->data($design)->autoCheck()->where('id')->eq($designID)->exec();
}
+ /**
+ * Unlink commit.
+ *
+ * @param int $designID
+ * @param int $commitID
+ * @access public
+ * @return void
+ */
+ public function unlinkCommit($designID = 0, $commitID = 0)
+ {
+ $this->dao->delete()->from(TABLE_RELATION)->where('AType')->eq('design')->andwhere('AID')->eq($designID)->andwhere('BType')->eq('commit')->andwhere('relation')->eq('completedin')->andWhere('BID')->eq($commitID)->exec();
+ $this->dao->delete()->from(TABLE_RELATION)->where('AType')->eq('commit')->andwhere('BID')->eq($designID)->andwhere('BType')->eq('design')->andwhere('relation')->eq('completedfrom')->andWhere('AID')->eq($commitID)->exec();
+
+ $commit = $this->dao->select('BID')->from(TABLE_RELATION)->where('AType')->eq('design')->andWhere('AID')->eq($designID)->fetchAll('BID');
+ $commit = implode(",", array_keys($commit));
+ $this->dao->update(TABLE_DESIGN)->set('commit')->eq($commit)->where('id')->eq($designID)->exec();
+ }
+
/**
* Set product menu.
*
@@ -312,16 +338,25 @@ class designModel extends model
->fetchAll('id');
}
- foreach($designs as $id => $design)
- {
- $design->commit = '';
- $relations = $this->loadModel('common')->getRelations('design', $id, 'commit');
- foreach($relations as $relation) $design->commit .= html::a(helper::createLink('design', 'revision', "repoID=$relation->BID", '', true), "#$relation->BID", '_blank');
- }
-
return $designs;
}
+ /**
+ * Get commit.
+ *
+ * @param int $designID
+ * @access public
+ * @return void
+ */
+ public function getCommit($designID = 0)
+ {
+ $design = $this->dao->select('*')->from(TABLE_DESIGN)->where('id')->eq($designID)->fetch();
+
+ $design->commit = $design->commit ? explode(",", $design->commit) : '';
+
+ return $design;
+ }
+
/**
* Get designs by search.
*
diff --git a/module/design/view/browse.html.php b/module/design/view/browse.html.php
index ba4ad2968f..b8af5713e3 100644
--- a/module/design/view/browse.html.php
+++ b/module/design/view/browse.html.php
@@ -42,14 +42,13 @@
recTotal}&recPerPage={$pager->recPerPage}";?>
- | idAB);?> |
+ design->id);?> |
design->type);?> |
design->name);?> |
- design->submission);?> |
design->createdBy);?> |
design->createdDate);?> |
design->assignedTo);?> |
- design->actions;?> |
+ design->actions;?> |
@@ -58,16 +57,15 @@
id);?> |
design->typeList, $design->type);?> |
createLink('design', 'view', "id={$design->id}"), $design->name);?> |
- commit;?> |
createdBy;?> |
createdDate, 0, 11);?> |
design->printAssignedHtml($design, $users);?> |
id}";
- common::printIcon('design', 'edit', $vars, $design, 'list', 'fork', '', '', '', '', '', $design->program);
- common::printIcon('design', 'linkCommit', $vars, $design, 'list', 'link', '', 'iframe showinonlybody', true);
- common::printIcon('design', 'delete', $vars, $design, 'list', 'trash', 'hiddenwin', '', '', '', '', $design->program);
+ common::printIcon('design', 'edit', $vars, $design, 'list', 'fork', '', '', '', '', '', $design->program);
+ common::printIcon('design', 'viewCommit', $vars, $design, 'list', 'glasses', '', 'iframe showinonlybody', true);
+ common::printIcon('design', 'delete', $vars, $design, 'list', 'trash', 'hiddenwin', '', '', '', '', $design->program);
?>
|
diff --git a/module/design/view/linkcommit.html.php b/module/design/view/linkcommit.html.php
index edd10c77a9..98a97c81e8 100644
--- a/module/design/view/linkcommit.html.php
+++ b/module/design/view/linkcommit.html.php
@@ -54,10 +54,11 @@
+ id, $linkedRevisions)) continue;?>
|
- revision, $linkedRevisions)) echo 'checked="checked"'?>/>
+
|
diff --git a/module/design/view/viewcommit.html.php b/module/design/view/viewcommit.html.php
new file mode 100644
index 0000000000..4f6bd9132f
--- /dev/null
+++ b/module/design/view/viewcommit.html.php
@@ -0,0 +1,54 @@
+
+ * @package design
+ * @version $Id: commit.html.php 4903 2013-06-26 05:32:59Z wyd621@gmail.com $
+ * @link http://www.zentao.net
+ */
+?>
+
+
+
+
+ id;?>
+ name?>
+ arrow . $lang->design->submission;?>
+
+
+ commit)):?>
+
+
+
+ id", "" . $lang->design->linkCommit, '_blank', "class='btn btn-primary'");?>
+
+
+
+
+ | design->submission;?> |
+ design->commitBy;?> |
+ design->commitDate;?> |
+ design->actions;?> |
+
+
+
+ commit as $commit):?>
+
+ |
+ commitBy;?> |
+ commitDate, 0, 11);?> |
+
+ id&commitID=$commit", $design, 'list', 'unlink', 'hiddenwin', 'iframe showinonlybody', true);?>
+ |
+
+
+
+
+
+
+
From 8f79522dbf7ed1fb33758d46256c9c247f07f13b Mon Sep 17 00:00:00 2001
From: qiyu-xie
Date: Tue, 1 Sep 2020 08:32:22 +0800
Subject: [PATCH 14/36] *Add action lang.
---
module/action/lang/de.php | 1 +
module/action/lang/en.php | 1 +
module/action/lang/fr.php | 1 +
module/action/lang/vi.php | 1 +
4 files changed, 4 insertions(+)
diff --git a/module/action/lang/de.php b/module/action/lang/de.php
index ad6a983fe8..c79c04e2d0 100644
--- a/module/action/lang/de.php
+++ b/module/action/lang/de.php
@@ -405,6 +405,7 @@ $lang->action->label->entry = 'Eintrag|entry|browse|';
$lang->action->label->webhook = 'Webhook|webhook|browse|';
$lang->action->label->space = ' ';
$lang->action->label->risk = 'Risk|risk|view|riskID=%s';
+$lang->action->label->issue = 'Issue|issue|view|issueID=%s';
/* Object type. */
$lang->action->search->objectTypeList[''] = '';
diff --git a/module/action/lang/en.php b/module/action/lang/en.php
index d00da21068..7458f7ca9f 100755
--- a/module/action/lang/en.php
+++ b/module/action/lang/en.php
@@ -405,6 +405,7 @@ $lang->action->label->entry = 'Application|entry|browse|';
$lang->action->label->webhook = 'Webhook|webhook|browse|';
$lang->action->label->space = ' ';
$lang->action->label->risk = 'Risk|risk|view|riskID=%s';
+$lang->action->label->issue = 'Issue|issue|view|issueID=%s';
/* Object type. */
$lang->action->search->objectTypeList[''] = '';
diff --git a/module/action/lang/fr.php b/module/action/lang/fr.php
index 71178150c4..9aa600c4ff 100644
--- a/module/action/lang/fr.php
+++ b/module/action/lang/fr.php
@@ -405,6 +405,7 @@ $lang->action->label->entry = 'Application|entry|browse|';
$lang->action->label->webhook = 'Webhook|webhook|browse|';
$lang->action->label->space = ' ';
$lang->action->label->risk = 'Risk|risk|view|riskID=%s';
+$lang->action->label->issue = 'Issue|issue|view|issueID=%s';
/* Object type. */
$lang->action->search->objectTypeList[''] = '';
diff --git a/module/action/lang/vi.php b/module/action/lang/vi.php
index 5d7e06eef1..353206c7fd 100644
--- a/module/action/lang/vi.php
+++ b/module/action/lang/vi.php
@@ -405,6 +405,7 @@ $lang->action->label->entry = 'Ứng dụng|entry|browse|';
$lang->action->label->webhook = 'Webhook|webhook|browse|';
$lang->action->label->space = ' ';
$lang->action->label->risk = 'Risk|risk|view|riskID%s';
+$lang->action->label->issue = 'Issue|issue|view|issueID=%s';
/* Object type. */
$lang->action->search->objectTypeList[''] = '';
From 0e9de1a8bea31634543ceac08f83135ff1692f19 Mon Sep 17 00:00:00 2001
From: Yagami <976204163@qq.com>
Date: Tue, 1 Sep 2020 09:13:59 +0800
Subject: [PATCH 15/36] * Finish task #7725.
---
db/demo.sql | 18 +++++++++---------
db/update20.0.sql | 1 +
module/company/view/browse.html.php | 4 ++--
module/dept/model.php | 7 +++++--
module/user/model.php | 22 +++++++++++++++-------
5 files changed, 32 insertions(+), 20 deletions(-)
diff --git a/db/demo.sql b/db/demo.sql
index 38df4bdeb0..bfd262c037 100644
--- a/db/demo.sql
+++ b/db/demo.sql
@@ -295,15 +295,15 @@ INSERT INTO `zt_testrun` (`id`, `task`, `case`, `version`, `assignedTo`, `lastRu
INSERT INTO `zt_testtask` (`id`, `name`, `product`, `project`, `build`, `owner`, `begin`, `end`, `desc`, `status`, `deleted`) VALUES(1, '企业网站第一期测试任务', 1, 1, 'trunk', 'testManager', '2012-06-05', '2013-06-21', '', 'wait', '0');
-INSERT INTO `zt_user` (`id`, `dept`, `account`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `weixin`, `dingding`, `slack`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(2, 5, 'productManager', 'e10adc3949ba59abbe56e057f20f883e', 'po', '产品经理', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 3, '192.168.0.8', 1338866083, '0');
-INSERT INTO `zt_user` (`id`, `dept`, `account`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `weixin`, `dingding`, `slack`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(3, 6, 'projectManager', 'e10adc3949ba59abbe56e057f20f883e', 'pm', '项目经理', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 3, '192.168.0.8', 1338865876, '0');
-INSERT INTO `zt_user` (`id`, `dept`, `account`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `weixin`, `dingding`, `slack`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(4, 2, 'dev1', 'e10adc3949ba59abbe56e057f20f883e', 'dev', '开发甲', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 1, '192.168.0.8', 1338863860, '1');
-INSERT INTO `zt_user` (`id`, `dept`, `account`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `weixin`, `dingding`, `slack`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(5, 2, 'dev2', 'e10adc3949ba59abbe56e057f20f883e', 'dev', '开发乙', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 1, '192.168.0.8', 1338864116, '1');
-INSERT INTO `zt_user` (`id`, `dept`, `account`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `weixin`, `dingding`, `slack`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(6, 2, 'dev3', 'e10adc3949ba59abbe56e057f20f883e', 'dev', '开发丙', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 1, '192.168.0.8', 1338864187, '1');
-INSERT INTO `zt_user` (`id`, `dept`, `account`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `weixin`, `dingding`, `slack`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(7, 3, 'tester1', 'e10adc3949ba59abbe56e057f20f883e', 'qa', '测试甲', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 3, '192.168.0.8', 1338865739, '1');
-INSERT INTO `zt_user` (`id`, `dept`, `account`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `weixin`, `dingding`, `slack`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(8, 3, 'tester2', 'e10adc3949ba59abbe56e057f20f883e', 'qa', '测试乙', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 2, '192.168.0.8', 1338865450, '1');
-INSERT INTO `zt_user` (`id`, `dept`, `account`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `weixin`, `dingding`, `slack`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(9, 3, 'tester3', 'e10adc3949ba59abbe56e057f20f883e', 'qa', '测试丙', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 1, '192.168.0.8', 1338865125, '1');
-INSERT INTO `zt_user` (`id`, `dept`, `account`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `weixin`, `dingding`, `slack`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(10, 1, 'testManager', 'e10adc3949ba59abbe56e057f20f883e', 'qd', '测试经理', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 6, '192.168.0.8', 1338865842, '1');
+INSERT INTO `zt_user` (`id`, `dept`, `account`, `type`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `weixin`, `dingding`, `slack`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(2, 5, 'productManager', 'inside', 'e10adc3949ba59abbe56e057f20f883e', 'po', '产品经理', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 3, '192.168.0.8', 1338866083, '0');
+INSERT INTO `zt_user` (`id`, `dept`, `account`, `type`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `weixin`, `dingding`, `slack`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(3, 6, 'projectManager', 'inside', 'e10adc3949ba59abbe56e057f20f883e', 'pm', '项目经理', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 3, '192.168.0.8', 1338865876, '0');
+INSERT INTO `zt_user` (`id`, `dept`, `account`, `type`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `weixin`, `dingding`, `slack`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(4, 2, 'dev1', 'inside', 'e10adc3949ba59abbe56e057f20f883e', 'dev', '开发甲', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 1, '192.168.0.8', 1338863860, '1');
+INSERT INTO `zt_user` (`id`, `dept`, `account`, `type`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `weixin`, `dingding`, `slack`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(5, 2, 'dev2', 'inside', 'e10adc3949ba59abbe56e057f20f883e', 'dev', '开发乙', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 1, '192.168.0.8', 1338864116, '1');
+INSERT INTO `zt_user` (`id`, `dept`, `account`, `type`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `weixin`, `dingding`, `slack`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(6, 2, 'dev3', 'inside', 'e10adc3949ba59abbe56e057f20f883e', 'dev', '开发丙', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 1, '192.168.0.8', 1338864187, '1');
+INSERT INTO `zt_user` (`id`, `dept`, `account`, `type`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `weixin`, `dingding`, `slack`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(7, 3, 'tester1', 'inside', 'e10adc3949ba59abbe56e057f20f883e', 'qa', '测试甲', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 3, '192.168.0.8', 1338865739, '1');
+INSERT INTO `zt_user` (`id`, `dept`, `account`, `type`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `weixin`, `dingding`, `slack`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(8, 3, 'tester2', 'inside', 'e10adc3949ba59abbe56e057f20f883e', 'qa', '测试乙', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 2, '192.168.0.8', 1338865450, '1');
+INSERT INTO `zt_user` (`id`, `dept`, `account`, `type`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `weixin`, `dingding`, `slack`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(9, 3, 'tester3', 'inside', 'e10adc3949ba59abbe56e057f20f883e', 'qa', '测试丙', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 1, '192.168.0.8', 1338865125, '1');
+INSERT INTO `zt_user` (`id`, `dept`, `account`, `type`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `weixin`, `dingding`, `slack`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(10, 1, 'testManager', 'inside', 'e10adc3949ba59abbe56e057f20f883e', 'qd', '测试经理', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 6, '192.168.0.8', 1338865842, '1');
INSERT INTO `zt_usergroup` (`account`, `group`) VALUES('productManager', 5);
INSERT INTO `zt_usergroup` (`account`, `group`) VALUES('projectManager', 4);
diff --git a/db/update20.0.sql b/db/update20.0.sql
index b75c5e0149..9734e1619a 100644
--- a/db/update20.0.sql
+++ b/db/update20.0.sql
@@ -36,6 +36,7 @@ ALTER TABLE `zt_usergroup` ADD `program` text NOT NULL;
ALTER TABLE `zt_userview` ADD `programs` mediumtext COLLATE 'utf8_general_ci' NOT NULL AFTER `account`;
ALTER TABLE `zt_user` ADD `type` char(30) NOT NULL AFTER `account`;
+update zt_user set `type` = 'inside';
CREATE TABLE `zt_stage` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
diff --git a/module/company/view/browse.html.php b/module/company/view/browse.html.php
index 557d65fa4b..7e88791b50 100644
--- a/module/company/view/browse.html.php
+++ b/module/company/view/browse.html.php
@@ -24,8 +24,8 @@ js::set('confirmDelete', $lang->user->confirmDelete);
diff --git a/module/dept/model.php b/module/dept/model.php
index 49add44902..4e735cc36e 100644
--- a/module/dept/model.php
+++ b/module/dept/model.php
@@ -349,7 +349,10 @@ class deptModel extends model
/**
* Get users of a deparment.
*
- * @param int $deptID
+ * @param varchar $browseType inside|outside|all
+ * @param int $deptID
+ * @param object $pager
+ * @param varchar $orderBy
* @access public
* @return array
*/
@@ -357,7 +360,7 @@ class deptModel extends model
{
return $this->dao->select('*')->from(TABLE_USER)
->where('deleted')->eq(0)
- ->beginIF($browseType == 'inside')->andWhere('type')->eq('')->fi()
+ ->beginIF($browseType == 'inside')->andWhere('type')->eq('inside')->fi()
->beginIF($browseType == 'outside')->andWhere('type')->eq('outside')->fi()
->beginIF($deptID)->andWhere('dept')->in($deptID)->fi()
->orderBy($orderBy)
diff --git a/module/user/model.php b/module/user/model.php
index de7959f4a3..88efbbd8f8 100644
--- a/module/user/model.php
+++ b/module/user/model.php
@@ -51,20 +51,24 @@ class userModel extends model
}
/**
- * Get users list of current company.
+ * Get inside users list of current company.
*
* @access public
* @return void
*/
public function getList()
{
- return $this->dao->select('*')->from(TABLE_USER)->where('deleted')->eq(0)->orderBy('account')->fetchAll();
+ return $this->dao->select('*')->from(TABLE_USER)
+ ->where('deleted')->eq(0)
+ ->andWhere('type')->eq('inside')
+ ->orderBy('account')
+ ->fetchAll();
}
/**
* Get the account=>realname pairs.
*
- * @param string $params noletter|noempty|nodeleted|noclosed|withguest|pofirst|devfirst|qafirst|pmfirst|realname, can be sets of theme
+ * @param string $params noletter|noempty|nodeleted|noclosed|withguest|pofirst|devfirst|qafirst|pmfirst|realname|outside|inside|all, can be sets of theme
* @param string $usersToAppended account1,account2
* @param int $maxCount
* @access public
@@ -79,7 +83,7 @@ class userModel extends model
* thus to make sure users of this role at first.
*/
$fields = 'account, realname, deleted';
- $type = (strpos($params, 'outside') !== false) ? 'outside' : '';
+ $type = (strpos($params, 'outside') !== false) ? 'outside' : 'inside';
if(strpos($params, 'pofirst') !== false) $fields .= ", INSTR(',pd,po,', role) AS roleOrder";
if(strpos($params, 'pdfirst') !== false) $fields .= ", INSTR(',po,pd,', role) AS roleOrder";
if(strpos($params, 'qafirst') !== false) $fields .= ", INSTR(',qd,qa,', role) AS roleOrder";
@@ -199,8 +203,10 @@ class userModel extends model
/**
* Get users by sql.
*
- * @param int $query
- * @param int $pager
+ * @param varchar $browseType inside|outside|all
+ * @param int $query
+ * @param object $pager
+ * @param varchar $orderBy
* @access public
* @return void
*/
@@ -209,7 +215,7 @@ class userModel extends model
return $this->dao->select('*')->from(TABLE_USER)
->where('deleted')->eq(0)
->beginIF($query)->andWhere($query)->fi()
- ->beginIF($browseType == 'inside')->andWhere('type')->eq('')->fi()
+ ->beginIF($browseType == 'inside')->andWhere('type')->eq('inside')->fi()
->beginIF($browseType == 'outside')->andWhere('type')->eq('outside')->fi()
->orderBy($orderBy)
->page($pager)
@@ -230,6 +236,7 @@ class userModel extends model
$user = fixer::input('post')
->setDefault('join', '0000-00-00' )
+ ->setDefault('type', 'inside' )
->setIF($this->post->password1 != false, 'password', substr($this->post->password1, 0, 32))
->setIF($this->post->password1 == false, 'password', '')
->setIF($this->post->email != false, 'email', trim($this->post->email))
@@ -308,6 +315,7 @@ class userModel extends model
$data[$i] = new stdclass();
$data[$i]->dept = $users->dept[$i] == 'ditto' ? (isset($prev['dept']) ? $prev['dept'] : 0) : $users->dept[$i];
$data[$i]->account = $users->account[$i];
+ $data[$i]->type = 'inside';
$data[$i]->realname = $users->realname[$i];
$data[$i]->role = $role;
$data[$i]->group = $users->group[$i] == 'ditto' ? (isset($prev['group']) ? $prev['group'] : '') : $users->group[$i];
From 3ffa7c78464fed941c58220f8f088e2d93f5edf8 Mon Sep 17 00:00:00 2001
From: Yagami <976204163@qq.com>
Date: Tue, 1 Sep 2020 09:32:48 +0800
Subject: [PATCH 16/36] * Finish task #7727.
---
module/doc/view/browse.html.php | 10 +++++-----
module/doc/view/side.html.php | 8 ++++----
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/module/doc/view/browse.html.php b/module/doc/view/browse.html.php
index ea07434a31..16f0bda852 100644
--- a/module/doc/view/browse.html.php
+++ b/module/doc/view/browse.html.php
@@ -105,7 +105,7 @@ var browseType = '';
collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
- | createLink('doc', 'browse', "libID={$lib->id}&browseType=all¶m=0&orderBy=$orderBy&from=$from"), " " . $lib->name);?> |
+ id}&browseType=all¶m=0&orderBy=$orderBy&from=$from"), " " . $lib->name);?> |
|
|
|
@@ -124,9 +124,9 @@ var browseType = '';
$attachLib):?>
- | createLink('doc', 'allLibs', "type=project&product={$currentLib->product}"), " " . $attachLib->name);?> |
+ product}"), " " . $attachLib->name);?> |
- createLink('doc', 'showFiles', "type=$type&objectID={$currentLib->$type}"), " " . $attachLib->name);?> |
+ $type}"), " " . $attachLib->name);?> |
|
|
@@ -141,7 +141,7 @@ var browseType = '';
collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
- | createLink('doc', 'browse', "libID=$libID&browseType=bymodule¶m=$module->id&orderBy=$orderBy&from=$from"), " " . $module->name);?> |
+ id&orderBy=$orderBy&from=$from"), " " . $module->name);?> |
|
|
|
@@ -158,7 +158,7 @@ var browseType = '';
collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
- | createLink('doc', 'view', "docID=$doc->id"), " " . $doc->title);?> |
+ id"), " " . $doc->title);?> |
fileSize ? $doc->fileSize : '-';?> |
addedBy);?> |
addedDate, 'y-m-d');?> |
diff --git a/module/doc/view/side.html.php b/module/doc/view/side.html.php
index 2dbf572ce4..f2d940ea7c 100644
--- a/module/doc/view/side.html.php
+++ b/module/doc/view/side.html.php
@@ -66,19 +66,19 @@ $sideWidth = common::checkNotCN() ? '270' : '238';
createLink('doc', 'allLibs', "type=project&product=$tabMenu->id");
+ $subLibLink = inlink('allLibs', "type=project&product=$tabMenu->id");
$activeClass = ($this->methodName == 'alllibs' && $type == 'project' && $$tabValue == $tabMenu->id) ? "class='active'" : '';
$icon = 'icon-stack';
}
elseif($subLibID == 'files')
{
- $subLibLink = $this->createLink('doc', 'showFiles', "type=$tabValue&objectID=$tabMenu->id");
+ $subLibLink = inlink('showFiles', "type=$tabValue&objectID=$tabMenu->id");
$activeClass = ($this->methodName == 'showfiles' && $type == $tabValue && $object->id == $tabMenu->id) ? "class='active'" : '';
$icon = 'icon-paper-clip';
}
else
{
- $subLibLink = $this->createLink('doc', 'browse', "libID=$subLibID");
+ $subLibLink = inlink('browse', "libID=$subLibID");
$activeClass = ($this->methodName == 'browse' && $browseType != 'bymodule' && $subLibID == $libID) ? "class='active'" : '';
$icon = 'icon-folder-outline';
}
@@ -181,7 +181,7 @@ $sideWidth = common::checkNotCN() ? '270' : '238';
doc->customShowLibs;?>
-