Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -114,6 +114,9 @@ class bug extends control
|
||||
$moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'bug', $startModuleID = 0, array('treeModel', 'createBugLink'), '', (int)$this->cookie->treeBranch);
|
||||
}
|
||||
|
||||
if(($browseType != 'bymodule' && $browseType != 'bybranch')) $this->session->set('bugBrowseType', $browseType);
|
||||
if(($browseType == 'bymodule' || $browseType == 'bybranch') and $this->session->bugBrowseType == 'bysearch') $this->session->set('bugBrowseType', 'unclosed');
|
||||
|
||||
/* Process the order by field. */
|
||||
if(!$orderBy) $orderBy = $this->cookie->qaBugOrder ? $this->cookie->qaBugOrder : 'id_desc';
|
||||
setcookie('qaBugOrder', $orderBy, 0, $this->config->webRoot, '', false, true);
|
||||
|
||||
@@ -48,12 +48,10 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
|
||||
foreach($menus as $menuItem)
|
||||
{
|
||||
if(isset($menuItem->hidden)) continue;
|
||||
|
||||
$menuBrowseType = strpos($menuItem->name, 'QUERY') === 0 ? 'bySearch' : $menuItem->name;
|
||||
$label = "<span class='text'>{$menuItem->text}</span>";
|
||||
if($this->session->bugBrowseType != 'bysearch' && ($browseType == 'bymodule' or $browseType == 'bybranch')) $browseType = $this->session->bugBrowseType;
|
||||
$label .= $menuBrowseType == $browseType ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>" : '';
|
||||
$active = $menuBrowseType == $browseType ? 'btn-active-text' : '';
|
||||
$label .= $menuBrowseType == $this->session->bugBrowseType ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>" : '';
|
||||
$active = $menuBrowseType == $this->session->bugBrowseType ? 'btn-active-text' : '';
|
||||
|
||||
if($menuItem->name == 'my')
|
||||
{
|
||||
|
||||
@@ -133,7 +133,6 @@ class product extends control
|
||||
if($browseType == '') setcookie('treeBranch', (int)$branch, 0, $this->config->webRoot, '', false, false);
|
||||
}
|
||||
if($browseType == 'bybranch') setcookie('storyBranch', (int)$branch, 0, $this->config->webRoot, '', false, false);
|
||||
if($browseType != 'bymodule' and $browseType != 'bybranch') $this->session->set('storyBrowseType', $browseType);
|
||||
|
||||
$moduleID = ($browseType == 'bymodule') ? (int)$param : (($browseType == 'bysearch' or $browseType == 'bybranch') ? 0 : ($this->cookie->storyModule ? $this->cookie->storyModule : 0));
|
||||
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
|
||||
@@ -154,6 +153,9 @@ class product extends control
|
||||
$moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'story', $startModuleID = 0, array('treeModel', $createModuleLink), '', (int)$this->cookie->treeBranch);
|
||||
}
|
||||
|
||||
if($browseType != 'bymodule' and $browseType != 'bybranch') $this->session->set('storyBrowseType', $browseType);
|
||||
if(($browseType == 'bymodule' or $browseType == 'bybranch') and $this->session->storyBrowseType == 'bysearch') $this->session->set('storyBrowseType', 'unclosed');
|
||||
|
||||
/* Process the order by field. */
|
||||
if(!$orderBy) $orderBy = $this->cookie->productStoryOrder ? $this->cookie->productStoryOrder : 'id_desc';
|
||||
setcookie('productStoryOrder', $orderBy, 0, $this->config->webRoot, '', false, true);
|
||||
|
||||
@@ -561,6 +561,7 @@ class productModel extends model
|
||||
|
||||
/* Set modules and browse type. */
|
||||
$modules = $moduleID ? $this->loadModel('tree')->getAllChildID($moduleID) : '0';
|
||||
|
||||
$browseType = $browseType == 'bybranch' ? 'bymodule' : $browseType;
|
||||
$browseType = ($browseType == 'bymodule' and $this->session->storyBrowseType and $this->session->storyBrowseType != 'bysearch') ? $this->session->storyBrowseType : $browseType;
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ js::set('foldAll', $lang->project->treeLevel['root']);
|
||||
</div>
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php
|
||||
if($this->session->storyBrowseType == 'bysearch') $this->session->set('storyBrowseType', 'allstory');
|
||||
foreach(customModel::getFeatureMenu($this->moduleName, $this->methodName) as $menuItem)
|
||||
{
|
||||
if(isset($menuItem->hidden)) continue;
|
||||
|
||||
@@ -149,6 +149,8 @@ class project extends control
|
||||
$this->session->set('taskBrowseType', $browseType);
|
||||
}
|
||||
|
||||
if($browseType == 'bymodule' and $this->session->taskBrowseType == 'bysearch') $this->session->set('taskBrowseType', 'unclosed');
|
||||
|
||||
/* Set queryID, moduleID and productID. */
|
||||
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
|
||||
$moduleID = ($browseType == 'bymodule') ? (int)$param : (($browseType == 'bysearch' or $browseType == 'byproduct') ? 0 : $this->cookie->moduleBrowseParam);
|
||||
|
||||
@@ -69,8 +69,8 @@ js::set('foldAll', $lang->project->treeLevel['root']);
|
||||
elseif($menuType != 'status' and $menuType != 'QUERY')
|
||||
{
|
||||
$label = "<span class='text'>{$menuItem->text}</span>";
|
||||
$label .= $menuType == $browseType ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>" : '';
|
||||
$active = $menuType == $browseType ? 'btn-active-text' : '';
|
||||
$label .= $menuType == $this->session->taskBrowseType ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>" : '';
|
||||
$active = $menuType == $this->session->taskBrowseType ? 'btn-active-text' : '';
|
||||
$title = $menuType == 'needconfirm' ? "title='{$lang->task->storyChange}'" : '';
|
||||
echo html::a(inlink('task', "project=$projectID&type=$menuType"), $label, '', "id='{$menuType}' class='btn btn-link $active' $title");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user