* Adjust block module code.

This commit is contained in:
leiyong
2021-03-09 12:30:23 +08:00
parent 44b04fbe18
commit 86b18553a7
21 changed files with 533 additions and 531 deletions
+2 -5
View File
@@ -62,9 +62,9 @@ class executionModel extends model
*/
public function setMenu($executions, $executionID, $buildID = 0, $extra = '')
{
$project = $this->getByID($this->session->project);
if(empty($executions))
{
$project = $this->loadModel('project')->getByID($this->session->project);
if($project->model == 'waterfall')
{
if(($this->app->moduleName == 'programplan' && $this->app->methodName != 'create') || $this->app->moduleName == 'execution') die(js::locate(helper::createLink('programplan', 'create', "projectID=$project->id")));
@@ -77,11 +77,8 @@ class executionModel extends model
if(!$executionID and $this->session->execution) $executionID = $this->session->execution;
if(!$executionID or !in_array($executionID, array_keys($executions))) $executionID = key($executions);
$this->session->set('execution', $executionID);
$products = $this->loadModel('product')->getPairs();
/* Unset story, bug, build and testtask if type is ops. */
$execution = $this->getByID($executionID);
if($execution and $execution->lifetime == 'ops')
@@ -94,7 +91,7 @@ class executionModel extends model
}
/* Hide story and qa menu when execution is story or design type. */
if($execution and ($execution->attribute == 'story' || $execution->attribute == 'design'))
if($execution and ($execution->attribute == 'story' or $execution->attribute == 'design'))
{
unset($this->lang->execution->menu->story);
unset($this->lang->execution->menu->qa);