Merge branch ztflow-wangyuting-dev/bug-62845#wangyuting of zentao/zentaopms (#8963)
This commit is contained in:
@@ -142,6 +142,47 @@ class executionModel extends model
|
||||
$this->lang->execution->menu->story['link'] = str_replace(array($this->lang->common->story, 'story'), array($this->lang->SRCommon, 'storykanban'), $this->lang->execution->menu->story['link']);
|
||||
$this->lang->execution->menu->story['dropMenu']->story = str_replace('execution|story', 'execution|storykanban', $this->lang->execution->menu->story['dropMenu']->story);
|
||||
}
|
||||
|
||||
/* 模板执行过滤部分导航菜单。 */
|
||||
if($execution->isTpl)
|
||||
{
|
||||
/* 模板执行不显示1.5级导航。 */
|
||||
$this->config->hasDropmenuApps = array_diff($this->config->hasDropmenuApps, array('project', 'execution'));
|
||||
|
||||
unset($this->lang->execution->menu->kanban);
|
||||
unset($this->lang->execution->menu->burn);
|
||||
unset($this->lang->execution->menu->view);
|
||||
unset($this->lang->execution->menu->story);
|
||||
unset($this->lang->execution->menu->qa);
|
||||
unset($this->lang->execution->menu->devops);
|
||||
unset($this->lang->execution->menu->build);
|
||||
unset($this->lang->execution->menu->release);
|
||||
unset($this->lang->execution->menu->action);
|
||||
unset($this->lang->execution->menu->dynamic);
|
||||
unset($this->lang->execution->menu->effort);
|
||||
unset($this->lang->execution->menu->more);
|
||||
|
||||
if(!empty($this->lang->execution->menu->other['dropMenu']->pssp))
|
||||
{
|
||||
$this->lang->execution->menu->pssp = $this->lang->execution->menu->other['dropMenu']->pssp;
|
||||
$this->lang->execution->menu->auditplan = $this->lang->execution->menu->other['dropMenu']->auditplan;
|
||||
|
||||
$docOrder = 0;
|
||||
foreach($this->lang->execution->menuOrder as $order => $menu) if($menu == 'doc') $docOrder = $order;
|
||||
$this->lang->execution->menuOrder[$docOrder + 1] = 'pssp';
|
||||
$this->lang->execution->menuOrder[$docOrder + 2] = 'auditplan';
|
||||
|
||||
if(!empty($this->lang->project->menuOrder))
|
||||
{
|
||||
$docOrder = 0;
|
||||
foreach($this->lang->project->menuOrder as $order => $menu) if($menu == 'doc') $docOrder = $order;
|
||||
$this->lang->project->menuOrder[$docOrder + 1] = 'pssp';
|
||||
$this->lang->project->menuOrder[$docOrder + 2] = 'auditplan';
|
||||
}
|
||||
}
|
||||
|
||||
unset($this->lang->execution->menu->other);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,10 +23,17 @@ title=测试 executionModel::setMenu();
|
||||
timeout=0
|
||||
cid=1
|
||||
|
||||
- 测试构建导航第build条的link属性 @构建|execution|build|executionID=5
|
||||
- 测试设置迭代导航第more条的link属性 @更多|execution|more|5
|
||||
- 测试设置阶段导航第more条的link属性 @更多|execution|more|5
|
||||
- 测试设置看板导航第kanban条的link属性 @看板|execution|kanban|executionID=5
|
||||
- 执行不存在的情况 @0
|
||||
|
||||
*/
|
||||
|
||||
$executionTester = new executionTest();
|
||||
r($executionTester->setMenuTest(3)) && p('more:link') && e('更多|execution|more|3'); // 测试设置迭代导航
|
||||
r($executionTester->setMenuTest(4)) && p('more:link') && e('更多|execution|more|3'); // 测试设置阶段导航
|
||||
r($executionTester->setMenuTest(5)) && p('kanban:link') && e('看板|execution|kanban|executionID=5'); // 测试设置看板导航
|
||||
r($executionTester->setMenuTest(10)) && p() && e('0'); // 执行不存在的情况
|
||||
r($executionTester->setMenuTest(2)) && p('build:link') && e('构建|execution|build|executionID=5'); // 测试构建导航
|
||||
r($executionTester->setMenuTest(3)) && p('more:link') && e('更多|execution|more|5'); // 测试设置迭代导航
|
||||
r($executionTester->setMenuTest(4)) && p('more:link') && e('更多|execution|more|5'); // 测试设置阶段导航
|
||||
r($executionTester->setMenuTest(5)) && p('kanban:link') && e('看板|execution|kanban|executionID=5'); // 测试设置看板导航
|
||||
r($executionTester->setMenuTest(10)) && p() && e('0'); // 执行不存在的情况
|
||||
|
||||
Reference in New Issue
Block a user