* Fix a bug.
This commit is contained in:
@@ -2260,7 +2260,7 @@ class execution extends control
|
||||
$execution = $this->execution->getById($executionID);
|
||||
$products = $this->execution->getProducts($executionID);
|
||||
$browseLink = $this->createLink('execution', 'story', "executionID=$executionID");
|
||||
if($execution->type == 'project') $browseLink = $this->createLink('projectstory', 'story');
|
||||
if($execution->type == 'project') $browseLink = $this->createLink('projectstory', 'story', "projectID=$executionID");
|
||||
|
||||
$this->session->set('storyList', $this->app->getURI(true), 'product'); // Save session.
|
||||
if($execution->type != 'execution') $this->execution->setMenu($this->executions, $execution->id); // Set menu.
|
||||
@@ -2936,7 +2936,7 @@ class execution extends control
|
||||
if($execution->type == 'project')
|
||||
{
|
||||
$moduleName = 'projectstory';
|
||||
$param = "productID=$productID";
|
||||
$param = "projectID=$executionID";
|
||||
}
|
||||
if($count != 0) echo js::alert(sprintf($this->lang->execution->haveDraft, $count)) . js::locate($this->createLink($moduleName, 'story', $param));
|
||||
die(js::locate(helper::createLink($moduleName, 'story', $param), 'parent'));
|
||||
|
||||
@@ -119,7 +119,7 @@ class product extends control
|
||||
*/
|
||||
public function browse($productID = 0, $branch = 0, $browseType = '', $param = 0, $storyType = 'story', $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1, $projectID = 0)
|
||||
{
|
||||
$productID = $this->product->saveState($productID, $this->products);
|
||||
$productID = $this->app->openApp != 'project' ? $this->product->saveState($productID, $this->products) : $productID;
|
||||
|
||||
if($this->app->openApp == 'product') $this->product->setMenu($productID, $branch);
|
||||
if($this->app->openApp == 'project') $this->loadModel('project')->setMenu($projectID);
|
||||
|
||||
@@ -26,6 +26,7 @@ js::set('foldAll', $lang->execution->treeLevel['root']);
|
||||
js::set('storyType', $storyType);
|
||||
$lang->story->createCommon = $storyType == 'story' ? $lang->story->createStory : $lang->story->createRequirement;
|
||||
$isProjectStory = $this->app->rawModule == 'projectstory';
|
||||
$projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
|
||||
?>
|
||||
<style>
|
||||
.btn-group .icon-close:before {font-size: 5px; vertical-align: 25%;}
|
||||
@@ -38,7 +39,7 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
|
||||
echo $moduleName;
|
||||
if($moduleID)
|
||||
{
|
||||
$removeLink = $browseType == 'bymodule' ? $this->createLink($this->app->rawModule, $this->app->rawMethod, "productID=$productID&branch=$branch&browseType=$browseType¶m=0&storyType=$storyType&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("storyModule")';
|
||||
$removeLink = $browseType == 'bymodule' ? $this->createLink($this->app->rawModule, $this->app->rawMethod, $projectIDParam . "productID=$productID&branch=$branch&browseType=$browseType¶m=0&storyType=$storyType&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("storyModule")';
|
||||
echo html::a($removeLink, "<i class='icon icon-sm icon-close'></i>", '', "class='text-muted'");
|
||||
}
|
||||
?>
|
||||
@@ -51,10 +52,10 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
|
||||
<a href='javascript:;' class='btn btn-link btn-limit text-ellipsis' data-toggle='dropdown' style="max-width: 120px;"><span class='text' title='<?php echo $productName;?>'><?php echo $productName;?></span> <span class='caret'></span></a>
|
||||
<ul class='dropdown-menu' style='max-height:240px; max-width: 300px; overflow-y:auto'>
|
||||
<?php
|
||||
echo "<li>" . html::a($this->createLink('projectstory', 'story', "productID=0"), $lang->product->all) . "</li>";
|
||||
echo "<li>" . html::a($this->createLink('projectstory', 'story', "projectID=$projectID"), $lang->product->all) . "</li>";
|
||||
foreach($projectProducts as $product)
|
||||
{
|
||||
echo "<li>" . html::a($this->createLink('projectstory', 'story', "productID=$product->id&branch=0"), $product->name, '', "title='{$product->name}' class='text-ellipsis'") . "</li>";
|
||||
echo "<li>" . html::a($this->createLink('projectstory', 'story', "projectID=$projectID&productID=$product->id&branch=0"), $product->name, '', "title='{$product->name}' class='text-ellipsis'") . "</li>";
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
@@ -64,7 +65,7 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
|
||||
<?php
|
||||
if($moduleID)
|
||||
{
|
||||
$removeLink = $browseType == 'bymodule' ? $this->createLink($this->app->rawModule, $this->app->rawMethod, "productID=$productID&branch=$branch&browseType=$browseType¶m=0&storyType=$storyType&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("storyModule")';
|
||||
$removeLink = $browseType == 'bymodule' ? $this->createLink($this->app->rawModule, $this->app->rawMethod, $projectIDParam . "productID=$productID&branch=$branch&browseType=$browseType¶m=0&storyType=$storyType&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("storyModule")';
|
||||
echo html::a($removeLink, "<i class='icon icon-sm icon-close'></i>", '', "class='text-muted btn btn-link' style='padding-left: 0;'");
|
||||
}
|
||||
?>
|
||||
@@ -96,20 +97,20 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
|
||||
foreach($lang->product->moreSelects as $key => $value)
|
||||
{
|
||||
$active = $key == $storyBrowseType ? 'btn-active-text' : '';
|
||||
echo '<li>' . html::a($this->createLink($this->app->rawModule, $this->app->rawMethod, "productID=$productID&branch=$branch&browseType=$key¶m=0&storyType=$storyType"), "<span class='text'>{$value}</span>", '', "class='btn btn-link $active'") . '</li>';
|
||||
echo '<li>' . html::a($this->createLink($this->app->rawModule, $this->app->rawMethod, $projectIDParam . "productID=$productID&branch=$branch&browseType=$key¶m=0&storyType=$storyType"), "<span class='text'>{$value}</span>", '', "class='btn btn-link $active'") . '</li>';
|
||||
}
|
||||
echo '</ul></div>';
|
||||
}
|
||||
}
|
||||
elseif($menuItem->name == 'QUERY')
|
||||
{
|
||||
$searchBrowseLink = $this->createLink($this->app->rawModule, $this->app->rawMethod, "productID=$productID&branch=$branch&browseType=$menuBrowseType¶m=%s&storyType=$storyType");
|
||||
$searchBrowseLink = $this->createLink($this->app->rawModule, $this->app->rawMethod, $projectIDParam . "productID=$productID&branch=$branch&browseType=$menuBrowseType¶m=%s&storyType=$storyType");
|
||||
$isBySearch = $this->session->storyBrowseType == 'bysearch';
|
||||
include '../../common/view/querymenu.html.php';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::a($this->createLink($this->app->rawModule, $this->app->rawMethod, "productID=$productID&branch=$branch&browseType=$menuBrowseType¶m=0&storyType=$storyType"), "<span class='text'>$menuItem->text</span>" . ($menuItem->name == $this->session->storyBrowseType ? ' <span class="label label-light label-badge">' . $pager->recTotal . '</span>' : ''), '', "id='{$menuItem->name}Tab' class='btn btn-link" . ($this->session->storyBrowseType == $menuItem->name ? ' btn-active-text' : '') . "'");
|
||||
echo html::a($this->createLink($this->app->rawModule, $this->app->rawMethod, $projectIDParam . "productID=$productID&branch=$branch&browseType=$menuBrowseType¶m=0&storyType=$storyType"), "<span class='text'>$menuItem->text</span>" . ($menuItem->name == $this->session->storyBrowseType ? ' <span class="label label-light label-badge">' . $pager->recTotal . '</span>' : ''), '', "id='{$menuItem->name}Tab' class='btn btn-link" . ($this->session->storyBrowseType == $menuItem->name ? ' btn-active-text' : '') . "'");
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -140,7 +141,7 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
|
||||
$wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID");
|
||||
if($isProjectStory) $wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID&storyID=&projectID=$projectID");
|
||||
$link = $this->createLink('tutorial', 'wizard', "module=story&method=create¶ms=$wizardParams");
|
||||
echo html::a($link, $lang->story->createCommon, '', "data-group='$openApp'");
|
||||
echo html::a($link, $lang->story->createCommon, '', "data-app='$openApp'");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -167,7 +168,7 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
|
||||
<li <?php echo $batchDisabled;?>>
|
||||
<?php
|
||||
$batchLink = $this->createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID&storyID=0&project=0&plan=0&type=$storyType");
|
||||
if($isProjectStory) $batchLink = $this->createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID&storyID=0&project={$this->session->project}");
|
||||
if($isProjectStory) $batchLink = $this->createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID&storyID=0&project=$projectID");
|
||||
echo html::a($batchLink, $lang->story->batchCreate, '', "data-group='$openApp'");
|
||||
?>
|
||||
</li>
|
||||
@@ -222,7 +223,7 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $storyType == 'story' ? $lang->story->noStory : $lang->story->noRequirement;?></span>
|
||||
<?php if(common::canModify('product', $product) and common::hasPriv('story', 'create')):?>
|
||||
<?php echo html::a($this->createLink('story', 'create', "productID={$productID}&branch={$branch}&moduleID={$moduleID}&storyID=0&projectID=$projectID&bugID=0&planID=0&todoID=0&extra=&type=$storyType"), "<i class='icon icon-plus'></i> " . $lang->story->createCommon, '', "class='btn btn-info' data-group='$from'");?>
|
||||
<?php echo html::a($this->createLink('story', 'create', "productID={$productID}&branch={$branch}&moduleID={$moduleID}&storyID=0&projectID=$projectID&bugID=0&planID=0&todoID=0&extra=&type=$storyType"), "<i class='icon icon-plus'></i> " . $lang->story->createCommon, '', "class='btn btn-info' data-app='$from'");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user