Merge branch 'zentaopms_239'

This commit is contained in:
wangyidong
2022-11-08 08:41:28 +08:00
458 changed files with 9419 additions and 4940 deletions
+14 -1
View File
@@ -109,7 +109,7 @@ class tree extends control
if($viewType == 'story')
{
/* Set menu.*/
$products = $this->product->getPairs();
$products = $this->product->getPairs($mode = '', $programID = 0, $append = '', 'all');
$this->product->saveState($rootID, $products);
unset($products[$rootID]);
@@ -294,6 +294,12 @@ class tree extends control
}
}
if($this->app->tab == 'project' and strpos($viewType, 'doc') === false)
{
$project = $this->loadModel('project')->getByID($this->session->project);
if(empty($project->hasProduct)) $this->view->root->name = $project->name;
}
$parentModules = $this->tree->getParents($currentModuleID);
$this->view->title = $title;
$this->view->position = $position;
@@ -408,6 +414,13 @@ class tree extends control
$childs = $this->tree->getAllChildId($moduleID);
foreach($childs as $childModuleID) unset($this->view->optionMenu[$childModuleID]);
$this->view->hiddenProduct = false;
if($this->app->tab == 'project')
{
$project = $this->loadModel('project')->getByID($this->session->project);
$this->view->hiddenProduct = empty($project->hasProduct);
}
$this->display();
}
+1 -1
View File
@@ -63,7 +63,7 @@ function syncProductOrProject(obj, type)
});
$('#' + type + 'Module').trigger("chosen:updated");
})
$('#copyModule').attr('onclick', null);
$('#copyModule').unbind('click');
$('#copyModule').bind('click', function(){syncModule(obj.value, viewType)});
}
+32 -17
View File
@@ -466,7 +466,7 @@ class treeModel extends model
{
$this->buildTree($treeMenu, $module, $type, $userFunc, $extra, $branch);
}
elseif(isset($executionModules[$module->id]))
elseif(isset($executionModules[$module->id]) || !empty($product->shadow))
{
$this->buildTree($treeMenu, $module, $type, $userFunc, $extra, $branch);
}
@@ -1083,16 +1083,44 @@ class treeModel extends model
{
$productID = zget($extra, 'productID', 0);
$projectID = $extra['projectID'];
return html::a(helper::createLink('projectstory', 'story', "projectID=$projectID&productID=$productID&branch=&browseType=byModule&param={$module->id}"), $module->name, '_self', "id='module{$module->id}' title='{$module->name}'");
return html::a(helper::createLink('projectstory', 'story', "projectID=$projectID&productID=$productID&branch=&browseType=byModule&param={$module->id}&storyType=story"), $module->name, '_self', "id='module{$module->id}' title='{$module->name}'");
}
elseif(isset($extra['executionID']) and !empty($extra['executionID']))
{
$executionID = $extra['executionID'];
return html::a(helper::createLink('execution', 'story', "executionID=$executionID&orderBy=order_desc&type=byModule&param={$module->id}"), $module->name, '_self', "id='module{$module->id}' title='{$module->name}'");
return html::a(helper::createLink('execution', 'story', "executionID=$executionID&storyType=story&orderBy=order_desc&type=byModule&param={$module->id}"), $module->name, '_self', "id='module{$module->id}' title='{$module->name}'");
}
else
{
return html::a(helper::createLink('product', 'browse', "root={$module->root}&branch={$extra['branchID']}&type=byModule&param={$module->id}"), $module->name, '_self', "id='module{$module->id}' title='{$module->name}'");
return html::a(helper::createLink('product', 'browse', "root={$module->root}&branch={$extra['branchID']}&type=byModule&param={$module->id}&storyType=story"), $module->name, '_self', "id='module{$module->id}' title='{$module->name}'");
}
}
/**
* Create link of requirement for waterfall.
*
* @param string $type
* @param object $module
* @param array $extra
* @access public
* @return string
*/
public function createRequirementLink($type, $module, $extra = array())
{
if(isset($extra['projectID']) and !empty($extra['projectID']))
{
$productID = zget($extra, 'productID', 0);
$projectID = $extra['projectID'];
return html::a(helper::createLink('projectstory', 'story', "projectID=$projectID&productID=$productID&branch=&browseType=byModule&param={$module->id}&storyType=requirement"), $module->name, '_self', "id='module{$module->id}' title='{$module->name}'");
}
elseif(isset($extra['executionID']) and !empty($extra['executionID']))
{
$executionID = $extra['executionID'];
return html::a(helper::createLink('execution', 'story', "executionID=$executionID&storyType=requirement&orderBy=order_desc&type=byModule&param={$module->id}"), $module->name, '_self', "id='module{$module->id}' title='{$module->name}'");
}
else
{
return html::a(helper::createLink('product', 'browse', "root={$module->root}&branch={$extra['branchID']}&type=byModule&param={$module->id}&storyType=requirement"), $module->name, '_self', "id='module{$module->id}' title='{$module->name}'");
}
}
@@ -1143,19 +1171,6 @@ class treeModel extends model
return html::a(helper::createLink('projectstory', 'story', "projectID={$extra['executionID']}&productID=$productID&branch=&browseType=byModule&param={$module->id}"), $module->name, '_self', "id='module{$module->id}' title='{$module->name}'");
}
/**
* Create link of requirement for waterfall.
*
* @param string $type
* @param object $module
* @access public
* @return string
*/
public function createRequirementLink($type, $module)
{
return html::a(helper::createLink($this->app->rawModule, $this->app->rawMethod, "root={$module->root}&branch=&type=byModule&param={$module->id}&storyType=requirement"), $module->name, '_self', "id='module{$module->id}' title='{$module->name}'");
}
/**
* Create link of a doc.
*
+1 -1
View File
@@ -34,7 +34,7 @@ if(isset($pageCSS)) css::internal($pageCSS);
<form action="<?php echo inlink('edit', 'module=' . $module->id .'&type=' .$type);?>" target='hiddenwin' method='post' class='mt-10px' id='dataform'>
<table class='table table-form'>
<?php if($showProduct):?>
<tr>
<tr class="<?php if($hiddenProduct) echo 'hidden';?>">
<th class='thWidth'><?php echo $lang->tree->product;?></th>
<td>
<div class='input-group'>