* Adjust the projectstory module.
This commit is contained in:
@@ -138,7 +138,7 @@ class product extends control
|
||||
$moduleID = ($browseType == 'bymodule') ? (int)$param : (($browseType == 'bysearch' or $browseType == 'bybranch') ? 0 : ($this->cookie->storyModule ? $this->cookie->storyModule : 0));
|
||||
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
|
||||
|
||||
/* Set menu. */
|
||||
/* Set menu. The projectstory module does not execute. */
|
||||
if($this->app->rawModule == 'product')
|
||||
{
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
@@ -152,11 +152,11 @@ class product extends control
|
||||
{
|
||||
setcookie('treeBranch', (int)$branch, 0, $this->config->webRoot, '', false, false);
|
||||
$browseType = 'unclosed';
|
||||
$moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'story', $startModuleID = 0, array('treeModel', $createModuleLink), '', $branch, "¶m=$param&storyType=$storyType");
|
||||
$moduleTree = $this->tree->getTreeMenu($productID, 'story', $startModuleID = 0, array('treeModel', $createModuleLink), '', $branch, "¶m=$param&storyType=$storyType");
|
||||
}
|
||||
else
|
||||
{
|
||||
$moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'story', $startModuleID = 0, array('treeModel', $createModuleLink), '', (int)$this->cookie->treeBranch, "¶m=$param&storyType=$storyType");
|
||||
$moduleTree = $this->tree->getTreeMenu($productID, 'story', $startModuleID = 0, array('treeModel', $createModuleLink), '', (int)$this->cookie->treeBranch, "¶m=$param&storyType=$storyType");
|
||||
}
|
||||
|
||||
if($browseType != 'bymodule' and $browseType != 'bybranch') $this->session->set('storyBrowseType', $browseType);
|
||||
@@ -201,7 +201,9 @@ class product extends control
|
||||
}
|
||||
|
||||
/* Build search form. */
|
||||
$actionURL = $this->createLink('product', 'browse', "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID&storyType=$storyType");
|
||||
$rawModule = $this->app->rawModule;
|
||||
$rawMethod = $this->app->rawMethod;
|
||||
$actionURL = $this->createLink($rawModule, $rawMethod, "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID&storyType=$storyType");
|
||||
$this->config->product->search['onMenuBar'] = 'yes';
|
||||
$this->product->buildSearchForm($productID, $this->products, $queryID, $actionURL);
|
||||
|
||||
@@ -213,7 +215,6 @@ class product extends control
|
||||
$this->view->position[] = $this->products[$productID];
|
||||
$this->view->position[] = $this->lang->product->browse;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->program = $this->loadModel('project')->getById($this->session->PRJ);
|
||||
$this->view->product = $this->product->getById($productID);
|
||||
$this->view->productName = $this->products[$productID];
|
||||
$this->view->moduleID = $moduleID;
|
||||
@@ -226,7 +227,7 @@ class product extends control
|
||||
$this->view->users = $this->user->getPairs('noletter|pofirst|nodeleted');
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->modules = $this->tree->getOptionMenu($productID, $viewType = 'story', 0, $branch);
|
||||
$this->view->modules = $this->tree->getOptionMenu($productID, 'story', 0, $branch);
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->moduleName = $moduleID ? $this->tree->getById($moduleID)->name : $this->lang->tree->all;
|
||||
$this->view->branch = $branch;
|
||||
|
||||
@@ -32,7 +32,7 @@ $lang->story->create = $storyType == 'story' ? $lang->story->createStory : $lang
|
||||
echo $moduleName;
|
||||
if($moduleID)
|
||||
{
|
||||
$removeLink = $browseType == 'bymodule' ? $this->createLink('product', 'browse', "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, "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'");
|
||||
}
|
||||
?>
|
||||
@@ -63,20 +63,20 @@ $lang->story->create = $storyType == 'story' ? $lang->story->createStory : $lang
|
||||
foreach($lang->product->moreSelects as $key => $value)
|
||||
{
|
||||
$active = $key == $storyBrowseType ? 'btn-active-text' : '';
|
||||
echo '<li>' . html::a($this->createLink('product', 'browse', "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, "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('product', 'browse', "productID=$productID&branch=$branch&browseType=$menuBrowseType¶m=%s&storyType=$storyType");
|
||||
$searchBrowseLink = $this->createLink($this->app->rawModule, $this->app->rawMethod, "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('product', 'browse', "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, "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' : '') . "'");
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -1321,7 +1321,7 @@ class story extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function track($pyoductID, $branch = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
public function track($productID, $branch = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
/* Set menu. The projectstory module does not execute. */
|
||||
if($this->app->rawModule == 'story')
|
||||
|
||||
@@ -410,7 +410,11 @@ class treeModel extends model
|
||||
{
|
||||
$linkHtml = ($type == 'case' and !empty($extra)) ? '<a>' . $branch . '</a>' : $this->createBranchLink($type, $rootID, $branchID, $branch);
|
||||
$linkHtml = $manage ? html::a(inlink('browse', "root=$rootID&viewType=$type¤tModuleID=0&branch=$branchID"), $branch) : $linkHtml;
|
||||
if($type == 'story' or $type == 'bug') $linkHtml = html::a(inlink('browse', "productID=$rootID&branch=$branchID&browseType=bybranch" . $extraParams), $branch, "", "id=branch" . $branchID);
|
||||
if($type == 'story' or $type == 'bug')
|
||||
{
|
||||
$branchLink = helper::createLink($this->app->rawModule, $this->app->rawMethod, "productID=$rootID&branch=$branchID&browseType=bybranch" . $extraParams);
|
||||
$linkHtml = html::a($branchLink, $branch, "", "id=branch" . $branchID);
|
||||
}
|
||||
if($firstBranch and $product->type != 'normal')
|
||||
{
|
||||
$linkHtml = '<a>' . $this->lang->product->branchName[$product->type] . '</a><ul><li>' . $linkHtml;
|
||||
@@ -840,7 +844,7 @@ class treeModel extends model
|
||||
*/
|
||||
public function createStoryLink($type, $module)
|
||||
{
|
||||
return html::a(helper::createLink('product', 'browse', "root={$module->root}&branch=&type=byModule¶m={$module->id}"), $module->name, '_self', "id='module{$module->id}'");
|
||||
return html::a(helper::createLink($this->app->rawModule, $this->app->rawMethod, "root={$module->root}&branch=&type=byModule¶m={$module->id}"), $module->name, '_self', "id='module{$module->id}'");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -900,8 +904,8 @@ class treeModel extends model
|
||||
* @return string
|
||||
*/
|
||||
public function createRequirementLink($type, $module)
|
||||
{
|
||||
return html::a(helper::createLink('product', 'browse', "root={$module->root}&branch=&type=byModule¶m={$module->id}&storyType=requirement"), $module->name, '_self', "id='module{$module->id}'");
|
||||
{
|
||||
return html::a(helper::createLink($this->app->rawModule, $this->app->rawMethod, "root={$module->root}&branch=&type=byModule¶m={$module->id}&storyType=requirement"), $module->name, '_self', "id='module{$module->id}'");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user