Merge branch 'sprint/197_liumengyi_32879' into 'sprint/197'
* Finish task #55678, #55680, #55682, #55683, #55684. See merge request easycorp/zentaopms!3662
This commit is contained in:
@@ -544,10 +544,12 @@ class buildModel extends model
|
||||
if($type == 'browse')
|
||||
{
|
||||
$executionID = $tab == 'execution' ? $extraParams['executionID'] : $build->execution;
|
||||
$execution = $this->loadModel('execution')->getByID($executionID);
|
||||
$testtaskApp = (!empty($execution->type) and $execution->type == 'kanban') ? 'data-app="qa"' : "data-app='{$tab}'";
|
||||
|
||||
if(common::hasPriv('build', 'linkstory') and common::canBeChanged('build', $build)) $menu .= $this->buildMenu('build', 'view', "{$params}&type=story&link=true", $build, $type, 'link', '', '', '', "data-app={$tab}", $this->lang->build->linkStory);
|
||||
|
||||
$menu .= $this->buildMenu('testtask', 'create', "product=$build->product&execution={$executionID}&build=$build->id", $build, $type, 'bullhorn', '', '', '', "data-app='{$tab}'");
|
||||
$menu .= $this->buildMenu('testtask', 'create', "product=$build->product&execution={$executionID}&build=$build->id", $build, $type, 'bullhorn', '', '', '', $testtaskApp);
|
||||
|
||||
if($tab == 'execution') $menu .= $this->buildMenu('execution', 'bug', "execution={$extraParams['executionID']}&productID={$extraParams['productID']}&orderBy=status&build=$build->id", $build, $type, '', '', '', '', $this->lang->execution->viewBug);
|
||||
if($tab == 'project') $menu .= $this->buildMenu('build', 'view', "{$params}&type=generatedBug", $build, $type, 'bug', '', '', '', "data-app='project'", $this->lang->project->bug);
|
||||
|
||||
@@ -291,9 +291,15 @@ $lang->waterfall->menu->design['subMenu']->ads = array('link' => "{$lang->d
|
||||
$lang->waterfall->menu->design['subMenu']->bysearch = array('link' => '<a href="javascript:;" class="querybox-toggle"><i class="icon-search icon"></i> ' . $lang->searchAB . '</a>');
|
||||
|
||||
/* Kanban project menu. */
|
||||
$lang->kanban->menu = new stdclass();
|
||||
$lang->kanban->menuOrder = array();
|
||||
$lang->kanban->dividerMenu = '';
|
||||
$lang->kanbanProject = new stdclass();
|
||||
$lang->kanbanProject->menu = new stdclass();
|
||||
$lang->kanbanProject->menu->index = array('link' => "{$lang->kanban->common}|project|index|project=%s");
|
||||
$lang->kanbanProject->menu->build = array('link' => "{$lang->build->common}|project|build|project=%s");
|
||||
|
||||
$lang->kanbanProject->menuOrder = array();
|
||||
$lang->kanbanProject->menuOrder[5] = 'index';
|
||||
$lang->kanbanProject->menuOrder[10] = 'build';
|
||||
$lang->kanbanProject->dividerMenu = '';
|
||||
|
||||
/* Execution menu. */
|
||||
$lang->execution->homeMenu = new stdclass();
|
||||
|
||||
@@ -67,6 +67,9 @@ class executionModel extends model
|
||||
if($execution and $execution->type == 'kanban')
|
||||
{
|
||||
$this->lang->execution->menu = new stdclass();
|
||||
$this->lang->execution->menu->kanban = array('link' => "{$this->lang->kanban->common}|execution|kanban|executionID=%s");
|
||||
$this->lang->execution->menu->build = array('link' => "{$this->lang->build->common}|execution|build|executionID=%s");
|
||||
$this->lang->execution->dividerMenu = '';
|
||||
$this->lang->execution->accessDenied = str_replace($this->lang->executionCommon, $this->lang->execution->kanban, $this->lang->execution->accessDenied);
|
||||
}
|
||||
|
||||
|
||||
@@ -2483,7 +2483,13 @@ class projectModel extends model
|
||||
$project = $this->getByID($objectID);
|
||||
|
||||
$model = 'scrum';
|
||||
if($project) $model = $project->model;
|
||||
if($project and $project->model == 'waterfall') $model = $project->model;
|
||||
if($project and $project->model == 'kanban')
|
||||
{
|
||||
$model = $project->model . 'Project';
|
||||
|
||||
$lang->executionCommon = $lang->project->kanban;
|
||||
}
|
||||
|
||||
if(isset($lang->$model))
|
||||
{
|
||||
|
||||
@@ -248,6 +248,9 @@ class testtask extends control
|
||||
$executions = empty($productID) ? array() : $this->loadModel('product')->getExecutionPairsByProduct($productID, '', 'id_desc', $projectID);
|
||||
$builds = empty($productID) ? array() : $this->loadModel('build')->getBuildPairs($productID, 'all', 'notrunk');
|
||||
|
||||
$execution = $this->loadModel('execution')->getByID($executionID);
|
||||
if(!empty($execution) and $execution->type == 'kanban') $this->lang->testtask->execution = str_replace($this->lang->execution->common, $this->lang->kanban->common, $this->lang->testtask->execution);
|
||||
|
||||
/* Set menu. */
|
||||
$productID = $this->product->saveState($productID, $this->products);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user