* code for task #69715.
This commit is contained in:
@@ -3123,11 +3123,11 @@ class execution extends control
|
||||
}
|
||||
|
||||
/* Get projects, executions and products. */
|
||||
$object = $this->project->getByID($objectID, $this->app->tab == 'project' ? 'project' : 'sprint,stage,kanban');
|
||||
$object = $this->project->getByID($objectID, 'project,sprint,stage,kanban');
|
||||
$products = $this->product->getProducts($objectID);
|
||||
$queryID = ($browseType == 'bySearch') ? (int)$param : 0;
|
||||
$browseLink = $this->session->executionStoryList;
|
||||
if($this->app->tab == 'project') $browseLink = $this->createLink('projectstory', 'story', "objectID=$objectID");
|
||||
if($this->app->tab == 'project' and empty($object->noSprint)) $browseLink = $this->createLink('projectstory', 'story', "objectID=$objectID");
|
||||
|
||||
$this->session->set('storyList', $this->app->getURI(true), $this->app->tab); // Save session.
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
common::printLink('story', 'export', "productID=$productID&orderBy=id_desc&executionID=$execution->id", "<i class='icon icon-export muted'></i> " . $lang->story->export, '', "class='btn btn-link export iframe' data-app='execution'");
|
||||
common::printLink('story', 'export', "productID=$productID&orderBy=id_desc&executionID=$execution->id", "<i class='icon icon-export muted'></i> " . $lang->story->export, '', "class='btn btn-link export iframe'");
|
||||
|
||||
if(common::canModify('execution', $execution))
|
||||
{
|
||||
@@ -96,14 +96,14 @@
|
||||
|
||||
$hidden = empty($buttonLink) ? 'hidden' : '';
|
||||
echo "<div class='btn-group dropdown' title='{$buttonTitle}'>";
|
||||
echo html::a($buttonLink, "<i class='icon icon-plus'></i> $buttonTitle", '', "class='btn btn-secondary $hidden' data-app='execution'");
|
||||
echo html::a($buttonLink, "<i class='icon icon-plus'></i> $buttonTitle", '', "class='btn btn-secondary $hidden'");
|
||||
|
||||
if($common::hasPriv('story', 'create') and common::hasPriv('story', 'batchCreate'))
|
||||
{
|
||||
if(!($isAllProduct and count($products) > 1)) echo "<button type='button' class='btn btn-secondary dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>";
|
||||
echo "<ul class='dropdown-menu pull-right'>";
|
||||
echo '<li>' . html::a($createStoryLink, $lang->story->create, '', "data-app='execution'") . '</li>';
|
||||
echo '<li>' . html::a($batchCreateLink, $lang->story->batchCreate, '', "data-app='execution'") . '</li>';
|
||||
echo '<li>' . html::a($createStoryLink, $lang->story->create) . '</li>';
|
||||
echo '<li>' . html::a($batchCreateLink, $lang->story->batchCreate) . '</li>';
|
||||
echo '</ul>';
|
||||
}
|
||||
|
||||
|
||||
@@ -2519,6 +2519,7 @@ class projectModel extends model
|
||||
}
|
||||
if(empty($projectID) or empty($executionID)) return;
|
||||
|
||||
$this->session->set('project', $projectID, $this->app->tab);
|
||||
$this->app->tab = 'project';
|
||||
$_COOKIE['tab'] = 'project';
|
||||
|
||||
@@ -2552,7 +2553,9 @@ class projectModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
$this->config->resetNavGroup['execution'] = 'project';
|
||||
$this->config->resetNavGroup[$moduleName] = 'project';
|
||||
$this->config->projectMode = 'noSprint';
|
||||
|
||||
/* If objectID is set, cannot use homeMenu. */
|
||||
unset($this->lang->$navGroup->homeMenu);
|
||||
|
||||
@@ -4580,7 +4580,7 @@ class storyModel extends model
|
||||
$storyLink = helper::createLink('story', 'view', "storyID=$story->id&version=0¶m=0&storyType=$story->type");
|
||||
$canView = common::hasPriv($story->type, 'view', null, "storyType=$story->type");
|
||||
|
||||
if($tab == 'project')
|
||||
if($tab == 'project' and empty($this->config->projectMode))
|
||||
{
|
||||
$storyLink = helper::createLink('projectstory', 'view', "storyID=$story->id");
|
||||
$canView = common::hasPriv('projectstory', 'view');
|
||||
|
||||
@@ -354,7 +354,7 @@ class task extends control
|
||||
{
|
||||
$taskLink = $this->createLink('my', 'work', 'mode=task');
|
||||
}
|
||||
elseif($this->app->tab == 'project')
|
||||
elseif($this->app->tab == 'project' and empty($execution->noSprint))
|
||||
{
|
||||
$taskLink = $this->createLink('project', 'execution', "browseType=all&projectID={$execution->project}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user