diff --git a/db/update21.6.beta.sql b/db/update21.6.beta.sql index 5ac113779c..a0577a1785 100644 --- a/db/update21.6.beta.sql +++ b/db/update21.6.beta.sql @@ -46,3 +46,6 @@ UPDATE `zt_workflowfield` SET `control` = 'select' WHERE `module` = 'proje UPDATE `zt_workflowfield` SET `control` = 'select', `options` = "{\"extend\":\"\\u7ee7\\u627f\",\"reset\":\"\\u91cd\\u65b0\\u5b9a\\u4e49\"}" WHERE `module` = 'project' AND `field` = 'auth'; UPDATE `zt_workflowaction` SET `layout` = 'side' WHERE `module` = 'ticket' AND `action` = 'edit'; + +DELETE FROM `zt_block` WHERE `dashboard` = 'my' AND `module` = 'product' AND `code` IN ('overview', 'statistic') AND `vision` = 'lite'; +DELETE FROM `zt_block` WHERE `dashboard` = 'my' AND `module` = 'qa' AND `code` = 'statistic' AND `vision` = 'lite'; diff --git a/module/block/lang/de.php b/module/block/lang/de.php index ca345e8594..d9ea37f5e4 100644 --- a/module/block/lang/de.php +++ b/module/block/lang/de.php @@ -197,12 +197,12 @@ $lang->block->default['full']['my'][] = array('title' => "Recent {$lang->project $lang->block->default['full']['my'][] = array('title' => "Undone {$lang->projectCommon} list", 'module' => 'project', 'code' => 'project', 'width' => '2', 'params' => array('type' => 'undone', 'count' => '20', 'orderBy' => 'id_desc')); $lang->block->default['full']['my'][] = array('title' => "{$lang->projectCommon} Statistic", 'module' => 'project', 'code' => 'statistic', 'width' => '2', 'params' => array('type' => 'undone', 'count' => '20')); $lang->block->default['full']['my'][] = array('title' => "Undone {$lang->execution->common} Statistic", 'module' => 'execution', 'code' => 'statistic', 'width' => '2', 'params' => array('type' => 'undone', 'count' => '20')); -$lang->block->default['full']['my'][] = array('title' => "Unclosed {$lang->productCommon} Statistic", 'module' => 'product', 'code' => 'statistic', 'width' => '2', 'params' => array('type' => 'noclosed', 'count' => '20')); -$lang->block->default['full']['my'][] = array('title' => "Unclosed {$lang->productCommon} test statistics", 'module' => 'qa', 'code' => 'statistic', 'width' => '2', 'params' => array('type' => 'noclosed', 'count' => '20')); +if($config->vision != 'lite') $lang->block->default['full']['my'][] = array('title' => "Unclosed {$lang->productCommon} Statistic", 'module' => 'product', 'code' => 'statistic', 'width' => '2', 'params' => array('type' => 'noclosed', 'count' => '20')); +if($config->vision != 'lite') $lang->block->default['full']['my'][] = array('title' => "Unclosed {$lang->productCommon} test statistics", 'module' => 'qa', 'code' => 'statistic', 'width' => '2', 'params' => array('type' => 'noclosed', 'count' => '20')); $lang->block->default['full']['my'][] = array('title' => "Zentao Dynamic", 'module' => 'zentaodynamic', 'code' => 'zentaodynamic', 'width' => '1'); $lang->block->default['full']['my'][] = array('title' => 'Dynamic', 'module' => 'dynamic', 'code' => 'dynamic', 'width' => '1'); $lang->block->default['full']['my'][] = array('title' => "Team", 'module' => 'teamachievement', 'code' => 'teamachievement', 'width' => '1'); -$lang->block->default['full']['my'][] = array('title' => "{$lang->productCommon} Overview", 'module' => 'product', 'code' => 'overview', 'width' => '1'); +if($config->vision != 'lite') $lang->block->default['full']['my'][] = array('title' => "{$lang->productCommon} Overview", 'module' => 'product', 'code' => 'overview', 'width' => '1'); $lang->block->default['full']['my'][] = array('title' => "{$lang->projectCommon} Overview", 'module' => 'project', 'code' => 'overview', 'width' => '1'); $lang->block->default['full']['my'][] = array('title' => "{$lang->execution->common} Overview", 'module' => 'execution', 'code' => 'overview', 'width' => '1'); diff --git a/module/block/lang/en.php b/module/block/lang/en.php index 3da7540ab3..2408ab9564 100644 --- a/module/block/lang/en.php +++ b/module/block/lang/en.php @@ -197,12 +197,12 @@ $lang->block->default['full']['my'][] = array('title' => "Recent {$lang->project $lang->block->default['full']['my'][] = array('title' => "Undone {$lang->projectCommon} list", 'module' => 'project', 'code' => 'project', 'width' => '2', 'params' => array('type' => 'undone', 'count' => '20', 'orderBy' => 'id_desc')); $lang->block->default['full']['my'][] = array('title' => "{$lang->projectCommon} Statistic", 'module' => 'project', 'code' => 'statistic', 'width' => '2', 'params' => array('type' => 'undone', 'count' => '20')); $lang->block->default['full']['my'][] = array('title' => "Undone {$lang->execution->common} Statistic", 'module' => 'execution', 'code' => 'statistic', 'width' => '2', 'params' => array('type' => 'undone', 'count' => '20')); -$lang->block->default['full']['my'][] = array('title' => "Unclosed {$lang->productCommon} Statistic", 'module' => 'product', 'code' => 'statistic', 'width' => '2', 'params' => array('type' => 'noclosed', 'count' => '20')); -$lang->block->default['full']['my'][] = array('title' => "Unclosed {$lang->productCommon} test statistics", 'module' => 'qa', 'code' => 'statistic', 'width' => '2', 'params' => array('type' => 'noclosed', 'count' => '20')); +if($config->vision != 'lite') $lang->block->default['full']['my'][] = array('title' => "Unclosed {$lang->productCommon} Statistic", 'module' => 'product', 'code' => 'statistic', 'width' => '2', 'params' => array('type' => 'noclosed', 'count' => '20')); +if($config->vision != 'lite') $lang->block->default['full']['my'][] = array('title' => "Unclosed {$lang->productCommon} test statistics", 'module' => 'qa', 'code' => 'statistic', 'width' => '2', 'params' => array('type' => 'noclosed', 'count' => '20')); $lang->block->default['full']['my'][] = array('title' => "Zentao Dynamic", 'module' => 'zentaodynamic', 'code' => 'zentaodynamic', 'width' => '1'); $lang->block->default['full']['my'][] = array('title' => 'Dynamic', 'module' => 'dynamic', 'code' => 'dynamic', 'width' => '1'); $lang->block->default['full']['my'][] = array('title' => "Team", 'module' => 'teamachievement', 'code' => 'teamachievement', 'width' => '1'); -$lang->block->default['full']['my'][] = array('title' => "{$lang->productCommon} Overview", 'module' => 'product', 'code' => 'overview', 'width' => '1'); +if($config->vision != 'lite') $lang->block->default['full']['my'][] = array('title' => "{$lang->productCommon} Overview", 'module' => 'product', 'code' => 'overview', 'width' => '1'); $lang->block->default['full']['my'][] = array('title' => "{$lang->projectCommon} Overview", 'module' => 'project', 'code' => 'overview', 'width' => '1'); $lang->block->default['full']['my'][] = array('title' => "{$lang->execution->common} Overview", 'module' => 'execution', 'code' => 'overview', 'width' => '1'); diff --git a/module/block/lang/fr.php b/module/block/lang/fr.php index c74e31aeaf..6a686220e9 100644 --- a/module/block/lang/fr.php +++ b/module/block/lang/fr.php @@ -197,12 +197,12 @@ $lang->block->default['full']['my'][] = array('title' => "Recent {$lang->project $lang->block->default['full']['my'][] = array('title' => "Undone {$lang->projectCommon} list", 'module' => 'project', 'code' => 'project', 'width' => '2', 'params' => array('type' => 'undone', 'count' => '20', 'orderBy' => 'id_desc')); $lang->block->default['full']['my'][] = array('title' => "{$lang->projectCommon} Statistic", 'module' => 'project', 'code' => 'statistic', 'width' => '2', 'params' => array('type' => 'undone', 'count' => '20')); $lang->block->default['full']['my'][] = array('title' => "Undone {$lang->execution->common} Statistic", 'module' => 'execution', 'code' => 'statistic', 'width' => '2', 'params' => array('type' => 'undone', 'count' => '20')); -$lang->block->default['full']['my'][] = array('title' => "Unclosed {$lang->productCommon} Statistic", 'module' => 'product', 'code' => 'statistic', 'width' => '2', 'params' => array('type' => 'noclosed', 'count' => '20')); -$lang->block->default['full']['my'][] = array('title' => "Unclosed {$lang->productCommon} test statistics", 'module' => 'qa', 'code' => 'statistic', 'width' => '2', 'params' => array('type' => 'noclosed', 'count' => '20')); +if($config->vision != 'lite') $lang->block->default['full']['my'][] = array('title' => "Unclosed {$lang->productCommon} Statistic", 'module' => 'product', 'code' => 'statistic', 'width' => '2', 'params' => array('type' => 'noclosed', 'count' => '20')); +if($config->vision != 'lite') $lang->block->default['full']['my'][] = array('title' => "Unclosed {$lang->productCommon} test statistics", 'module' => 'qa', 'code' => 'statistic', 'width' => '2', 'params' => array('type' => 'noclosed', 'count' => '20')); $lang->block->default['full']['my'][] = array('title' => "Zentao Dynamic", 'module' => 'zentaodynamic', 'code' => 'zentaodynamic', 'width' => '1'); $lang->block->default['full']['my'][] = array('title' => 'Dynamic', 'module' => 'dynamic', 'code' => 'dynamic', 'width' => '1'); $lang->block->default['full']['my'][] = array('title' => "Team", 'module' => 'teamachievement', 'code' => 'teamachievement', 'width' => '1'); -$lang->block->default['full']['my'][] = array('title' => "{$lang->productCommon} Overview", 'module' => 'product', 'code' => 'overview', 'width' => '1'); +if($config->vision != 'lite') $lang->block->default['full']['my'][] = array('title' => "{$lang->productCommon} Overview", 'module' => 'product', 'code' => 'overview', 'width' => '1'); $lang->block->default['full']['my'][] = array('title' => "{$lang->projectCommon} Overview", 'module' => 'project', 'code' => 'overview', 'width' => '1'); $lang->block->default['full']['my'][] = array('title' => "{$lang->execution->common} Overview", 'module' => 'execution', 'code' => 'overview', 'width' => '1'); diff --git a/module/block/lang/zh-cn.php b/module/block/lang/zh-cn.php index 9f91fc57f5..7cdbe8ec56 100644 --- a/module/block/lang/zh-cn.php +++ b/module/block/lang/zh-cn.php @@ -197,12 +197,12 @@ $lang->block->default['full']['my'][] = array('title' => "我近期参与的{$la $lang->block->default['full']['my'][] = array('title' => "未完成的{$lang->projectCommon}列表", 'module' => 'project', 'code' => 'project', 'width' => '2', 'params' => array('type' => 'undone', 'count' => '20', 'orderBy' => 'id_desc')); $lang->block->default['full']['my'][] = array('title' => "未完成的{$lang->execution->common}统计", 'module' => 'execution', 'code' => 'statistic', 'width' => '2', 'params' => array('type' => 'undone', 'count' => '20')); $lang->block->default['full']['my'][] = array('title' => "未完成的{$lang->projectCommon}统计", 'module' => 'project', 'code' => 'statistic', 'width' => '2', 'params' => array('type' => 'undone', 'count' => '20')); -$lang->block->default['full']['my'][] = array('title' => "未关闭的{$lang->productCommon}统计", 'module' => 'product', 'code' => 'statistic', 'width' => '2', 'params' => array('type' => 'noclosed', 'count' => '20')); -$lang->block->default['full']['my'][] = array('title' => "未关闭{$lang->productCommon}的测试统计", 'module' => 'qa', 'code' => 'statistic', 'width' => '2', 'params' => array('type' => 'noclosed', 'count' => '20')); +if($config->vision != 'lite') $lang->block->default['full']['my'][] = array('title' => "未关闭的{$lang->productCommon}统计", 'module' => 'product', 'code' => 'statistic', 'width' => '2', 'params' => array('type' => 'noclosed', 'count' => '20')); +if($config->vision != 'lite') $lang->block->default['full']['my'][] = array('title' => "未关闭{$lang->productCommon}的测试统计", 'module' => 'qa', 'code' => 'statistic', 'width' => '2', 'params' => array('type' => 'noclosed', 'count' => '20')); $lang->block->default['full']['my'][] = array('title' => "禅道动态", 'module' => 'zentaodynamic', 'code' => 'zentaodynamic', 'width' => '1'); $lang->block->default['full']['my'][] = array('title' => "最新动态", 'module' => 'dynamic', 'code' => 'dynamic', 'width' => '1'); $lang->block->default['full']['my'][] = array('title' => "团队成就", 'module' => 'teamachievement', 'code' => 'teamachievement', 'width' => '1'); -$lang->block->default['full']['my'][] = array('title' => "{$lang->productCommon}总览", 'module' => 'product', 'code' => 'overview', 'width' => '1'); +if($config->vision != 'lite') $lang->block->default['full']['my'][] = array('title' => "{$lang->productCommon}总览", 'module' => 'product', 'code' => 'overview', 'width' => '1'); $lang->block->default['full']['my'][] = array('title' => "{$lang->projectCommon}总览", 'module' => 'project', 'code' => 'overview', 'width' => '1'); $lang->block->default['full']['my'][] = array('title' => "{$lang->execution->common}总览", 'module' => 'execution', 'code' => 'overview', 'width' => '1'); diff --git a/module/block/zen.php b/module/block/zen.php index c1b84435d7..31cdb6e8c8 100644 --- a/module/block/zen.php +++ b/module/block/zen.php @@ -1893,7 +1893,7 @@ class blockZen extends block /* 通过度量项获取迭代总量。 */ $executionCount = 0; - $executionCountGroup = $project ? $this->metric->getResultByCodeWithArray('count_of_execution_in_project', array('project' => $project)) : $this->metric->getResultByCodeWithArray('count_of_execution', array(), 'cron'); + $executionCountGroup = $project ? $this->metric->getResultByCodeWithArray('count_of_execution_in_project', array('project' => $project)) : $this->metric->getResultByCodeWithArray('count_of_execution', array(), 'cron', null, $this->config->vision); if(!empty($executionCountGroup)) { $executionCountGroup = reset($executionCountGroup); @@ -1902,7 +1902,7 @@ class blockZen extends block /* 通过度量项获取今年完成的迭代数量。 */ $finishedExecution = 0; - $finishedExecutionGroup = $project ? $this->metric->getResultByCodeWithArray('count_of_annual_finished_execution_in_project', array('project' => $project, 'year' => date('Y')), 'cron') : $this->metric->getResultByCodeWithArray('count_of_annual_finished_execution', array('year' => date('Y')), 'cron'); + $finishedExecutionGroup = $project ? $this->metric->getResultByCodeWithArray('count_of_annual_finished_execution_in_project', array('project' => $project, 'year' => date('Y')), 'cron') : $this->metric->getResultByCodeWithArray('count_of_annual_finished_execution', array('year' => date('Y')), 'cron', null, $this->config->vision); if(!empty($finishedExecutionGroup)) { $finishedExecutionGroup = reset($finishedExecutionGroup); @@ -1911,7 +1911,7 @@ class blockZen extends block /* 通过度量项获取未开始的迭代数量。 */ $waitExecution = 0; - $waitExecutionGroup = $project ? $this->metric->getResultByCodeWithArray('count_wait_execution_in_project', array('project' => $project), 'cron') : $this->metric->getResultByCodeWithArray('count_of_wait_execution', array(), 'cron'); + $waitExecutionGroup = $project ? $this->metric->getResultByCodeWithArray('count_wait_execution_in_project', array('project' => $project), 'cron') : $this->metric->getResultByCodeWithArray('count_of_wait_execution', array(), 'cron', null, $this->config->vision); if(!empty($waitExecutionGroup)) { $waitExecutionGroup = reset($waitExecutionGroup); @@ -1920,7 +1920,7 @@ class blockZen extends block /* 通过度量项获取进行中的迭代数量。 */ $doingExecution = 0; - $doingExecutionGroup = $project ? $this->metric->getResultByCodeWithArray('count_of_doing_execution_in_project', array('project' => $project), 'cron') : $this->metric->getResultByCodeWithArray('count_of_doing_execution', array(), 'cron'); + $doingExecutionGroup = $project ? $this->metric->getResultByCodeWithArray('count_of_doing_execution_in_project', array('project' => $project), 'cron') : $this->metric->getResultByCodeWithArray('count_of_doing_execution', array(), 'cron', null, $this->config->vision); if(!empty($doingExecutionGroup)) { $doingExecutionGroup = reset($doingExecutionGroup); @@ -1929,7 +1929,7 @@ class blockZen extends block /* 通过度量项获取已挂起的迭代数量。 */ $suspendedExecution = 0; - $suspendedExecutionGroup = $project ? $this->metric->getResultByCodeWithArray('count_of_suspended_execution_in_project', array('project' => $project), 'cron') : $this->metric->getResultByCodeWithArray('count_of_suspended_execution', array(), 'cron'); + $suspendedExecutionGroup = $project ? $this->metric->getResultByCodeWithArray('count_of_suspended_execution_in_project', array('project' => $project), 'cron') : $this->metric->getResultByCodeWithArray('count_of_suspended_execution', array(), 'cron', null, $this->config->vision); if(!empty($suspendedExecutionGroup)) { $suspendedExecutionGroup = reset($suspendedExecutionGroup); @@ -1937,7 +1937,7 @@ class blockZen extends block } /* 如果是地盘下的区块跳转到执行列表,如果是单项目下的区块跳转到项目的迭代列表。 */ - $url = common::hasPriv('execution', 'all') ? helper::createLink('execution', 'all', 'status=all') : null; + $url = common::hasPriv('execution', 'all') && $this->config->vision != 'lite' ? helper::createLink('execution', 'all', 'status=all') : null; if($project) $url = common::hasPriv('project', 'execution') ? helper::createLink('project', 'execution', "status=all&projectID=$project") : null; /* 组装区块左侧的数据。 */