Merge branch 'master' into zentaopms_239
This commit is contained in:
@@ -45,9 +45,14 @@ class execution extends control
|
||||
$mode = $this->app->tab == 'execution' ? 'multiple' : '';
|
||||
$this->executions = $this->execution->getPairs(0, 'all', "nocode,{$mode}");
|
||||
$skipCreateStep = array('computeburn', 'ajaxgetdropmenu', 'executionkanban', 'ajaxgetteammembers', 'all');
|
||||
if(!in_array($this->methodName, $skipCreateStep) and $this->app->tab == 'execution')
|
||||
if(!in_array($this->methodName, $skipCreateStep) and $this->app->tab == 'execution' and isset($this->app->user))
|
||||
{
|
||||
if(!$this->executions and $this->methodName != 'index' and $this->methodName != 'create' and $this->app->getViewType() != 'mhtml') $this->locate($this->createLink('execution', 'create'));
|
||||
$this->executions = $this->execution->getPairs(0, 'all', 'nocode');
|
||||
$skipCreateStep = array('computeburn', 'ajaxgetdropmenu', 'executionkanban', 'ajaxgetteammembers', 'all');
|
||||
if(!in_array($this->methodName, $skipCreateStep) and $this->app->tab == 'execution')
|
||||
{
|
||||
if(!$this->executions and $this->methodName != 'index' and $this->methodName != 'create' and $this->app->getViewType() != 'mhtml') $this->locate($this->createLink('execution', 'create'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -522,7 +527,10 @@ class execution extends control
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$recTotal = count($tasks2Imported);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
$tasks2ImportedList = array_chunk($tasks2Imported, $pager->recPerPage, true);
|
||||
$tasks2ImportedList = empty($tasks2ImportedList) ? $tasks2ImportedList : $tasks2ImportedList[$pageID - 1];
|
||||
$tasks2ImportedList = $this->loadModel('task')->processTasks($tasks2ImportedList);
|
||||
|
||||
/* Save session. */
|
||||
$this->app->session->set('taskList', $this->app->getURI(true), 'execution');
|
||||
@@ -531,7 +539,7 @@ class execution extends control
|
||||
$this->view->pager = $pager;
|
||||
$this->view->position[] = html::a(inlink('browse', "executionID=$toExecution"), $execution->name);
|
||||
$this->view->position[] = $this->lang->execution->importTask;
|
||||
$this->view->tasks2Imported = empty($tasks2ImportedList) ? $tasks2ImportedList : $tasks2ImportedList[$pageID - 1];
|
||||
$this->view->tasks2Imported = $tasks2ImportedList;
|
||||
$this->view->executions = $executions;
|
||||
$this->view->executionID = $execution->id;
|
||||
$this->view->fromExecution = $fromExecution;
|
||||
@@ -967,15 +975,16 @@ class execution extends control
|
||||
* View a story.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function storyView($storyID)
|
||||
public function storyView($storyID, $executionID = 0)
|
||||
{
|
||||
$this->session->set('productList', $this->app->getURI(true), 'product');
|
||||
|
||||
$story = $this->loadModel('story')->getByID($storyID);
|
||||
echo $this->fetch('story', 'view', "storyID=$storyID&version=$story->version¶m=" . $this->session->execution);
|
||||
echo $this->fetch('story', 'view', "storyID=$storyID&version=$story->version¶m=" . ($executionID ? $executionID : $this->session->execution));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3827,6 +3836,7 @@ class execution extends control
|
||||
$this->view->from = $from;
|
||||
$this->view->param = $param;
|
||||
$this->view->isStage = (isset($project->model) and $project->model == 'waterfall') ? true : false;
|
||||
$this->view->showBatchEdit = $this->cookie->showExecutionBatchEdit;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user