Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3

This commit is contained in:
wangyidong
2021-03-22 08:29:55 +08:00
92 changed files with 2157 additions and 1893 deletions
+2 -5
View File
@@ -215,15 +215,12 @@ class baseHelper
{
if(is_array($idList))
{
if(!function_exists('get_magic_quotes_gpc') or !get_magic_quotes_gpc())
{
foreach($idList as $key=>$value) $idList[$key] = addslashes($value);
}
foreach($idList as $key=>$value) $idList[$key] = addslashes($value);
return "IN ('" . join("','", $idList) . "')";
}
if(!is_string($idList)) $idList = json_encode($idList);
if(!function_exists('get_magic_quotes_gpc') or !get_magic_quotes_gpc()) $idList = addslashes($idList);
$idList = addslashes($idList);
return "IN ('" . str_replace(',', "','", str_replace(' ', '', $idList)) . "')";
}
-14
View File
@@ -382,7 +382,6 @@ class baseRouter
$this->setErrorHandler();
$this->setTimezone();
$this->startSession();
$this->setProject();
if($this->config->framework->multiSite) $this->setSiteCode() && $this->loadExtraConfig();
if($this->config->framework->autoConnectDB) $this->connectDB();
@@ -854,18 +853,6 @@ class baseRouter
}
}
/**
* 从Get里取project id 设置到session中。
* Get project id from Get and set it to session.
*
* @access public
* @return void
*/
public function setProject()
{
if(isset($_GET['PRJ'])) $this->session->set('PRJ', $_GET['PRJ']); //Set project id into session.
}
/**
* 从cookie中获取当前的group, 即URL锚链接'#open=?'。
* Get current group from cookie, original source is url '#open=?'.
@@ -1830,7 +1817,6 @@ class baseRouter
global $filter;
/* Remove these three params. */
unset($passedParams['PRJ']);
unset($passedParams['onlybody']);
unset($passedParams['HTTP_X_REQUESTED_WITH']);
+1 -1
View File
@@ -208,7 +208,7 @@ class control extends baseControl
chdir(dirname($viewFile));
/**
* 使用extract安定ob方法渲染$viewFile里面的代码。
* 使用extract和ob方法渲染$viewFile里面的代码。
* Use extract and ob functions to eval the codes in $viewFile.
*/
extract((array)$this->view);
+1 -1
View File
@@ -80,7 +80,7 @@ $lang->admin->safe->reasonList['birthday'] = 'Same as DOB';
$lang->admin->safe->modifyPasswordList[1] = 'Yes';
$lang->admin->safe->modifyPasswordList[0] = 'No';
$lang->admin->safe->loginCaptchaList[1] = 'Yes'
$lang->admin->safe->loginCaptchaList[1] = 'Yes';
$lang->admin->safe->loginCaptchaList[0] = 'No';
$lang->admin->safe->noticeMode = 'Password will be checked when a user logs in, or a user is added or edited.';
+1 -1
View File
@@ -14,7 +14,7 @@
<?php include '../../common/view/header.html.php';?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<div class='btn-toolbar pull-left'><?php common::printAdminSubMenu('system');?></div>
<div class='btn-toolbar pull-left'><?php // common::printAdminSubMenu('system');?></div>
</div>
</div>
<div class="main-row">
+1 -1
View File
@@ -61,7 +61,7 @@ class automation extends control
/* Set menu. */
$productID = $this->product->saveState($productID, $this->products);
if(empty($branch)) $branch = (int)$this->cookie->preBranch;
$this->automation->setMenu($this->products, $productID, $branch);
$this->loadModel('qa')->setMenu($this->products, $productID, $branch);
$this->view->title = $this->lang->automation->common;
$this->view->position[] = $this->lang->automation->browse;
-30
View File
@@ -13,34 +13,4 @@
<?php
class automationModel extends model
{
/**
* Set the menu.
*
* @param array $products
* @param int $productID
* @param int $branch
* @access public
* @return void
*/
public function setMenu($products, $productID, $branch = 0)
{
$this->loadModel('product');
foreach($this->lang->testtask->menu as $key => $value)
{
if($this->lang->navGroup->testtask != 'qa') $this->loadModel('qa')->setSubMenu('automation', $key, $productID);
common::setMenuVars($this->lang->testtask->menu, $key, $productID);
}
if($this->lang->navGroup->automation == 'qa')
{
foreach($this->lang->qa->subMenu->automation as $key => $menu)
{
common::setMenuVars($this->lang->qa->subMenu->automation, $key, $productID);
}
$this->lang->qa->menu = $this->lang->automation->menu;
$this->lang->automation->menu = $this->lang->qa->subMenu->automation;
$this->lang->qa->switcherMenu = $this->product->getSwitcher($productID, '', $branch);
}
}
}
+1 -1
View File
@@ -17,7 +17,7 @@
</div>
<?php endif;?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'><?php common::printAdminSubMenu('system');?></div>
<div class='btn-toolbar pull-left'><?php // common::printAdminSubMenu('system');?></div>
</div>
<div id='mainContent' class="main-row">
<div class='side-col' id='sidebar'>
+27 -5
View File
@@ -45,6 +45,7 @@ class bug extends control
$this->loadModel('action');
$this->loadModel('story');
$this->loadModel('task');
$this->loadModel('qa');
/* Set bug menu group. */
$this->projectID = isset($_GET['PRJ']) ? $_GET['PRJ'] : 0;
@@ -93,6 +94,10 @@ class bug extends control
{
$this->loadModel('datatable');
$products = $this->loadModel('product')->getPairs('noclosed');
$productID = $this->product->saveState($productID, $products);
$this->qa->setMenu($products, $productID);
/* Set browse type. */
$browseType = strtolower($browseType);
@@ -282,6 +287,8 @@ class bug extends control
{
if(empty($this->products)) $this->locate($this->createLink('product', 'create'));
$this->qa->setMenu($this->products, $productID);
/* Whether there is a object to transfer bug, for example feedback. */
$extras = str_replace(array(',', ' '), array('&', ''), $extras);
parse_str($extras, $output);
@@ -382,7 +389,7 @@ class bug extends control
$this->bug->setMenu($this->products, $productID, $branch);
/* Init vars. */
$projectID = $this->lang->navGroup->bug == 'project' ? $this->session->PRJ : 0;
$projectID = $this->session->PRJ ? $this->session->PRJ : 0;
$moduleID = 0;
$executionID = 0;
$taskID = 0;
@@ -455,6 +462,7 @@ class bug extends control
{
$builds = $this->loadModel('build')->getExecutionBuildPairs($executionID, $productID, $branch, 'noempty,noterminate,nodone');
$stories = $this->story->getExecutionStoryPairs($executionID);
if(!$projectID) $projectID = $this->dao->select('project')->from(TABLE_EXECUTION)->where('id')->eq($executionID)->fetch('project');
}
else
{
@@ -496,6 +504,18 @@ class bug extends control
$projects += $this->product->getProjectPairsByProduct($productID, $branch);
}
/* Get block id of assinge to me. */
$blockID = 0;
if(isonlybody())
{
$blockID = $this->dao->select('id')->from(TABLE_BLOCK)
->where('block')->eq('assingtome')
->andWhere('module')->eq('my')
->andWhere('account')->eq($this->app->user->account)
->orderBy('order_desc')
->fetch('id');
}
/* Get executions. */
$executions = array('' => '');
if(isset($projects[$projectID])) $executions += $this->product->getExecutionPairsByProduct($productID, $branch ? "0,$branch" : 0, 'id_desc', $projectID);
@@ -541,6 +561,7 @@ class bug extends control
$this->view->type = $type;
$this->view->branch = $branch;
$this->view->branches = $branches;
$this->view->blockID = $blockID;
$this->view->color = $color;
$this->view->stepsRequired = strpos($this->config->bug->create->requiredFields, 'steps');
$this->view->isStepsTemplate = $steps == $this->lang->bug->tplStep . $this->lang->bug->tplResult . $this->lang->bug->tplExpect ? true : false;
@@ -888,11 +909,12 @@ class bug extends control
}
}
$this->lang->navGroup->bug = 'my';
$this->lang->noMenuModule[] = 'bug';
$this->lang->bug->menu = $this->lang->my->menu;
$this->lang->bug->menuOrder = $this->lang->my->menuOrder;
$this->loadModel('my')->setMenu();
$moduleIndex = array_search('bug', $this->lang->noMenuModule);
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
$this->lang->task->menu = $this->lang->my->workMenu;
$this->lang->my->menu->myWork['subModule'] = 'bug';
$this->view->position[] = html::a($this->createLink('my', 'bug'), $this->lang->my->bug);
$this->view->title = "BUG" . $this->lang->bug->batchEdit;
}
+4
View File
@@ -144,3 +144,7 @@ $(function()
}
});
});
$(window).unload(function(){
if(blockID) window.parent.refreshBlock($('#block' + blockID));
});
+65 -13
View File
@@ -43,19 +43,6 @@ class bugModel extends model
$this->lang->modulePageNav = $pageNav;
$this->lang->TRActions = $pageActions;
foreach($this->lang->bug->menu as $key => $menu)
{
if($this->lang->navGroup->testcase != 'qa') $this->loadModel('qa')->setSubMenu('bug', $key, $productID);
$replace = $productID;
if($this->lang->navGroup->testcase == 'project' and $key == 'bug') $replace = 0;
common::setMenuVars($this->lang->bug->menu, $key, $replace);
}
if($this->lang->navGroup->bug == 'qa')
{
$this->lang->qa->menu = $this->lang->bug->menu;
$this->lang->qa->switcherMenu = $this->product->getSwitcher($productID, '', $branch);
}
}
/**
@@ -1409,6 +1396,71 @@ class bugModel extends model
return $bugs;
}
/**
* Get bugs of a project.
*
* @param int $projectID
* @param int $build
* @param string $type
* @param int $param
* @param string $orderBy
* @param string $excludeBugs
* @param object $pager
* @access public
* @return array
*/
public function getProjectBugs($projectID, $build = 0, $type = '', $param = 0, $orderBy = 'id_desc', $excludeBugs = '', $pager = null)
{
$type = strtolower($type);
if($type == 'bysearch')
{
$queryID = (int)$param;
$products = $this->loadModel('project')->getProducts($projectID);
if($this->session->projectBugQuery == false) $this->session->set('projectBugQuery', ' 1 = 1');
if($queryID)
{
$query = $this->loadModel('search')->getQuery($queryID);
if($query)
{
$this->session->set('projectBugQuery', $query->sql);
$this->session->set('projectBugForm', $query->form);
}
}
$allProduct = "`product` = 'all'";
$bugQuery = $this->session->projectBugQuery;
if(strpos($this->session->projectBugQuery, $allProduct) !== false)
{
$bugQuery = str_replace($allProduct, '1', $this->session->projectBugQuery);
}
$bugs = $this->dao->select('*')->from(TABLE_BUG)
->where($bugQuery)
->andWhere('project')->eq((int)$projectID)
->andWhere('deleted')->eq(0)
->beginIF($excludeBugs)->andWhere('id')->notIN($excludeBugs)->fi()
->orderBy($orderBy)
->page($pager)
->fetchAll('id');
}
else
{
$bugs = $this->dao->select('*')->from(TABLE_BUG)
->where('deleted')->eq(0)
->beginIF(empty($build))->andWhere('project')->eq($projectID)->fi()
->beginIF($type == 'unresolved')->andWhere('status')->eq('active')->fi()
->beginIF($type == 'noclosed')->andWhere('status')->ne('closed')->fi()
->beginIF($build)->andWhere("CONCAT(',', openedBuild, ',') like '%,$build,%'")->fi()
->beginIF($excludeBugs)->andWhere('id')->notIN($excludeBugs)->fi()
->orderBy($orderBy)->page($pager)->fetchAll();
}
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'bug');
return $bugs;
}
/**
* Get bugs of a execution.
*
+1
View File
@@ -24,6 +24,7 @@ js::set('stepsRequired', $stepsRequired);
js::set('stepsNotEmpty', $lang->bug->stepsNotEmpty);
js::set('isStepsTemplate', $isStepsTemplate);
js::set('oldProjectID', $projectID);
js::set('blockID', $blockID);
?>
<div id="mainContent" class="main-content fade">
<div class="center-block">
+8 -19
View File
@@ -25,16 +25,6 @@ class build extends control
$this->loadModel('execution');
$this->loadModel('user');
if($this->app->openApp == 'project')
{
$model = $this->dao->select('model')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetch('model');
$this->lang->project->menu = $this->lang->menu->$model;
commonModel::setAppObjectID('project', $projectID);
$executions = $this->execution->getPairs($projectID);
$executionID = key($executions);
}
if(!empty($_POST))
{
$executionID = $this->post->execution;
@@ -48,18 +38,17 @@ class build extends control
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('build', 'view', "buildID=$buildID")));
}
$execution = $this->execution->getByID($executionID);
if($this->app->openApp == 'execution')
if($this->app->openApp == 'project')
{
/* Set session and get execution by id. */
$this->session->set('buildCreate', $this->app->getURI(true));
$this->project->setMenu($projectID);
/* Set menu. */
$executions = $this->execution->getPairs($execution->project);
$this->execution->setMenu($executions, $executionID);
commonModel::setAppObjectID('execution', $executionID);
}
elseif($this->app->openApp == 'execution')
{
$executions = $this->execution->getPairs($projectID);
$executionID = $executionID == 0 ? key($executions) : $executionID;
$this->execution->setMenu($executions, $executionID);
}
$productGroups = $this->execution->getProducts($executionID);
$productID = $productID ? $productID : key($productGroups);
+1 -1
View File
@@ -45,7 +45,7 @@ $lang->build->unlinkBug = 'Bug Verknüpgung aufheben';
$lang->build->stories = "Abgeschlossene {$lang->SRCommon}";
$lang->build->bugs = 'Gelöster Bug';
$lang->build->generatedBugs = 'Left Bug';
$lang->build->noProduct = " <span id='noProduct' style='color:red'>Dieses {$lang->executionCommon} ist nicht mit einem {$lang->productCommon} verknüpft, daher kann das Build nicht erstellt werden. Bitte erst <a href='%s' data-app='%s'> {$lang->productCommon} verknüpfen.</a></span>";
$lang->build->noProduct = " <span id='noProduct' style='color:red'>Dieses {$lang->executionCommon} ist nicht mit einem {$lang->productCommon} verknüpft, daher kann das Build nicht erstellt werden. Bitte erst <a href='%s' data-app='%s' data-toggle='modal' data-type='iframe'> {$lang->productCommon} verknüpfen.</a></span>";
$lang->build->noBuild = 'Keine Builds. ';
$lang->build->notice = new stdclass();
+1 -1
View File
@@ -45,7 +45,7 @@ $lang->build->unlinkBug = 'Unlink Bug';
$lang->build->stories = "Finished {$lang->SRCommon}";
$lang->build->bugs = 'Resolved Bugs';
$lang->build->generatedBugs = 'Reported Bugs';
$lang->build->noProduct = " <span id='noProduct' style='color:red'>This {$lang->executionCommon} is not linked to {$lang->productCommon}, so the Build cannot be created. Please first <a href='%s' data-app='%s'> link {$lang->productCommon}</a></span>";
$lang->build->noProduct = " <span id='noProduct' style='color:red'>This {$lang->executionCommon} is not linked to {$lang->productCommon}, so the Build cannot be created. Please first <a href='%s' data-app='%s' data-toggle='modal' data-type='iframe'> link {$lang->productCommon}</a></span>";
$lang->build->noBuild = 'No builds yet.';
$lang->build->notice = new stdclass();
+1 -1
View File
@@ -45,7 +45,7 @@ $lang->build->unlinkBug = 'Retirer Bug';
$lang->build->stories = 'Stories terminées';
$lang->build->bugs = 'Bugs Résolus';
$lang->build->generatedBugs = 'Bugs signalés';
$lang->build->noProduct = " <span id='noProduct' style='color:red'>Ce {$lang->executionCommon} n'est pas associé à un {$lang->productCommon}, le Build ne peut pas être créé. Commencez par <a href='%s' data-app='%s'>rattacher le projet à un {$lang->productCommon}</a></span>";
$lang->build->noProduct = " <span id='noProduct' style='color:red'>Ce {$lang->executionCommon} n'est pas associé à un {$lang->productCommon}, le Build ne peut pas être créé. Commencez par <a href='%s' data-app='%s' data-toggle='modal' data-type='iframe'>rattacher le projet à un {$lang->productCommon}</a></span>";
$lang->build->noBuild = 'Aucun builds.';
$lang->build->notice = new stdclass();
+1 -1
View File
@@ -45,7 +45,7 @@ $lang->build->unlinkBug = 'Hủy liên kết Bug';
$lang->build->stories = "{$lang->SRCommon} đã kết thúc";
$lang->build->bugs = 'Bugs đã giải quyết';
$lang->build->generatedBugs = 'Bugs đã báo cáo';
$lang->build->noProduct = " <span id='noProduct' style='color:red'>{$lang->executionCommon} này chưa liên kết tới {$lang->productCommon}, bởi vậy Bản dựng này không thể tạo. Vui lòng liên kết <a href='%s' data-app='%s'> {$lang->productCommon} trước</a></span>";
$lang->build->noProduct = " <span id='noProduct' style='color:red'>{$lang->executionCommon} này chưa liên kết tới {$lang->productCommon}, bởi vậy Bản dựng này không thể tạo. Vui lòng liên kết <a href='%s' data-app='%s' data-toggle='modal' data-type='iframe'> {$lang->productCommon} trước</a></span>";
$lang->build->noBuild = 'Không có bản dựng nào';
$lang->build->notice = new stdclass();
+1 -1
View File
@@ -45,7 +45,7 @@ $lang->build->unlinkBug = '移除Bug';
$lang->build->stories = "完成的{$lang->SRCommon}";
$lang->build->bugs = '解决的Bug';
$lang->build->generatedBugs = '产生的Bug';
$lang->build->noProduct = " <span id='noProduct' style='color:red'>该{$lang->executionCommon}没有关联{$lang->productCommon},无法创建版本,请先<a href='%s' data-app='%s'>关联{$lang->productCommon}</a></span>";
$lang->build->noProduct = " <span id='noProduct' style='color:red'>该{$lang->executionCommon}没有关联{$lang->productCommon},无法创建版本,请先<a href='%s' data-app='%s' data-toggle='modal' data-type='iframe'>关联{$lang->productCommon}</a></span>";
$lang->build->noBuild = '暂时没有版本。';
$lang->build->notice = new stdclass();
+2 -3
View File
@@ -19,7 +19,7 @@
</div>
<form class='load-indicator main-form form-ajax' id='dataform' method='post' enctype='multipart/form-data'>
<table class='table table-form'>
<?php if($projectID != 0):?>
<?php if($openApp == 'project'):?>
<tr>
<th><?php echo $lang->executionCommon;?></th>
<td><?php echo html::select('execution', $executions, $executionID, "onchange='loadProducts(this.value);' class='form-control chosen' required");?></td>
@@ -40,11 +40,10 @@
?>
</div>
</td>
<td></td>
<?php else:?>
<td>
<div class='input-group'>
<?php printf($lang->build->noProduct, $this->createLink('execution', 'manageproducts', "executionID=$executionID&from=buildCreate"), $openApp);?>
<?php printf($lang->build->noProduct, $this->createLink('execution', 'manageproducts', "executionID=$executionID&from=buildCreate", '', 'true'), $openApp);?>
</div>
</td>
<?php endif;?>
+6 -24
View File
@@ -99,34 +99,16 @@ class caselibModel extends model
$this->lang->modulePageNav = $pageNav;
$this->lang->TRActions = $pageActions;
foreach($this->lang->caselib->menu as $key => $value)
{
if($this->config->global->flow == 'full' and $this->lang->navGroup->testcase != 'qa') $this->loadModel('qa')->setSubMenu('caselib', $key, $libID);
$replace = $libID;
if($this->lang->navGroup->testcase == 'project' and $key == 'bug') $replace = 0;
common::setMenuVars($this->lang->caselib->menu, $key, $replace);
}
if($this->config->global->flow != 'full' && $this->app->getMethodName() != 'view') $this->lang->caselib->menu->bysearch = "<a class='querybox-toggle' id='bysearchTab'><i class='icon icon-search muted'> </i>{$this->lang->testcase->bySearch}</a>";
if($this->lang->navGroup->caselib == 'qa')
if(!empty($libraries))
{
foreach($this->lang->qa->subMenu->testcase as $key => $menu)
{
common::setMenuVars($this->lang->qa->subMenu->testcase, $key, $libID);
}
$this->lang->qa->menu = $this->lang->caselib->menu;
$this->lang->caselib->menu = $this->lang->qa->subMenu->testcase;
$this->lang->qa->mainMenuAction = html::a(helper::createLink('caselib', 'create'), "<i class='icon-plus'></i>" . $this->lang->caselib->create, '', "class='btn btn-link'");
$dropMenuLink = helper::createLink('caselib', 'ajaxGetDropMenu', "objectID=$libID&module=caselib&method=browse");
if(!empty($libraries))
{
$dropMenuLink = helper::createLink('caselib', 'ajaxGetDropMenu', "objectID=$libID&module=caselib&method=browse");
$output = "<div class='btn-group header-btn' id='swapper'><button data-toggle='dropdown' type='button' class='btn' id='currentItem' title='{$currentLibName}'><span class='text'><i class='icon icon-product'></i> {$currentLibName}</span> <span class='caret' style='margin-top: 3px'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
$output .= '<div class="input-control search-box has-icon-left has-icon-right search-example"><input type="search" class="form-control search-input" /><label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label><a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a></div>';
$output .= "</div></div>";
$this->lang->qa->switcherMenu = $output;
}
$output = "<div class='btn-group header-btn' id='swapper'><button data-toggle='dropdown' type='button' class='btn' id='currentItem' title='{$currentLibName}'><span class='text'><i class='icon icon-product'></i> {$currentLibName}</span> <span class='caret' style='margin-top: 3px'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
$output .= '<div class="input-control search-box has-icon-left has-icon-right search-example"><input type="search" class="form-control search-input" /><label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label><a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a></div>';
$output .= "</div></div>";
$this->lang->qa->switcherMenu = $output;
}
}
+143
View File
@@ -0,0 +1,143 @@
<?php
$lang->common = new stdclass();
$lang->index = new stdclass();
$lang->my = new stdclass();
$lang->todo = new stdclass();
$lang->program = new stdclass();
$lang->product = new stdclass();
$lang->project = new stdclass();
$lang->scrum = new stdclass();
$lang->waterfall = new stdclass();
$lang->execution = new stdclass();
$lang->release = new stdclass();
$lang->branch = new stdclass();
$lang->productplan = new stdclass();
$lang->measurement = new stdclass();
$lang->review = new stdclass();
$lang->milestone = new stdclass();
$lang->qa = new stdclass();
$lang->doc = new stdclass();
$lang->system = new stdclass();
$lang->testcase = new stdclass();
$lang->testtask = new stdclass();
$lang->testreport = new stdclass();
$lang->score = new stdclass();
$lang->auditplan = new stdclass();
$lang->cm = new stdclass();
$lang->nc = new stdclass();
$lang->pssp = new stdclass();
$lang->stakeholder = new stdclass();
$lang->task = new stdclass();
$lang->build = new stdclass();
$lang->bug = new stdclass();
$lang->company = new stdclass();
$lang->dept = new stdclass();
$lang->group = new stdclass();
$lang->user = new stdclass();
$lang->report = new stdclass();
$lang->repo = new stdclass();
$lang->jenkins = new stdclass();
$lang->compile = new stdclass();
$lang->job = new stdclass();
$lang->svn = new stdclass();
$lang->git = new stdclass();
$lang->subject = new stdclass();
$lang->company = new stdclass();
$lang->admin = new stdclass();
$lang->convert = new stdclass();
$lang->upgrade = new stdclass();
$lang->action = new stdclass();
$lang->backup = new stdclass();
$lang->extension = new stdclass();
$lang->custom = new stdclass();
$lang->mail = new stdclass();
$lang->cron = new stdclass();
$lang->dev = new stdclass();
$lang->entry = new stdclass();
$lang->webhook = new stdclass();
$lang->message = new stdclass();
$lang->search = new stdclass();
$lang->devops = new stdclass();
$lang->team = new stdclass();
$lang->automation = new stdclass();
$lang->personnel = new stdclass();
$lang->mail = new stdclass();
$lang->projectrelease = new stdclass();
$lang->projectstory = new stdclass();
/* Common action icons. */
$lang->icons['todo'] = 'check';
$lang->icons['product'] = 'product';
$lang->icons['bug'] = 'bug';
$lang->icons['task'] = 'check-sign';
$lang->icons['tasks'] = 'tasks';
$lang->icons['program'] = 'program';
$lang->icons['project'] = 'project';
$lang->icons['stage'] = 'waterfall';
$lang->icons['sprint'] = 'sprint';
$lang->icons['doc'] = 'file-text';
$lang->icons['doclib'] = 'folder-close';
$lang->icons['story'] = 'lightbulb';
$lang->icons['release'] = 'tags';
$lang->icons['roadmap'] = 'code-fork';
$lang->icons['plan'] = 'flag';
$lang->icons['dynamic'] = 'volume-up';
$lang->icons['build'] = 'tag';
$lang->icons['test'] = 'check';
$lang->icons['testtask'] = 'check';
$lang->icons['group'] = 'group';
$lang->icons['team'] = 'group';
$lang->icons['company'] = 'sitemap';
$lang->icons['user'] = 'user';
$lang->icons['dept'] = 'sitemap';
$lang->icons['tree'] = 'sitemap';
$lang->icons['usecase'] = 'sitemap';
$lang->icons['testcase'] = 'sitemap';
$lang->icons['result'] = 'list-alt';
$lang->icons['mail'] = 'envelope';
$lang->icons['trash'] = 'trash';
$lang->icons['extension'] = 'th-large';
$lang->icons['app'] = 'th-large';
$lang->icons['results'] = 'list-alt';
$lang->icons['create'] = 'plus';
$lang->icons['post'] = 'edit';
$lang->icons['batchCreate'] = 'plus-sign';
$lang->icons['batchEdit'] = 'edit-sign';
$lang->icons['batchClose'] = 'off';
$lang->icons['edit'] = 'edit';
$lang->icons['delete'] = 'close';
$lang->icons['copy'] = 'copy';
$lang->icons['report'] = 'bar-chart';
$lang->icons['export'] = 'export';
$lang->icons['report-file'] = 'file-powerpoint';
$lang->icons['import'] = 'import';
$lang->icons['finish'] = 'checked';
$lang->icons['resolve'] = 'check';
$lang->icons['start'] = 'play';
$lang->icons['restart'] = 'play';
$lang->icons['run'] = 'run';
$lang->icons['runCase'] = 'run';
$lang->icons['batchRun'] = 'play-sign';
$lang->icons['assign'] = 'hand-right';
$lang->icons['assignTo'] = 'hand-right';
$lang->icons['change'] = 'fork';
$lang->icons['link'] = 'link';
$lang->icons['close'] = 'off';
$lang->icons['activate'] = 'magic';
$lang->icons['review'] = 'glasses';
$lang->icons['confirm'] = 'search';
$lang->icons['confirmBug'] = 'search';
$lang->icons['putoff'] = 'calendar';
$lang->icons['suspend'] = 'pause';
$lang->icons['pause'] = 'pause';
$lang->icons['cancel'] = 'ban-circle';
$lang->icons['recordEstimate'] = 'time';
$lang->icons['customFields'] = 'cogs';
$lang->icons['manage'] = 'cog';
$lang->icons['unlock'] = 'unlock-alt';
$lang->icons['confirmStoryChange'] = 'search';
$lang->icons['score'] = 'tint';
$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'execution', 'task', 'build', 'productplan', 'project', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage', 'entry', 'jenkins');
+40 -27
View File
@@ -133,7 +133,7 @@ list($executionModule, $executionMethod) = explode('-', $config->executionLink);
/* Main menu. */
$lang->mainNav = new stdclass();
$lang->mainNav->my = '<i class="icon icon-menu-my"></i> My|my|index|';
$lang->mainNav->product = "<i class='icon icon-menu-product'></i> Product|$productModule|$productMethod|";
$lang->mainNav->product = "<i class='icon icon-product'></i> Product|$productModule|$productMethod|";
if($config->systemMode == 'new')
{
$lang->mainNav->project = "<i class='icon icon-project'></i> Project|$projectModule|$projectMethod|";
@@ -182,7 +182,7 @@ $lang->personnel = new stdClass();
$lang->personnel->menu = new stdClass();
$lang->personnel->menu->invest = array('link' => "Investment|personnel|invest|programID=%s");
$lang->personnel->menu->accessible = array('link' => "Accessible|personnel|accessible|programID=%s");
$lang->personnel->menu->whitelist = array('link' => "Whitelist|personnel|whitelist|program=ID%s", 'alias' => 'addwhitelist');
$lang->personnel->menu->whitelist = array('link' => "Whitelist|personnel|whitelist|programID=%s", 'alias' => 'addwhitelist');
/* Scrum menu. */
$lang->product = new stdclass();
@@ -192,7 +192,7 @@ $lang->product->homeMenu->list = array('link' => $lang->productCommon . '|produc
$lang->product->menu = new stdclass();
$lang->product->menu->dashboard = array('link' => 'Dashboard|product|dashboard|productID=%s');
if($config->URAndSR) $lang->product->viewMenu->requirement = array('link' => "$lang->URCommon|product|browse|productID=%s&branch=&browseType=unclosed&param=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
if($config->URAndSR) $lang->product->menu->requirement = array('link' => "$lang->URCommon|product|browse|productID=%s&branch=&browseType=unclosed&param=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->product->menu->story = array('link' => "$lang->SRCommon|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->product->menu->plan = array('link' => "Plan|productplan|browse|productID=%s", 'subModule' => 'productplan');
$lang->product->menu->release = array('link' => "Release|release|browse|productID=%s", 'subModule' => 'release');
@@ -204,16 +204,16 @@ $lang->product->menu->dynamic = 'Dynamic|product|dynamic|productID=%s';
$lang->product->menu->set = array('link' => 'Setting|product|view|productID=%s', 'subModule' => 'tree,branch', 'alias' => 'edit');
$lang->product->setMenu = new stdclass();
$lang->product->setMenu->view = array('link' => 'View|product|view|productID={PRODUCT}', 'alias' => 'edit');
$lang->product->setMenu->module = array('link' => 'Module|tree|browse|product={PRODUCT}&view=story', 'subModule' => 'tree');
$lang->product->setMenu->branch = array('link' => '@branch@|branch|manage|product={PRODUCT}', 'subModule' => 'branch');
$lang->product->setMenu->whitelist = array('link' => 'Whitelist|product|whitelist|product={PRODUCT}', 'subModule' => 'personnel');
$lang->product->setMenu->view = array('link' => 'View|product|view|productID=%s', 'alias' => 'edit');
$lang->product->setMenu->module = array('link' => 'Module|tree|browse|product=%s&view=story', 'subModule' => 'tree');
$lang->product->setMenu->branch = array('link' => '@branch@|branch|manage|product=%s', 'subModule' => 'branch');
$lang->product->setMenu->whitelist = array('link' => 'Whitelist|product|whitelist|product=%s', 'subModule' => 'personnel');
$lang->release = new stdclass();
$lang->branch = new stdclass();
$lang->productplan = new stdclass();
$lang->release->menu = $lang->product->viewMenu;
$lang->release->menu = $lang->product->menu;
$lang->branch->menu = $lang->product->menu;
$lang->productplan->menu = $lang->product->menu;
@@ -367,6 +367,12 @@ $lang->execution->subMenu->more->whitelist = array('link' => 'Whitelist|executio
$lang->execution->subMenu->more->action = array('link' => 'Dynamics|execution|dynamic|executionID=%s');
$lang->execution->subMenu->more->view = array('link' => 'Overview|execution|view|executionID=%s', 'subModule' => 'view', 'alias' => 'edit,start,suspend,putoff,close');
$lang->execution->qaMenu = new stdclass();
$lang->execution->qaMenu->qa = array('link' => '仪表盘|execution|qa|executionID=%s');
$lang->execution->qaMenu->bug = array('link' => 'Bug|execution|bug|executionID=%s');
$lang->execution->qaMenu->testcase = array('link' => '用例|execution|testcase|executionID=%s', 'alias' => 'create');
$lang->execution->qaMenu->testtask = array('link' => '测试单|execution|testtask|executionID=%s');
$lang->execution->dividerMenu = ',execution,programplan,executionbuild,story,doc,other,';
$lang->task = new stdclass();
@@ -857,43 +863,50 @@ $lang->icons['score'] = 'tint';
/* Scrum menu. */
$lang->menu = new stdclass();
$lang->menu->scrum = new stdclass();
<<<<<<< Updated upstream
$lang->menu->scrum->index = 'Index|project|index|project={PROJECT}';
$lang->menu->scrum->project = "$lang->executionCommon|project|index|locate=no";
$lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|projectstory|story|project={PROJECT}', 'subModule' => 'story', 'alias' => 'story,track');
$lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|projectstory|story|', 'subModule' => 'story', 'alias' => 'story,track');
$lang->menu->scrum->doc = 'Doc|doc|index|';
=======
$lang->menu->scrum->index = 'Index|project|index|project=%s';
$lang->menu->scrum->project = array('link' => "$lang->executionCommon|project|index|locate=no");
$lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|projectstory|story|project=%s', 'subModule' => 'story', 'alias' => 'story,track');
$lang->menu->scrum->doc = array('link' => 'Doc|doc|objectLibs|type=project&objectID=%s', 'subModule' => 'doc');
>>>>>>> Stashed changes
$lang->menu->scrum->qa = 'QA|qa|index';
$lang->menu->scrum->ci = 'Code|repo|browse';
$lang->menu->scrum->build = array('link' => 'Build|project|build|project={PROJECT}');
$lang->menu->scrum->build = array('link' => 'Build|project|build|project=%s');
$lang->menu->scrum->projectrelease = array('link' => 'Release|projectrelease|browse');
$lang->menu->scrum->dynamic = array('link' => 'Dynamic|project|dynamic|project={PROJECT}');
$lang->menu->scrum->projectsetting = array('link' => 'Setting|project|view|project={PROJECT}', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
$lang->menu->scrum->dynamic = array('link' => 'Dynamic|project|dynamic|project=%s');
$lang->menu->scrum->projectsetting = array('link' => 'Setting|project|view|project=%s', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
$lang->scrum = new stdclass();
$lang->scrum->setMenu = new stdclass();
$lang->scrum->setMenu->view = array('link' => 'View|project|view|project={PROJECT}');
$lang->scrum->setMenu->products = array('link' => 'Product|project|manageProducts|project={PROJECT}', 'alias' => 'manageproducts');
$lang->scrum->setMenu->members = array('link' => 'Member|project|manageMembers|project={PROJECT}', 'alias' => 'managemembers');
$lang->scrum->setMenu->whitelist = array('link' => 'White List|project|whitelist|project={PROJECT}', 'subModule' => 'personnel');
$lang->scrum->setMenu->view = array('link' => 'View|project|view|project=%s');
$lang->scrum->setMenu->products = array('link' => 'Product|project|manageProducts|project=%s', 'alias' => 'manageproducts');
$lang->scrum->setMenu->members = array('link' => 'Member|project|manageMembers|project=%s', 'alias' => 'managemembers');
$lang->scrum->setMenu->whitelist = array('link' => 'White List|project|whitelist|project=%s', 'subModule' => 'personnel');
$lang->scrum->setMenu->stakeholder = array('link' => '干系人|stakeholder|browse|', 'subModule' => 'stakeholder');
$lang->scrum->setMenu->group = array('link' => 'Priv Group|project|group|project={PROJECT}', 'alias' => 'group,manageview,managepriv');
$lang->scrum->setMenu->group = array('link' => 'Priv Group|project|group|project=%s', 'alias' => 'group,manageview,managepriv');
/* Waterfall menu. */
$lang->menu->waterfall = new stdclass();
$lang->menu->waterfall->index = array('link' => 'Dashboard|project|index|project={PROJECT}');
$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|project={PROJECT}', 'subModule' => 'programplan');
$lang->menu->waterfall->project = array('link' => $lang->executionCommon . '|execution|task|executionID={EXECUTION}', 'subModule' => ',project,task,');
$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|project={PROJECT}');
$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|project={PROJECT}', 'subModule' => ',milestone,');
$lang->menu->waterfall->projectstory = array('link' => $lang->SRCommon . '|projectstory|story|project={PROJECT}');
$lang->menu->waterfall->design = 'Design|design|browse|product={PRODUCT}';
$lang->menu->waterfall->index = array('link' => 'Dashboard|project|index|project=%s');
$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|project=%s', 'subModule' => 'programplan');
$lang->menu->waterfall->execution = array('link' => $lang->executionCommon . '|execution|all|status=all&projectID=%s', 'subModule' => ',project,task,');
$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|project=%s');
$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|project=%s', 'subModule' => ',milestone,');
$lang->menu->waterfall->projectstory = array('link' => $lang->SRCommon . '|projectstory|story|project=%s');
$lang->menu->waterfall->design = 'Design|design|browse|product=0&project=%s';
$lang->menu->waterfall->ci = 'Repo|repo|browse|';
$lang->menu->waterfall->track = array('link' => 'Track|projectstory|track', 'alias' => 'track');
$lang->menu->waterfall->qa = 'QA|qa|index';
$lang->menu->waterfall->projectrelease = array('link' => 'Release|projectrelease|browse');
$lang->menu->waterfall->build = array('link' => 'Build|project|build|project={PROJECT}');
$lang->menu->waterfall->dynamic = array('link' => 'Dynamic|project|dynamic|project={PROJECT}');
$lang->menu->waterfall->build = array('link' => 'Build|project|build|project=%s');
$lang->menu->waterfall->dynamic = array('link' => 'Dynamic|project|dynamic|project=%s');
$lang->menu->waterfall->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
$lang->menu->waterfall->projectsetting = array('link' => 'Setting|project|view|project={PROJECT}', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
$lang->menu->waterfall->projectsetting = array('link' => 'Setting|project|view|project=%s', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
$lang->waterfall = new stdclass();
$lang->waterfall->subMenu = new stdclass();
+546
View File
@@ -0,0 +1,546 @@
<?php
global $config;
list($programModule, $programMethod) = explode('-', $config->programLink);
list($productModule, $productMethod) = explode('-', $config->productLink);
list($projectModule, $projectMethod) = explode('-', $config->projectLink);
list($executionModule, $executionMethod) = explode('-', $config->executionLink);
/* Main Navigation. */
$lang->mainNav = new stdclass();
$lang->mainNav->my = "<i class='icon icon-menu-my'></i> {$lang->my->shortCommon}|my|index|";
if($config->systemMode == 'new') $lang->mainNav->program = "<i class='icon icon-program'></i> {$lang->program->common}|$programModule|$programMethod|";
$lang->mainNav->product = "<i class='icon icon-product'></i> {$lang->product->common}|$productModule|$productMethod|";
if($config->systemMode == 'new') $lang->mainNav->project = "<i class='icon icon-project'></i> {$lang->project->common}|$projectModule|$projectMethod|";
$lang->mainNav->execution = "<i class='icon icon-run'></i> {$lang->execution->common}|$executionModule|$executionMethod|";
$lang->mainNav->qa = "<i class='icon icon-test'></i> {$lang->qa->common}|qa|index|";
$lang->mainNav->devops = "<i class='icon icon-code1'></i> DevOps|repo|browse|";
$lang->mainNav->doc = "<i class='icon icon-doc'></i> {$lang->doc->common}|doc|index|";
$lang->mainNav->report = "<i class='icon icon-statistic'></i> {$lang->report->common}|report|productSummary|";
$lang->mainNav->system = "<i class='icon icon-group'></i> {$lang->system->common}|my|team|";
$lang->mainNav->admin = "<i class='icon icon-cog-outline'></i> {$lang->admin->common}|admin|index|";
$lang->dividerMenu = ',devops,report,';
$lang->mainNav->menuOrder[5] = 'my';
if($config->systemMode == 'new') $lang->mainNav->menuOrder[10] = 'program';
$lang->mainNav->menuOrder[15] = 'product';
$lang->mainNav->menuOrder[20] = 'project';
$lang->mainNav->menuOrder[21] = 'execution';
$lang->mainNav->menuOrder[23] = 'qa';
$lang->mainNav->menuOrder[25] = 'devops';
$lang->mainNav->menuOrder[30] = 'system';
$lang->mainNav->menuOrder[35] = 'doc';
$lang->mainNav->menuOrder[40] = 'report';
$lang->mainNav->menuOrder[45] = 'admin';
/* My menu. */
$lang->my->menu = new stdclass();
$lang->my->menu->index = array('link' => "$lang->dashboard|my|index");
$lang->my->menu->work = array('link' => "{$lang->my->work}|my|work|mode=task");
if($config->systemMode == 'new') $lang->my->menu->project = array('link' => "{$lang->project->common}|my|project|");
$lang->my->menu->execution = array('link' => "{$lang->execution->common}|my|execution|type=undone");
$lang->my->menu->contribute = array('link' => "$lang->contribute|my|contribute|mode=task");
$lang->my->menu->dynamic = array('link' => "$lang->dynamic|my|dynamic|");
$lang->my->menu->score = array('link' => "{$lang->score->shortCommon}|my|score|", 'subModule' => 'score');
$lang->my->menu->contacts = array('link' => "$lang->contact|my|managecontacts|");
/* My menu order. */
$lang->my->menuOrder[5] = 'index';
$lang->my->menuOrder[10] = 'work';
$lang->my->menuOrder[15] = 'project';
$lang->my->menuOrder[20] = 'execution';
$lang->my->menuOrder[25] = 'contribute';
$lang->my->menuOrder[30] = 'score';
$lang->my->menuOrder[35] = 'dynamic';
$lang->my->menuOrder[40] = 'follow';
$lang->my->menuOrder[45] = 'contacts';
$lang->my->menu->work['subMenu'] = new stdclass();
$lang->my->menu->work['subMenu']->task = "{$lang->task->common}|my|work|mode=task";
if($config->URAndSR) $lang->my->menu->work['subMenu']->requirement = "$lang->URCommon|my|work|mode=requirement";
$lang->my->menu->work['subMenu']->story = "$lang->SRCommon|my|work|mode=story";
$lang->my->menu->work['subMenu']->bug = "{$lang->bug->common}|my|work|mode=bug";
$lang->my->menu->work['subMenu']->testcase = "{$lang->testcase->common}|my|work|mode=testcase&type=assigntome";
$lang->my->menu->work['subMenu']->testtask = "{$lang->testtask->common}|my|work|mode=testtask&type=wait";
$lang->my->menu->contribute['subMenu'] = new stdclass();
$lang->my->menu->contribute['subMenu']->task = "{$lang->task->common}|my|contribute|mode=task";
if($config->URAndSR) $lang->my->menu->contribute['subMenu']->requirement = "$lang->URCommon|my|contribute|mode=requirement";
$lang->my->menu->contribute['subMenu']->story = "$lang->SRCommon|my|contribute|mode=story";
$lang->my->menu->contribute['subMenu']->bug = "{$lang->bug->common}|my|contribute|mode=bug";
$lang->my->menu->contribute['subMenu']->testcase = "{$lang->testcase->shortCommon}|my|contribute|mode=testcase&type=openedbyme";
$lang->my->menu->contribute['subMenu']->testtask = "{$lang->testtask->common}|my|contribute|mode=testtask&type=done";
$lang->my->menu->contribute['subMenu']->doc = "{$lang->doc->common}|my|contribute|mode=doc&type=openedbyme";
$lang->my->dividerMenu = ',work,score,';
/* Program menu. */
$lang->program->homeMenu = new stdclass();
$lang->program->homeMenu->browse = array('link' => "{$lang->program->common}|program|browse|");
$lang->program->menu = new stdclass();
$lang->program->menu->product = array('link' => "{$lang->product->common}|program|product|programID=%s", 'alias' => 'view');
$lang->program->menu->project = array('link' => "{$lang->project->common}|program|project|programID=%s");
$lang->program->menu->personnel = array('link' => "{$lang->personnel->common}|personnel|invest|programID=%s");
$lang->program->menu->stakeholder = array('link' => "{$lang->stakeholder->common}|program|stakeholder|programID=%s", 'alias' => 'createstakeholder');
/* Program menu order. */
$lang->program->menuOrder[5] = 'product';
$lang->program->menuOrder[10] = 'project';
$lang->program->menuOrder[15] = 'personnel';
$lang->program->menuOrder[20] = 'stakeholder';
$lang->program->menu->personnel['subMenu'] = new stdClass();
$lang->program->menu->personnel['subMenu']->invest = array('link' => "{$lang->personnel->invest}|personnel|invest|programID=%s");
$lang->program->menu->personnel['subMenu']->accessible = array('link' => "{$lang->personnel->accessible}|personnel|accessible|programID=%s");
$lang->program->menu->personnel['subMenu']->whitelist = array('link' => "{$lang->whitelist}|personnel|whitelist|objectID=%s", 'alias' => 'addwhitelist');
/* Product menu. */
$lang->product->homeMenu = new stdclass();
$lang->product->homeMenu->home = array('link' => "{$lang->dashboard}|product|index|");
$lang->product->homeMenu->list = array('link' => $lang->productCommon . '|product|all|', 'alias' => 'create,batchedit,manageline');
$lang->product->menu = new stdclass();
$lang->product->menu->dashboard = array('link' => "{$lang->dashboard}|product|dashboard|productID=%s");
if($config->URAndSR) $lang->product->menu->requirement = array('link' => "$lang->URCommon|product|browse|productID=%s&branch=&browseType=unclosed&param=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->product->menu->story = array('link' => "$lang->SRCommon|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->product->menu->plan = array('link' => "{$lang->productplan->shortCommon}|productplan|browse|productID=%s", 'subModule' => 'productplan');
$lang->product->menu->release = array('link' => "{$lang->release->common}|release|browse|productID=%s", 'subModule' => 'release');
$lang->product->menu->roadmap = array('link' => "{$lang->roadmap}|product|roadmap|productID=%s");
$lang->product->menu->project = array('link' => "{$lang->project->common}|product|project|status=all&productID=%s");
$lang->product->menu->track = array('link' => "{$lang->track}|story|track|productID=%s");
$lang->product->menu->doc = array('link' => "{$lang->doc->common}|doc|objectLibs|type=product&objectID=%s", 'subModule' => 'doc');
$lang->product->menu->dynamic = array('link' => "{$lang->dynamic}|product|dynamic|productID=%s");
$lang->product->menu->settings = array('link' => "{$lang->settings}|product|view|productID=%s", 'subModule' => 'tree,branch', 'alias' => 'edit,whitelist,addwhitelist');
/* Product menu order. */
$lang->product->menuOrder[5] = 'dashboard';
$lang->product->menuOrder[10] = 'story';
$lang->product->menuOrder[15] = 'plan';
$lang->product->menuOrder[20] = 'project';
$lang->product->menuOrder[25] = 'release';
$lang->product->menuOrder[30] = 'roadmap';
$lang->product->menuOrder[35] = 'requirement';
$lang->product->menuOrder[40] = 'track';
$lang->product->menuOrder[45] = 'doc';
$lang->product->menuOrder[50] = 'dynamic';
$lang->product->menuOrder[55] = 'setting';
$lang->product->menuOrder[60] = 'create';
$lang->product->menuOrder[65] = 'all';
$lang->product->menu->settings['subMenu'] = new stdclass();
$lang->product->menu->settings['subMenu']->view = array('link' => "{$lang->overview}|product|view|productID=%s", 'alias' => 'edit');
$lang->product->menu->settings['subMenu']->module = array('link' => "{$lang->module}|tree|browse|product=%s&view=story", 'subModule' => 'tree');
// $lang->product->menu->settings['subMenu']->branch = array('link' => "@branch@|branch|manage|product=%s", 'subModule' => 'branch');
$lang->product->menu->settings['subMenu']->whitelist = array('link' => "{$lang->whitelist}|product|whitelist|product=%s", 'subModule' => 'personnel');
$lang->product->dividerMenu = $config->URAndSR ? ',requirement,set,' : ',track,set,';
/* Project menu. */
$lang->project->homeMenu = new stdclass();
$lang->project->homeMenu->browse = array('link' => ($config->systemMode == 'new' ? $lang->project->common : $lang->executionCommon) . '|project|browse|');
$lang->project->dividerMenu = ',execution,programplan,doc,dynamic,';
/* Scrum menu. */
$lang->scrum->menu = new stdclass();
$lang->scrum->menu->index = array('link' => "{$lang->dashboard}|project|index|project=%s");
$lang->scrum->menu->execution = array('link' => "$lang->executionCommon|project|execution|projectID=%s");
$lang->scrum->menu->story = array('link' => "$lang->SRCommon|projectstory|story|projectID=%s", 'alias' => 'story,track');
$lang->scrum->menu->doc = array('link' => "{$lang->doc->common}|doc|objectLibs|type=project&objectID=%s", 'subModule' => 'doc');
$lang->scrum->menu->qa = array('link' => "{$lang->qa->common}|project|qa|projectID=%s", 'subModule' => 'testcase,testtask,bug', 'alias' => 'bug,testtask,testcase');
$lang->scrum->menu->devops = array('link' => "{$lang->devops->common}|repo|browse|repoID=0&objectID=%s", 'subModule' => 'repo');
$lang->scrum->menu->build = array('link' => "{$lang->build->common}|project|build|project=%s");
$lang->scrum->menu->release = array('link' => "{$lang->release->common}|projectrelease|browse|project=%s", 'subModule' => 'projectrelease');
$lang->scrum->menu->dynamic = array('link' => "$lang->dynamic|project|dynamic|project=%s");
$lang->scrum->menu->settings = array('link' => "$lang->settings|project|view|project=%s", 'subModule' => 'stakeholder', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
/* Scrum menu order. */
$lang->scrum->menuOrder[5] = 'index';
$lang->scrum->menuOrder[10] = 'execution';
$lang->scrum->menuOrder[15] = 'story';
$lang->scrum->menuOrder[20] = 'qa';
$lang->scrum->menuOrder[25] = 'devops';
$lang->scrum->menuOrder[30] = 'doc';
$lang->scrum->menuOrder[35] = 'build';
$lang->scrum->menuOrder[40] = 'release';
$lang->scrum->menuOrder[45] = 'other';
$lang->scrum->menuOrder[48] = 'dynamic';
$lang->scrum->menuOrder[50] = 'settings';
$lang->scrum->menu->qa['subMenu'] = new stdclass();
$lang->scrum->menu->qa['subMenu']->index = array('link' => "$lang->dashboard|project|qa|projectID=%s");
$lang->scrum->menu->qa['subMenu']->bug = array('link' => "{$lang->bug->common}|project|bug|projectID=%s", 'subModule' => 'bug');
$lang->scrum->menu->qa['subMenu']->testcase = array('link' => "{$lang->testcase->shortCommon}|project|testcase|projectID=%s", 'subModule' => 'testsuite,testcase,caselib');
$lang->scrum->menu->qa['subMenu']->testtask = array('link' => "{$lang->testtask->common}|project|testtask|projectID=%s", 'subModule' => 'testtask', 'class' => 'dropdown dropdown-hover');
$lang->scrum->menu->settings['subMenu'] = new stdclass();
$lang->scrum->menu->settings['subMenu']->view = array('link' => "$lang->overview|project|view|project=%s", 'alias' => 'edit');
$lang->scrum->menu->settings['subMenu']->products = array('link' => "{$lang->product->common}|project|manageProducts|project=%s", 'alias' => 'manageproducts');
$lang->scrum->menu->settings['subMenu']->members = array('link' => "{$lang->team->common}|project|manageMembers|project=%s", 'alias' => 'managemembers');
$lang->scrum->menu->settings['subMenu']->whitelist = array('link' => "{$lang->whitelist}|project|whitelist|project=%s", 'subModule' => 'personnel');
$lang->scrum->menu->settings['subMenu']->stakeholder = array('link' => "{$lang->stakeholder->common}|stakeholder|browse|", 'subModule' => 'stakeholder');
$lang->scrum->menu->settings['subMenu']->group = array('link' => "{$lang->priv}|project|group|project=%s", 'alias' => 'group,manageview,managepriv');
/* Waterfall menu. */
$lang->waterfall->menu = new stdclass();
$lang->waterfall->menu->index = array('link' => "$lang->dashboard|project|index|project=%s");
$lang->waterfall->menu->programplan = array('link' => "{$lang->productplan->shortCommon}|programplan|browse|project=%s", 'subModule' => 'programplan');
$lang->waterfall->menu->execution = array('link' => "$lang->executionCommon|execution|all|status=all&projectID=%s", 'subModule' => ',project,task,');
$lang->waterfall->menu->doc = array('link' => "{$lang->doc->common}|doc|index|project=%s");
$lang->waterfall->menu->weekly = array('link' => "{$lang->project->report}|weekly|index|project=%s", 'subModule' => ',milestone,');
$lang->waterfall->menu->story = array('link' => "$lang->SRCommon|projectstory|story|project=%s");
$lang->waterfall->menu->design = array('link' => "$lang->design|design|browse|product=0&project=%s");
$lang->waterfall->menu->repo = array('link' => "{$lang->devops->common}|repo|browse|repoID=0&objectID=%s", 'subModule' => 'repo');
$lang->waterfall->menu->track = array('link' => "$lang->track|projectstory|track", 'alias' => 'track');
$lang->waterfall->menu->qa = array('link' => "{$lang->qa->common}|project|qa|projectID=%s", 'subModule' => 'testcase,testtask,bug', 'alias' => 'bug,testtask,testcase');
$lang->waterfall->menu->release = array('link' => "{$lang->release->common}|projectrelease|browse", 'subModule' => 'projectrelease');
$lang->waterfall->menu->build = array('link' => "{$lang->build->common}|project|build|project=%s");
$lang->waterfall->menu->dynamic = array('link' => "$lang->dynamic|project|dynamic|project=%s");
$lang->waterfall->menu->other = array('link' => "$lang->other|project|other", 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
$lang->waterfall->menu->settings = array('link' => "$lang->settings|project|view|project=%s", 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
/* Waterfall menu order. */
$lang->waterfall->menuOrder[5] = 'index';
$lang->waterfall->menuOrder[15] = 'programplan';
$lang->waterfall->menuOrder[10] = 'execution';
$lang->waterfall->menuOrder[20] = 'projectstory';
$lang->waterfall->menuOrder[25] = 'design';
$lang->waterfall->menuOrder[30] = 'ci';
$lang->waterfall->menuOrder[35] = 'track';
$lang->waterfall->menuOrder[38] = 'review';
$lang->waterfall->menuOrder[39] = 'cm';
$lang->waterfall->menuOrder[40] = 'qa';
$lang->waterfall->menuOrder[45] = 'doc';
$lang->waterfall->menuOrder[50] = 'build';
$lang->waterfall->menuOrder[55] = 'projectrelease';
$lang->waterfall->menuOrder[60] = 'weekly';
$lang->waterfall->menuOrder[65] = 'other';
$lang->waterfall->menuOrder[68] = 'dynamic';
$lang->waterfall->menuOrder[70] = 'projectsetting';
$lang->waterfall->menu->other['subMenu'] = new stdclass();
$lang->waterfall->menu->other['subMenu']->estimation = array('link' => "$lang->estimation|workestimation|index|program=%s", 'subModule' => 'workestimation,durationestimation,budget');
$lang->waterfall->menu->other['subMenu']->issue = array('link' => "$lang->issue|issue|browse|", 'subModule' => 'issue');
$lang->waterfall->menu->other['subMenu']->risk = array('link' => "$lang->risk|risk|browse|", 'subModule' => 'risk');
$lang->waterfall->menu->other['subMenu']->stakeholder = array('link' => "{$lang->stakeholder->common}|stakeholder|browse|", 'subModule' => 'stakeholder');
$lang->waterfall->menu->other['subMenu']->report = array('link' => "{$lang->measure}|report|projectsummary|project=%s", 'subModule' => ',report,measrecord');
$lang->waterfall->menu->other['subMenu']->auditplan = array('link' => "{$lang->qa->shortCommon}|auditplan|browse|", 'subModule' => 'nc');
$lang->waterfall->menu->qa = $lang->scrum->menu->qa;
$lang->waterfall->menu->settings = $lang->scrum->menu->settings;
/* Execution menu. */
$lang->execution->homeMenu = new stdclass();
$lang->execution->homeMenu->index = "$lang->dashboard|execution|index|";
$lang->execution->homeMenu->list = array('link' => "{$lang->execution->common}|execution|all|", 'alias' => 'create,batchedit');
$lang->execution->menu = new stdclass();
$lang->execution->menu->task = array('link' => "{$lang->task->common}|execution|task|executionID=%s", 'subModule' => 'task,tree', 'alias' => 'importtask,importbug');
$lang->execution->menu->kanban = array('link' => "$lang->kanban|execution|kanban|executionID=%s");
$lang->execution->menu->burn = array('link' => "$lang->burn|execution|burn|executionID=%s");
$lang->execution->menu->view = array('link' => "$lang->view|execution|grouptask|executionID=%s", 'alias' => 'grouptask,tree', 'class' => 'dropdown dropdown-hover');
$lang->execution->menu->story = array('link' => "$lang->SRCommon|execution|story|executionID=%s", 'subModule' => 'story', 'alias' => 'linkstory,storykanban');
$lang->execution->menu->qa = array('link' => "{$lang->qa->common}|execution|qa|executionID=%s", 'subModule' => 'bug', 'alias' => 'qa,bug,testcase,testtask,testreport');
$lang->execution->menu->repo = array('link' => "{$lang->devops->common}|repo|browse|repoID=0&objectID=%s", 'subModule' => 'repo');
$lang->execution->menu->doc = array('link' => "{$lang->doc->common}|doc|objectLibs|type=execution&objectID=%s", 'subModule' => 'doc');
$lang->execution->menu->build = array('link' => "{$lang->build->common}|execution|build|executionID=%s", 'subModule' => 'build');
$lang->execution->menu->release = array('link' => "{$lang->release->common}|projectrelease|browse|projectID=0&executionID=%s", 'subModule' => 'projectrelease');
$lang->execution->menu->action = array('link' => "$lang->dynamic|execution|dynamic|executionID=%s");
$lang->execution->menu->settings = array('link' => "$lang->settings|execution|view|executionID=%s", 'subModule' => 'personnel', 'alias' => 'edit,manageproducts,team,whitelist,addwhitelist,managemembers', 'class' => 'dropdown dropdown-hover');
/* Execution menu order. */
$lang->execution->menuOrder[5] = 'task';
$lang->execution->menuOrder[10] = 'kanban';
$lang->execution->menuOrder[15] = 'burn';
$lang->execution->menuOrder[20] = 'view';
$lang->execution->menuOrder[25] = 'story';
$lang->execution->menuOrder[30] = 'qa';
$lang->execution->menuOrder[35] = 'repo';
$lang->execution->menuOrder[40] = 'devops';
$lang->execution->menuOrder[45] = 'doc';
$lang->execution->menuOrder[50] = 'build';
$lang->execution->menuOrder[55] = 'release';
$lang->execution->menuOrder[60] = 'action';
$lang->execution->menuOrder[65] = 'setting';
$lang->execution->menu->view['subMenu'] = new stdclass();
$lang->execution->menu->view['subMenu']->groupTask = "$lang->groupView|execution|grouptask|executionID=%s";
$lang->execution->menu->view['subMenu']->tree = "$lang->treeView|execution|tree|executionID=%s";
$lang->execution->menu->qa['subMenu'] = new stdclass();
$lang->execution->menu->qa['subMenu']->qa = array('link' => "$lang->dashboard|execution|qa|executionID=%s");
$lang->execution->menu->qa['subMenu']->bug = array('link' => "{$lang->bug->common}|execution|bug|executionID=%s");
$lang->execution->menu->qa['subMenu']->testcase = array('link' => "{$lang->testcase->shortCommon}|execution|testcase|executionID=%s", 'alias' => 'create');
$lang->execution->menu->qa['subMenu']->testtask = array('link' => "{$lang->testtask->common}|execution|testtask|executionID=%s");
// $lang->execution->menu->qa['subMenu']->testreport = array('link' => "$lang->project->report|testreport|browse|exeutionID=%s&type=execution");
$lang->execution->menu->qa['menuOrder'][5] = 'qa';
$lang->execution->menu->qa['menuOrder'][10] = 'bug';
$lang->execution->menu->qa['menuOrder'][15] = 'testcase';
$lang->execution->menu->qa['menuOrder'][20] = 'testtask';
$lang->execution->menu->settings['subMenu'] = new stdclass();
$lang->execution->menu->settings['subMenu']->view = array('link' => "$lang->overview|execution|view|executionID=%s", 'subModule' => 'view', 'alias' => 'edit,start,suspend,putoff,close');
$lang->execution->menu->settings['subMenu']->products = array('link' => "$lang->productCommon|execution|manageproducts|executionID=%s");
$lang->execution->menu->settings['subMenu']->team = array('link' => "{$lang->team->common}|execution|team|executionID=%s", 'alias' => 'managemembers');
$lang->execution->menu->settings['subMenu']->whitelist = array('link' => "$lang->whitelist|execution|whitelist|executionID=%s", 'subModule' => 'personnel', 'alias' => 'addwhitelist');
$lang->execution->dividerMenu = ',story,build,setting,';
/* QA menu.*/
$lang->qa->menu = new stdclass();
$lang->qa->menu->index = array('link' => "$lang->dashboard|qa|index");
$lang->qa->menu->bug = array('link' => "{$lang->bug->common}|bug|browse|productID=%s", 'alias' => 'view,create,batchcreate,edit,resolve,close,activate,report,batchedit,batchactivate,confirmbug,assignto');
$lang->qa->menu->testcase = array('link' => "{$lang->testcase->shortCommon}|testcase|browse|productID=%s", 'subModule' => 'testsuite,caselib', 'class' => 'dropdown dropdown-hover');
$lang->qa->menu->testtask = array('link' => "{$lang->testtask->common}|testtask|browse|productID=%s", 'subModule' => 'testreport', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report,importunitresult', 'class' => 'dropdown dropdown-hover');
$lang->qa->menu->automation = array('link' => "{$lang->automation->common}|automation|browse|productID=%s", 'alias' => '', 'class' => 'dropdown dropdown-hover');
/* QA menu order. */
$lang->qa->menuOrder[5] = 'product';
$lang->qa->menuOrder[10] = 'index';
$lang->qa->menuOrder[15] = 'bug';
$lang->qa->menuOrder[20] = 'testcase';
$lang->qa->menuOrder[25] = 'testtask';
$lang->qa->menuOrder[30] = 'report';
$lang->qa->menuOrder[35] = 'testsuite';
$lang->qa->menuOrder[40] = 'caselib';
$lang->qa->menu->testcase['subMenu'] = new stdclass();
$lang->qa->menu->testcase['subMenu']->feature = array('link' => "{$lang->testcase->feature}|testcase|browse|productID=%s", 'subModule' => 'testcase,tree,story');
$lang->qa->menu->testcase['subMenu']->unit = array('link' => "{$lang->testcase->unit}|testtask|browseUnits|productID=%s", 'alias' => 'browseunits');
$lang->qa->menu->testcase['subMenu']->testsuite = array('link' => "{$lang->testcase->testsuite}|testsuite|browse|productID=%s", 'subModule' => 'testsuite');
$lang->qa->menu->testcase['subMenu']->caselib = array('link' => "{$lang->testcase->caselib}|caselib|browse|libID=0");
$lang->qa->menu->testtask['subMenu'] = new stdclass();
$lang->qa->menu->testtask['subMenu']->testtask = array('link' => "{$lang->testtask->common}|testtask|browse|productID=%s", 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report,importunitresult');
$lang->qa->menu->testtask['subMenu']->report = array('link' => "{$lang->testreport->common}|testreport|browse|productID=%s", 'alias' => 'view,create,edit');
$lang->qa->menu->automation['subMenu'] = new stdclass();
$lang->qa->menu->automation['subMenu']->browse = array('link' => "{$lang->intro}|automation|browse|productID=%s", 'alias' => '');
// $lang->qa->menu->automation['subMenu']->framework = array('link' => '框架|automation|framework|productID=%s', 'alias' => '');
// $lang->qa->menu->automation['subMenu']->data = array('link' => '数据|automation|date|productID=%s', 'alias' => '');
// $lang->qa->menu->automation['subMenu']->interface = array('link' => '接口|automation|interface|productID=%s', 'alias' => '');
// $lang->qa->menu->automation['subMenu']->environment = array('link' => '环境|automation|environment|productID=%s', 'alias' => '');
/* DevOps menu. */
$lang->devops->menu = new stdclass();
$lang->devops->menu->code = array('link' => "{$lang->devops->common}|repo|browse|repoID=%s", 'alias' => 'diff,view,revision,log,blame,showsynccomment');
$lang->devops->menu->build = array('link' => "{$lang->devops->build}|job|browse", 'subModule' => 'compile,job');
$lang->devops->menu->jenkins = array('link' => "Jenkins|jenkins|browse", 'alias' => 'create,edit');
$lang->devops->menu->maintain = array('link' => "{$lang->devops->repo}|repo|maintain", 'alias' => 'create,edit');
$lang->devops->menu->rules = array('link' => "{$lang->devops->rules}|repo|setrules");
$lang->devops->menuOrder[5] = 'code';
$lang->devops->menuOrder[10] = 'build';
$lang->devops->menuOrder[15] = 'jenkins';
$lang->devops->menuOrder[20] = 'maintain';
$lang->devops->menuOrder[25] = 'rules';
/* Doc menu.*/
$lang->doc = new stdclass();
$lang->doc->menu = new stdclass();
/* Doc menu order. */
$lang->doc->menuOrder[5] = 'list';
$lang->doc->menuOrder[10] = 'product';
$lang->doc->menuOrder[15] = 'project';
$lang->doc->menuOrder[20] = 'custom';
$lang->doc->menuOrder[25] = 'index';
$lang->doc->menuOrder[30] = 'create';
/* Report menu.*/
$lang->report->menu = new stdclass();
$lang->report->menu->annual = array('link' => "{$lang->report->annual}|report|annualData|year=&dept=&userID=" . (isset($_SESSION['user']) ? zget($_SESSION['user'], 'id', 0) : 0), 'target' => '_blank');
$lang->report->menu->product = array('link' => "{$lang->product->common}|report|productsummary");
$lang->report->menu->execution = array('link' => "{$lang->execution->common}|report|executiondeviation");
$lang->report->menu->test = array('link' => "{$lang->qa->common}|report|bugcreate", 'alias' => 'bugassign');
$lang->report->menu->staff = array('link' => "{$lang->system->common}|report|workload");
/* Report menu order. */
$lang->report->menuOrder[5] = 'annual';
$lang->report->menuOrder[10] = 'product';
$lang->report->menuOrder[15] = 'execution';
$lang->report->menuOrder[20] = 'test';
$lang->report->menuOrder[25] = 'staff';
/* Company menu.*/
$lang->company->menu = new stdclass();
$lang->company->menu->browseUser = array('link' => "{$lang->user->common}|company|browse", 'subModule' => ',user,');
$lang->company->menu->dept = array('link' => "{$lang->dept->common}|dept|browse", 'subModule' => 'dept');
$lang->company->menu->browseGroup = array('link' => "$lang->priv|group|browse", 'subModule' => 'group');
/* Company menu order. */
$lang->company->menuOrder[5] = 'browseUser';
$lang->company->menuOrder[10] = 'dept';
$lang->company->menuOrder[15] = 'browseGroup';
$lang->company->menuOrder[20] = 'addGroup';
$lang->company->menuOrder[25] = 'batchAddUser';
$lang->company->menuOrder[30] = 'addUser';
/* Admin menu. */
$lang->admin->menu = new stdclass();
$lang->admin->menu->index = array('link' => "$lang->indexPage|admin|index", 'alias' => 'register,certifytemail,certifyztmobile,ztcompany', 'exclude' => 'admin-safe');
$lang->admin->menu->company = array('link' => "{$lang->personnel->common}|company|browse|", 'subModule' => ',user,dept,group,');
$lang->admin->menu->model = array('link' => "$lang->model|custom|browsestoryconcept|", 'subModule' => 'holiday');
$lang->admin->menu->custom = array('link' => "{$lang->custom->common}|custom|index", 'exclude' => 'custom-timezone');
$lang->admin->menu->extension = array('link' => "{$lang->extension->common}|extension|browse", 'subModule' => 'extension');
$lang->admin->menu->dev = array('link' => "$lang->redev|dev|api", 'alias' => 'db', 'subModule' => 'dev,editor,entry');
$lang->admin->menu->message = array('link' => "{$lang->message->common}|message|index", 'subModule' => 'message,mail,webhook');
$lang->admin->menu->system = array('link' => "{$lang->admin->system}|backup|index", 'subModule' => 'cron,backup,action,search,admin');
/* Admin menu order. */
$lang->admin->menuOrder[5] = 'index';
$lang->admin->menuOrder[10] = 'company';
$lang->admin->menuOrder[15] = 'model';
$lang->admin->menuOrder[20] = 'custom';
$lang->admin->menuOrder[25] = 'message';
$lang->admin->menuOrder[30] = 'extension';
$lang->admin->menuOrder[35] = 'dev';
$lang->admin->menuOrder[40] = 'system';
$lang->admin->menu->message['subMenu'] = new stdclass();
$lang->admin->menu->message['subMenu']->message = new stdclass();
$lang->admin->menu->message['subMenu']->mail = array('link' => "{$lang->mail->common}|mail|index", 'subModule' => 'mail');
$lang->admin->menu->message['subMenu']->webhook = array('link' => "Webhook|webhook|browse", 'subModule' => 'webhook');
$lang->admin->menu->message['subMenu']->browser = array('link' => "$lang->browser|message|browser");
$lang->admin->menu->message['subMenu']->setting = array('link' => "$lang->settings|message|setting");
$lang->admin->menu->message['menuOrder'][5] = 'mail';
$lang->admin->menu->message['menuOrder'][10] = 'webhook';
$lang->admin->menu->message['menuOrder'][15] = 'browser';
$lang->admin->menu->message['menuOrder'][20] = 'setting';
$lang->admin->menu->dev['subMenu'] = new stdclass();
$lang->admin->menu->dev['subMenu']->api = array('link' => "API|dev|api");
$lang->admin->menu->dev['subMenu']->db = array('link' => "$lang->db|dev|db");
$lang->admin->menu->dev['subMenu']->editor = array('link' => "$lang->editor|dev|editor");
$lang->admin->menu->dev['subMenu']->entry = array('link' => "{$lang->admin->entry}|entry|browse", 'subModule' => 'entry');
$lang->admin->menu->dev['menuOrder'][5] = 'api';
$lang->admin->menu->dev['menuOrder'][10] = 'db';
$lang->admin->menu->dev['menuOrder'][15] = 'editor';
$lang->admin->menu->dev['menuOrder'][20] = 'entry';
$lang->admin->menu->system['subMenu'] = new stdclass();
$lang->admin->menu->system['subMenu']->data = array('link' => "{$lang->admin->data}|backup|index", 'subModule' => 'action');
$lang->admin->menu->system['subMenu']->safe = array('link' => "$lang->safety|admin|safe", 'alias' => 'checkweak');
$lang->admin->menu->system['subMenu']->cron = array('link' => "{$lang->admin->cron}|cron|index", 'subModule' => 'cron');
$lang->admin->menu->system['subMenu']->timezone = array('link' => "$lang->timezone|custom|timezone");
$lang->admin->menu->system['subMenu']->buildIndex = array('link' => "{$lang->admin->buildIndex}|search|buildindex|");
$lang->admin->dividerMenu = ',company,message,system,';
$lang->subject->menu = new stdclass();
$lang->subject->menu->storyConcept = array('link' => "{$lang->subject->storyConcept}|custom|browsestoryconcept|");
/* System menu. */
$lang->system = new stdclass();
$lang->system->menu = new stdclass();
$lang->system->menu->team = array('link' => "{$lang->team->common}|my|team|", 'subModule' => 'user');
$lang->system->menu->calendar = array('link' => "$lang->calendar|my|calendar|", 'subModule' => 'todo', 'alias' => 'todo');
$lang->system->menu->dynamic = array('link' => "$lang->dynamic|company|dynamic|");
$lang->system->menu->view = array('link' => "{$lang->company->common}|company|view");
/* System menu order. */
$lang->system->menuOrder[5] = 'team';
$lang->system->menuOrder[10] = 'calendar';
$lang->system->menuOrder[15] = 'dynamic';
$lang->system->menuOrder[20] = 'view';
/* Nav group.*/
$lang->navGroup = new stdclass();
$lang->navGroup->my = 'my';
$lang->navGroup->effort = 'my';
$lang->navGroup->score = 'my';
$lang->navGroup->program = 'program';
$lang->navGroup->personnel = 'program';
$lang->navGroup->product = 'product';
$lang->navGroup->productplan = 'product';
$lang->navGroup->release = 'product';
$lang->navGroup->branch = 'product';
$lang->navGroup->story = 'product';
$lang->navGroup->tree = 'product';
$lang->navGroup->project = 'project';
$lang->navGroup->testcase = 'project';
$lang->navGroup->testtask = 'project';
$lang->navGroup->testreport = 'project';
$lang->navGroup->testsuite = 'project';
$lang->navGroup->caselib = 'project';
$lang->navGroup->feedback = 'project';
$lang->navGroup->deploy = 'project';
$lang->navGroup->stakeholder = 'project';
$lang->navGroup->projectstory = 'project';
$lang->navGroup->review = 'project';
$lang->navGroup->reviewissue = 'project';
$lang->navGroup->milestone = 'project';
$lang->navGroup->pssp = 'project';
$lang->navGroup->auditplan = 'project';
$lang->navGroup->cm = 'project';
$lang->navGroup->nc = 'project';
$lang->navGroup->projectrelease = 'project';
$lang->navGroup->build = 'project';
$lang->navGroup->job = 'project';
$lang->navGroup->jenkins = 'project';
$lang->navGroup->compile = 'project';
$lang->navGroup->measrecord = 'project';
$lang->navGroup->execution = 'execution';
$lang->navGroup->task = 'execution';
$lang->navGroup->build = 'execution';
$lang->navGroup->doc = 'doc';
$lang->navGroup->report = 'report';
$lang->navGroup->qa = 'qa';
$lang->navGroup->bug = 'qa';
$lang->navGroup->testcase = 'qa';
$lang->navGroup->testtask = 'qa';
$lang->navGroup->automation = 'qa';
$lang->navGroup->devops = 'devops';
$lang->navGroup->repo = 'devops';
$lang->navGroup->company = 'system';
$lang->navGroup->sqlbuilder = 'system';
$lang->navGroup->auditcl = 'system';
$lang->navGroup->cmcl = 'system';
$lang->navGroup->todo = 'system';
$lang->navGroup->ldap = 'system';
$lang->navGroup->process = 'system';
$lang->navGroup->activity = 'system';
$lang->navGroup->zoutput = 'system';
$lang->navGroup->classify = 'system';
$lang->navGroup->subject = 'system';
$lang->navGroup->baseline = 'system';
$lang->navGroup->reviewcl = 'system';
$lang->navGroup->reviewsetting = 'system';
$lang->navGroup->attend = 'attend';
$lang->navGroup->leave = 'attend';
$lang->navGroup->makeup = 'attend';
$lang->navGroup->overtime = 'attend';
$lang->navGroup->lieu = 'attend';
$lang->navGroup->admin = 'admin';
$lang->navGroup->dept = 'admin';
$lang->navGroup->user = 'admin';
$lang->navGroup->group = 'admin';
$lang->navGroup->dept = 'admin';
$lang->navGroup->webhook = 'admin';
$lang->navGroup->sms = 'admin';
$lang->navGroup->message = 'admin';
$lang->navGroup->custom = 'admin';
$lang->navGroup->cron = 'admin';
$lang->navGroup->backup = 'admin';
$lang->navGroup->mail = 'admin';
$lang->navGroup->dev = 'admin';
$lang->navGroup->entry = 'admin';
$lang->navGroup->extension = 'admin';
$lang->navGroup->action = 'admin';
$lang->navGroup->search = 'admin';
-203
View File
@@ -1,203 +0,0 @@
<?php
$lang->mainNav->menuOrder[5] = 'my';
$lang->mainNav->menuOrder[15] = 'product';
$lang->mainNav->menuOrder[20] = 'project';
$lang->mainNav->menuOrder[21] = 'execution';
$lang->mainNav->menuOrder[23] = 'qa';
$lang->mainNav->menuOrder[25] = 'repo';
$lang->mainNav->menuOrder[30] = 'doc';
$lang->mainNav->menuOrder[35] = 'report';
$lang->mainNav->menuOrder[60] = 'system';
$lang->mainNav->menuOrder[70] = 'admin';
if($config->systemMode == 'new') $lang->mainNav->menuOrder[10] = 'program';
/* Waterfall menu order. */
$lang->waterfall->menuOrder[5] = 'programindex';
$lang->waterfall->menuOrder[10] = 'programplan';
$lang->waterfall->menuOrder[15] = 'project';
$lang->waterfall->menuOrder[20] = 'projectstory';
$lang->waterfall->menuOrder[25] = 'design';
$lang->waterfall->menuOrder[30] = 'ci';
$lang->waterfall->menuOrder[35] = 'track';
$lang->waterfall->menuOrder[38] = 'review';
$lang->waterfall->menuOrder[39] = 'cm';
$lang->waterfall->menuOrder[40] = 'qa';
$lang->waterfall->menuOrder[45] = 'doc';
$lang->waterfall->menuOrder[50] = 'build';
$lang->waterfall->menuOrder[55] = 'projectrelease';
$lang->waterfall->menuOrder[60] = 'weekly';
$lang->waterfall->menuOrder[65] = 'other';
$lang->waterfall->menuOrder[68] = 'dynamic';
$lang->waterfall->menuOrder[70] = 'projectsetting';
/* Sort of main menu. */
$lang->scrum->menuOrder[5] = 'index';
$lang->scrum->menuOrder[10] = 'execution';
$lang->scrum->menuOrder[15] = 'projectstory';
$lang->scrum->menuOrder[20] = 'qa';
$lang->scrum->menuOrder[25] = 'ci';
$lang->scrum->menuOrder[30] = 'doc';
$lang->scrum->menuOrder[35] = 'build';
$lang->scrum->menuOrder[40] = 'projectrelease';
$lang->scrum->menuOrder[45] = 'other';
$lang->scrum->menuOrder[48] = 'dynamic';
$lang->scrum->menuOrder[50] = 'projectsetting';
/* index menu order. */
$lang->index->menuOrder[5] = 'product';
$lang->index->menuOrder[10] = 'project';
/* my menu order. */
$lang->my->menuOrder[5] = 'index';
$lang->my->menuOrder[10] = 'myWork';
$lang->my->menuOrder[15] = 'myProject';
$lang->my->menuOrder[20] = 'myExecution';
$lang->my->menuOrder[25] = 'contribute';
$lang->my->menuOrder[30] = 'score';
$lang->my->menuOrder[35] = 'dynamic';
$lang->my->menuOrder[40] = 'follow';
$lang->my->menuOrder[45] = 'contacts';
$lang->todo->menuOrder = $lang->my->menuOrder;
/* program menu order. */
$lang->program->menuOrder[5] = 'product';
$lang->program->menuOrder[10] = 'project';
$lang->program->menuOrder[15] = 'personnel';
$lang->program->menuOrder[20] = 'stakeholder';
/* product menu order. */
$lang->product->menuOrder[5] = 'dashboard';
$lang->product->menuOrder[10] = 'story';
$lang->product->menuOrder[15] = 'plan';
$lang->product->menuOrder[20] = 'project';
$lang->product->menuOrder[25] = 'release';
$lang->product->menuOrder[30] = 'roadmap';
$lang->product->menuOrder[35] = 'requirement';
$lang->product->menuOrder[40] = 'track';
$lang->product->menuOrder[45] = 'doc';
$lang->product->menuOrder[50] = 'dynamic';
$lang->product->menuOrder[55] = 'setting';
$lang->product->menuOrder[60] = 'create';
$lang->product->menuOrder[65] = 'all';
$lang->story->menuOrder = $lang->product->menuOrder;
$lang->productplan->menuOrder = $lang->product->menuOrder;
$lang->release->menuOrder = $lang->product->menuOrder;
$lang->branch->menuOrder = $lang->product->menuOrder;
/* project menu order. */
$lang->execution->menuOrder[5] = 'task';
$lang->execution->menuOrder[10] = 'kanban';
$lang->execution->menuOrder[15] = 'burn';
$lang->execution->menuOrder[20] = 'view';
$lang->execution->menuOrder[25] = 'story';
$lang->execution->menuOrder[30] = 'qa';
$lang->execution->menuOrder[35] = 'repo';
$lang->execution->menuOrder[40] = 'ci';
$lang->execution->menuOrder[45] = 'doc';
$lang->execution->menuOrder[50] = 'build';
$lang->execution->menuOrder[55] = 'release';
$lang->execution->menuOrder[60] = 'action';
$lang->execution->menuOrder[65] = 'setting';
$lang->task->menuOrder = $lang->execution->menuOrder;
$lang->build->menuOrder = $lang->execution->menuOrder;
/* qa menu order. */
$lang->qa->menuOrder[5] = 'product';
$lang->qa->menuOrder[10] = 'index';
$lang->qa->menuOrder[15] = 'bug';
$lang->qa->menuOrder[20] = 'testcase';
$lang->qa->menuOrder[25] = 'testtask';
$lang->qa->menuOrder[30] = 'report';
$lang->qa->menuOrder[35] = 'testsuite';
$lang->qa->menuOrder[40] = 'caselib';
$lang->bug->menuOrder = $lang->qa->menuOrder;
$lang->testtask->menuOrder = $lang->qa->menuOrder;
$lang->testreport->menuOrder = $lang->qa->menuOrder;
$lang->testcase->menuOrder[5] = 'feature';
$lang->testcase->menuOrder[10] = 'unit';
$lang->testcase->menuOrder[15] = 'testsuite';
$lang->testcase->menuOrder[20] = 'caselib';
$lang->caselib->menuOrder = $lang->testcase->menuOrder;
$lang->testsuite->menuOrder = $lang->testcase->menuOrder;
$lang->ci->menuOrder[5] = 'code';
$lang->ci->menuOrder[10] = 'build';
$lang->ci->menuOrder[15] = 'jenkins';
$lang->ci->menuOrder[20] = 'maintain';
$lang->ci->menuOrder[25] = 'rules';
$lang->repo->menuOrder = $lang->ci->menuOrder;
$lang->jenkins->menuOrder = $lang->ci->menuOrder;
/* doc menu order. */
$lang->doc->menuOrder[5] = 'list';
$lang->doc->menuOrder[10] = 'product';
$lang->doc->menuOrder[15] = 'project';
$lang->doc->menuOrder[20] = 'custom';
$lang->doc->menuOrder[25] = 'index';
$lang->doc->menuOrder[30] = 'create';
/* report menu order. */
$lang->report->menuOrder[5] = 'annual';
$lang->report->menuOrder[10] = 'product';
$lang->report->menuOrder[15] = 'execution';
$lang->report->menuOrder[20] = 'test';
$lang->report->menuOrder[25] = 'staff';
/* company menu order. */
$lang->company->menuOrder[5] = 'browseUser';
$lang->company->menuOrder[10] = 'dept';
$lang->company->menuOrder[15] = 'browseGroup';
$lang->company->menuOrder[20] = 'addGroup';
$lang->company->menuOrder[25] = 'batchAddUser';
$lang->company->menuOrder[30] = 'addUser';
$lang->dept->menuOrder = $lang->company->menuOrder;
$lang->group->menuOrder = $lang->company->menuOrder;
$lang->user->menuOrder = $lang->company->menuOrder;
/* system menu order. */
$lang->system->menuOrder[5] = 'team';
$lang->system->menuOrder[10] = 'calendar';
$lang->system->menuOrder[15] = 'dynamic';
$lang->system->menuOrder[20] = 'view';
/* admin menu order. */
$lang->admin->menuOrder[5] = 'index';
$lang->admin->menuOrder[10] = 'company';
$lang->admin->menuOrder[15] = 'model';
$lang->admin->menuOrder[20] = 'custom';
$lang->admin->menuOrder[25] = 'message';
$lang->admin->menuOrder[30] = 'extension';
$lang->admin->menuOrder[35] = 'dev';
$lang->admin->menuOrder[40] = 'system';
$lang->admin->subMenuOrder = new stdclass();
$lang->admin->subMenuOrder->message[5] = 'mail';
$lang->admin->subMenuOrder->message[10] = 'webhook';
$lang->admin->subMenuOrder->message[15] = 'browser';
$lang->admin->subMenuOrder->message[20] = 'setting';
$lang->admin->subMenuOrder->sso[5] = 'ranzhi';
$lang->admin->subMenuOrder->dev[5] = 'api';
$lang->admin->subMenuOrder->dev[10] = 'db';
$lang->admin->subMenuOrder->dev[15] = 'editor';
$lang->admin->subMenuOrder->dev[20] = 'entry';
$lang->admin->subMenuOrder->system[5] = 'data';
$lang->admin->subMenuOrder->system[10] = 'safe';
$lang->admin->subMenuOrder->system[15] = 'cron';
$lang->admin->subMenuOrder->system[20] = 'timezone';
$lang->admin->subMenuOrder->system[25] = 'buildIndex';
$lang->convert->menuOrder = $lang->admin->menuOrder;
$lang->upgrade->menuOrder = $lang->admin->menuOrder;
$lang->action->menuOrder = $lang->admin->menuOrder;
$lang->backup->menuOrder = $lang->admin->menuOrder;
$lang->cron->menuOrder = $lang->admin->menuOrder;
$lang->extension->menuOrder = $lang->admin->menuOrder;
$lang->custom->menuOrder = $lang->admin->menuOrder;
$lang->mail->menuOrder = $lang->admin->menuOrder;
$lang->dev->menuOrder = $lang->admin->menuOrder;
$lang->entry->menuOrder = $lang->admin->menuOrder;
$lang->webhook->menuOrder = $lang->admin->menuOrder;
+98 -658
View File
@@ -9,6 +9,11 @@
* @version $Id: zh-cn.php 5116 2013-07-12 06:37:48Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
include (dirname(__FILE__) . '/common.php');
global $config;
$lang->arrow = '&nbsp;<i class="icon-angle-right"></i>&nbsp;';
$lang->colon = '-';
$lang->comma = ',';
@@ -121,112 +126,109 @@ $lang->openedByAB = '创建';
$lang->assignedToAB = '指派';
$lang->typeAB = '类型';
$lang->common = new stdclass();
$lang->common->common = '公有模块';
$lang->common->common = '公有模块';
$lang->my->common = '我的地盘';
$lang->program->common = '项目集';
$lang->product->common = '产品';
$lang->project->common = '项目';
$lang->execution->common = $config->systemMode == 'new' ? '执行' : $lang->executionCommon;
$lang->qa->common = '测试';
$lang->devops->common = '代码';
$lang->doc->common = '文档';
$lang->report->common = '统计';
$lang->system->common = '组织';
$lang->admin->common = '后台';
$lang->task->common = '任务';
$lang->bug->common = 'Bug';
$lang->doc->common = '文档';
$lang->testcase->common = '测试用例';
$lang->testtask->common = '测试单';
$lang->score->common = '我的积分';
$lang->build->common = '版本';
$lang->testreport->common = '测试报告';
$lang->automation->common = '自动化';
$lang->team->common = '团队';
$lang->user->common = '用户';
$lang->custom->common = '自定义';
$lang->extension->common = '插件';
$lang->company->common = '公司';
$lang->dept->common = '部门';
global $config;
list($programModule, $programMethod) = explode('-', $config->programLink);
list($productModule, $productMethod) = explode('-', $config->productLink);
list($projectModule, $projectMethod) = explode('-', $config->projectLink);
list($executionModule, $executionMethod) = explode('-', $config->executionLink);
$lang->personnel->common = '人员';
$lang->personnel->invest = '投入人员';
$lang->personnel->accessible = '可访问人员';
/* 主导航菜单。*/
$lang->mainNav = new stdclass();
$lang->mainNav->my = '<i class="icon icon-menu-my"></i> 地盘|my|index|';
if($config->systemMode == 'new') $lang->mainNav->program = "<i class='icon icon-program'></i> 项目集|$programModule|$programMethod|";
$lang->mainNav->product = "<i class='icon icon-product'></i> 产品|$productModule|$productMethod|";
if($config->systemMode == 'new')
{
$lang->mainNav->project = "<i class='icon icon-project'></i> 项目|$projectModule|$projectMethod|";
$lang->mainNav->execution = "<i class='icon icon-run'></i> 执行|$executionModule|$executionMethod|";
}
else
{
$lang->mainNav->execution = "<i class='icon icon-run'></i> $lang->executionCommon|$executionModule|$executionMethod|";
}
$lang->mainNav->qa = '<i class="icon icon-test"></i> 测试|qa|index|';
$lang->mainNav->repo = '<i class="icon icon-code1"></i> 代码|repo|browse|';
$lang->mainNav->doc = '<i class="icon icon-doc"></i> 文档|doc|index|';
$lang->mainNav->report = "<i class='icon icon-statistic'></i> 统计|report|productSummary|";
$lang->mainNav->system = '<i class="icon icon-group"></i> 组织|my|team|';
$lang->mainNav->admin = '<i class="icon icon-cog-outline"></i> 后台|admin|index|';
$lang->stakeholder->common = '干系人';
$lang->release->common = '发布';
$lang->message->common = '通知';
$lang->mail->common = '邮件';
$lang->dividerMenu = ',qa,report,admin,';
$lang->my->shortCommon = '地盘';
$lang->testcase->shortCommon = '用例';
$lang->productplan->shortCommon = '计划';
$lang->score->shortCommon = '积分';
$lang->testreport->shortCommon = '报告';
$lang->qa->shortCommon = 'QA';
/* Program set menu. */
$lang->program = new stdclass();
$lang->program->homeMenu = new stdclass();
//$lang->program->homeMenu->index = '仪表盘|program|index|';
$lang->program->homeMenu->browse = array('link' => '项目集|program|browse|');
$lang->dashboard = '仪表盘';
$lang->contribute = '贡献';
$lang->dynamic = '动态';
$lang->contact = '联系人';
$lang->whitelist = '白名单';
$lang->roadmap = '路线图';
$lang->track = '矩阵';
$lang->settings = '设置';
$lang->overview = '概况';
$lang->module = '模块';
$lang->settings = '设置';
$lang->priv = '权限';
$lang->design = '设计';
$lang->other = '其他';
$lang->estimation = '估算';
$lang->issue = '问题';
$lang->risk = '风险';
$lang->measure = '度量';
$lang->treeView = '树状图';
$lang->groupView = '分组视图';
$lang->kanban = '看板';
$lang->burn = '燃尽图';
$lang->view = '视图';
$lang->intro = '介绍';
$lang->indexPage = '首页';
$lang->model = '模型';
$lang->redev = '二次开发';
$lang->browser = '浏览器';
$lang->db = '数据库';
$lang->editor = '编辑器';
$lang->timezone = '时区';
$lang->safety = '安全';
$lang->calendar = '日程';
$lang->project = new stdclass();
$lang->project->homeMenu = new stdclass();
if($config->systemMode == 'new')
{
$lang->project->homeMenu->browse = array('link' => '项目|project|browse|');
}
else
{
$lang->project->homeMenu->browse = array('link' => "$lang->executionCommon|project|browse|");
}
$lang->my->work = '待处理';
$lang->project->dividerMenu = ',execution,programplan,doc,dynamic,';
$lang->project->report = '报告';
$lang->program->menu = new stdclass();
$lang->program->menu->product = array('link' => '产品|program|product|programID=%s', 'alias' => 'view');
$lang->program->menu->project = array('link' => "项目|program|project|programID=%s");
$lang->program->menu->personnel = array('link' => "人员|personnel|invest|programID=%s");
$lang->program->menu->stakeholder = array('link' => "干系人|program|stakeholder|programID=%s", 'alias' => 'createstakeholder');
$lang->report->weekly = '周报';
$lang->report->annual = '年度总结';
$lang->report->notice = new stdclass();
$lang->report->notice->help = '注:统计报表的数据来源于列表页面的检索结果,生成统计报表前请先在列表页面进行检索。比如列表页面我们检索的是%tab%,那么报表就是基于之前检索的%tab%的结果集进行统计。';
$lang->personnel = new stdClass();
$lang->personnel->menu = new stdClass();
$lang->personnel->menu->invest = array('link' => "投入人员|personnel|invest|programID=%s");
$lang->personnel->menu->accessible = array('link' => "可访问人员|personnel|accessible|programID=%s");
$lang->personnel->menu->whitelist = array('link' => "白名单|personnel|whitelist|objectID=%s", 'alias' => 'addwhitelist');
$lang->testcase->feature = '功能测试';
$lang->testcase->unit = '单元测试';
$lang->testcase->testsuite = '套件';
$lang->testcase->caselib = '用例库';
/* Scrum menu. */
$lang->product = new stdclass();
$lang->product->homeMenu = new stdclass();
$lang->product->homeMenu->home = '仪表盘|product|index|';
$lang->product->homeMenu->list = array('link' => $lang->productCommon . '|product|all|', 'alias' => 'create,batchedit,manageline');
$lang->devops->build = '构建';
$lang->devops->repo = '版本库';
$lang->devops->rules = '指令';
$lang->product->menu = new stdclass();
$lang->product->menu->dashboard = array('link' => '仪表盘|product|dashboard|productID=%s');
if($config->URAndSR) $lang->product->menu->requirement = array('link' => "$lang->URCommon|product|browse|productID=%s&branch=&browseType=unclosed&param=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->product->menu->story = array('link' => "$lang->SRCommon|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->product->menu->plan = array('link' => "计划|productplan|browse|productID=%s", 'subModule' => 'productplan');
$lang->product->menu->release = array('link' => '发布|release|browse|productID=%s', 'subModule' => 'release');
$lang->product->menu->roadmap = '路线图|product|roadmap|productID=%s';
$lang->product->menu->project = "项目|product|project|status=all&productID=%s";
$lang->product->menu->track = array('link' => "矩阵|story|track|productID=%s");
$lang->product->menu->doc = array('link' => '文档|doc|objectLibs|type=product&objectID=%s', 'subModule' => 'doc');
$lang->product->menu->dynamic = '动态|product|dynamic|productID=%s';
$lang->product->menu->set = array('link' => '设置|product|view|productID=%s', 'subModule' => 'tree,branch', 'alias' => 'edit');
$lang->admin->system = '系统';
$lang->admin->entry = '应用';
$lang->admin->data = '数据';
$lang->admin->cron = '定时';
$lang->admin->buildIndex = '重建索引';
$lang->product->setMenu = new stdclass();
$lang->product->setMenu->view = array('link' => '概况|product|view|productID={PRODUCT}', 'alias' => 'edit');
$lang->product->setMenu->module = array('link' => '模块|tree|browse|product={PRODUCT}&view=story', 'subModule' => 'tree');
$lang->product->setMenu->branch = array('link' => '@branch@|branch|manage|product={PRODUCT}', 'subModule' => 'branch');
$lang->product->setMenu->whitelist = array('link' => '白名单|product|whitelist|product={PRODUCT}', 'subModule' => 'personnel');
$lang->release = new stdclass();
$lang->branch = new stdclass();
$lang->productplan = new stdclass();
$lang->release->menu = $lang->product->menu;
$lang->branch->menu = $lang->product->menu;
$lang->productplan->menu = $lang->product->menu;
/* System menu. */
$lang->system = new stdclass();
$lang->system->menu = new stdclass();
$lang->system->menu->team = array('link' => '团队|my|team|', 'subModule' => 'user');
$lang->system->menu->calendar = array('link' => '日程|my|calendar|', 'subModule' => 'todo', 'alias' => 'todo');
$lang->system->menu->dynamic = '动态|company|dynamic|';
$lang->system->menu->view = array('link' => '公司|company|view');
$lang->measurement = new stdclass();
$lang->measurement->menu = new stdclass();
$lang->subject->storyConcept = '需求概念';
$lang->searchTips = '';
$lang->searchAB = '搜索';
@@ -277,404 +279,6 @@ $lang->themes['pink'] = '芙蕖粉';
$lang->themes['blackberry'] = '露莓黑';
$lang->themes['classic'] = '经典蓝';
/* 首页菜单设置。*/
$lang->index = new stdclass();
$lang->index->menu = new stdclass();
$lang->index->menu->product = "浏览{$lang->productCommon}|product|browse";
$lang->index->menu->project = "浏览{$lang->executionCommon}|project|browse";
/* 我的地盘菜单设置。*/
$lang->my = new stdclass();
$lang->my->menu = new stdclass();
$lang->my->menu->index = '仪表盘|my|index';
$lang->my->menu->myWork = array('link' => '待处理|my|work|mode=task');
if($config->systemMode == 'new')
{
$lang->my->menu->myProject = array('link' => '项目|my|project|');
$lang->my->menu->myExecution = '执行|my|execution|type=undone';
}
else
{
$lang->my->menu->myExecution = $lang->executionCommon . '|my|execution|type=undone';
}
$lang->my->menu->contribute = array('link' => '贡献|my|contribute|mode=task');
$lang->my->menu->dynamic = '动态|my|dynamic|';
$lang->my->menu->score = array('link' => '积分|my|score|', 'subModule' => 'score');
$lang->my->menu->contacts = '联系人|my|managecontacts|';
$lang->my->workMenu = new stdclass();
$lang->my->workMenu->task = '任务|my|work|mode=task';
if($config->URAndSR) $lang->my->workMenu->requirement = "$lang->URCommon|my|work|mode=requirement";
$lang->my->workMenu->story = "$lang->SRCommon|my|work|mode=story";
$lang->my->workMenu->bug = 'Bug|my|work|mode=bug';
$lang->my->workMenu->testcase = '用例|my|work|mode=testcase&type=assigntome';
$lang->my->workMenu->testtask = '测试单|my|work|mode=testtask&type=wait';
$lang->my->contributeMenu = new stdclass();
$lang->my->contributeMenu->task = '任务|my|contribute|mode=task';
if($config->URAndSR) $lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testcase = '用例|my|contribute|mode=testcase&type=openedbyme';
$lang->my->contributeMenu->testtask = '测试单|my|contribute|mode=testtask&type=done';
$lang->my->contributeMenu->doc = '文档|my|contribute|mode=doc&type=openedbyme';
$lang->my->dividerMenu = ',myWork,score,';
$lang->todo = new stdclass();
$lang->todo->menu = $lang->my->menu;
$lang->product->dividerMenu = $config->URAndSR ? ',requirement,set,' : ',track,set,';
$lang->story = new stdclass();
$lang->story->menu = $lang->product->menu;
/* 执行视图菜单设置。*/
$lang->execution = new stdclass();
$lang->execution->homeMenu = new stdclass();
$lang->execution->homeMenu->index = '仪表盘|execution|index|';
$lang->execution->homeMenu->list = array('link' => '执行|execution|all|', 'alias' => 'create,batchedit');
$lang->execution->menu = new stdclass();
$lang->execution->menu->task = array('link' => '任务|execution|task|executionID=%s', 'subModule' => 'task,tree', 'alias' => 'importtask,importbug');
$lang->execution->menu->kanban = array('link' => '看板|execution|kanban|executionID=%s');
$lang->execution->menu->burn = array('link' => '燃尽图|execution|burn|executionID=%s');
$lang->execution->menu->view = array('link' => '视图|execution|grouptask|executionID=%s', 'alias' => 'grouptask,tree', 'class' => 'dropdown dropdown-hover');
$lang->execution->menu->story = array('link' => "{$lang->SRCommon}|execution|story|executionID=%s", 'subModule' => 'story', 'alias' => 'linkstory,storykanban');
$lang->execution->menu->qa = array('link' => '测试|execution|qa|executionID=%s', 'subModule' => 'bug', 'alias' => 'qa,bug,testcase,testtask,testreport');
$lang->execution->menu->repo = array('link' => '代码|repo|browse|projectID=%s');
$lang->execution->menu->doc = array('link' => '文档|doc|objectLibs|type=execution&objectID=%s', 'subModule' => 'doc');
$lang->execution->menu->build = array('link' => '版本|execution|build|executionID=%s', 'subModule' => 'build');
$lang->execution->menu->release = array('link' => '发布|projectrelease|browse|projectID=0&executionID=%s', 'subModule' => 'projectrelease');
$lang->execution->menu->action = array('link' => '动态|execution|dynamic|executionID=%s');
$lang->execution->menu->setting = array('link' => '设置|execution|view|executionID=%s', 'subModule' => 'personnel', 'alias' => 'edit,manageproducts,team,whitelist,addwhitelist,managemembers', 'class' => 'dropdown dropdown-hover');
$lang->execution->viewMenu = new stdclass();
$lang->execution->viewMenu->groupTask = '分组视图|execution|grouptask|executionID=%s';
$lang->execution->viewMenu->tree = '树状图|execution|tree|executionID=%s';
$lang->execution->qaMenu = new stdclass();
$lang->execution->qaMenu->qa = array('link' => '仪表盘|execution|qa|executionID=%s');
$lang->execution->qaMenu->bug = array('link' => 'Bug|execution|bug|executionID=%s');
$lang->execution->qaMenu->testcase = array('link' => '用例|execution|testcase|executionID=%s', 'alias' => 'create');
$lang->execution->qaMenu->testtask = array('link' => '测试单|execution|testtask|executionID=%s');
//$lang->execution->qaMenu->testreport = array('link' => '报告|testreport|browse|exeutionID=%s&type=execution');
$lang->execution->settingMenu = new stdclass();
$lang->execution->settingMenu->view = array('link' => '概况|execution|view|executionID={EXECUTION}', 'subModule' => 'view', 'alias' => 'edit,start,suspend,putoff,close');
$lang->execution->settingMenu->products = $lang->productCommon . '|execution|manageproducts|executionID={EXECUTION}';
$lang->execution->settingMenu->team = array('link' => '团队|execution|team|executionID={EXECUTION}', 'alias' => 'managemembers');
$lang->execution->settingMenu->whitelist = array('link' => '白名单|execution|whitelist|executionID={EXECUTION}', 'subModule' => 'personnel', 'alias' => 'addwhitelist');
$lang->execution->dividerMenu = ',story,build,setting,';
$lang->task = new stdclass();
$lang->build = new stdclass();
$lang->task->menu = $lang->execution->menu;
$lang->build->menu = $lang->execution->menu;
/* QA视图菜单设置。*/
$lang->qa = new stdclass();
$lang->qa->menu = new stdclass();
$lang->qa->menu->index = array('link' => '仪表盘|qa|index');
$lang->qa->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,resolve,close,activate,report,batchedit,batchactivate,confirmbug,assignto');
$lang->qa->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'subModule' => 'testsuite,caselib', 'class' => 'dropdown dropdown-hover');
$lang->qa->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report,importunitresult', 'class' => 'dropdown dropdown-hover');
$lang->qa->menu->automation = array('link' => '自动化|automation|browse|productID=%s', 'alias' => '', 'class' => 'dropdown dropdown-hover');
$lang->qa->subMenu = new stdclass();
$lang->qa->subMenu->testcase = new stdclass();
$lang->qa->subMenu->testcase->feature = array('link' => '功能测试|testcase|browse|productID=%s', 'subModule' => 'testcase,tree,story');
$lang->qa->subMenu->testcase->unit = array('link' => '单元测试|testtask|browseUnits|productID=%s', 'alias' => 'browseunits');
$lang->qa->subMenu->testcase->testsuite = array('link' => '套件|testsuite|browse|productID=%s', 'subModule' => 'testsuite');
$lang->qa->subMenu->testcase->caselib = array('link' => '用例库|caselib|browse|libID=0');
$lang->qa->subMenu->testtask = new stdclass();
$lang->qa->subMenu->testtask->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report,importunitresult');
$lang->qa->subMenu->testtask->report = array('link' => '报告|testreport|browse|productID=%s', 'alias' => 'view,create,edit');
$lang->qa->subMenu->automation = new stdclass();
$lang->qa->subMenu->automation->browse = array('link' => '介绍|automation|browse|productID=%s', 'alias' => '');
//$lang->qa->subMenu->automation->framework = array('link' => '框架|automation|framework|productID=%s', 'alias' => '');
//$lang->qa->subMenu->automation->data = array('link' => '数据|automation|date|productID=%s', 'alias' => '');
//$lang->qa->subMenu->automation->interface = array('link' => '接口|automation|interface|productID=%s', 'alias' => '');
//$lang->qa->subMenu->automation->environment = array('link' => '环境|automation|environment|productID=%s', 'alias' => '');
$lang->bug = new stdclass();
$lang->bug->menu = new stdclass();
$lang->bug->subMenu = $lang->qa->subMenu;
$lang->bug->menu->index = array('link' => '仪表盘|qa|index');
$lang->bug->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,resolve,close,activate,report,batchedit,batchactivate,confirmbug,assignto', 'subModule' => 'tree');
$lang->bug->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
$lang->bug->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
$lang->bug->menu->automation = array('link' => '自动化|automation|browse|productID=%s', 'alias' => '', 'class' => 'dropdown dropdown-hover');
$lang->testcase = new stdclass();
$lang->testcase->menu = new stdclass();
$lang->testcase->subMenu = $lang->qa->subMenu;
$lang->testcase->menu->index = array('link' => '仪表盘|qa|index');
$lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
$lang->testcase->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib', 'subModule' => 'tree,story', 'class' => 'dropdown dropdown-hover');
$lang->testcase->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
$lang->testcase->menu->automation = array('link' => '自动化|automation|browse|productID=%s', 'alias' => '', 'class' => 'dropdown dropdown-hover');
$lang->testtask = new stdclass();
$lang->testtask->menu = new stdclass();
$lang->testtask->subMenu = $lang->qa->subMenu;
$lang->testtask->menu->index = array('link' => '仪表盘|qa|index');
$lang->testtask->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
$lang->testtask->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
$lang->testtask->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
$lang->testtask->menu->automation = array('link' => '自动化|automation|browse|productID=%s', 'alias' => '', 'class' => 'dropdown dropdown-hover');
$lang->testsuite = new stdclass();
$lang->testsuite->menu = new stdclass();
$lang->testsuite->subMenu = $lang->qa->subMenu;
$lang->testsuite->menu->index = array('link' => '仪表盘|qa|index');
$lang->testsuite->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
$lang->testsuite->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'subModule' => 'testsuite', 'class' => 'dropdown dropdown-hover');
$lang->testsuite->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
$lang->testsuite->menu->automation = array('link' => '自动化|automation|browse|productID=%s', 'alias' => '', 'class' => 'dropdown dropdown-hover');
$lang->testreport = new stdclass();
$lang->testreport->menu = new stdclass();
$lang->testreport->subMenu = $lang->qa->subMenu;
$lang->testreport->menu->index = array('link' => '仪表盘|qa|index');
$lang->testreport->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
$lang->testreport->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
$lang->testreport->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'subModule' => 'testreport', 'class' => 'dropdown dropdown-hover');
$lang->testreport->menu->automation = array('link' => '自动化|automation|browse|productID=%s', 'alias' => '', 'class' => 'dropdown dropdown-hover');
$lang->caselib = new stdclass();
$lang->caselib->menu = new stdclass();
$lang->caselib->subMenu = $lang->qa->subMenu;
$lang->caselib->menu->index = array('link' => '仪表盘|qa|index');
$lang->caselib->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
$lang->caselib->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'subModule' => 'caselib', 'class' => 'dropdown dropdown-hover');
$lang->caselib->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
$lang->caselib->menu->automation = array('link' => '自动化|automation|browse|productID=%s', 'alias' => '', 'class' => 'dropdown dropdown-hover');
$lang->automation = new stdclass();
$lang->automation->menu = new stdclass();
$lang->automation->subMenu = $lang->qa->subMenu;
$lang->automation->menu->index = array('link' => '仪表盘|qa|index');
$lang->automation->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
$lang->automation->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
$lang->automation->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'subModule' => 'testreport', 'class' => 'dropdown dropdown-hover');
$lang->automation->menu->automation = array('link' => '自动化|automation|browse|productID=%s', 'alias' => '', 'class' => 'dropdown dropdown-hover');
$lang->ci = new stdclass();
$lang->ci->menu = new stdclass();
$lang->ci->menu->code = array('link' => '代码|repo|browse|repoID=%s', 'alias' => 'diff,view,revision,log,blame,showsynccomment');
$lang->ci->menu->build = array('link' => '构建|job|browse', 'subModule' => 'compile,job');
$lang->ci->menu->jenkins = array('link' => 'Jenkins|jenkins|browse', 'alias' => 'create,edit');
$lang->ci->menu->maintain = array('link' => '版本库|repo|maintain', 'alias' => 'create,edit');
$lang->ci->menu->rules = array('link' => '指令|repo|setrules');
$lang->repo = new stdclass();
$lang->jenkins = new stdclass();
$lang->compile = new stdclass();
$lang->job = new stdclass();
$lang->repo->menu = $lang->ci->menu;
$lang->jenkins->menu = $lang->ci->menu;
$lang->compile->menu = $lang->ci->menu;
$lang->job->menu = $lang->ci->menu;
/* 文档视图菜单设置。*/
$lang->doc = new stdclass();
$lang->doc->menu = new stdclass();
$lang->svn = new stdclass();
$lang->git = new stdclass();
/* 发布视图菜单设置。*/
$lang->projectrelease = new stdclass();
$lang->projectrelease->menu = new stdclass();
/* 统计视图菜单设置。*/
$lang->report = new stdclass();
$lang->report->menu = new stdclass();
$lang->report->menu->annual = array('link' => '年度总结|report|annualData|year=&dept=&userID=' . (isset($_SESSION['user']) ? zget($_SESSION['user'], 'id', 0) : 0), 'target' => '_blank');
$lang->report->menu->product = array('link' => $lang->productCommon . '|report|productsummary');
$lang->report->menu->execution = array('link' => '执行|report|executiondeviation');
$lang->report->menu->test = array('link' => '测试|report|bugcreate', 'alias' => 'bugassign');
$lang->report->menu->staff = array('link' => '组织|report|workload');
$lang->report->notice = new stdclass();
$lang->report->notice->help = '注:统计报表的数据来源于列表页面的检索结果,生成统计报表前请先在列表页面进行检索。比如列表页面我们检索的是%tab%,那么报表就是基于之前检索的%tab%的结果集进行统计。';
/* 组织结构视图菜单设置。*/
$lang->company = new stdclass();
$lang->dept = new stdclass();
$lang->group = new stdclass();
$lang->user = new stdclass();
$lang->company->menu = new stdclass();
$lang->dept->menu = new stdclass();
$lang->group->menu = new stdclass();
$lang->user->menu = new stdclass();
$lang->company = new stdclass();
$lang->company->menu = new stdclass();
$lang->company->menu->browseUser = array('link' => '用户|company|browse', 'subModule' => ',user,');
$lang->company->menu->dept = array('link' => '部门|dept|browse', 'subModule' => 'dept');
$lang->company->menu->browseGroup = array('link' => '权限|group|browse', 'subModule' => 'group');
/* 后台管理菜单设置。*/
$lang->admin = new stdclass();
$lang->admin->menu = new stdclass();
$lang->admin->menu->index = array('link' => '首页|admin|index', 'alias' => 'register,certifytemail,certifyztmobile,ztcompany');
$lang->admin->menu->company = array('link' => '人员|company|browse|', 'subModule' => ',user,dept,group,');
$lang->admin->menu->model = array('link' => '模型|custom|browsestoryconcept|', 'subModule' => 'holiday');
$lang->admin->menu->custom = array('link' => '自定义|custom|index', 'subModule' => 'custom');
$lang->admin->menu->extension = array('link' => '插件|extension|browse', 'subModule' => 'extension');
$lang->admin->menu->dev = array('link' => '二次开发|dev|api', 'alias' => 'db', 'subModule' => 'dev,editor,entry');
$lang->admin->menu->message = array('link' => '通知|message|index', 'subModule' => 'message,mail,webhook');
$lang->admin->menu->system = array('link' => '系统|backup|index', 'subModule' => 'cron,backup,action,search');
$lang->subject = new stdclass();
$lang->subject->menu = new stdclass();
$lang->subject->menu->storyConcept = array('link' => '需求概念|custom|browsestoryconcept|');
$lang->dept->menu = $lang->company->menu;
$lang->group->menu = $lang->company->menu;
$lang->user->menu = $lang->company->menu;
$lang->admin->subMenu = new stdclass();
$lang->admin->subMenu->message = new stdclass();
$lang->admin->subMenu->message->mail = array('link' => '邮件|mail|index', 'subModule' => 'mail');
$lang->admin->subMenu->message->webhook = array('link' => 'Webhook|webhook|browse', 'subModule' => 'webhook');
$lang->admin->subMenu->message->browser = array('link' => '浏览器|message|browser');
$lang->admin->subMenu->message->setting = array('link' => '设置|message|setting');
$lang->admin->subMenu->sso = new stdclass();
$lang->admin->subMenu->sso->ranzhi = 'ZDOO|admin|sso';
$lang->admin->subMenu->dev = new stdclass();
$lang->admin->subMenu->dev->api = array('link' => 'API|dev|api');
$lang->admin->subMenu->dev->db = array('link' => '数据库|dev|db');
$lang->admin->subMenu->dev->editor = array('link' => '编辑器|dev|editor');
$lang->admin->subMenu->dev->entry = array('link' => '应用|entry|browse', 'subModule' => 'entry');
$lang->admin->subMenu->system = new stdclass();
$lang->admin->subMenu->system->data = array('link' => '数据|backup|index', 'subModule' => 'action');
$lang->admin->subMenu->system->safe = array('link' => '安全|admin|safe', 'alias' => 'checkweak');
$lang->admin->subMenu->system->cron = array('link' => '定时|cron|index', 'subModule' => 'cron');
$lang->admin->subMenu->system->timezone = array('link' => '时区|custom|timezone', 'subModule' => 'custom');
$lang->admin->subMenu->system->buildIndex = array('link' => '重建索引|search|buildindex|');
$lang->admin->dividerMenu = ',company,message,system,';
$lang->convert = new stdclass();
$lang->upgrade = new stdclass();
$lang->action = new stdclass();
$lang->backup = new stdclass();
$lang->extension = new stdclass();
$lang->custom = new stdclass();
$lang->mail = new stdclass();
$lang->cron = new stdclass();
$lang->dev = new stdclass();
$lang->entry = new stdclass();
$lang->webhook = new stdclass();
$lang->message = new stdclass();
$lang->search = new stdclass();
/* Nav group.*/
$lang->navGroup = new stdclass();
$lang->navGroup->my = 'my';
$lang->navGroup->effort = 'my';
$lang->navGroup->score = 'my';
$lang->navGroup->program = 'program';
$lang->navGroup->personnel = 'program';
$lang->navGroup->product = 'product';
$lang->navGroup->productplan = 'product';
$lang->navGroup->release = 'product';
$lang->navGroup->branch = 'product';
$lang->navGroup->story = 'product';
$lang->navGroup->tree = 'product';
$lang->navGroup->project = 'project';
$lang->navGroup->testcase = 'project';
$lang->navGroup->testtask = 'project';
$lang->navGroup->testreport = 'project';
$lang->navGroup->testsuite = 'project';
$lang->navGroup->caselib = 'project';
$lang->navGroup->feedback = 'project';
$lang->navGroup->deploy = 'project';
$lang->navGroup->stakeholder = 'project';
$lang->navGroup->projectstory = 'project';
$lang->navGroup->review = 'project';
$lang->navGroup->reviewissue = 'project';
$lang->navGroup->milestone = 'project';
$lang->navGroup->pssp = 'project';
$lang->navGroup->auditplan = 'project';
$lang->navGroup->cm = 'project';
$lang->navGroup->nc = 'project';
$lang->navGroup->projectrelease = 'project';
$lang->navGroup->build = 'project';
$lang->navGroup->job = 'project';
$lang->navGroup->jenkins = 'project';
$lang->navGroup->compile = 'project';
$lang->navGroup->report = 'project';
$lang->navGroup->measrecord = 'project';
$lang->navGroup->execution = 'execution';
$lang->navGroup->task = 'execution';
$lang->navGroup->build = 'execution';
$lang->navGroup->doc = 'doc';
$lang->navGroup->qa = 'qa';
$lang->navGroup->repo = 'repo';
$lang->navGroup->company = 'system';
$lang->navGroup->sqlbuilder = 'system';
$lang->navGroup->auditcl = 'system';
$lang->navGroup->cmcl = 'system';
$lang->navGroup->todo = 'system';
$lang->navGroup->ldap = 'system';
$lang->navGroup->process = 'system';
$lang->navGroup->activity = 'system';
$lang->navGroup->zoutput = 'system';
$lang->navGroup->classify = 'system';
$lang->navGroup->subject = 'system';
$lang->navGroup->baseline = 'system';
$lang->navGroup->reviewcl = 'system';
$lang->navGroup->reviewsetting = 'system';
$lang->navGroup->attend = 'attend';
$lang->navGroup->leave = 'attend';
$lang->navGroup->makeup = 'attend';
$lang->navGroup->overtime = 'attend';
$lang->navGroup->lieu = 'attend';
$lang->navGroup->admin = 'admin';
$lang->navGroup->dept = 'admin';
$lang->navGroup->user = 'admin';
$lang->navGroup->group = 'admin';
$lang->navGroup->dept = 'admin';
$lang->navGroup->webhook = 'admin';
$lang->navGroup->sms = 'admin';
$lang->navGroup->message = 'admin';
$lang->navGroup->custom = 'admin';
$lang->navGroup->cron = 'admin';
$lang->navGroup->backup = 'admin';
$lang->navGroup->mail = 'admin';
$lang->navGroup->dev = 'admin';
$lang->navGroup->entry = 'admin';
$lang->navGroup->extension = 'admin';
$lang->navGroup->action = 'admin';
$lang->navGroup->search = 'admin';
/* 错误提示信息。*/
$lang->error = new stdclass();
$lang->error->companyNotFound = "您访问的域名 %s 没有对应的公司。";
@@ -788,168 +392,4 @@ $lang->datepicker->dayNames = array('星期日', '星期一', '星期二', '
$lang->datepicker->abbrDayNames = array('日', '一', '二', '三', '四', '五', '六');
$lang->datepicker->monthNames = array('一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月');
/* Common action icons 通用动作图标 */
$lang->icons['todo'] = 'check';
$lang->icons['product'] = 'product';
$lang->icons['bug'] = 'bug';
$lang->icons['task'] = 'check-sign';
$lang->icons['tasks'] = 'tasks';
$lang->icons['program'] = 'program';
$lang->icons['project'] = 'project';
$lang->icons['stage'] = 'waterfall';
$lang->icons['sprint'] = 'sprint';
$lang->icons['doc'] = 'file-text';
$lang->icons['doclib'] = 'folder-close';
$lang->icons['story'] = 'lightbulb';
$lang->icons['release'] = 'tags';
$lang->icons['roadmap'] = 'code-fork';
$lang->icons['plan'] = 'flag';
$lang->icons['dynamic'] = 'volume-up';
$lang->icons['build'] = 'tag';
$lang->icons['test'] = 'check';
$lang->icons['testtask'] = 'check';
$lang->icons['group'] = 'group';
$lang->icons['team'] = 'group';
$lang->icons['company'] = 'sitemap';
$lang->icons['user'] = 'user';
$lang->icons['dept'] = 'sitemap';
$lang->icons['tree'] = 'sitemap';
$lang->icons['usecase'] = 'sitemap';
$lang->icons['testcase'] = 'sitemap';
$lang->icons['result'] = 'list-alt';
$lang->icons['mail'] = 'envelope';
$lang->icons['trash'] = 'trash';
$lang->icons['extension'] = 'th-large';
$lang->icons['app'] = 'th-large';
$lang->icons['results'] = 'list-alt';
$lang->icons['create'] = 'plus';
$lang->icons['post'] = 'edit';
$lang->icons['batchCreate'] = 'plus-sign';
$lang->icons['batchEdit'] = 'edit-sign';
$lang->icons['batchClose'] = 'off';
$lang->icons['edit'] = 'edit';
$lang->icons['delete'] = 'close';
$lang->icons['copy'] = 'copy';
$lang->icons['report'] = 'bar-chart';
$lang->icons['export'] = 'export';
$lang->icons['report-file'] = 'file-powerpoint';
$lang->icons['import'] = 'import';
$lang->icons['finish'] = 'checked';
$lang->icons['resolve'] = 'check';
$lang->icons['start'] = 'play';
$lang->icons['restart'] = 'play';
$lang->icons['run'] = 'run';
$lang->icons['runCase'] = 'run';
$lang->icons['batchRun'] = 'play-sign';
$lang->icons['assign'] = 'hand-right';
$lang->icons['assignTo'] = 'hand-right';
$lang->icons['change'] = 'fork';
$lang->icons['link'] = 'link';
$lang->icons['close'] = 'off';
$lang->icons['activate'] = 'magic';
$lang->icons['review'] = 'glasses';
$lang->icons['confirm'] = 'search';
$lang->icons['confirmBug'] = 'search';
$lang->icons['putoff'] = 'calendar';
$lang->icons['suspend'] = 'pause';
$lang->icons['pause'] = 'pause';
$lang->icons['cancel'] = 'ban-circle';
$lang->icons['recordEstimate'] = 'time';
$lang->icons['customFields'] = 'cogs';
$lang->icons['manage'] = 'cog';
$lang->icons['unlock'] = 'unlock-alt';
$lang->icons['confirmStoryChange'] = 'search';
$lang->icons['score'] = 'tint';
/* Scrum menu. */
$lang->menu = new stdclass();
$lang->menu->scrum = new stdclass();
$lang->menu->scrum->index = '仪表盘|project|index|project={PROJECT}';
$lang->menu->scrum->execution = "$lang->executionCommon|project|execution|projectID={PROJECT}";
$lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|projectstory|story|projectID={PROJECT}', 'alias' => 'story,track');
$lang->menu->scrum->doc = array('link' => '文档|doc|objectLibs|type=project&objectID={PROJECT}', 'subModule' => 'doc');
$lang->menu->scrum->qa = array('link' => '测试|qa|index', 'subModule' => 'testcase,testtask');
$lang->menu->scrum->ci = '代码|repo|browse';
$lang->menu->scrum->build = array('link' => '版本|project|build|project={PROJECT}');
$lang->menu->scrum->projectrelease = array('link' => '发布|projectrelease|browse|project={PROJECT}');
$lang->menu->scrum->dynamic = array('link' => '动态|project|dynamic|project={PROJECT}');
$lang->menu->scrum->projectsetting = array('link' => '设置|project|view|project={PROJECT}', 'subModule' => 'stakeholder', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
$lang->projectQa = new stdclass();
$lang->projectQa->menu = new stdclass();
$lang->projectQa->menu->index = array('link' => '仪表盘|qa|index');
$lang->projectQa->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'subModule' => 'bug');
$lang->projectQa->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'subModule' => 'testsuite,testcase,caselib');
$lang->projectQa->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'subModule' => 'testtask', 'class' => 'dropdown dropdown-hover');
$lang->projectQa->subMenu = new stdclass();
$lang->projectQa->subMenu->testtask = new stdclass();
$lang->projectQa->subMenu->testtask->testtask = array('link' => '测试单|testtask|browse|productID=%s');
$lang->projectQa->subMenu->testtask->report = array('link' => '报告|testreport|browse|productID=%s');
$lang->scrum = new stdclass();
$lang->scrum->setMenu = new stdclass();
$lang->scrum->setMenu->view = array('link' => '概况|project|view|project={PROJECT}', 'alias' => 'edit');
$lang->scrum->setMenu->products = array('link' => '产品|project|manageProducts|project={PROJECT}', 'alias' => 'manageproducts');
$lang->scrum->setMenu->members = array('link' => '团队|project|manageMembers|project={PROJECT}', 'alias' => 'managemembers');
$lang->scrum->setMenu->whitelist = array('link' => '白名单|project|whitelist|project={PROJECT}', 'subModule' => 'personnel');
$lang->scrum->setMenu->stakeholder = array('link' => '干系人|stakeholder|browse|', 'subModule' => 'stakeholder');
$lang->scrum->setMenu->group = array('link' => '权限|project|group|project={PROJECT}', 'alias' => 'group,manageview,managepriv');
/* Waterfall menu. */
$lang->menu->waterfall = new stdclass();
$lang->menu->waterfall->index = array('link' => '仪表盘|project|index|project={PROJECT}');
$lang->menu->waterfall->programplan = array('link' => '计划|programplan|browse|project={PROJECT}', 'subModule' => 'programplan');
$lang->menu->waterfall->project = array('link' => $lang->executionCommon . '|execution|task|executionID={EXECUTION}', 'subModule' => ',project,task,');
$lang->menu->waterfall->doc = array('link' => '文档|doc|index|project={PROJECT}');
$lang->menu->waterfall->weekly = array('link' => '报告|weekly|index|project={PROJECT}', 'subModule' => ',milestone,');
$lang->menu->waterfall->projectstory = array('link' => $lang->SRCommon . '|projectstory|story|project={PROJECT}');
$lang->menu->waterfall->design = '设计|design|browse|product={PRODUCT}';
$lang->menu->waterfall->ci = '代码|repo|browse|';
$lang->menu->waterfall->track = array('link' => '矩阵|projectstory|track', 'alias' => 'track');
$lang->menu->waterfall->qa = '测试|qa|index';
$lang->menu->waterfall->projectrelease = array('link' => '发布|projectrelease|browse');
$lang->menu->waterfall->build = array('link' => '版本|project|build|project={PROJECT}');
$lang->menu->waterfall->dynamic = array('link' => '动态|project|dynamic|project={PROJECT}');
$lang->menu->waterfall->other = array('link' => '其他|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
$lang->menu->waterfall->projectsetting = array('link' => '设置|project|view|project={PROJECT}', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
$lang->waterfall = new stdclass();
$lang->waterfall->subMenu = new stdclass();
$lang->waterfall->subMenu->other = new stdclass();
$lang->waterfall->subMenu->other->estimation = array('link' => '估算|workestimation|index|program=%s', 'subModule' => 'workestimation,durationestimation,budget');
$lang->waterfall->subMenu->other->issue = array('link' => '问题|issue|browse|', 'subModule' => 'issue');
$lang->waterfall->subMenu->other->risk = array('link' => '风险|risk|browse|', 'subModule' => 'risk');
$lang->waterfall->subMenu->other->stakeholder = array('link' => '干系人|stakeholder|browse|', 'subModule' => 'stakeholder');
$lang->waterfall->subMenu->other->report = array('link' => '度量|report|projectsummary|project=%s', 'subModule' => ',report,measrecord');
$lang->waterfall->subMenu->other->auditplan = array('link' => 'QA|auditplan|browse|', 'subModule' => 'nc');
$lang->waterfall->setMenu = new stdclass();
$lang->waterfall->setMenu = $lang->scrum->setMenu;
$lang->waterfallproduct = new stdclass();
$lang->review = new stdclass();
$lang->milestone = new stdclass();
$lang->auditplan = new stdclass();
$lang->cm = new stdclass();
$lang->nc = new stdclass();
$lang->pssp = new stdclass();
$lang->stakeholder = new stdclass();
$lang->projectstory = new stdclass();
$lang->review->menu = new stdclass();
$lang->milestone->menu = new stdclass();
$lang->auditplan->menu = new stdclass();
$lang->cm->menu = new stdclass();
$lang->pssp->menu = new stdclass();
$lang->stakeholder->menu = new stdclass();
$lang->waterfallproduct->menu = new stdclass();
$lang->projectstory->menu = new stdclass();
$lang->stakeholder->menu = $lang->scrum->setMenu;
$lang->nc->menu = $lang->auditplan->menu;
$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'execution', 'task', 'build', 'productplan', 'project', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage', 'entry', 'jenkins');
include (dirname(__FILE__) . '/menuOrder.php');
include (dirname(__FILE__) . '/menu.php');
+181 -224
View File
@@ -33,6 +33,7 @@ class commonModel extends model
$this->loadCustomFromDB();
if(!$this->checkIP()) die($this->lang->ipLimited);
$this->app->loadLang('company');
$this->setOpenApp();
}
}
@@ -115,6 +116,21 @@ class commonModel extends model
}
}
/**
* Set openApp.
*
* @access public
* @return void
*/
public function setOpenApp()
{
$openApp = $this->app->openApp;
if($this->lang->navGroup->$openApp)
{
$this->app->openApp = $this->lang->navGroup->$openApp;
}
}
/**
* Load configs from database and save it to config->system and config->personal.
*
@@ -405,39 +421,39 @@ class commonModel extends model
* @access public
* @return array
*/
public static function createSubMenu($items, $replace)
public static function createDropMenu($items, $replace)
{
$subMenu = array();
foreach($items as $subMenuKey => $subMenuLink)
$dropMenu = array();
foreach($items as $dropMenuKey => $dropMenuLink)
{
if(is_array($subMenuLink) and isset($subMenuLink['link'])) $subMenuLink = $subMenuLink['link'];
if(is_array($dropMenuLink) and isset($dropMenuLink['link'])) $dropMenuLink = $dropMenuLink['link'];
if(is_array($replace))
{
$subMenuLink = vsprintf($subMenuLink, $replace);
$dropMenuLink = vsprintf($dropMenuLink, $replace);
}
else
{
$subMenuLink = sprintf($subMenuLink, $replace);
$dropMenuLink = sprintf($dropMenuLink, $replace);
}
list($subMenuName, $subMenuModule, $subMenuMethod, $subMenuParams) = explode('|', $subMenuLink);
list($dropMenuName, $dropMenuModule, $dropMenuMethod, $dropMenuParams) = explode('|', $dropMenuLink);
$link = array();
$link['module'] = $subMenuModule;
$link['method'] = $subMenuMethod;
$link['vars'] = $subMenuParams;
$link['module'] = $dropMenuModule;
$link['method'] = $dropMenuMethod;
$link['vars'] = $dropMenuParams;
$subMenuItem = isset($items->$subMenuKey) ? $items->$subMenuKey : array();
$dropMenuItem = isset($items->$dropMenuKey) ? $items->$dropMenuKey : array();
$menu = new stdclass();
$menu->name = $subMenuKey;
$menu->name = $dropMenuKey;
$menu->link = $link;
$menu->text = $subMenuName;
$menu->subModule = isset($subMenuItem['subModule']) ? $subMenuItem['subModule'] : '';
$menu->alias = isset($subMenuItem['alias']) ? $subMenuItem['alias'] : '';
$menu->text = $dropMenuName;
$menu->subModule = isset($dropMenuItem['subModule']) ? $dropMenuItem['subModule'] : '';
$menu->alias = isset($dropMenuItem['alias']) ? $dropMenuItem['alias'] : '';
$menu->hidden = false;
$subMenu[$subMenuKey] = $menu;
$dropMenu[$dropMenuKey] = $menu;
}
return $subMenu;
return $dropMenu;
}
/**
@@ -458,16 +474,16 @@ class commonModel extends model
foreach($lang->menu->$model as $key => $menu)
{
/* Replace for dropdown submenu. */
if(isset($lang->$model->subMenu->$key))
if(isset($lang->$model->dropMenu->$key))
{
$programSubMenu = $lang->$model->subMenu->$key;
$subMenu = common::createSubMenu($programSubMenu, $app->session->PRJ);
$programDropMenu = $lang->$model->dropMenu->$key;
$dropMenu = common::createDropMenu($programDropMenu, $app->session->PRJ);
if(!empty($subMenu))
if(!empty($dropMenu))
{
foreach($subMenu as $menuKey => $menu)
foreach($dropMenu as $menuKey => $menu)
{
$itemMenu = zget($programSubMenu, $menuKey, '');
$itemMenu = zget($programDropMenu, $menuKey, '');
$isActive['method'] = ($moduleName == strtolower($menu->link['module']) and $methodName == strtolower($menu->link['method']));
$isActive['alias'] = ($moduleName == strtolower($menu->link['module']) and (is_array($itemMenu) and isset($itemMenu['alias']) and strpos($itemMenu['alias'], $methodName) !== false));
$isActive['subModule'] = (is_array($itemMenu) and isset($itemMenu['subModule']) and strpos($itemMenu['subModule'], $moduleName) !== false);
@@ -478,7 +494,7 @@ class commonModel extends model
break;
}
}
$lang->menu->$model->{$key}['subMenu'] = $subMenu;
$lang->menu->$model->{$key}['dropMenu'] = $dropMenu;
}
}
}
@@ -486,34 +502,34 @@ class commonModel extends model
}
/**
* Print admin subMenu.
* Print admin dropMenu.
*
* @param string $subMenu
* @param string $dropMenu
* @static
* @access public
* @return void
*/
public static function printAdminSubMenu($subMenu)
public static function printAdminDropMenu($dropMenu)
{
global $app, $lang;
$currentModule = $app->getModuleName();
$currentMethod = $app->getMethodName();
if(isset($lang->admin->subMenuOrder->$subMenu))
if(isset($lang->admin->dropMenuOrder->$dropMenu))
{
ksort($lang->admin->subMenuOrder->$subMenu);
foreach($lang->admin->subMenuOrder->$subMenu as $type)
ksort($lang->admin->dropMenuOrder->$dropMenu);
foreach($lang->admin->dropMenuOrder->$dropMenu as $type)
{
if(isset($lang->admin->subMenu->$subMenu->$type))
if(isset($lang->admin->dropMenu->$dropMenu->$type))
{
$subModule = '';
$alias = '';
$link = $lang->admin->subMenu->$subMenu->$type;
if(is_array($lang->admin->subMenu->$subMenu->$type))
$link = $lang->admin->dropMenu->$dropMenu->$type;
if(is_array($lang->admin->dropMenu->$dropMenu->$type))
{
$subMenuType = $lang->admin->subMenu->$subMenu->$type;
if(isset($subMenuType['subModule'])) $subModule = $subMenuType['subModule'];
if(isset($subMenuType['alias'])) $alias = $subMenuType['alias'];
if(isset($subMenuType['link'])) $link = $subMenuType['link'];
$dropMenuType = $lang->admin->dropMenu->$dropMenu->$type;
if(isset($dropMenuType['subModule'])) $subModule = $dropMenuType['subModule'];
if(isset($dropMenuType['alias'])) $alias = $dropMenuType['alias'];
if(isset($dropMenuType['link'])) $link = $dropMenuType['link'];
}
list($text, $moduleName, $methodName)= explode('|', $link);
@@ -614,25 +630,26 @@ class commonModel extends model
/**
* Print the main menu.
*
* @param string $currentModule
* @param string $currentMethod
*
* @static
* @access public
* @return void
* @return string
*/
public static function printMainMenu($currentModule, $currentMethod)
public static function printMainMenu()
{
global $app, $lang, $config;
/* Set main menu by openApp and module. */
$openApp = $app->openApp ? $app->openApp : $lang->navGroup->$currentModule;
self::setMainMenuByOpenApp($openApp, $currentModule, $currentMethod);
self::setMainMenu();
$activeMenu = '';
$openApp = $app->openApp;
$currentModule = $app->rawModule;
$currentMethod = $app->rawMethod;
/* Print all main menus. */
$menu = customModel::getMainMenu();
$activeName = 'active';
$lastMenu = end($menu);
$menu = customModel::getMainMenu();
$lastMenu = end($menu);
echo "<ul class='nav nav-default'>\n";
foreach($menu as $menuItem)
@@ -645,8 +662,19 @@ class commonModel extends model
$alias = isset($menuItem->alias) ? $menuItem->alias : '';
$subModule = isset($menuItem->subModule) ? explode(',', $menuItem->subModule) : array();
$class = isset($menuItem->class) ? $menuItem->class : '';
$active = $menuItem->name == $currentModule ? "active" : '';
if($subModule) $active = in_array($currentModule, $subModule) ? 'active' : '';
$exclude = isset($menuItem->exclude) ? $menuItem->exclude : '';
$active = '';
if($menuItem->name == $currentModule and strpos(",$exclude,", ",$currentMethod,") === false)
{
$activeMenu = $menuItem->name;
$active = 'active';
}
if($subModule and in_array($currentModule, $subModule) and strpos(",$exclude,", ",$currentModule-$currentMethod,") === false)
{
$activeMenu = $menuItem->name;
$active = 'active';
}
if($menuItem->link)
{
@@ -660,46 +688,52 @@ class commonModel extends model
if(isset($menuItem->link['module'])) $module = $menuItem->link['module'];
if(isset($menuItem->link['method'])) $method = $menuItem->link['method'];
}
if($module == $currentModule and ($method == $currentMethod or strpos(",$alias,", ",$currentMethod,") !== false)) $active = 'active';
$label = $menuItem->text;
$subMenu = '';
/* Print sub menus. */
if(isset($menuItem->subMenu))
if($module == $currentModule and ($method == $currentMethod or strpos(",$alias,", ",$currentMethod,") !== false) and strpos(",$exclude,", ",$currentMethod,") === false)
{
foreach($menuItem->subMenu as $subMenuItem)
$activeMenu = $menuItem->name;
$active = 'active';
}
$label = $menuItem->text;
$dropMenu = '';
/* Print drop menus. */
if(isset($menuItem->dropMenu))
{
foreach($menuItem->dropMenu as $dropMenuItem)
{
if($subMenuItem->hidden) continue;
if($dropMenuItem->hidden) continue;
$subActive = '';
$subModule = '';
$subMethod = '';
$subParams = '';
$subProgram = '';
$subLabel = $subMenuItem->text;
if(isset($subMenuItem->link['module'])) $subModule = $subMenuItem->link['module'];
if(isset($subMenuItem->link['method'])) $subMethod = $subMenuItem->link['method'];
if(isset($subMenuItem->link['vars'])) $subParams = $subMenuItem->link['vars'];
$subLabel = $dropMenuItem->text;
if(isset($dropMenuItem->link['module'])) $subModule = $dropMenuItem->link['module'];
if(isset($dropMenuItem->link['method'])) $subMethod = $dropMenuItem->link['method'];
if(isset($dropMenuItem->link['vars'])) $subParams = $dropMenuItem->link['vars'];
$subLink = helper::createLink($subModule, $subMethod, $subParams);
if($currentModule == strtolower($subModule) && $currentMethod == strtolower($subMethod)) $subActive = 'active';
$subMenu .= "<li class='$subActive' data-id='$subMenuItem->name'>" . html::a($subLink, $subLabel) . $subProgram . '</li>';
$subActive = 'active';
if($currentModule == strtolower($subModule) && $currentMethod == strtolower($subMethod))
{
$activeMenu = $menuItem->name;
$active = 'active';
$subActive = 'active';
}
$dropMenu .= "<li class='$subActive' data-id='$dropMenuItem->name'>" . html::a($subLink, $subLabel) . $subProgram . '</li>';
}
if(empty($subMenu)) continue;
if(empty($dropMenu)) continue;
$label .= "<span class='caret'></span>";
$subMenu = "<ul class='dropdown-menu'>{$subMenu}</ul>";
$dropMenu = "<ul class='dropdown-menu'>{$dropMenu}</ul>";
}
/* Avoid highlighting the same navigation method at the same time. */
if($currentModule == 'feedback' and $currentMethod == 'admin') $active = '';
if($currentModule == 'product' and $currentMethod == 'browse') $active = '';
if($currentModule == 'story') $active = '';
$misc = isset($lang->navGroup->$module) and $openApp != $lang->navGroup->$module ? "data-app='$openApp'" : '';
$menuItemHtml = "<li class='$class $active' data-id='$menuItem->name'>" . html::a($link, $label, $target, $misc) . $subMenu . "</li>\n";
$misc = (isset($lang->navGroup->$module) and $openApp != $lang->navGroup->$module) ? "data-app='$openApp'" : '';
$menuItemHtml = "<li class='$class $active' data-id='$menuItem->name'>" . html::a($link, $label, $target, $misc) . $dropMenu . "</li>\n";
echo $menuItemHtml;
}
@@ -709,6 +743,8 @@ class commonModel extends model
}
}
echo "</ul>\n";
return $activeMenu;
}
/**
@@ -739,40 +775,23 @@ class commonModel extends model
/**
* Print the module menu.
*
* @param string $moduleName
* @param string $actveMenu
* @param string $methodName
* @static
* @access public
* @return void
*/
public static function printModuleMenu($moduleName, $methodName)
public static function printModuleMenu($activeMenu)
{
global $config, $lang, $app;
global $app, $lang;
$moduleName = $app->rawModule;
$methodName = $app->rawMethod;
/* Set main menu by openApp. */
$openApp = $app->openApp ? $app->openApp : $lang->navGroup->$moduleName;
if(in_array($moduleName, array('admin', 'repo', 'ops', 'feedback'))) return;
$openApp = $app->openApp;
if($openApp == 'my') self::getMyModuleMenu($moduleName, $methodName);
if($openApp == 'project') self::getProjectModuleMenu($moduleName, $methodName);
if($openApp == 'product')
{
$lang->product->menu = $lang->product->setMenu;
self::processMenuVars($lang->product->menu);
}
if($openApp == 'execution')
{
if(in_array($methodName, array('grouptask', 'tree'))) $lang->execution->menu = $lang->execution->viewMenu;
if(in_array($methodName, array('qa', 'bug', 'testtask', 'testcase', 'testreport'))) $lang->execution->menu = $lang->execution->qaMenu;
if(in_array($methodName, array('view', 'manageproducts', 'team', 'whitelist', 'edit', 'managemembers', 'addwhitelist'))) $lang->execution->menu = self::processMenuVars($lang->execution->settingMenu);
}
if(strpos('qa|bug|testcase|testreport|testtask', $moduleName) !== false and $openApp == 'project')
{
unset($lang->$moduleName->menu->testsuite);
unset($lang->$moduleName->menu->caselib);
}
self::getModuleMenu($activeMenu);
if(!isset($lang->$moduleName->menu))
if(!isset($lang->$openApp->menu))
{
echo "<ul></ul>";
return;
@@ -785,8 +804,8 @@ class commonModel extends model
$isMobile = $app->viewType === 'mhtml';
/* When use workflow then set rawModule to moduleName. */
if($moduleName == 'flow') $moduleName = $app->rawModule;
$menu = customModel::getModuleMenu($moduleName);
if($moduleName == 'flow') $activeMenu = $app->rawModule;
$menu = customModel::getModuleMenu($activeMenu);
/* If this is not workflow then use rawModule and rawMethod to judge highlight. */
if($app->isFlow)
@@ -830,37 +849,37 @@ class commonModel extends model
if($module == $currentModule and ($method == $currentMethod or strpos(",$alias,", ",$currentMethod,") !== false)) $active = 'active';
$label = $menuItem->text;
$subMenu = '';
$dropMenu = '';
/* Print sub menus. */
if(isset($menuItem->subMenu))
if(isset($menuItem->dropMenu))
{
foreach($menuItem->subMenu as $subMenuItem)
foreach($menuItem->dropMenu as $dropMenuItem)
{
if($subMenuItem->hidden) continue;
if($dropMenuItem->hidden) continue;
$subActive = '';
$subModule = '';
$subMethod = '';
$subParams = '';
$subLabel = $subMenuItem->text;
if(isset($subMenuItem->link['module'])) $subModule = $subMenuItem->link['module'];
if(isset($subMenuItem->link['method'])) $subMethod = $subMenuItem->link['method'];
if(isset($subMenuItem->link['vars'])) $subParams = $subMenuItem->link['vars'];
$subLabel = $dropMenuItem->text;
if(isset($dropMenuItem->link['module'])) $subModule = $dropMenuItem->link['module'];
if(isset($dropMenuItem->link['method'])) $subMethod = $dropMenuItem->link['method'];
if(isset($dropMenuItem->link['vars'])) $subParams = $dropMenuItem->link['vars'];
$subLink = helper::createLink($subModule, $subMethod, $subParams);
if($currentModule == strtolower($subModule) && $currentMethod == strtolower($subMethod)) $subActive = 'active';
$subMenu .= "<li class='$subActive' data-id='$subMenuItem->name'>" . html::a($subLink, $subLabel) . '</li>';
$dropMenu .= "<li class='$subActive' data-id='$dropMenuItem->name'>" . html::a($subLink, $subLabel) . '</li>';
}
if(empty($subMenu)) continue;
if(empty($dropMenu)) continue;
$label .= "<span class='caret'></span>";
$subMenu = "<ul class='dropdown-menu'>{$subMenu}</ul>";
$dropMenu = "<ul class='dropdown-menu'>{$dropMenu}</ul>";
}
$menuItemHtml = "<li class='$class $active' data-id='$menuItem->name'>" . html::a($link, $label, $target) . $subMenu . "</li>\n";
$menuItemHtml = "<li class='$class $active' data-id='$menuItem->name'>" . html::a($link, $label, $target) . $dropMenu . "</li>\n";
if($isMobile) $menuItemHtml = html::a($link, $menuItem->text, $target, "class='$class $active'") . "\n";
echo $menuItemHtml;
}
@@ -1370,7 +1389,6 @@ EOD;
}
$changes = array();
$magicQuote = get_magic_quotes_gpc();
foreach($new as $key => $value)
{
if(is_object($value) or is_array($value)) continue;
@@ -1384,7 +1402,6 @@ EOD;
if(strtolower($key) == 'canceleddate' && $value == '') continue;
if(strtolower($key) == 'closeddate' && $value == '') continue;
if($magicQuote) $value = stripslashes($value);
if(isset($old->$key) and $value != stripslashes($old->$key))
{
$diff = '';
@@ -1920,52 +1937,6 @@ EOD;
return (($ip & $netmask) == ($ipWhiteList & $netmask));
}
/**
* Replace the %s of one key of a menu by $params.
*
* All the menus are defined in the common's language file. But there're many dynamic params, so in the defination,
* we used %s as placeholder. These %s should be setted in one module.
*
* The items of one module's menu may be an string or array. For example, please see module/common/lang.
*
* @param string $object the menus of one module
* @param string $key the menu item to be replaced
* @param string $params the params passed to the menu item
* @access public
* @return void
*/
public static function setMenuVars($menu, $key, $params)
{
if(!isset($menu->$key)) return false;
if(is_array($params))
{
if(is_array($menu->$key))
{
$menu->$key = (object)$menu->$key;
$menu->$key->link = vsprintf($menu->$key->link, $params);
$menu->$key = (array)$menu->$key;
}
else
{
$menu->$key = vsprintf($menu->$key, $params);
}
}
else
{
if(is_array($menu->$key))
{
$menu->$key = (object)$menu->$key;
$menu->$key->link = sprintf($menu->$key->link, $params);
$menu->$key = (array)$menu->$key;
}
else
{
$menu->$key = sprintf($menu->$key, $params);
}
}
}
/**
* Get the full url of the system.
*
@@ -2276,29 +2247,27 @@ EOD;
}
/**
* Set main menu by openApp.
* Set main menu.
*
* @param string $openApp
* @param string $moduleName
* @param string $methodName
* @static
* @access public
* @return string
*/
public static function setMainMenuByOpenApp($openApp, $moduleName, $methodName)
public static function setMainMenu()
{
global $lang, $config;
global $app, $lang;
$openApp = $app->openApp;
/* If homeMenu is not exists or unset, display menu. */
if(!isset($lang->$openApp->homeMenu))
{
$lang->menu = $openApp == 'project' ? self::getProjectMainMenu($moduleName) : $lang->$openApp->menu;
$lang->menu = $lang->$openApp->menu;
$lang->menuOrder = $lang->$openApp->menuOrder;
return;
}
if($methodName == 'create')
if($app->rawModule == $openApp && $app->rawMethod == 'create')
{
$lang->menu = $lang->$openApp->homeMenu;
return;
@@ -2310,7 +2279,7 @@ EOD;
$link = is_array($menu) ? $menu['link'] : $menu;
$method = explode('|', $link)[2];
if($method == $methodName)
if($method == $app->rawMethod)
{
$lang->menu = $lang->$openApp->homeMenu;
return;
@@ -2318,7 +2287,7 @@ EOD;
}
/* Default, display menu. */
$lang->menu = $openApp == 'project' ? self::getProjectMainMenu($moduleName) : $lang->$openApp->menu;
$lang->menu = $lang->$openApp->menu;
$lang->menuOrder = $lang->$openApp->menuOrder;
}
@@ -2338,10 +2307,6 @@ EOD;
{
$link = is_array($setting) ? $setting['link'] : $setting;
if(strpos($link, "{PRODUCT}") !== false) $link = str_replace('{PRODUCT}', $app->session->product, $link);
if(strpos($link, "{EXECUTION}") !== false) $link = str_replace('{EXECUTION}', $app->session->execution, $link);
if(strpos($link, "{PROJECT}") !== false) $link = str_replace('{PROJECT}', $app->session->PRJ, $link);
if(is_array($setting))
{
$setting['link'] = $link;
@@ -2390,47 +2355,18 @@ EOD;
}
}
/**
* Get project module menu by model.
*
* @param varchar $moduleName
* @param varchar $methodName
* @static
* @access public
* @return string
*/
public static function getProjectModuleMenu($moduleName, $methodName)
{
global $app, $lang, $dbh;
$program = $dbh->query("SELECT * FROM " . TABLE_PROJECT . " WHERE `id` = '{$app->session->PRJ}'")->fetch();
if(empty($program)) return;
if($program->model == 'waterfall')
{
$lang->$moduleName->menu = self::processMenuVars($lang->$moduleName->menu);
}
if($program->model == 'scrum')
{
$lang->$moduleName->menu = self::processMenuVars($lang->$moduleName->menu);
unset($lang->stakeholder->menu->issue);
unset($lang->stakeholder->menu->plan);
unset($lang->stakeholder->menu->expectation);
}
}
/**
* Get my module menu by methodName.
*
* @param string $moduleName
* @param string $methodName
* @param string $activeMenu
* @static
* @access public
* @return void
*/
public static function getMyModuleMenu($moduleName, $methodName)
public static function getModuleMenu($activeMenu)
{
global $lang;
if($methodName == 'work') $lang->my->menu = $lang->my->workMenu;
if($methodName == 'contribute') $lang->my->menu = $lang->my->contributeMenu;
global $app, $lang;
$lang->{$app->openApp}->menu = $lang->{$app->openApp}->menu->$activeMenu['subMenu'];
}
/**
@@ -2455,37 +2391,58 @@ EOD;
}
/**
* Set objectID in current App.
* Replace the %s of one key of a menu by objectID or $params.
*
* @param string $openApp
* All the menus are defined in the common's language file. But there're many dynamic params, so in the defination,
* we used %s as placeholder. These %s should be setted in one module.
*
* @param string $moduleName
* @param int $objectID
* @param array $params
*
* @access public
* @return string
*/
static public function setAppObjectID($openApp, $objectID)
static public function setMenuVars($moduleName, $objectID, $params = array())
{
global $lang;
foreach($lang->$openApp->menu as $label => $menu)
foreach($lang->$moduleName->menu as $label => $menu)
{
if(isset($lang->$openApp->menu->{$label}['link']))
$lang->$moduleName->menu->$label = self::setMenuVarsEx($menu, $objectID, $params);
if(isset($menu['subMenu']))
{
$lang->$openApp->menu->{$label}['link'] = is_array($menu) ? sprintf($menu['link'], $objectID) : sprintf($menu, $objectID);
}
}
if($openApp == 'program')
{
foreach($lang->personnel->menu as $label => $menu)
{
$menu['link'] = is_array($menu) ? sprintf($menu['link'], $objectID) : sprintf($menu, $objectID);
$lang->personnel->menu->$label = $menu;
foreach($menu['subMenu'] as $key => $subMenu)
{
$lang->$moduleName->menu->{$label}['subMenu']->$key = self::setMenuVarsEx($subMenu, $objectID, $params);
}
}
}
/* If objectID is set, cannot use homeMenu. */
unset($lang->$openApp->homeMenu);
unset($lang->$moduleName->homeMenu);
}
/*
* Replace the %s of one key of a menu by objectID or $params.
* @param object $menu
* @param int $objectID
* @param array $params
*/
static private function setMenuVarsEx($menu, $objectID, $params = array())
{
if(is_array($menu))
{
$link = sprintf($menu['link'], $objectID);
$menu['link'] = vsprintf($link, $params);
}
else
{
$menu = sprintf($menu, $objectID);
$menu = vsprintf($menu, $params);
}
return $menu;
}
}
+4 -22
View File
@@ -7,36 +7,18 @@ include 'chosen.html.php';
<?php if(empty($_GET['onlybody']) or $_GET['onlybody'] != 'yes'):?>
<?php $this->app->loadConfig('sso');?>
<?php if(!empty($config->sso->redirect)) js::set('ssoRedirect', $config->sso->redirect);?>
<?php
$isProgram = $app->openApp == 'program';
$isProduct = $app->openApp == 'product';
$isProject = $app->openApp == 'project';
$isExecution = $app->openApp == 'execution';
$isReport = $app->openApp == 'report';
$isQa = $app->openApp == 'qa';
?>
<header id='header'>
<div id='mainHeader'>
<div class='container'>
<div id='heading'>
<?php if($isProduct) echo isset($lang->product->switcherMenu) ? $lang->product->switcherMenu : '';?>
<?php if($isQa) echo isset($lang->qa->switcherMenu) ? $lang->qa->switcherMenu : '';?>
<?php if($this->config->systemMode == 'new'):?>
<?php if($isProgram) echo isset($lang->program->switcherMenu) ? $lang->program->switcherMenu : '';?>
<?php if($isProject) echo $this->loadModel('project')->getSwitcher($this->session->PRJ, $app->rawModule, $app->rawMethod);?>
<?php if($isExecution) echo $this->loadModel('execution')->getSwitcher($this->session->execution, $app->rawModule, $app->rawMethod);?>
<?php elseif($this->config->systemMode == 'classic'):?>
<?php if($isProject) echo isset($lang->project->switcherMenu) ? $lang->project->switcherMenu : '';;?>
<?php endif;?>
</div>
<nav id='navbar'><?php commonModel::printMainMenu($app->rawModule, $app->rawMethod);?></nav>
<div id='heading'><?php echo isset($lang->switcherMenu) ? $lang->switcherMenu : '';?></div>
<nav id='navbar'><?php $activeMenu = commonModel::printMainMenu();?></nav>
</div>
</div>
<?php if(!in_array($app->rawModule, $lang->noMenuModule)):?>
<?php if(isset($lang->{$app->openApp}->menu->$activeMenu) and isset($lang->{$app->openApp}->menu->$activeMenu['subMenu'])):?>
<div id='subHeader'>
<div class='container'>
<div id="pageNav" class='btn-toolbar'><?php if(isset($lang->modulePageNav)) echo $lang->modulePageNav;?></div>
<nav id='subNavbar'><?php common::printModuleMenu($app->rawModule, $app->rawMethod);?></nav>
<nav id='subNavbar'><?php common::printModuleMenu($activeMenu);?></nav>
<div id="pageActions"><div class='btn-toolbar'><?php if(isset($lang->TRActions)) echo $lang->TRActions;?></div></div>
</div>
</div>
+2
View File
@@ -22,9 +22,11 @@ class companyModel extends model
*/
public function setMenu($dept = 0)
{
/*
common::setMenuVars($this->lang->company->menu, 'name', array($this->app->company->name));
common::setMenuVars($this->lang->company->menu, 'addUser', array($dept));
common::setMenuVars($this->lang->company->menu, 'batchAddUser', array($dept));
*/
}
/**
+1 -1
View File
@@ -12,7 +12,7 @@
?>
<?php include '../../common/view/header.html.php';?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'><?php common::printAdminSubMenu('system');?></div>
<div class='btn-toolbar pull-left'><?php // common::printAdminSubMenu('system');?></div>
</div>
<div id='mainContent' class='main-content'>
<?php if(!empty($config->global->cron)):?>
+7 -2
View File
@@ -155,6 +155,7 @@ class customModel extends model
$menuModuleName = $module;
$order = 1;
$customMenuMap = array();
$openApp = $app->openApp;
$isTutorialMode = commonModel::isTutorialMode();
if($customMenu)
@@ -194,7 +195,7 @@ class customModel extends model
}
elseif($module)
{
$menuOrder = ($module == 'main' and isset($lang->menuOrder)) ? $lang->menuOrder : (isset($lang->$module->menuOrder) ? $lang->$module->menuOrder : array());
$menuOrder = ($module == 'main' and isset($lang->menuOrder)) ? $lang->menuOrder : (isset($lang->menu->$module['menuOrder']) ? $lang->menu->$module['menuOrder'] : array());
if($menuOrder)
{
ksort($menuOrder);
@@ -227,6 +228,7 @@ class customModel extends model
$subModule = '';
$subMenu = '';
$alias = '';
$exclude = '';
$link = (is_array($item) and isset($item['link'])) ? $item['link'] : $item;
/* The variable of item has not link and is not link then ignore it. */
@@ -257,6 +259,7 @@ class customModel extends model
if(isset($item['subModule'])) $subModule = $item['subModule'];
if(isset($item['subMenu'])) $subMenu = $item['subMenu'];
if(isset($item['alias'])) $alias = $item['alias'];
if(isset($item['exclude'])) $exclude = $item['exclude'];
}
$hidden = isset($customMenuMap[$name]) && isset($customMenuMap[$name]->hidden) && $customMenuMap[$name]->hidden;
@@ -291,6 +294,7 @@ class customModel extends model
if($subModule)$menuItem->subModule = $subModule;
if($subMenu) $menuItem->subMenu = $subMenu;
if($alias) $menuItem->alias = $alias;
if($exclude) $menuItem->exclude = $exclude;
if($isTutorialMode) $menuItem->tutorial = true;
/* Hidden menu by config in mobile. */
@@ -317,7 +321,7 @@ class customModel extends model
if(empty($module)) $module = 'main';
global $app, $lang, $config;
$allMenu = $module == 'main' ? $lang->menu : (isset($lang->$module->menu) ? $lang->$module->menu : $lang->my->menu);
$allMenu = $module == 'main' ? $lang->menu : $lang->menu->$module['subMenu'];
if($module == 'product' and isset($allMenu->branch)) $allMenu->branch = str_replace('@branch@', $lang->custom->branch, $allMenu->branch);
$flowModule = $config->global->flow . '_' . $module;
$customMenu = isset($config->customMenu->$flowModule) ? $config->customMenu->$flowModule : array();
@@ -325,6 +329,7 @@ class customModel extends model
if(!empty($customMenu) && is_string($customMenu) && substr($customMenu, 0, 1) === '[') $customMenu = json_decode($customMenu);
if($module == 'my' && empty($config->global->scoreStatus)) unset($allMenu->score);
$menu = self::setMenuByConfig($allMenu, $customMenu, $module);
return $menu;
}
+1 -1
View File
@@ -12,7 +12,7 @@
?>
<?php include '../../common/view/header.html.php';?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'><?php common::printAdminSubMenu('system');?></div>
<div class='btn-toolbar pull-left'><?php // common::printAdminSubMenu('system');?></div>
</div>
<div id='mainContent' class='main-content'>
<div class='mw-500px'>
+1 -1
View File
@@ -1,5 +1,5 @@
<?php include '../../common/view/header.html.php';?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'><?php common::printAdminSubMenu('dev');?></div>
<div class='btn-toolbar pull-left'><?php // common::printAdminSubMenu('dev');?></div>
</div>
<script>$('#mainMenu #<?php echo $tab;?>').addClass('btn-active-text')</script>
+23 -12
View File
@@ -448,6 +448,15 @@ class doc extends control
$this->doc->setMenu($type, $libID, $doc->module, $lib->product, $lib->execution);
}
/* Set my menu. */
if($this->app->openApp == 'my')
{
$this->lang->doc->menu = $this->lang->my->contributeMenu;
$this->lang->modulePageNav = '';
$this->lang->TRActions = '';
$this->lang->my->menu->contribute['subModule'] = 'doc';
}
$this->view->title = $lib->name . $this->lang->colon . $this->lang->doc->edit;
$this->view->position[] = html::a($this->createLink('doc', 'browse', "libID=$libID"), $lib->name);
$this->view->position[] = $this->lang->doc->edit;
@@ -831,7 +840,7 @@ class doc extends control
$this->lang->doc->menu = $this->lang->project->menu;
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
$this->project->setMenu($this->project->getPairs($this->session->PRJ, 'all', 0, true), $objectID);
$this->project->setMenu($objectID);
}
else
{
@@ -912,18 +921,10 @@ class doc extends control
$table = $type == 'product' ? TABLE_PRODUCT : TABLE_PROJECT;
$object = $this->dao->select('id,name,status')->from($table)->where('id')->eq($objectID)->fetch();
if(empty($object)) $this->locate($this->createLink($type, 'create', '', '', '', $this->session->PRJ));
$this->lang->noMenuModule[] = 'doc';
if($from == 'product')
{
$this->product->setMenu($this->product->getPairs(), $objectID);
$this->lang->product->switcherMenu = $this->product->getSwitcher($objectID);
$this->lang->noMenuModule[] = 'doc';
}
elseif($from == 'project' or $from == 'execution')
{
if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
}
else
$from = $this->app->openApp;
if($from == 'doc')
{
$crumb = html::a(inlink('allLibs', "type=$type"), $type == 'product' ? $this->lang->productCommon : $this->lang->executionCommon) . $this->lang->doc->separator;
if($this->productID and $type == 'execution') $crumb = $this->doc->getProductCrumb($this->productID, $objectID);
@@ -931,6 +932,16 @@ class doc extends control
$productID = $type == 'product' ? $objectID : 0;
$executionID = $type == 'execution' ? $objectID : 0;
$this->doc->setMenu($type, 0, 0, $productID, $executionID, $crumb);
}
elseif($from == 'execution')
{
$executions = $this->loadModel('execution')->getPairs(0, 'all', 'nocode');
$this->execution->setMenu($executions, $objectID);
}
else
{
$this->loadModel($from)->setMenu($objectID);
}
/* Set Custom. */
+2
View File
@@ -20,4 +20,6 @@ $(function()
$('#urlBox').removeClass('hidden');
}
});
$('#subNavbar li[data-id="doc"]').addClass('active');
})
+1
View File
@@ -361,6 +361,7 @@ class docModel extends model
$docIDList = $this->dao->select('objectID')->from(TABLE_ACTION)
->where('objectType')->eq('doc')
->andWhere('actor')->eq($this->app->user->account)
->andWhere('action')->eq('edited')
->fetchAll('objectID');
$docs = $this->dao->select('*')->from(TABLE_DOC)
->where('deleted')->eq(0)
+1 -1
View File
@@ -12,7 +12,7 @@
?>
<?php include '../../common/view/header.html.php';?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'><?php common::printAdminSubMenu('dev');?></div>
<div class='btn-toolbar pull-left'><?php // common::printAdminSubMenu('dev');?></div>
<div class='btn-toolbar pull-right'>
<?php echo html::a($this->createLink('entry', 'create'), "<i class='icon icon-plus'></i> {$lang->entry->create}", '', "class='btn btn-primary'"); ?>
</div>
+44 -44
View File
@@ -186,9 +186,9 @@ class execution extends control
/* Save to session. */
$uri = $this->app->getURI(true);
$this->app->session->set('taskList', $uri);
$this->app->session->set('storyList', $uri);
$this->app->session->set('executionList', $uri);
$this->app->session->set('taskList', $uri, 'execution');
$this->app->session->set('storyList', $uri, 'product');
$this->app->session->set('executionList', $uri, 'execution');
/* Process the order by field. */
if(!$orderBy) $orderBy = $this->cookie->executionTaskOrder ? $this->cookie->executionTaskOrder : 'status,id_desc';
@@ -270,8 +270,8 @@ class execution extends control
$executionID = $execution->id;
/* Save session. */
$this->app->session->set('taskList', $this->app->getURI(true));
$this->app->session->set('storyList', $this->app->getURI(true));
$this->app->session->set('taskList', $this->app->getURI(true), 'execution');
$this->app->session->set('storyList', $this->app->getURI(true), 'product');
/* Header and session. */
$this->view->title = $execution->name . $this->lang->colon . $this->lang->execution->task;
@@ -493,8 +493,8 @@ class execution extends control
}
/* Save session. */
$this->app->session->set('taskList', $this->app->getURI(true));
$this->app->session->set('storyList', $this->app->getURI(true));
$this->app->session->set('taskList', $this->app->getURI(true), 'execution');
$this->app->session->set('storyList', $this->app->getURI(true), 'product');
$this->view->title = $execution->name . $this->lang->colon . $this->lang->execution->importTask;
$this->view->position[] = html::a(inlink('browse', "executionID=$toExecution"), $execution->name);
@@ -535,9 +535,9 @@ class execution extends control
/* Save to session. */
$uri = $this->app->getURI(true);
$this->app->session->set('bugList', $uri);
$this->app->session->set('storyList', $uri);
$this->app->session->set('executionList', $uri);
$this->app->session->set('bugList', $uri, 'qa');
$this->app->session->set('storyList', $uri, 'product');
$this->app->session->set('executionList', $uri, 'execution');
$this->loadModel('bug');
$executions = $this->execution->getPairs(0, 'all', 'nocode');
@@ -721,7 +721,7 @@ class execution extends control
}
/* Save session. */
$this->app->session->set('storyList', $this->app->getURI(true));
$this->app->session->set('storyList', $this->app->getURI(true), 'product');
/* Process the order by field. */
if(!$orderBy) $orderBy = $this->cookie->executionStoryOrder ? $this->cookie->executionStoryOrder : 'pri';
@@ -855,7 +855,7 @@ class execution extends control
$this->loadModel('user');
/* Save session. */
$this->session->set('bugList', $this->app->getURI(true));
$this->session->set('bugList', $this->app->getURI(true), 'qa');
$type = strtolower($type);
$queryID = ($type == 'bysearch') ? (int)$param : 0;
@@ -963,7 +963,7 @@ class execution extends control
{
/* Load module and set session. */
$this->loadModel('testtask');
$this->session->set('buildList', $this->app->getURI(true));
$this->session->set('buildList', $this->app->getURI(true), 'execution');
$execution = $this->commonAction($executionID);
$executionID = $execution->id;
@@ -1028,7 +1028,7 @@ class execution extends control
$this->loadModel('testtask');
/* Save session. */
$this->session->set('testtaskList', $this->app->getURI(true));
$this->session->set('testtaskList', $this->app->getURI(true), 'qa');
$execution = $this->commonAction($executionID);
$executionID = $execution->id;
@@ -1184,8 +1184,8 @@ class execution extends control
{
$project = $this->project->getByID($projectID);
$model = $project->model;
$this->lang->project->menu = $this->lang->menu->$model;
commonModel::setAppobjectID('project', $projectID);
$this->project->setMenu($projectID);
}
$this->app->loadLang('program');
@@ -1402,7 +1402,7 @@ class execution extends control
$isSprint = true;
if($this->config->systemMode == 'new')
{
$project = $this->project->getById($this->session->PRJ);
$project = $this->project->getById($execution->project);
if($project->model == 'scrum')
{
unset($this->lang->execution->endList[62]);
@@ -1431,8 +1431,8 @@ class execution extends control
$this->view->title = $title;
$this->view->position = $position;
$this->view->executions = $executions;
$this->view->execution = $execution;
$this->view->executions = $executions;
$this->view->execution = $execution;
$this->view->poUsers = $poUsers;
$this->view->pmUsers = $pmUsers;
$this->view->qdUsers = $qdUsers;
@@ -1718,7 +1718,6 @@ class execution extends control
if(empty($execution) || strpos('stage,sprint', $execution->type) === false) die(js::error($this->lang->notFound) . js::locate('back'));
$this->app->loadLang('program');
$this->session->PRJ = $execution->project;
/* Execution not found to prevent searching for .*/
if(!isset($this->executions[$execution->id])) $this->executions = $this->execution->getPairs($execution->execution, 'all', 'nocode');
@@ -1776,9 +1775,9 @@ class execution extends control
{
/* Save to session. */
$uri = $this->app->getURI(true);
$this->app->session->set('taskList', $uri);
$this->app->session->set('storyList', $uri);
$this->app->session->set('bugList', $uri);
$this->app->session->set('taskList', $uri, 'execution');
$this->app->session->set('storyList', $uri, 'product');
$this->app->session->set('bugList', $uri, 'qa');
/* Compatibility IE8*/
if(strpos($this->server->http_user_agent, 'MSIE 8.0') !== false) header("X-UA-Compatible: IE=EmulateIE7");
@@ -1835,11 +1834,11 @@ class execution extends control
/* Save to session. */
$uri = $this->app->getURI(true);
$this->app->session->set('taskList', $uri);
$this->app->session->set('storyList', $uri);
$this->app->session->set('executionList', $uri);
$this->app->session->set('caseList', $uri);
$this->app->session->set('bugList', $uri);
$this->app->session->set('taskList', $uri, 'execution');
$this->app->session->set('storyList', $uri, 'product');
$this->app->session->set('executionList', $uri, 'execution');
$this->app->session->set('caseList', $uri, 'qa');
$this->app->session->set('bugList', $uri, 'qa');
if($type === 'json') die(helper::jsonEncode4Parse($tree, JSON_HEX_QUOT | JSON_HEX_APOS));
@@ -1973,7 +1972,7 @@ class execution extends control
{
/* Save to session. */
$uri = $this->app->getURI(true);
$this->app->session->set('storyList', $uri);
$this->app->session->set('storyList', $uri, 'product');
/* Compatibility IE8*/
if(strpos($this->server->http_user_agent, 'MSIE 8.0') !== false) header("X-UA-Compatible: IE=EmulateIE7");
@@ -2090,6 +2089,7 @@ class execution extends control
$diffProducts = array_merge(array_diff($oldProducts, $newProducts), array_diff($newProducts, $oldProducts));
if($diffProducts) $this->loadModel('action')->create($this->objectType, $executionID, 'Managed', '', !empty($_POST['products']) ? join(',', $_POST['products']) : '');
if(isonlybody()) die(js::reload('parent'));
die(js::locate($browseExecutionLink));
}
@@ -2259,7 +2259,7 @@ class execution extends control
$browseLink = $this->createLink('execution', 'story', "executionID=$executionID");
if($execution->type == 'project') $browseLink = $this->createLink('projectstory', 'story');
$this->session->set('storyList', $this->app->getURI(true)); // Save session.
$this->session->set('storyList', $this->app->getURI(true), 'product'); // Save session.
if($execution->type != 'execution') $this->execution->setMenu($this->executions, $execution->id); // Set menu.
if(empty($products))
@@ -2429,16 +2429,16 @@ class execution extends control
{
/* Save session. */
$uri = $this->app->getURI(true);
$this->session->set('productList', $uri);
$this->session->set('productPlanList', $uri);
$this->session->set('releaseList', $uri);
$this->session->set('storyList', $uri);
$this->session->set('executionList', $uri);
$this->session->set('taskList', $uri);
$this->session->set('buildList', $uri);
$this->session->set('bugList', $uri);
$this->session->set('caseList', $uri);
$this->session->set('testtaskList', $uri);
$this->session->set('productList', $uri, 'product');
$this->session->set('productPlanList', $uri, 'product');
$this->session->set('releaseList', $uri, 'product');
$this->session->set('storyList', $uri, 'product');
$this->session->set('executionList', $uri, 'execution');
$this->session->set('taskList', $uri, 'execution');
$this->session->set('buildList', $uri, 'execution');
$this->session->set('bugList', $uri, 'qa');
$this->session->set('caseList', $uri, 'qa');
$this->session->set('testtaskList', $uri, 'qa');
/* use first execution if executionID does not exist. */
if(!isset($this->executions[$executionID])) $executionID = key($this->executions);
@@ -2681,8 +2681,8 @@ class execution extends control
$this->app->loadLang('programplan');
$from = $this->app->openApp;
if($from == 'execution') $this->session->set('executionList', $this->app->getURI(true));
if($from == 'project') $this->lang->navGroup->execution = 'project';
if($from == 'execution') $this->session->set('executionList', $this->app->getURI(true), 'execution');
if($from == 'project') $this->project->setMenu($projectID);
/* Load pager and get tasks. */
$this->app->loadClass('pager', $static = true);
@@ -2792,9 +2792,9 @@ class execution extends control
unset($fields[$key]);
}
$projectID = $from == 'project' ? $this->session->PRJ : 0;
$projectID = $from == 'project' ? $this->session->project : 0;
$executionStats = $this->project->getStats($projectID, $status == 'byproduct' ? 'all' : $status, $productID, 0, 30, 'id_asc');
$users = $this->loadModel('user')->getPairs('noletter');
$users = $this->loadModel('user')->getPairs('noletter');
foreach($executionStats as $i => $execution)
{
$execution->PM = zget($users, $execution->PM);
+9 -52
View File
@@ -58,29 +58,18 @@ class executionModel extends model
* @param int $buildID
* @param string $extra
* @access public
* @return bool
* @return void
*/
public function setMenu($executions, $executionID, $buildID = 0, $extra = '')
{
if(empty($executions))
{
$project = $this->loadModel('project')->getByID($this->session->PRJ);
if($project->model == 'waterfall')
{
if(($this->app->moduleName == 'programplan' && $this->app->methodName != 'create') || $this->app->moduleName == 'execution') die(js::locate(helper::createLink('programplan', 'create', "projectID=$project->id")));
}
else
{
if($this->app->moduleName == 'execution' && $this->app->methodName != 'create') die(js::locate(helper::createLink('execution', 'create')));
}
}
if(!$executionID and $this->session->execution) $executionID = $this->session->execution;
if(!$executionID or !in_array($executionID, array_keys($executions))) $executionID = key($executions);
$this->session->set('execution', $executionID);
/* Unset story, bug, build and testtask if type is ops. */
$execution = $this->getByID($executionID);
/*
if($execution and $execution->lifetime == 'ops')
{
unset($this->lang->execution->menu->story);
@@ -89,13 +78,16 @@ class executionModel extends model
unset($this->lang->execution->subMenu->qa->build);
unset($this->lang->execution->subMenu->qa->testtask);
}
*/
/* Hide story and qa menu when execution is story or design type. */
/*
if($execution and ($execution->attribute == 'story' or $execution->attribute == 'design'))
{
unset($this->lang->execution->menu->story);
unset($this->lang->execution->menu->qa);
}
*/
if($executions and (!isset($executions[$executionID]) or !$this->checkPriv($executionID))) $this->accessDenied();
@@ -108,43 +100,8 @@ class executionModel extends model
$this->cookie->executionMode = 'all';
}
/* Set execution module page nav. */
$label = $this->lang->execution->index;
if($methodName == 'all') $label = $this->lang->execution->allExecutions;
if($methodName == 'create' and $moduleName == 'execution') $label = $this->lang->execution->create;
foreach($this->lang->execution->viewMenu as $key => $menu) common::setMenuVars($this->lang->execution->viewMenu, $key, $executionID);
foreach($this->lang->execution->qaMenu as $key => $menu) common::setMenuVars($this->lang->execution->qaMenu, $key, $executionID);
foreach($this->lang->execution->menu as $key => $menu)
{
common::setMenuVars($this->lang->execution->menu, $key, $executionID);
if(isset($this->lang->execution->subMenu->$key))
{
$executionSubMenu = $this->lang->execution->subMenu->$key;
$subMenu = common::createSubMenu($this->lang->execution->subMenu->$key, $executionID);
if(!empty($subMenu))
{
foreach($subMenu as $menuKey => $menu)
{
$itemMenu = zget($executionSubMenu, $menuKey, '');
$isActive['method'] = ($moduleName == strtolower($menu->link['module']) and $methodName == strtolower($menu->link['method']));
$isActive['alias'] = ($moduleName == strtolower($menu->link['module']) and (is_array($itemMenu) and isset($itemMenu['alias']) and strpos($itemMenu['alias'], $methodName) !== false));
$isActive['subModule'] = (is_array($itemMenu) and isset($itemMenu['subModule']) and strpos($itemMenu['subModule'], $moduleName) !== false);
if($isActive['method'] or $isActive['alias'] or $isActive['subModule'])
{
$this->lang->execution->menu->{$key}['link'] = $menu->text . "|" . join('|', $menu->link);
break;
}
}
$this->lang->execution->menu->{$key}['subMenu'] = $subMenu;
}
}
}
return true;
$this->lang->switcherMenu = $this->getSwitcher($executionID, $this->app->rawModule, $this->app->rawMethod);
common::setMenuVars('execution', $executionID);
}
/**
@@ -1855,7 +1812,7 @@ class executionModel extends model
$bugToTasks = fixer::input('post')->get();
$bugs = $this->bug->getByList(array_keys($bugToTasks->import));
$projectID = $this->loadModel('execution')->getProjectID($executionID);
$projectID = $this->loadModel('task')->getProjectID($executionID);
foreach($bugToTasks->import as $key => $value)
{
$bug = zget($bugs, $key, '');
+15 -7
View File
@@ -35,6 +35,14 @@
}
}
$minWidth = (count($visibleFields) > 5) ? 'w-150px' : '';
$name = $from == 'execution' ? 'execName' : 'name';
$code = $from == 'execution' ? 'execCode' : 'code';
$PM = $from == 'execution' ? 'execPM' : 'PM';
$type = $from == 'execution' ? 'execType' : 'type';
$desc = $from == 'execution' ? 'execDesc' : 'desc';
$status = $from == 'execution' ? 'execStatus' : 'status';
?>
<form class='main-form' method='post' target='hiddenwin' action='<?php echo inLink('batchEdit');?>'>
<div class="table-responsive">
@@ -42,17 +50,17 @@
<thead>
<tr>
<th class='w-50px'><?php echo $lang->idAB;?></th>
<th class='required <?php echo $minWidth?>' style="width:100%"><?php echo $from == 'execution' ? $lang->execution->execName : $lang->execution->name;?></th>
<th class='w-150px required'><?php echo $from == 'execution' ? $lang->execution->execCode : $lang->execution->code;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'PM', ' hidden') . zget($requiredFields, 'PM', '', ' required');?>'><?php echo $from == 'execution' ? $lang->execution->execPM : $lang->execution->PM;?></th>
<th class='required <?php echo $minWidth?>' style="width:100%"><?php echo $lang->execution->$name;?></th>
<th class='w-150px required'><?php echo $lang->execution->$code;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'PM', ' hidden') . zget($requiredFields, 'PM', '', ' required');?>'><?php echo $lang->execution->$PM;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'PO', ' hidden') . zget($requiredFields, 'PO', '', ' required');?>'><?php echo $lang->execution->PO;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'QD', ' hidden') . zget($requiredFields, 'QD', '', ' required');?>'><?php echo $lang->execution->QD;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'RD', ' hidden') . zget($requiredFields, 'RD', '', ' required');?>'><?php echo $lang->execution->RD;?></th>
<th class='w-100px<?php echo zget($visibleFields, 'type', ' hidden') . zget($requiredFields, 'type', '', ' required');?>'><?php echo $from == 'execution' ? $lang->execution->execType : $lang->execution->type;?></th>
<th class='w-100px<?php echo zget($visibleFields, 'status', ' hidden') . zget($requiredFields, 'status', '', ' required');?>'><?php echo $from == 'execution' ? $lang->execution->execStatus : $lang->execution->status;?></th>
<th class='w-100px<?php echo zget($visibleFields, 'type', ' hidden') . zget($requiredFields, 'type', '', ' required');?>'><?php echo $lang->execution->$type;?></th>
<th class='w-100px<?php echo zget($visibleFields, 'status', ' hidden') . zget($requiredFields, 'status', '', ' required');?>'><?php echo $lang->execution->$status;?></th>
<th class='w-110px required'><?php echo $lang->execution->begin;?></th>
<th class='w-110px required'><?php echo $lang->execution->end;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'desc', ' hidden') . zget($requiredFields, 'desc', '', ' required');?>'> <?php echo $from == 'execution' ? $lang->execution->execDesc : $lang->execution->desc;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'desc', ' hidden') . zget($requiredFields, 'desc', '', ' required');?>'><?php echo $lang->execution->$desc;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'teamname', ' hidden') . zget($requiredFields, 'teamname', '', ' required');?>'><?php echo $lang->execution->teamname;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'days', ' hidden') . zget($requiredFields, 'days', '', ' required');?>'><?php echo $lang->execution->days;?></th>
</tr>
@@ -69,7 +77,7 @@
<td><?php echo sprintf('%03d', $executionID) . html::hidden("executionIDList[$executionID]", $executionID);?></td>
<td title='<?php echo $executions[$executionID]->name?>'><?php echo html::input("names[$executionID]", $executions[$executionID]->name, "class='form-control'");?></td>
<td><?php echo html::input("codes[$executionID]", $executions[$executionID]->code, "class='form-control'");?></td>
<td class='text-left<?php echo zget($visibleFields, 'PM', ' hidden')?>' style='overflow:visible'><?php echo html::select("PMs[$executionID]", $pmUsers, $executions[$executionID]->PM, "class='form-control chosen'");?></td>
<td class='text-left<?php echo zget($visibleFields, 'PM', ' hidden')?>' style='overflow:visible'><?php echo html::select("PMs[$executionID]", $pmUsers, $executions[$executionID]->PM, "class='form-control chosen'");?></td>
<td class='text-left<?php echo zget($visibleFields, 'PO', ' hidden')?>' style='overflow:visible'><?php echo html::select("POs[$executionID]", $poUsers, $executions[$executionID]->PO, "class='form-control chosen'");?></td>
<td class='text-left<?php echo zget($visibleFields, 'QD', ' hidden')?>' style='overflow:visible'><?php echo html::select("QDs[$executionID]", $qdUsers, $executions[$executionID]->QD, "class='form-control chosen'");?></td>
<td class='text-left<?php echo zget($visibleFields, 'RD', ' hidden')?>' style='overflow:visible'><?php echo html::select("RDs[$executionID]", $rdUsers, $executions[$executionID]->RD, "class='form-control chosen'");?></td>
-17
View File
@@ -139,23 +139,6 @@ $lang->resource->todo->activate = 'activate';
$lang->resource->todo->close = 'close';
$lang->resource->todo->batchClose = 'batchClose';
$lang->todo->methodOrder[5] = 'create';
$lang->todo->methodOrder[10] = 'createCycle';
$lang->todo->methodOrder[15] = 'batchCreate';
$lang->todo->methodOrder[20] = 'edit';
$lang->todo->methodOrder[25] = 'batchEdit';
$lang->todo->methodOrder[30] = 'view';
$lang->todo->methodOrder[35] = 'delete';
$lang->todo->methodOrder[40] = 'export';
$lang->todo->methodOrder[45] = 'start';
$lang->todo->methodOrder[50] = 'finish';
$lang->todo->methodOrder[55] = 'batchFinish';
$lang->todo->methodOrder[60] = 'import2Today';
$lang->todo->methodOrder[65] = 'assignTo';
$lang->todo->methodOrder[70] = 'activate';
$lang->todo->methodOrder[75] = 'close';
$lang->todo->methodOrder[80] = 'batchClose';
global $config;
if($config->systemMode == 'new')
{
+1 -1
View File
@@ -1,4 +1,4 @@
<?php include '../../common/view/header.html.php';?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left"><?php common::printAdminSubMenu('message');?></div>
<div class="btn-toolbar pull-left"><?php // common::printAdminSubMenu('message');?></div-->
</div>
+5 -1
View File
@@ -25,7 +25,7 @@
<?php if(empty($docs)):?>
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->project->empty;?></span>
<span class="text-muted"><?php echo $lang->doc->noDoc;?></span>
</p>
</div>
<?php else:?>
@@ -35,7 +35,9 @@
<tr>
<th class="c-name"><?php echo $lang->doc->title;?></th>
<th class="c-num"><?php echo $lang->doc->size;?></th>
<?php if($type != 'openedbyme'):?>
<th class="c-user"><?php echo $lang->doc->addedBy;?></th>
<?php endif;?>
<th class="c-datetime"><?php echo $lang->doc->addedDate;?></th>
<th class="c-datetime"><?php echo $lang->doc->editedDate;?></th>
<th class="w-90px text-center"><?php echo $lang->actions;?></th>
@@ -48,7 +50,9 @@
<tr>
<td class="c-name"><?php echo html::a($this->createLink('doc', 'view', "docID=$doc->id&version=0&from={$lang->navGroup->doc}"), "<i class='icon icon-file-text text-muted'></i> &nbsp;" . $doc->title, '', "title={$doc->title}");?></td>
<td class="c-num"><?php echo $doc->fileSize ? $doc->fileSize : '-';?></td>
<?php if($type != 'openedbyme'):?>
<td class="c-user"><?php echo zget($users, $doc->addedBy);?></td>
<?php endif;?>
<td class="c-datetime"><?php echo formatTime($doc->addedDate, 'y-m-d');?></td>
<td class="c-datetime"><?php echo formatTime($doc->editedDate, 'y-m-d');?></td>
<td class="c-actions">
+20 -20
View File
@@ -26,10 +26,10 @@ class personnel extends control
*/
public function accessible($programID = 0, $deptID = 0, $browseType='browse', $param = 0, $recTotal = 0, $recPerPage = 15, $pageID = 1)
{
$this->setProgramMenu($programID);
$this->loadModel('program')->setMenu($programID);
$this->app->loadLang('user');
$program = $this->loadModel('program')->getByID($programID);
$program = $this->program->getByID($programID);
/* Set the pager. */
$this->app->loadClass('pager', true);
@@ -72,8 +72,7 @@ class personnel extends control
*/
public function invest($programID = 0)
{
$this->setProgramMenu($programID);
commonModel::setAppObjectID('program', $programID);
$this->loadModel('program')->setMenu($programID);
$this->view->title = $this->lang->personnel->invest;
$this->view->position[] = $this->lang->personnel->invest;
@@ -99,7 +98,14 @@ class personnel extends control
*/
public function whitelist($objectID = 0, $module = 'personnel', $objectType = 'program', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1, $programID = 0, $from = '')
{
if($module == 'personnel') $this->setProgramMenu($objectID);
if($this->app->openApp == 'program')
{
$this->loadModel('program')->setMenu($objectID);
}
else if($this->app->openApp == 'project')
{
$this->loadModel('project')->setMenu($objectID);
}
if($module == 'product')
{
@@ -149,7 +155,15 @@ class personnel extends control
*/
public function addWhitelist($objectID = 0, $deptID = 0, $objectType = 'program', $module = 'personnel', $programID = 0, $from = '')
{
if($module == 'personnel') $this->setProgramMenu($objectID);
if($this->app->openApp == 'program')
{
$this->loadModel('program')->setMenu($objectID);
}
else if($this->app->openApp == 'project')
{
$this->loadModel('project')->setMenu($objectID);
}
$this->app->loadLang('execution');
if($_POST)
@@ -214,18 +228,4 @@ class personnel extends control
die(js::reload('parent'));
}
}
/*
* Setting up the program menu.
*
* @param int $programID
* @access public
* @return void
*/
public function setProgramMenu($programID = 0)
{
$this->loadModel('program');
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID);
commonModel::setAppObjectID('program', $programID);
}
}
+21 -27
View File
@@ -56,7 +56,7 @@ class product extends control
if($this->app->getViewType() != 'mhtml') unset($this->lang->product->menu->index);
$productID = $this->product->saveState($productID, $this->products);
$branch = (int)$this->cookie->preBranch;
//$this->product->setMenu($this->products, $productID, $branch);
//$this->product->setMenu($productID, $branch);
if(common::hasPriv('product', 'create')) $this->lang->TRActions = html::a($this->createLink('product', 'create'), "<i class='icon icon-sm icon-plus'></i> " . $this->lang->product->create, '', "class='btn btn-primary'");
@@ -77,8 +77,7 @@ class product extends control
*/
public function project($status = 'all', $productID = 0, $branch = 0, $involved = 0)
{
$this->product->setMenu($this->products, $productID, $branch);
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
$this->product->setMenu($productID, $branch);
$this->app->loadLang('my');
$this->app->loadLang('execution');
@@ -116,12 +115,15 @@ class product extends control
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @param string $from product|project
* @param int $projectID
* @access public
* @return void
*/
public function browse($productID = 0, $branch = 0, $browseType = '', $param = 0, $storyType = 'story', $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1, $from = 'product')
public function browse($productID = 0, $branch = 0, $browseType = '', $param = 0, $storyType = 'story', $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1, $projectID = 0)
{
if($this->app->openApp == 'product') $this->product->setMenu($productID, $branch);
if($this->app->openApp == 'project') $this->loadModel('project')->setMenu($projectID);
/* Lower browse type. */
$browseType = strtolower($browseType);
@@ -130,7 +132,7 @@ class product extends control
$this->loadModel('execution');
/* Set product, module and query. */
$productID = $this->app->rawModule != 'projectstory' ? $this->product->saveState($productID, $this->products) : $productID;
$productID = $this->app->openApp != 'projectstory' ? $this->product->saveState($productID, $this->products) : $productID;
$branch = ($branch === '') ? (int)$this->cookie->preBranch : (int)$branch;
setcookie('preProductID', $productID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
setcookie('preBranch', (int)$branch, $this->config->cookieLife, $this->config->webRoot, '', false, true);
@@ -161,7 +163,6 @@ class product extends control
$this->session->set('productList', $this->app->getURI(true));
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID, "storyType=$storyType", $branch);
$this->product->setMenu($this->products, $productID, $branch);
}
/* Set moduleTree. */
@@ -289,10 +290,11 @@ class product extends control
$this->view->storyBugs = $storyBugs;
$this->view->storyCases = $storyCases;
$this->view->param = $param;
$this->view->projectID = $projectID;
$this->view->products = $this->products;
$this->view->projectProducts = isset($projectProducts) ? $projectProducts : array();
$this->view->storyType = $storyType;
$this->view->from = $from;
$this->view->from = $this->app->openApp;
$this->display();
}
@@ -321,8 +323,6 @@ class product extends control
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locate));
}
if($programID) commonModel::setAppObjectID('program', $programID);
$this->loadModel('user');
$poUsers = $this->user->getPairs('nodeleted|pofirst|noclosed', '', $this->config->maxCount);
if(!empty($this->config->user->moreLink)) $this->config->moreLinks["PO"] = $this->config->user->moreLink;
@@ -361,9 +361,7 @@ class product extends control
*/
public function edit($productID, $action = 'edit', $extra = '', $programID = 0)
{
/* Set menu. */
$this->app->loadLang('custom');
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
/* Init vars. */
$product = $this->product->getById($productID);
@@ -451,7 +449,7 @@ class product extends control
}
$productID = $this->product->saveState($productID, $this->products);
$this->product->setMenu($this->products, $productID);
$this->product->setMenu($productID);
$moduleIndex = array_search('product', $this->lang->noMenuModule);
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
@@ -598,7 +596,7 @@ class product extends control
die(js::reload('parent.parent'));
}
$this->product->setMenu($this->products, $productID);
$this->product->setMenu($productID);
$this->view->product = $product;
$this->view->title = $this->view->product->name . $this->lang->colon .$this->lang->close;
@@ -622,10 +620,9 @@ class product extends control
$moduleIndex = array_search('product', $this->lang->noMenuModule);
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
$product->desc = $this->loadModel('file')->setImgSize($product->desc);
$this->product->setMenu($this->products, $productID);
$this->product->setMenu($productID);
/* Load pager. */
$this->app->loadClass('pager', $static = true);
@@ -680,7 +677,7 @@ class product extends control
public function roadmap($productID, $branch = 0)
{
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID, '', $branch);
$this->product->setMenu($this->products, $productID, $branch);
$this->product->setMenu($productID, $branch);
$this->session->set('releaseList', $this->app->getURI(true));
$this->session->set('productPlanList', $this->app->getURI(true));
@@ -725,7 +722,7 @@ class product extends control
$this->session->set('caseList', $uri);
$this->session->set('testtaskList', $uri);
$this->product->setMenu($this->products, $productID);
$this->product->setMenu($productID);
/* Append id for secend sort. */
$orderBy = $direction == 'next' ? 'date_desc' : 'date_asc';
@@ -782,10 +779,8 @@ class product extends control
$product = $this->product->getStatByID($productID);
if(!$product) die(js::locate('product', 'all'));
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
$product->desc = $this->loadModel('file')->setImgSize($product->desc);
$this->product->setMenu($this->products, $productID);
$this->product->setMenu($productID);
/* Load pager. */
$this->app->loadClass('pager', $static = true);
@@ -818,10 +813,10 @@ class product extends control
$products = $this->product->getProductPairsByProject($executionID);
if(empty($products))
{
die(printf($this->lang->build->noProduct, $this->createLink('execution', 'manageproducts', "executionID=$executionID&from=buildCreate"), 'project'));
die(printf($this->lang->build->noProduct, $this->createLink('execution', 'manageproducts', "executionID=$executionID&from=buildCreate", '', 'true'), 'project'));
}
die(html::select('product', $products, empty($product) ? '' : $product->id, "onchange='loadBranches(this.value);' class='form-control chosen' required"));
die(html::select('product', $products, empty($product) ? '' : $product->id, "onchange='loadBranches(this.value);' class='form-control chosen' required data-toggle='modal' data-type='iframe'"));
}
/**
@@ -1101,7 +1096,7 @@ class product extends control
public function whitelist($productID = 0, $module = 'product', $objectType = 'product', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID, '', 0);
$this->product->setMenu($this->products, $productID, 0);
$this->product->setMenu($productID, 0);
$this->lang->modulePageNav = '';
echo $this->fetch('personnel', 'whitelist', "objectID=$productID&module=product&browseType=$objectType&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
@@ -1118,8 +1113,7 @@ class product extends control
*/
public function addWhitelist($productID = 0, $deptID = 0, $branch = '')
{
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID, '', $branch);
$this->product->setMenu($this->products, $productID, $branch);
$this->product->setMenu($productID, $branch);
$moduleIndex = array_search('product', $this->lang->noMenuModule);
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
$this->lang->modulePageNav = '';
@@ -1223,7 +1217,7 @@ class product extends control
/* Get current product. */
$productID = $this->product->saveState($productID, $this->products);
$product = $this->product->getById($productID);
$this->product->setMenu($this->products, $productID, $branch);
$this->product->setMenu($productID, $branch);
/* Set menu.*/
$this->session->set('buildList', $this->app->getURI(true));
+23 -31
View File
@@ -13,37 +13,6 @@
<?php
class productModel extends model
{
/**
*
* Set menu.
*
* @param array $products
* @param int $productID
* @param int $branch
* @param int $module
* @param string $moduleType
* @param string $extra
*
* @access public
* @return void
*/
public function setMenu($products, $productID, $branch = 0, $module = 0, $moduleType = '', $extra = '')
{
$product = $this->getByID($productID);
if($product)
{
$this->getModuleNav($products, '', $product, $extra, $branch, $module, $moduleType);
}
foreach($this->lang->product->menu as $key => $menu)
{
$replace = array();
$replace['productID'] = $productID;
$replace['branch'] = $branch;
common::setMenuVars($this->lang->product->menu, $key, $replace);
}
}
/**
* Get product module menu.
*
@@ -1694,4 +1663,27 @@ class productModel extends model
}
}
}
/**
*
* Set menu.
*
* @param int $productID
* @param int $branch
* @param int $module
* @param string $moduleType
* @param string $extra
*
* @access public
* @return void
*/
public function setMenu($productID, $branch = 0, $module = 0, $moduleType = '', $extra = '')
{
$product = $this->getByID($productID);
if(!$product) return;
$this->lang->switcherMenu = $this->getSwitcher($productID, $extra, $branch);
$params = array('branch' => $branch);
common::setMenuVars('product', $productID, $params);
}
}
+12 -9
View File
@@ -14,7 +14,7 @@
<?php include '../../common/view/datatable.fix.html.php';?>
<?php js::set('browseType', $browseType);?>
<?php js::set('productID', $productID);?>
<?php js::set('projectID', $this->session->PRJ);?>
<?php js::set('projectID', $projectID);?>
<?php js::set('branch', $branch);?>
<?php js::set('rawModule', $this->app->rawModule);?>
<?php
@@ -135,18 +135,23 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
<ul class='dropdown-menu'>
<li>
<?php
$openApp = $isProjectStory ? 'project' : 'product';
if(commonModel::isTutorialMode())
{
$wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID");
if($isProjectStory) $wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID&storyID=&projectID={$this->session->PRJ}");
if($isProjectStory) $wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID&storyID=&projectID=$projectID");
$link = $this->createLink('tutorial', 'wizard', "module=story&method=create&params=$wizardParams");
echo html::a($link, $lang->story->createCommon, '', "data-group='$openApp'");
}
else
{
$link = $this->createLink('story', 'create', "product=$productID&branch=$branch&moduleID=$moduleID&storyID=0&projectID=0&bugID=0&planID=0&todoID=0&extra=&type=$storyType");
if($isProjectStory) $link = $this->createLink('story', 'create', "product=$productID&branch=$branch&moduleID=$moduleID&storyID=0&projectID={$this->session->PRJ}");
if($from == 'project')
{
$link = $this->createLink('story', 'create', "product=$productID&branch=$branch&moduleID=$moduleID&storyID=0&projectID=$projectID");
}
else
{
$link = $this->createLink('story', 'create', "product=$productID&branch=$branch&moduleID=$moduleID&storyID=0&projectID=0&bugID=0&planID=0&todoID=0&extra=&type=$storyType");
}
$disabled = '';
if(!common::hasPriv('story', 'create'))
{
@@ -183,7 +188,7 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
echo "<i class='icon-link'></i> {$lang->execution->linkStory} <span class='caret'></span>";
echo '</button>';
echo "<ul class='dropdown-menu pull-right' id='linkActionMenu'>";
if(common::hasPriv('projectstory', 'linkStory')) echo '<li>' . html::a($this->createLink('projectstory', 'linkStory', "project={$this->session->PRJ}"), $lang->execution->linkStory). "</li>";
if(common::hasPriv('projectstory', 'linkStory')) echo '<li>' . html::a($this->createLink('projectstory', 'linkStory', "project=$projectID"), $lang->execution->linkStory). "</li>";
if(common::hasPriv('projectstory', 'importPlanStories') and !empty($productID)) echo '<li>' . html::a('#linkStoryByPlan', $lang->execution->linkStoryByPlan, '', 'data-toggle="modal"') . "</li>";
echo '</ul>';
}
@@ -217,9 +222,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 $projectID = $isProjectStory ? $this->session->PRJ : 0;?>
<?php $openApp = $isProjectStory ? 'project' : 'product';?>
<?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='$openApp'");?>
<?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 endif;?>
</p>
</div>
+1 -4
View File
@@ -22,9 +22,8 @@ class productplan extends control
*/
public function commonAction($productID, $branch = 0)
{
$this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID, '', $branch);
$this->loadModel('product')->setMenu($productID, $branch);
$this->loadModel('product');
$this->app->loadConfig('execution');
$product = $this->product->getById($productID);
if(empty($product)) $this->locate($this->createLink('product', 'create'));
@@ -61,8 +60,6 @@ class productplan extends control
$this->commonAction($productID, $branchID);
$lastPlan = $this->productplan->getLast($productID, $branchID, $parent);
if($productID) commonModel::setAppObjectID('product', $productID);
if($lastPlan)
{
$timestamp = strtotime($lastPlan->end);
+6 -9
View File
@@ -98,12 +98,11 @@ class program extends control
$programID = $this->program->saveState($programID, $this->program->getPairs());
setCookie("lastProgram", $programID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
$this->program->setMenu($programID);
$program = $this->program->getByID($programID);
if(empty($program) || $program->type != 'program') die(js::error($this->lang->notFound) . js::locate('back'));
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
commonModel::setAppObjectID('program', $programID);
/* Load pager and get tasks. */
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
@@ -389,15 +388,14 @@ class program extends control
public function project($programID = 0, $browseType = 'all', $orderBy = 'order_desc', $recTotal = 0, $recPerPage = 15, $pageID = 1)
{
$programID = $this->program->saveState($programID, $this->program->getPairs());
if(!$programID) $this->locate($this->createLink('program', 'browse'));
setCookie("lastProgram", $programID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
if(!$programID) $this->locate($this->createLink('program', 'browse'));
$this->program->setMenu($programID);
$this->app->session->set('programProject', $this->app->getURI(true));
$this->app->session->set('projectList', $this->app->getURI(true));
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
commonModel::setAppObjectID('program', $programID);
$this->loadModel('datatable');
/* Load pager and get tasks. */
@@ -436,8 +434,7 @@ class program extends control
*/
public function stakeholder($programID = 0, $orderBy = 't1.id_desc', $recTotal = 0, $recPerPage = 15, $pageID = 1)
{
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
commonModel::setAppObjectID('program', $programID);
$this->program->setMenu($programID);
/* Load pager and get tasks. */
$this->app->loadClass('pager', $static = true);
+6
View File
@@ -834,4 +834,10 @@ class programModel extends model
return $budgetUnitList;
}
public function setMenu($programID)
{
$this->lang->switcherMenu = $this->getSwitcher($programID);
common::setMenuVars('program', $programID);
}
}
+1 -1
View File
@@ -16,7 +16,7 @@ js::set('programID', $programID);
js::set('browseType', $browseType);
?>
<style>
.project-type-label.label-outline {width: 47px;}
.project-type-label.label-outline {width: 50px;}
</style>
<div id="mainMenu" class="clearfix">
<div class="btn-toolBar pull-left">
+193 -55
View File
@@ -177,6 +177,8 @@ class project extends control
$this->lang->noMenuModule[] = 'project';
$projectID = $this->project->saveState($projectID, $this->project->getPairsByProgram());
$this->project->setMenu($projectID);
$project = $this->project->getByID($projectID);
if(empty($project) || $project->type != 'project') die(js::error($this->lang->notFound) . js::locate('back'));
@@ -291,11 +293,7 @@ class project extends control
}
}
if($programID)
{
$this->lang->program->switcherMenu = $this->loadModel('program')->getSwitcher($programID, true);
commonModel::setAppObjectID('program', $programID);
}
if($programID) $this->program->setMenu($programID);
$this->lang->noMenuModule[] = 'project';
@@ -375,9 +373,6 @@ class project extends control
$project = $this->project->getByID($projectID);
$programID = $project->parent;
/* Navigation stay in program when enter from program list. */
$this->adjustNavigation($from, $programID);
if($_POST)
{
$changes = $this->project->update($projectID);
@@ -389,7 +384,7 @@ class project extends control
$this->action->logHistory($actionID, $changes);
}
$locateLink = $this->session->PRJBrowse ? $this->session->PRJBrowse : inLink('view', "projectID=$projectID");
$locateLink = $this->session->projectBrowse ? $this->session->projectBrowse : inLink('view', "projectID=$projectID");
if($from == 'program') $locateLink = $this->createLink('program', 'browse');
if($from == 'programProject') $locateLink = $this->session->programProject ? $this->session->programProject : $this->createLink('program', 'project', "projectID=$projectID");
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locateLink));
@@ -456,9 +451,6 @@ class project extends control
{
$this->loadModel('action');
/* Navigation stay in project when enter from project list. */
$this->adjustNavigation($from, $projectID);
if($this->post->names)
{
$allChanges = $this->project->batchUpdate();
@@ -500,8 +492,8 @@ class project extends control
*/
public function view($projectID = 0)
{
$this->project->setMenu($projectID);
$this->app->loadLang('bug');
$this->lang->project->menu = $this->lang->scrum->setMenu;
$moduleIndex = array_search('project', $this->lang->noMenuModule);
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
@@ -545,7 +537,8 @@ class project extends control
*/
public function group($projectID = 0, $programID = 0)
{
$this->lang->project->menu = $this->lang->scrum->setMenu;
$this->project->setMenu($projectID);
$moduleIndex = array_search('project', $this->lang->noMenuModule);
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
@@ -604,7 +597,7 @@ class project extends control
*/
public function dynamic($projectID = 0, $type = 'today', $param = '', $recTotal = 0, $date = '', $direction = 'next')
{
$this->lang->noMenuModule[] = 'project';
$this->project->setMenu($projectID);
/* Save session. */
$uri = $this->app->getURI(true);
@@ -671,6 +664,182 @@ class project extends control
$this->locate($this->createLink('execution', 'all', "status=all&projectID=$projectID", '', false));
}
/**
* Project qa dashboard.
*
* @param int $projectID
* @access public
* @return void
*/
public function qa($projectID = 0)
{
$this->project->setMenu($projectID);
$this->view->title = $this->lang->project->qa;
$this->display();
}
/**
* Project bug list.
*
* @param int $projectID
* @param string $orderBy
* @param int $build
* @param string $type
* @param int $param
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @access public
* @return void
*/
public function bug($projectID = 0, $orderBy = 'status,id_desc', $build = 0, $type = 'all', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Load these two models. */
$this->loadModel('bug');
$this->loadModel('user');
/* Save session. */
$this->session->set('bugList', $this->app->getURI(true), 'qa');
$this->project->setMenu($projectID);
$project = $this->project->getByID($projectID);
$type = strtolower($type);
$queryID = ($type == 'bysearch') ? (int)$param : 0;
$products = $this->project->getProducts($projectID);
$productID = key($products); // Get the first product for creating bug.
$branchID = isset($products[$productID]) ? $products[$productID]->branch : 0;
/* Header and position. */
$title = $project->name . $this->lang->colon . $this->lang->bug->common;
$position[] = html::a($this->createLink('project', 'browse', "projectID=$projectID"), $project->name);
$position[] = $this->bug->common;
/* Load pager and get bugs, user. */
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
$sort = $this->loadModel('common')->appendOrder($orderBy);
$bugs = $this->bug->getProjectBugs($projectID, $build, $type, $param, $sort, '', $pager);
$users = $this->user->getPairs('noletter');
/* team member pairs. */
$memberPairs = array();
$memberPairs[] = "";
foreach($this->view->teamMembers as $key => $member)
{
$memberPairs[$key] = $member->realname;
}
/* Build the search form. */
$actionURL = $this->createLink('project', 'bug', "projectID=$projectID&orderBy=$orderBy&build=$build&type=bysearch&queryID=myQueryID");
$this->execution->buildBugSearchForm($products, $queryID, $actionURL);
/* Assign. */
$this->view->title = $title;
$this->view->position = $position;
$this->view->bugs = $bugs;
$this->view->tabID = 'bug';
$this->view->build = $this->loadModel('build')->getById($build);
$this->view->buildID = $this->view->build ? $this->view->build->id : 0;
$this->view->pager = $pager;
$this->view->orderBy = $orderBy;
$this->view->users = $users;
$this->view->productID = $productID;
$this->view->branchID = empty($this->view->build->branch) ? $branchID : $this->view->build->branch;
$this->view->memberPairs = $memberPairs;
$this->view->type = $type;
$this->view->param = $param;
$this->display();
}
/**
* Project case list.
*
* @param int $projectID
* @param string $type
* @param string $orderBy
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @access public
* @return void
*/
public function testcase($projectID = 0, $type = 'all', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$this->loadModel('testcase');
$this->loadModel('testtask');
$this->project->setMenu($projectID);
$products = $this->project->getProducts($projectID);
$productID = key($products); // Get the first product for creating testcase.
/* Load pager. */
$this->app->loadClass('pager', $static = true);
$pager = pager::init($recTotal, $recPerPage, $pageID);
$cases = $this->loadModel('testcase')->getProjectCases($projectID, $orderBy, $pager, $type);
$cases = $this->testcase->appendData($cases, 'run');
$this->view->title = $this->lang->execution->testcase;
$this->view->projectID = $projectID;
$this->view->productID = $productID;
$this->view->cases = $cases;
$this->view->orderBy = $orderBy;
$this->view->pager = $pager;
$this->view->type = $type;
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->execution = $this->execution->getByID($executionID);
$this->display();
}
/**
* Project test task list.
*
* @param int $projectID
* @param string $orderBy
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @access public
* @return void
*/
public function testtask($projectID = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$this->loadModel('testtask');
/* Save session. */
$this->session->set('testtaskList', $this->app->getURI(true), 'qa');
$this->project->setMenu($projectID);
/* Load pager. */
$this->app->loadClass('pager', $static = true);
$pager = pager::init($recTotal, $recPerPage, $pageID);
$productTasks = array();
$project = $this->project->getByID($projectID);
$tasks = $this->testtask->getProjectTasks($projectID, $orderBy, $pager);
foreach($tasks as $key => $task) $productTasks[$task->product][] = $task;
$this->view->title = $project->name . $this->lang->colon . $this->lang->project->common;
$this->view->position[] = html::a($this->createLink('project', 'testtask', "projectID=$projectID"), $project->name);
$this->view->position[] = $this->lang->testtask->common;
$this->view->project = $project;
$this->view->projectID = $projectID;
$this->view->projectName = $project->name;
$this->view->pager = $pager;
$this->view->orderBy = $orderBy;
$this->view->tasks = $productTasks;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
$this->view->products = $this->loadModel('product')->getPairs('', 0);
$this->view->canBeChanged = common::canModify('execution', $execution); // Determines whether an object is editable.
$this->display();
}
/**
* Browse builds of a project.
*
@@ -683,7 +852,8 @@ class project extends control
{
/* Load module and get project. */
$this->loadModel('build');
$project = $this->project->getByID($projectID);
$project = $this->project->getByID($projectID);
$this->project->setMenu($projectID);
$this->session->set('buildList', $this->app->getURI(true));
@@ -854,8 +1024,8 @@ class project extends control
*/
public function manageMembers($projectID, $dept = '')
{
$this->lang->navGroup->project = 'project';
$this->lang->project->menu = $this->lang->scrum->setMenu;
$this->project->setMenu($projectID);
$moduleIndex = array_search('project', $this->lang->noMenuModule);
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
@@ -1196,7 +1366,6 @@ class project extends control
/**
* Get white list personnel.
*
* @param int $programID
* @param int $projectID
* @param string $module
* @param string $from project|program|programProject
@@ -1208,20 +1377,15 @@ class project extends control
* @access public
* @return void
*/
public function whitelist($programID = 0, $projectID = 0, $module = 'project', $from = 'project', $objectType = 'project', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function whitelist($projectID = 0, $module = 'project', $from = 'project', $objectType = 'project', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
if($from == 'project')
{
$this->lang->project->menu = $this->lang->scrum->setMenu;
$this->project->setMenu($projectID);
$moduleIndex = array_search('project', $this->lang->noMenuModule);
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
}
if($from == 'programproject')
{
$this->app->rawMethod = 'programproject';
$this->lang->navGroup->project = 'project';
$this->lang->project->switcherMenu = $this->loadModel('program')->getSwitcher($programID, true);
}
echo $this->fetch('personnel', 'whitelist', "objectID=$projectID&module=$module&browseType=$objectType&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID&projectID=$projectID&from=$from");
}
@@ -1238,9 +1402,6 @@ class project extends control
*/
public function addWhitelist($projectID = 0, $deptID = 0, $programID = 0, $from = 'project')
{
/* Navigation stay in project when enter from project list. */
$this->adjustNavigation($from, $projectID);
echo $this->fetch('personnel', 'addWhitelist', "objectID=$projectID&dept=$deptID&objectType=project&module=project&programID=$programID&from=$from");
}
@@ -1268,8 +1429,7 @@ class project extends control
*/
public function manageProducts($projectID, $programID = 0, $from = 'project')
{
/* Navigation stay in project when enter from project list. */
$this->adjustNavigation($from, $projectID);
$this->project->setMenu($projectID);
if(!empty($_POST))
{
@@ -1289,7 +1449,7 @@ class project extends control
$diffProducts = array_merge(array_diff($oldProducts, $newProducts), array_diff($newProducts, $oldProducts));
if($diffProducts) $this->loadModel('action')->create('project', $projectID, 'Managed', '', !empty($_POST['products']) ? join(',', $_POST['products']) : '');
$locateLink = $this->session->PRJBrowse ? $this->session->PRJBrowse : inLink('manageProducts', "projectID=$projectID");
$locateLink = $this->session->projectBrowse ? $this->session->projectBrowse : inLink('manageProducts', "projectID=$projectID");
if($from == 'program') $locateLink = $this->createLink('program', 'browse');
if($from == 'programproject') $locateLink = $this->session->programProject ? $this->session->programProject : inLink('programProject', "projectID=$projectID");
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locateLink));
@@ -1364,26 +1524,4 @@ class project extends control
}
die(json_encode($response));
}
/**
* Adjust the navigation.
*
* @param string $from
* @param int $objectID projectID|programID
* @access public
* @return void
*/
public function adjustNavigation($from = '', $objectID = 0)
{
if($from == 'project')
{
$this->lang->project->menu = $this->lang->scrum->setMenu;
$moduleIndex = array_search('project', $this->lang->noMenuModule);
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
}
else if($from == 'pgmproject')
{
$this->lang->program->switcherMenu = $this->loadModel('program')->getSwitcher($objectID, true);
}
}
}
+1 -1
View File
@@ -5,7 +5,7 @@ $(function()
if(executions.length == 0)
{
alert(createExecution);
location.href = createLink('execution', 'create', 'productID=&executionID=&copyExecutionID=&planID=&confirm=&projectID=' + projectID);
location.href = createLink('execution', 'create', 'projectID=' + projectID);
return false;
}
});
+25 -9
View File
@@ -34,7 +34,6 @@ class projectModel extends model
{
echo(js::alert($this->lang->project->accessDenied));
unset($_SESSION['PRJ']);
die(js::locate(helper::createLink('project', 'index')));
}
@@ -115,16 +114,16 @@ class projectModel extends model
*/
public function saveState($projectID = 0, $projects = array())
{
if($projectID > 0) $this->session->set('PRJ', (int)$projectID);
if($projectID == 0 and $this->cookie->lastProject) $this->session->set('PRJ', (int)$this->cookie->lastProject);
if($projectID == 0 and $this->session->PRJ == '') $this->session->set('PRJ', key($projects));
if(!isset($projects[$this->session->PRJ]))
if($projectID > 0) $this->session->set('project', (int)$projectID);
if($projectID == 0 and $this->cookie->lastProject) $this->session->set('project', (int)$this->cookie->lastProject);
if($projectID == 0 and $this->session->project == '') $this->session->set('project', key($projects));
if(!isset($projects[$this->session->project]))
{
$this->session->set('PRJ', key($projects));
if($projectID && strpos(",{$this->app->user->view->projects},", ",{$this->session->PRJ},") === false) $this->accessDenied();
$this->session->set('project', key($projects));
if($projectID && strpos(",{$this->app->user->view->projects},", ",{$this->session->project},") === false) $this->accessDenied();
}
return $this->session->PRJ;
return $this->session->project;
}
/*
@@ -1570,7 +1569,7 @@ class projectModel extends model
}
/* In the case of the waterfall model, calculate the sub-stage. */
$project = $this->getByID($this->session->PRJ);
$project = $this->getByID($projectID);
if($project and $project->model == 'waterfall')
{
foreach($parents as $id => $execution)
@@ -1585,4 +1584,21 @@ class projectModel extends model
return array_merge($parents, $orphan);
}
/**
* Set menu of project module.
*
* @param int $objectID projectID
* @access public
* @return void
*/
public function setMenu($objectID)
{
$project = $this->getByID($objectID);
$this->lang->project->menu = $this->lang->{$project->model}->menu;
$this->lang->project->menuOrder = $this->lang->{$project->model}->menuOrder;
$this->lang->switcherMenu = $this->getSwitcher($objectID, $this->app->rawModule, $this->app->rawMethod);
common::setMenuVars('project', $objectID);
}
}
+1 -1
View File
@@ -17,7 +17,7 @@ js::set('programID', $programID);
js::set('browseType', $browseType);
?>
<style>
.project-type-label.label-outline {width: 47px;}
.project-type-label.label-outline {width: 50px;}
</style>
<div id="mainMenu" class="clearfix">
<?php if($this->config->systemMode == 'new'):?>
+164
View File
@@ -0,0 +1,164 @@
<?php
/**
* The bug view file of execution module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package execution
* @version $Id: bug.html.php 4894 2013-06-25 01:28:39Z wyd621@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php
$buildName = $build ? " <span class='label label-danger'>Build:{$build->name}</span>" : '';
echo html::a($this->inlink('bug', "executionID={$execution->id}&orderBy=status,id_desc&build=$buildID&type=all"), "<span class='text'>{$lang->bug->allBugs}</span>" . ($type == 'all' ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>$buildName" : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
echo html::a($this->inlink('bug', "executionID={$execution->id}&orderBy=status,id_desc&build=$buildID&type=unresolved"), "<span class='text'>{$lang->bug->unResolved}</span>" . ($type == 'unresolved' ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>$buildName" : ''), '', "id='unresolvedTab' class='btn btn-link" . ('unresolved' == $type ? ' btn-active-text' : '') . "'");
?>
<a class="btn btn-link querybox-toggle" id="bysearchTab"><i class="icon icon-search muted"></i> <?php echo $lang->bug->search;?></a>
</div>
<div class="btn-toolbar pull-right">
<?php common::printLink('bug', 'export', "productID=$productID&orderBy=$orderBy&browseType=&executionID=$execution->id", "<i class='icon icon-export muted'> </i>" . $lang->bug->export, '', "class='btn btn-link export'");?>
<?php if(common::canModify('execution', $execution)) common::printLink('bug', 'create', "productID=$productID&branch=$branchID&extras=executionID=$execution->id", "<i class='icon icon-plus'></i> " . $lang->bug->create, '', "class='btn btn-primary'");?>
</div>
</div>
<div id="mainContent">
<div class="cell <?php if($type == 'bysearch') echo 'show';?>" id="queryBox" data-module='executionBug'></div>
<?php if(empty($bugs)):?>
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->bug->noBug;?></span>
<?php if(common::canModify('execution', $execution) and common::hasPriv('bug', 'create')):?>
<?php echo html::a($this->createLink('bug', 'create', "productID=$productID&branch=$branchID&extra=executionID=$execution->id"), "<i class='icon icon-plus'></i> " . $lang->bug->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>
</div>
<?php else:?>
<form class='main-table' method='post' id='executionBugForm' data-ride="table">
<table class='table has-sort-head' id='bugList'>
<?php $canBatchAssignTo = common::hasPriv('bug', 'batchAssignTo');?>
<?php $vars = "executionID={$execution->id}&orderBy=%s&build=$buildID&type=$type&param=$param&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
<thead>
<tr>
<th class='c-id'>
<?php if($canBatchAssignTo):?>
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
<label></label>
</div>
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='w-80px'> <?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></th>
<th class='c-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-110px c-user'><?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->assignedToAB);?></th>
<th class='w-100px'><?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedBy);?></th>
<th class='w-100px'><?php common::printOrderLink('resolution', $orderBy, $vars, $lang->bug->resolutionAB);?></th>
<th class='c-actions-5'><?php echo $lang->actions;?></th>
</tr>
</thead>
<?php
$hasCustomSeverity = false;
foreach($lang->bug->severityList as $severityKey => $severityValue)
{
if(!empty($severityKey) and (string)$severityKey != (string)$severityValue)
{
$hasCustomSeverity = true;
break;
}
}
?>
<tbody>
<?php foreach($bugs as $bug):?>
<?php
$canBeChanged = common::canBeChanged('bug', $bug);
$arrtibute = $canBeChanged ? '' : 'disabled';
?>
<tr>
<td class='cell-id'>
<?php if($canBatchAssignTo):?>
<?php echo html::checkbox('bugIDList', array($bug->id => ''), '', $arrtibute) . html::a(helper::createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id));?>
<?php else:?>
<?php printf('%03d', $bug->id);?>
<?php endif;?>
</td>
<td>
<?php if($hasCustomSeverity):?>
<span class='<?php echo 'label-severity-custom';?>' title='<?php echo zget($lang->bug->severityList, $bug->severity);?>' data-severity='<?php echo $bug->severity;?>'><?php echo zget($lang->bug->severityList, $bug->severity, $bug->severity);?></span>
<?php else:?>
<span class='<?php echo 'label-severity';?>' title='<?php echo zget($lang->bug->severityList, $bug->severity);?>' data-severity='<?php echo $bug->severity;?>'></span>
<?php endif;?>
</td>
<td><span class='label-pri <?php echo 'label-pri-' . $bug->pri?>' title='<?php echo zget($lang->bug->priList, $bug->pri, $bug->pri)?>'><?php echo zget($lang->bug->priList, $bug->pri, $bug->pri)?></span></td>
<td class='text-left' title="<?php echo $bug->title?>"><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title, null, "style='color: $bug->color'");?></td>
<td><?php echo zget($users, $bug->openedBy, $bug->openedBy);?></td>
<td class='c-assignedTo has-btn text-left'><?php $this->bug->printAssignedHtml($bug, $users);?></td>
<td><?php echo zget($users, $bug->resolvedBy, $bug->resolvedBy);?></td>
<td><?php echo zget($lang->bug->resolutionList, $bug->resolution);?></td>
<td class='c-actions'>
<?php
if($canBeChanged)
{
$params = "bugID=$bug->id";
common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'ok', '', 'iframe', true);
common::printIcon('bug', 'resolve', $params, $bug, 'list', 'checked', '', 'iframe', true);
common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true);
common::printIcon('bug', 'create', "product=$bug->product&branch=$bug->branch&extra=$params", $bug, 'list', 'copy');
common::printIcon('bug', 'edit', $params, $bug, 'list');
}
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<div class='table-footer'>
<?php if($canBatchAssignTo):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar">
<div class="btn-group dropup">
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->bug->assignedTo?> <span class="caret"></span></button>
<?php
$withSearch = count($memberPairs) > 10;
$actionLink = $this->createLink('bug', 'batchAssignTo', "executionID={$execution->id}&type=execution");
echo html::select('assignedTo', $memberPairs, '', 'class="hidden"');
if($withSearch)
{
echo "<div class='dropdown-menu search-list search-box-sink' data-ride='searchList'>";
echo '<div class="input-control search-box has-icon-left has-icon-right search-example">';
echo '<input id="userSearchBox" type="search" class="form-control search-input" autocomplete="off" />';
echo '<label for="userSearchBox" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>';
echo '<a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a>';
echo '</div>';
$membersPinYin = common::convert2Pinyin($memberPairs);
}
else
{
echo "<div class='dropdown-menu search-list'>";
}
echo '<div class="list-group">';
foreach($memberPairs as $key => $value)
{
if(empty($key)) continue;
$searchKey = $withSearch ? ('data-key="' . zget($membersPinYin, $value, '') . " @$key\"") : "data-key='@$key'";
echo html::a("javascript:$(\".table-actions #assignedTo\").val(\"$key\");setFormAction(\"$actionLink\")", $value, '', $searchKey);
}
echo "</div>";
echo "</div>";
?>
</div>
</div>
<?php endif;?>
<?php $pager->show('right', 'pagerjs');?>
</div>
</form>
<?php endif;?>
</div>
<?php js::set('replaceID', 'bugList');?>
<?php js::set('browseType', $type);?>
<?php include '../../common/view/footer.html.php';?>
+1 -1
View File
@@ -15,7 +15,7 @@
<?php js::set('confirmDelete', $lang->group->confirmDelete);?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<?php echo html::backButton($lang->goback, '', 'btn-secondary');?>
<?php // echo html::backButton($lang->goback, '', 'btn-secondary');?>
<span class='btn btn-link btn-active-text'><span class='text'><?php echo $lang->group->browse;?></span></span>
</div>
<div class='btn-toolbar pull-right'>
+2
View File
@@ -0,0 +1,2 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/footer.html.php';?>
+78
View File
@@ -0,0 +1,78 @@
<?php include '../../common/view/header.html.php';?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php echo html::a(inlink('testcase', "executionID=$executionID&type=$type&orderBy=$orderBy"), "<span class='text'>{$lang->execution->all}</span>", '', "class='btn btn-link btn-active-text'");?>
</div>
<div class="btn-toolbar pull-right">
<?php if(common::canModify('execution', $execution)) echo html::a(helper::createLink('testcase', 'create', "productID=$productID&branch=0&moduleID=0&from=execution&param=$execution->id", '', '', '', true), "<i class='icon icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-primary' data-app='execution'");?>
</div>
</div>
<div id="mainContent">
<?php if(empty($cases)):?>
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->testcase->noCase;?></span>
<?php if(common::canModify('execution', $execution) and common::hasPriv('testcase', 'create')):?>
<?php echo html::a(helper::createLink('testcase', 'create', "productID=$productID&branch=0&moduleID=0&from=execution&param=$execution->id", '', '', '', true), "<i class='icon icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-info' data-app='execution'");?>
<?php endif;?>
</p>
</div>
<?php else:?>
<form class='main-table' method='post' id='executionBugForm' data-ride="table">
<table class='table has-sort-head' id='bugList'>
<?php $vars = "executionID=$executionID&type=$type&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
<thead>
<tr>
<th class='w-50px'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-50px'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->testcase->title);?></th>
<th class='w-type'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->typeAB);?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-80px'> <?php common::printOrderLink('lastRunner', $orderBy, $vars, $lang->testtask->lastRunAccount);?></th>
<th class='w-120px'> <?php common::printOrderLink('lastRunDate', $orderBy, $vars, $lang->testtask->lastRunTime);?></th>
<th class='w-80px'> <?php common::printOrderLink('lastRunResult', $orderBy, $vars, $lang->testtask->lastRunResult);?></th>
<th class='c-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='c-actions-5 text-center'> <?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($cases as $case):?>
<?php
$caseID = $type == 'assigntome' ? $case->case : $case->id;
$runID = $type == 'assigntome' ? $case->id : 0;
$canBeChanged = common::canBeChanged('testcase', $case);
?>
<tr>
<td class="c-id">
<?php echo sprintf('%03d', $case->id); ?>
</td>
<td><span class='label-pri <?php echo 'label-pri-' . $case->pri?>' title='<?php echo zget($lang->testcase->priList, $case->pri, $case->pri);?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri)?></span></td>
<?php $params = "testcaseID=$caseID&version=$case->version";?>
<?php if($type == 'assigntome') $params .= "&from=testtask&taskID=$case->task";?>
<td class='text-left'><?php echo html::a($this->createLink('testcase', 'view', $params, '', '', $case->project), $case->title, null, "style='color: $case->color' data-group='project'");?></td>
<td><?php echo zget($lang->testcase->typeList, $case->type);?></td>
<td><?php echo zget($users, $case->openedBy);?></td>
<td><?php echo zget($users, $case->lastRunner);?></td>
<td><?php if(!helper::isZeroDate($case->lastRunDate)) echo date(DT_MONTHTIME1, strtotime($case->lastRunDate));?></td>
<td class='<?php echo $case->lastRunResult;?>'><?php if($case->lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?></td>
<td class='<?php if(isset($run)) echo $run->status;?>'><?php echo $this->processStatus('testcase', $case);?></td>
<td class='c-actions'>
<?php
if($canBeChanged)
{
common::printIcon('testcase', 'createBug', "product=$case->product&branch=$case->branch&extra=caseID=$caseID,version=$case->version,runID=$runID", $case, 'list', 'bug', '', '', '', '', '', $case->project);
common::printIcon('testcase', 'create', "productID=$case->product&branch=$case->branch&moduleID=$case->module&from=testcase&param=$caseID", $case, 'list', 'copy', '', '', '', '', '', $case->project);
common::printIcon('testtask', 'runCase', "runID=$runID&caseID=$caseID&version=$case->version", '', 'list', 'play', '', 'iframe', true, "data-width='95%'", '', $case->project);
common::printIcon('testtask', 'results', "runID=$runID&caseID=$caseID", '', 'list', 'list-alt', '', 'iframe', true, "data-width='95%'", '', $case->project);
common::printIcon('testcase', 'edit', "caseID=$caseID", $case, 'list', 'edit', '', '', '', '', '', $case->project);
}
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</form>
<?php endif;?>
</div>
<?php include '../../common/view/footer.html.php';?>
+146
View File
@@ -0,0 +1,146 @@
<?php
/**
* The browse view file of testtask module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id: browse.html.php 1914 2011-06-24 10:11:25Z yidong@cnezsoft.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('confirmDelete', $lang->testtask->confirmDelete)?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php if(!empty($tasks)):?>
<div class="pull-left table-group-btns">
<button type="button" class="btn btn-link group-collapse-all"><?php echo $lang->testtask->collapseAll;?> <i class="icon-fold-all muted"></i></button>
<button type="button" class="btn btn-link group-expand-all"><?php echo $lang->testtask->expandAll;?> <i class="icon-unfold-all muted"></i></button>
</div>
<?php endif;?>
<?php $total = 0;?>
<?php foreach($tasks as $productTasks) $total += count($productTasks);?>
<a href='' class='btn btn-link btn-active-text'>
<span class='text'><?php echo $lang->testtask->browse;?></span>
<span class="label label-light label-badge"><?php echo $total;?></span>
</a>
</div>
<div class="btn-toolbar pull-right">
<?php if(common::canModify('execution', $execution)):?>
<?php common::printIcon('testreport', 'browse', "objectID=$executionID&objectType=execution", '', 'button','flag muted');?>
<?php common::printLink('testtask', 'create', "product=0&executionID=$executionID&build=&projectID=$execution->project", "<i class='icon icon-plus'></i> " . $lang->testtask->create, '', "class='btn btn-primary'");?>
<?php endif;?>
</div>
</div>
<div id="mainContent">
<?php if(empty($tasks)):?>
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->testtask->noTesttask;?></span>
<?php if(common::canModify('execution', $execution) and common::hasPriv('testtask', 'create')):?>
<?php echo html::a($this->createLink('testtask', 'create', "product=0&execution=$executionID"), "<i class='icon icon-plus'></i> " . $lang->testtask->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>
</div>
<?php else:?>
<form class="main-table table-testtask" data-ride="table" data-group="true" method="post" target='hiddenwin' id='testtaskForm'>
<table class="table table-grouped has-sort-head" id='taskList'>
<thead>
<?php $vars = "executionID=$executionID&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
<?php $canTestReport = ($canBeChanged and common::hasPriv('testreport', 'browse'));?>
<tr class='<?php if($total) echo 'divider'; ?>'>
<th class='c-side text-center'><?php common::printOrderLink('product', $orderBy, $vars, $lang->testtask->product);?></th>
<th class="c-id">
<?php if($canTestReport):?>
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
<label></label>
</div>
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th><?php common::printOrderLink('name', $orderBy, $vars, $lang->testtask->name);?></th>
<th><?php common::printOrderLink('build', $orderBy, $vars, $lang->testtask->build);?></th>
<th class='w-user'><?php common::printOrderLink('owner', $orderBy, $vars, $lang->testtask->owner);?></th>
<th class='w-100px'><?php common::printOrderLink('begin', $orderBy, $vars, $lang->testtask->begin);?></th>
<th class='w-100px'><?php common::printOrderLink('end', $orderBy, $vars, $lang->testtask->end);?></th>
<th class='w-80px'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='c-actions-5 text-center'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($tasks as $product => $productTasks):?>
<?php $productName = zget($products, $product, '');?>
<?php foreach($productTasks as $task):?>
<tr data-id='<?php echo $product;?>' <?php if($task == reset($productTasks)) echo "class='divider-top'";?>>
<?php if($task == reset($productTasks)):?>
<td rowspan='<?php echo count($productTasks);?>' class='c-side text-left group-toggle'>
<a class='text-primary' title='<?php echo $productName;?>'><i class='icon icon-caret-down'></i> <?php echo $productName;?></a>
<div class='small'><span class='text-muted'><?php echo $lang->testtask->allTasks;?></span> <?php echo count($productTasks);?></div>
</td>
<?php endif;?>
<td class="c-id">
<?php if($canTestReport):?>
<?php echo html::checkbox('taskIdList', array($task->id => sprintf('%03d', $task->id)));?>
<?php else:?>
<?php printf('%03d', $task->id);?>
<?php endif;?>
</td>
<td class='text-left' title="<?php echo $task->name?>"><?php echo html::a($this->createLink('testtask', 'view', "taskID=$task->id"), $task->name);?></td>
<td title="<?php echo $task->buildName?>"><?php echo ($task->build == 'trunk' || empty($task->buildName)) ? $lang->trunk : html::a($this->createLink('build', 'view', "buildID=$task->build"), $task->buildName);?></td>
<td><?php echo zget($users, $task->owner);?></td>
<td><?php echo $task->begin?></td>
<td><?php echo $task->end?></td>
<?php $status = $this->processStatus('testtask', $task);?>
<td title='<?php echo $status;?>'>
<span class='status-testtask status-<?php echo $task->status?>'><?php echo $status;?></span>
</td>
<td class='c-actions'>
<?php
if($canBeChanged)
{
common::printIcon('testtask', 'cases', "taskID=$task->id", $task, 'list', 'sitemap');
common::printIcon('testtask', 'linkCase', "taskID=$task->id", $task, 'list', 'link');
common::printIcon('testreport', 'browse', "objectID=$task->product&objectType=product&extra=$task->id", $task, 'list','flag');
common::printIcon('testtask', 'edit', "taskID=$task->id", $task, 'list');
if(common::hasPriv('testtask', 'delete', $task))
{
$deleteURL = $this->createLink('testtask', 'delete', "taskID=$task->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"taskList\", confirmDelete)", '<i class="icon-trash"></i>', '', "class='btn' title='{$lang->testtask->delete}'");
}
}
?>
</td>
</tr>
<?php endforeach;?>
<tr data-id='<?php echo $product;?>' class='group-toggle group-summary divider hidden'>
<td class='c-side text-left'>
<a title='<?php echo $productName;?>'><i class='icon-caret-right text-muted'></i> <?php echo $productName;?></a>
</td>
<td colspan='8' class='text-left'>
<div class='small with-padding'>
<span class='text-muted'><?php echo $lang->testtask->allTasks;?></span> <?php echo count($productTasks);?>
</div>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<div class="table-footer">
<?php if($canTestReport):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar">
<?php
$actionLink = $this->createLink('testreport', 'browse', "objectID=$executionID&objctType=execution");
$misc = common::hasPriv('testreport', 'browse') ? "onclick=\"setFormAction('$actionLink', '', '#testtaskForm')\"" : "disabled='disabled'";
echo html::commonButton($lang->testreport->common, $misc);
?>
</div>
<?php endif;?>
<?php $pager->show('right', 'pagerjs');?>
</div>
</form>
<?php endif;?>
</div>
<?php include '../../common/view/footer.html.php';?>
+5 -4
View File
@@ -27,6 +27,7 @@ class projectrelease extends control
$products = array();
$this->loadModel('product');
$this->loadModel('release');
$this->loadModel('project');
$this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->PRJ);
if(empty($this->view->products)) $this->locate($this->createLink('product', 'create'));
}
@@ -52,7 +53,7 @@ class projectrelease extends control
$this->view->product = $product;
$this->view->branches = (isset($product->type) and $product->type == 'normal') ? array() : $this->loadModel('branch')->getPairs($productID);
$this->view->branch = $branch;
$this->view->project = $this->loadModel('project')->getByID($this->session->PRJ);
$this->view->project = $this->project->getByID($this->session->PRJ);
}
/**
@@ -69,8 +70,8 @@ class projectrelease extends control
$this->session->set('releaseList', $this->app->getURI(true));
$execution = $this->loadModel('execution')->getById($this->session->PRJ);
if($projectID) commonModel::setAppObjectID('project', $projectID);
if($executionID) commonModel::setAppObjectID('execution', $executionID);
if($projectID) $this->project->setMenu($projectID);
if($executionID) $this->loadModel('execution')->setMenu($executionID, $this->app->rawModule, $this->app->rawMethod);
$this->view->title = $execution->name . $this->lang->colon . $this->lang->release->browse;
$this->view->position[] = $this->lang->release->browse;
@@ -114,7 +115,7 @@ class projectrelease extends control
foreach($releaseBuilds as $build) unset($builds[$build]);
unset($builds['trunk']);
commonModel::setAppObjectID('project', $projectID);
$this->project->setMenu($projectID);
$this->commonAction();
$this->view->title = $this->view->project->name . $this->lang->colon . $this->lang->release->create;
+4 -8
View File
@@ -30,6 +30,7 @@ class projectStory extends control
/**
* Get software requirements from product.
*
* @param int $projectID
* @param int $productID
* @param int $branch
* @param string $browseType
@@ -42,16 +43,11 @@ class projectStory extends control
* @access public
* @return void
*/
public function story($productID = 0, $branch = 0, $browseType = '', $param = 0, $storyType = 'story', $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function story($projectID = 0, $productID = 0, $branch = 0, $browseType = '', $param = 0, $storyType = 'story', $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$this->session->set('storyList', $this->app->getURI(true));
$this->session->set('storyList', $this->app->getURI(true), 'project');
$this->lang->story->title = str_replace($this->lang->SRCommon, $this->lang->SRCommon, $this->lang->story->title);
$this->lang->story->createRequirement = str_replace($this->lang->SRCommon, $this->lang->SRCommon, $this->lang->story->createRequirement);
$this->lang->story->createStory = str_replace($this->lang->SRCommon, $this->lang->SRCommon, $this->lang->story->createStory);
$this->lang->story->noStory = str_replace($this->lang->SRCommon, $this->lang->SRCommon, $this->lang->story->noStory);
echo $this->fetch('product', 'browse', "productID=$productID&branch=$branch&browseType=$browseType&param=$param&storyType=$storyType&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID&from=project");
echo $this->fetch('product', 'browse', "productID=$productID&branch=$branch&browseType=$browseType&param=$param&storyType=$storyType&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID&projectID=$projectID");
}
/**
-1
View File
@@ -28,7 +28,6 @@ class qa extends control
$productID = $this->product->saveState($productID, $products);
$branch = (int)$this->cookie->preBranch;
$this->qa->setMenu($products, $productID, $branch);
commonModel::setAppObjectID('qa', $productID);
$this->view->title = $this->lang->qa->index;
$this->view->position[] = $this->lang->qa->index;
+3 -3
View File
@@ -23,8 +23,7 @@ class qaModel extends model
*/
public function setMenu($products, $productID, $branch = 0, $extra = '')
{
$this->loadModel('product')->setMenu($products, $productID, $branch);
$selectHtml = $this->product->select($products, $productID, 'qa', 'index', $extra, $branch);
$selectHtml = $this->loadModel('product')->select($products, $productID, 'qa', 'index', $extra, $branch);
$productIndex = '';
$isMobile = $this->app->viewType == 'mhtml';
@@ -39,7 +38,8 @@ class qaModel extends model
$productIndex .= $selectHtml;
}
if($this->lang->navGroup->qa == 'qa') $this->lang->qa->switcherMenu = $this->product->getSwitcher($productID, $extra, $branch);
if($this->app->rawModule != 'qa') $this->lang->switcherMenu = $this->product->getSwitcher($productID, $extra, $branch);
common::setMenuVars('qa', $productID);
}
/**
+1 -4
View File
@@ -21,9 +21,8 @@ class release extends control
*/
public function commonAction($productID, $branch = 0)
{
$this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID, '', $branch);
$this->loadModel('product')->setMenu($productID, $branch);
$this->loadModel('product');
$product = $this->product->getById($productID);
if(empty($product)) $this->locate($this->createLink('product', 'create'));
$this->view->product = $product;
@@ -81,8 +80,6 @@ class release extends control
foreach($releaseBuilds as $build) unset($builds[$build]);
unset($builds['trunk']);
commonModel::setAppObjectID('product', $productID);
$this->commonAction($productID, $branch);
$this->view->title = $this->view->product->name . $this->lang->colon . $this->lang->release->create;
$this->view->position[] = $this->lang->release->create;
+33 -17
View File
@@ -27,24 +27,35 @@ class repo extends control
die(js::locate('back'));
}
/* Set repo menu group. */
$this->projectID = isset($_GET['project']) ? $_GET['project'] : 0;
if(!$this->projectID)
{
$this->lang->navGroup->repo = 'repo';
$this->lang->navGroup->jenkins = 'repo';
$this->lang->navGroup->job = 'repo';
$this->lang->navGroup->compile = 'repo';
}
$this->scm = $this->app->loadClass('scm');
$this->repos = $this->repo->getRepoPairs($this->projectID);
if(empty($this->repos) and $this->methodName != 'create') die(js::locate($this->repo->createLink('create')));
/* Unlock session for wait to get data of repo. */
session_write_close();
}
/**
* Common actions.
*
* @param int $objectID projectID|executionID
* @access public
* @return void
*/
public function commonAction($objectID)
{
if($this->app->openApp == 'project')
{
/* Set repo menu group. */
$this->scm = $this->app->loadClass('scm');
$this->repos = $this->repo->getRepoPairs($objectID);
if(empty($this->repos) and $this->methodName != 'create') die(js::locate($this->repo->createLink('create', "objectID=$objectID")));
$this->loadModel('project')->setMenu($objectID);
}
else if($this->app->openApp == 'execution')
{
$executions = $this->loadModel('execution')->getPairs(0, 'all', 'nocode');
$this->execution->setMenu($executions, $objectID);
}
}
/**
* List all repo.
*
@@ -81,10 +92,11 @@ class repo extends control
/**
* Create a repo.
*
* @param int $objectID projectID|executionID
* @access public
* @return void
*/
public function create()
public function create($objectID)
{
if($_POST)
{
@@ -96,6 +108,8 @@ class repo extends control
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $link));
}
$this->commonAction($objectID);
array_push($this->lang->noMenuModule, 'repo');
$this->app->loadLang('action');
$this->repo->setMenu($this->repos, '', false);
@@ -282,14 +296,16 @@ class repo extends control
* Browse repo.
*
* @param int $repoID
* @param string $path
* @param int $objectID
* @param string $revision
* @param int $refresh
* @access public
* @return void
*/
public function browse($repoID = 0, $path = '', $revision = 'HEAD', $refresh = 0)
public function browse($repoID = 0, $objectID = 0, $revision = 'HEAD', $refresh = 0)
{
$this->commonAction($objectID);
/* Get path and refresh. */
if($this->get->repoPath) $path = $this->get->repoPath;
if(empty($refresh) and $this->cookie->repoRefresh) $refresh = $this->cookie->repoRefresh;
+1 -4
View File
@@ -93,10 +93,7 @@ class repoModel extends model
$this->lang->modulePageNav = $repoIndex;
}
foreach($this->lang->repo->menu as $key => $menu)
{
common::setMenuVars($this->lang->repo->menu, $key, $repoID);
}
common::setMenuVars('devops', $repoID);
session_start();
$this->session->set('repoID', $repoID);
+1 -1
View File
@@ -12,7 +12,7 @@
?>
<?php include '../../common/view/header.html.php';?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'><?php common::printAdminSubMenu('system');?></div>
<div class='btn-toolbar pull-left'><?php // common::printAdminSubMenu('system');?></div>
</div>
<div id='mainContent' class='main-content'>
<div class='main-header'>
+1
View File
@@ -179,6 +179,7 @@ class settingModel extends model
$config = array();
foreach($records as $record)
{
if(!isset($config[$record->owner])) $config[$record->owner] = new stdclass();
if(!isset($record->module)) return array(); // If no module field, return directly. Since 3.2 version, there's the module field.
if(empty($record->module)) continue;
+1 -6
View File
@@ -67,12 +67,7 @@ class stakeholder extends control
if($programID)
{
$this->loadModel('program');
$this->app->rawModule = 'program';
$this->app->rawMethod = 'stakeholder';
$this->lang->navGroup->program = 'program';
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
$this->loadModel('program')->setMenu($programID);
$this->view->members = $this->loadModel('project')->getTeamMemberPairs($programID);
}
else
+40 -15
View File
@@ -49,8 +49,14 @@ class story extends control
public function create($productID = 0, $branch = 0, $moduleID = 0, $storyID = 0, $objectID = 0, $bugID = 0, $planID = 0, $todoID = 0, $extra = '', $type = 'story')
{
$this->story->replaceURLang($type);
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
commonModel::setAppObjectID($this->app->openApp, $this->app->openApp == 'product' ? $productID : $objectID);
if($this->app->openApp == 'product')
{
$this->loadModel('product')->setMenu($productID);
}
else if($this->app->openApp == 'project')
{
$this->loadModel('project')->setMenu($objectID);
}
/* Whether there is a object to transfer story, for example feedback. */
$extra = str_replace(array(',', ' '), array('&', ''), $extra);
@@ -267,6 +273,18 @@ class story extends control
}
}
/* Get block id of assinge to me. */
$blockID = 0;
if(isonlybody())
{
$blockID = $this->dao->select('id')->from(TABLE_BLOCK)
->where('block')->eq('assingtome')
->andWhere('module')->eq('my')
->andWhere('account')->eq($this->app->user->account)
->orderBy('order_desc')
->fetch('id');
}
/* Set Custom. */
foreach(explode(',', $this->config->story->list->customCreateFields) as $field) $customFields[$field] = $this->lang->story->$field;
$this->view->customFields = $customFields;
@@ -297,6 +315,7 @@ class story extends control
$this->view->verify = $verify;
$this->view->keywords = $keywords;
$this->view->mailto = $mailto;
$this->view->blockID = $blockID;
$this->view->URS = $type == 'story' ? $this->story->getRequierements($productID) : '';
$this->view->needReview = ($this->app->user->account == $product->PO || $objectID > 0 || $this->config->story->needReview == 0) ? "checked='checked'" : "";
$this->view->type = $type;
@@ -827,9 +846,18 @@ class story extends control
/* Set the menu. */
$from = $this->app->openApp;
if($from == 'execution' or $from == 'project')
if($from == 'execution')
{
commonModel::setAppObjectID($from, $param);
$executions = $this->loadModel('execution')->getPairs(0, 'all', 'nocode');
$this->execution->setMenu($executions, $param);
}
elseif($from == 'project')
{
$this->loadModel('project')->setMenu($param);
}
elseif($from == 'product')
{
$this->product->setMenu($story->product, $story->branch);
}
$this->executeHooks($storyID);
@@ -1345,8 +1373,8 @@ class story extends control
{
$products = $this->product->getPairs();
$productID = $this->product->saveState($productID, $products);
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID, '', $branch);
$this->product->setMenu($products, $productID, $branch);
$this->product->products = $this->product->saveState($productID, $products);
$this->product->setMenu($productID, $branch);
}
/* Save session. */
@@ -1438,20 +1466,17 @@ class story extends control
$this->session->set('productList', $this->app->getURI(true));
$products = $this->product->getPairs();
$this->lang->navGroup->story = $from;
if($from == 'project')
$moduleIndex = array_search('story', $this->lang->noMenuModule);
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
if($from == 'qa')
{
$moduleIndex = array_search('story', $this->lang->noMenuModule);
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
}
else
{
$this->app->loadConfig('qa');
$this->loadModel('qa');
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
}
$this->lang->story->menu = $this->lang->testcase->menu;
$this->lang->story->menu = $this->lang->qa->subMenu->testcase;
$this->lang->story->menuOrder = $this->lang->testcase->menuOrder;
$this->loadModel('testcase')->setMenu($products, $productID);
+4
View File
@@ -21,3 +21,7 @@ function refreshPlan()
{
$('a.refresh').click();
}
$(window).unload(function(){
if(blockID) window.parent.refreshBlock($('#block' + blockID));
});
+1
View File
@@ -12,6 +12,7 @@
?>
<?php include './header.html.php';?>
<?php js::set('holders', $lang->story->placeholder); ?>
<?php js::set('blockID', $blockID); ?>
<?php if(common::checkNotCN()):?>
<style> .sourceTd > .input-group > .input-group > .input-group-addon:first-child{padding: 5px 18px} </style>
<?php endif;?>
+22 -6
View File
@@ -39,10 +39,9 @@ class task extends control
*/
public function create($executionID = 0, $storyID = 0, $moduleID = 0, $taskID = 0, $todoID = 0)
{
commonModel::setAppObjectID('execution', $executionID);
$executions = $this->execution->getPairs();
$executionID = $this->execution->saveState($executionID, $executions);
$this->execution->setMenu($executions, $executionID);
$this->execution->getLimitedExecution();
$limitedExecutions = !empty($_SESSION['limitedExecutions']) ? $_SESSION['limitedExecutions'] : '';
@@ -192,6 +191,18 @@ class task extends control
}
$stories = $this->story->getExecutionStoryPairs($executionID, 0, 0, $moduleIdList, 'full', 'unclosed');
/* Get block id of assinge to me. */
$blockID = 0;
if(isonlybody())
{
$blockID = $this->dao->select('id')->from(TABLE_BLOCK)
->where('block')->eq('assingtome')
->andWhere('module')->eq('my')
->andWhere('account')->eq($this->app->user->account)
->orderBy('order_desc')
->fetch('id');
}
$title = $execution->name . $this->lang->colon . $this->lang->task->create;
$position[] = html::a($taskLink, $execution->name);
$position[] = $this->lang->task->common;
@@ -214,6 +225,7 @@ class task extends control
$this->view->stories = $stories;
$this->view->testStoryIdList = $this->loadModel('story')->getTestStories(array_keys($stories), $execution->id);
$this->view->members = $members;
$this->view->blockID = $blockID;
$this->view->moduleOptionMenu = $moduleOptionMenu;
$this->display();
}
@@ -462,9 +474,13 @@ class task extends control
/* The tasks of my. */
else
{
$this->lang->task->menu = $this->lang->my->menu;
$this->lang->task->menuOrder = $this->lang->my->menuOrder;
/* Set my menu. */
$this->loadModel('my')->setMenu();
$moduleIndex = array_search('task', $this->lang->noMenuModule);
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
$this->lang->task->menu = $this->lang->my->workMenu;
$this->lang->my->menu->myWork['subModule'] = 'task';
$this->view->position[] = html::a($this->createLink('my', 'task'), $this->lang->my->task);
$this->view->title = $this->lang->task->batchEdit;
$this->view->users = $this->loadModel('user')->getPairs('noletter');
@@ -787,8 +803,8 @@ class task extends control
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
}
$this->session->set('estimateList', $this->app->getURI(true));
if(isonlybody() && $this->config->requestType != 'GET') $this->session->set('estimateList', $this->app->getURI(true) . '?onlybody=yes');
$this->session->set('estimateList', $this->app->getURI(true), 'execution');
if(isonlybody() && $this->config->requestType != 'GET') $this->session->set('estimateList', $this->app->getURI(true) . '?onlybody=yes', 'execution');
$this->view->task = $this->task->getById($taskID);
$this->view->estimates = $this->task->getTaskEstimate($taskID);
+4
View File
@@ -46,3 +46,7 @@ $(document).on('change', 'select', function()
}
});
$(function()
{
$('#subNavbar li[data-id="task"]').addClass('active');
});
+4
View File
@@ -474,3 +474,7 @@ $('#modalTeam .btn').click(function()
$('#estimate').val(time);
})
});
$(window).unload(function(){
if(blockID) window.parent.refreshBlock($('#block' + blockID));
});
+1 -1
View File
@@ -91,7 +91,7 @@ js::set('dittoNotice', $dittoNotice);
<?php $disableHour = (isset($teams[$taskID]) or $tasks[$taskID]->parent < 0) ? "disabled='disabled'" : '';?>
<?php
$members = array('' => '', 'ditto' => $this->lang->task->ditto);
$teamAccounts = array_keys($executionTeams[$tasks[$taskID]->execution]);
$teamAccounts = !empty($executionTeams[$tasks[$taskID]->execution]) ? array_keys($executionTeams[$tasks[$taskID]->execution]) : array();
foreach($teamAccounts as $teamAccount) $members[$teamAccount] = $users[$teamAccount];
$members['closed'] = 'Closed';
+1
View File
@@ -14,6 +14,7 @@
<?php include '../../common/view/kindeditor.html.php';?>
<?php include '../../common/view/sortable.html.php';?>
<?php js::set('toTaskList', !empty($task->id));?>
<?php js::set('blockID', $blockID);?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
+3 -3
View File
@@ -799,7 +799,6 @@ class testcase extends control
$this->view->title = $product->name . $this->lang->colon . $this->lang->testcase->batchEdit;
}
}
/* The cases of my. */
else
{
/* Get the edited cases. */
@@ -809,9 +808,10 @@ class testcase extends control
->fetchAll('id');
$caseIDList = array_keys($cases);
$this->lang->testcase->menu = $this->lang->my->menu;
$this->lang->testcase->menuOrder = $this->lang->my->menuOrder;
/* The cases of my. */
$this->loadModel('my')->setMenu();
$this->lang->testcase->menu = $this->lang->my->workMenu;
$this->lang->my->menu->myWork['subModule'] = 'testcase';
$this->view->position[] = html::a($this->server->http_referer, $this->lang->my->testCase);
$this->view->title = $this->lang->testcase->batchEdit;
+1
View File
@@ -37,6 +37,7 @@ function loadBranches(product, branch, caseID)
$(function()
{
removeDitto(); //Remove 'ditto' in first row.
$('#subNavbar li[data-id="testcase"]').addClass('active');
});
$(document).on('click', '.chosen-with-drop', function(){oldValue = $(this).prev('select').val();})//Save old value.
+23 -34
View File
@@ -27,40 +27,7 @@ class testcaseModel extends model
*/
public function setMenu($products, $productID, $branch = 0, $moduleID = 0, $suiteID = 0, $orderBy = 'id_desc')
{
$this->loadModel('product')->setMenu($products, $productID, $branch, $moduleID, 'case');
$selectHtml = $this->product->select($products, $productID, 'testcase', 'browse', '', $branch, $moduleID, 'case');
$pageNav = '';
$pageActions = '';
$isMobile = $this->app->viewType == 'mhtml';
if($isMobile)
{
$this->app->loadLang('qa');
$pageNav = html::a(helper::createLink('qa', 'index'), $this->lang->qa->index) . $this->lang->colon;
}
$pageNav .= $selectHtml;
$this->lang->modulePageNav = $pageNav;
$this->lang->TRActions = $pageActions;
foreach($this->lang->testcase->menu as $key => $menu)
{
if($this->lang->navGroup->testcase != 'qa') $this->loadModel('qa')->setSubMenu('testcase', $key, $productID);
$replace = $productID;
if($this->lang->navGroup->testcase == 'project' and $key == 'bug') $replace = 0;
common::setMenuVars($this->lang->testcase->menu, $key, $replace);
}
if($this->lang->navGroup->testcase == 'qa')
{
foreach($this->lang->qa->subMenu->testcase as $key => $menu)
{
common::setMenuVars($this->lang->qa->subMenu->testcase, $key, $productID);
}
$this->lang->qa->menu = $this->lang->testcase->menu;
$this->lang->testcase->menu = $this->lang->qa->subMenu->testcase;
$this->lang->qa->switcherMenu = $this->product->getSwitcher($productID, '', $branch);
}
$this->loadModel('qa')->setMenu($products, $productID, $branch, $moduleID, 'case');
}
/**
@@ -297,6 +264,28 @@ class testcaseModel extends model
->fetchAll('id');
}
/**
* Get project cases.
*
* @param int $projectID
* @param string $orderBy
* @param object $pager
* @param string $browseType
* @access public
* @return array
*/
public function getProjectCases($projectID, $orderBy = 'id_desc', $pager = null, $browseType = '')
{
return $this->dao->select('distinct t1.*, t2.*')->from(TABLE_PROJECTCASE)->alias('t1')
->leftJoin(TABLE_CASE)->alias('t2')->on('t1.case=t2.id')
->where('t1.project')->eq((int)$projectID)
->beginIF($browseType != 'all')->andWhere('t2.status')->eq($browseType)->fi()
->andWhere('t2.deleted')->eq('0')
->orderBy($orderBy)
->page($pager)
->fetchAll('id');
}
/**
* Get execution cases.
*
+2 -2
View File
@@ -543,10 +543,10 @@ class testreport extends control
$this->products = $this->product->getProductPairsByProject($projectID);
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', 'fromModule=testreport&moduleGroup=' . $this->lang->navGroup->bug . '&activeMenu=report')));
$productID = $this->product->saveState($objectID, $this->products);
$this->testreport->setMenu($this->products, $productID);
$this->loadModel('qa')->setMenu($this->products, $productID);
return $productID;
}
elseif($objectType == 'project')
elseif($objectType == 'execution')
{
$this->executions = $this->execution->getPairs($this->session->PRJ, 'all', 'nocode');
$executionID = $this->execution->saveState($objectID, $this->executions);
-9
View File
@@ -23,16 +23,7 @@ class testreportModel extends model
public function setMenu($products, $productID, $branch = 0)
{
$this->loadModel('product')->setMenu($products, $productID, $branch);
$selectHtml = $this->product->select($products, $productID, 'testreport', 'browse', $this->session->PRJ, $branch);
/* Remove branch. */
if(strpos($selectHtml, 'currentBranch') !== false) $selectHtml = substr($selectHtml, 0, strrpos($selectHtml, "<div class='btn-group'>")) . '</div>';
$pageNav = $selectHtml;
$pageActions = '';
$this->lang->modulePageNav = $pageNav;
$this->lang->TRActions = $pageActions;
foreach($this->lang->testtask->menu as $key => $value)
{
if($this->lang->navGroup->testreport != 'qa') $this->loadModel('qa')->setSubMenu('testreport', $key, $productID);
+2 -2
View File
@@ -72,7 +72,7 @@ class testsuite extends control
$this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($projectID);
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', 'fromModule=testsuite&moduleGroup=' . $this->lang->navGroup->bug . '&activeMenu=testsuite')));
$productID = $this->product->saveState($productID, $this->products);
$this->testsuite->setMenu($this->products, $productID);
$this->loadModel('qa')->setMenu($this->products, $productID);
/* Load pager. */
$this->app->loadClass('pager', $static = true);
@@ -137,7 +137,7 @@ class testsuite extends control
/* Set menu. */
$this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
$productID = $this->product->saveState($productID, $this->products);
$this->testsuite->setMenu($this->products, $productID);
$this->loadModel('qa')->setMenu($this->products, $productID);
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testsuite->create;
$this->view->position[] = html::a($this->createLink('testsuite', 'browse', "productID=$productID"), $this->products[$productID]);
-47
View File
@@ -13,53 +13,6 @@
<?php
class testsuiteModel extends model
{
/**
* Set the menu.
*
* @param array $products
* @param int $productID
* @access public
* @return void
*/
public function setMenu($products, $productID)
{
$this->loadModel('product')->setMenu($products, $productID);
$selectHtml = $this->select($products, $productID, 'testsuite', 'browse');
if(strpos($selectHtml, 'currentBranch') !== false) $selectHtml = substr($selectHtml, 0, strrpos($selectHtml, "<div class='btn-group'>")) . '</div>';
$pageNav = '';
$pageActions = '';
$isMobile = $this->app->viewType == 'mhtml';
if($isMobile)
{
$this->app->loadLang('qa');
$pageNav = html::a(helper::createLink('qa', 'index'), $this->lang->qa->index) . $this->lang->colon;
}
$pageNav .= $selectHtml;
$this->lang->modulePageNav = $pageNav;
$this->lang->TRActions = $pageActions;
foreach($this->lang->testsuite->menu as $key => $value)
{
if($this->config->global->flow == 'full' and $this->lang->navGroup->testcase != 'qa') $this->loadModel('qa')->setSubMenu('testsuite', $key, $productID);
$replace = $productID;
if($this->lang->navGroup->testsuite == 'project' and $key == 'bug') $replace = 0;
common::setMenuVars($this->lang->testsuite->menu, $key, $replace);
}
if($this->lang->navGroup->testsuite == 'qa')
{
foreach($this->lang->qa->subMenu->testcase as $key => $menu)
{
common::setMenuVars($this->lang->qa->subMenu->testcase, $key, $productID);
}
$this->lang->qa->menu = $this->lang->testsuite->menu;
$this->lang->testsuite->menu = $this->lang->qa->subMenu->testcase;
$this->lang->qa->switcherMenu = $this->product->getSwitcher($productID, '', 0);
}
}
/**
* Build select string.
*
+5 -5
View File
@@ -100,7 +100,7 @@ class testtask extends control
/* Set menu. */
$productID = $this->product->saveState($productID, $this->products);
if($branch === '') $branch = (int)$this->cookie->preBranch;
$this->testtask->setMenu($this->products, $productID, $branch);
$this->loadModel('qa')->setMenu($this->products, $productID, $branch);
/* Load pager. */
$this->app->loadClass('pager', $static = true);
@@ -151,7 +151,7 @@ class testtask extends control
/* Set menu. */
$productID = $this->product->saveState($productID, $this->products);
$this->loadModel('testtask')->setUnitMenu($this->products, $productID);
$this->loadModel('qa')->setMenu($this->products, $productID);
/* Load pager. */
if($browseType == 'newest') $recPerPage = '10';
@@ -1094,9 +1094,9 @@ class testtask extends control
/* The case of my. */
else
{
$this->lang->testtask->menu = $this->lang->my->menu;
$this->lang->testtask->menuOrder = $this->lang->my->menuOrder;
$this->loadModel('my')->setMenu();
$this->lang->testtask->menu = $this->lang->my->workMenu;
$this->lang->my->menu->myWork['subModule'] = 'testtask';
$this->view->title = $this->lang->testtask->batchRun;
$cases = $this->dao->select('t1.*,t2.id as runID')->from(TABLE_CASE)->alias('t1')
+5
View File
@@ -10,3 +10,8 @@ $(document).on('keyup', 'form input:text', function()
$(preSelect).val('fail');
}
})
$(function()
{
$('#subNavbar li[data-id="testcase"]').addClass('active');
})
+22 -147
View File
@@ -13,153 +13,6 @@
<?php
class testtaskModel extends model
{
/**
* Set the menu.
*
* @param array $products
* @param int $productID
* @access public
* @return void
*/
public function setMenu($products, $productID, $branch = 0, $testtask = 0)
{
$this->loadModel('product')->setMenu($products, $productID, $branch);
$selectHtml = $this->product->select($products, $productID, 'testtask', 'browse', '', $branch);
if($testtask and $this->app->viewType != 'mhtml')
{
$testtasks = $this->getProductTasks($productID, 0, 'id_desc', null, array('local', 'totalStatus'), 0, 0, $this->session->PRJ);
if(!isset($testtasks[$testtask])) $testtasks[$testtask] = $this->getById($testtask);
$selectHtml .= "<div class='btn-group angle-btn'>";
$selectHtml .= "<div class='btn-group'>";
$selectHtml .= "<a data-toggle='dropdown' class='btn'>" . $testtasks[$testtask]->name . " <span class='caret'></span></a>";
$selectHtml .= "<ul class='dropdown-menu'>";
foreach($testtasks as $testtask) $selectHtml .= '<li>' . html::a(helper::createLink('testtask', 'cases', "taskID=$testtask->id"), "<i class='icon icon-file-o'></i> {$testtask->name}") . '</li>';
$selectHtml .= "</ul>";
$selectHtml .= "</div>";
$selectHtml .= "</div>";
$this->lang->TRActions = '';
if(common::hasPriv('testtask', 'view')) $this->lang->TRActions .= html::a(helper::createLink('testtask', 'view', "taskID={$testtask->id}"), "<i class='icon icon-file-text'> </i>" . $this->lang->testtask->view, '', "class='btn'");
if(common::hasPriv('testreport', 'browse')) $this->lang->TRActions .= html::a(helper::createLink('testreport', 'browse', "objectID=$productID&objectType=product&extra={$testtask->id}"), "<i class='icon icon-flag'> </i>" . $this->lang->testtask->reportField, '', "class='btn'");
}
$this->app->loadLang('qa');
$productIndex = $selectHtml;
$pageNav = '';
$pageActions = '';
$isMobile = $this->app->viewType == 'mhtml';
if($isMobile)
{
$this->app->loadLang('qa');
$pageNav = html::a(helper::createLink('qa', 'index'), $this->lang->qa->index) . $this->lang->colon;
}
$pageNav .= $selectHtml;
$this->lang->modulePageNav = $pageNav;
$this->lang->TRActions = $pageActions;
foreach($this->lang->testtask->menu as $key => $value)
{
if($this->lang->navGroup->testtask != 'qa') $this->loadModel('qa')->setSubMenu('testtask', $key, $productID);
$replace = ($key == 'product') ? $selectHtml : $productID;
if($this->lang->navGroup->testcase == 'project' and $key == 'bug') $replace = 0;
common::setMenuVars($this->lang->testtask->menu, $key, $replace);
}
if($this->lang->navGroup->testtask == 'qa')
{
foreach($this->lang->qa->subMenu->testtask as $key => $menu)
{
common::setMenuVars($this->lang->qa->subMenu->testtask, $key, $productID);
}
$this->lang->qa->menu = $this->lang->testtask->menu;
$this->lang->testtask->menu = $this->lang->qa->subMenu->testtask;
$this->lang->qa->switcherMenu = $this->product->getSwitcher($productID, '', $branch);
}
}
/**
* Set unit menu.
*
* @param array $products
* @param int $productID
* @param int $branch
* @param int $testtask
* @access public
* @return void
*/
public function setUnitMenu($products, $productID, $branch = 0, $testtask = 0)
{
$this->loadModel('product')->setMenu($products, $productID, $branch);
$selectHtml = $this->product->select($products, $productID, 'testtask', 'browseUnits', '', $branch);
if($testtask and $this->app->viewType != 'mhtml')
{
$testtasks = $this->getProductUnitTasks($productID, 'all', 'id_desc');
if(!isset($testtasks[$testtask])) $testtasks[$testtask] = $this->getById($testtask);
$selectHtml .= "<div class='btn-group angle-btn'>";
$selectHtml .= "<div class='btn-group'>";
$selectHtml .= "<a data-toggle='dropdown' class='btn'>" . $testtasks[$testtask]->name . " <span class='caret'></span></a>";
$selectHtml .= "<ul class='dropdown-menu'>";
foreach($testtasks as $testtask) $selectHtml .= '<li>' . html::a(helper::createLink('testtask', 'unitCases', "taskID=$testtask->id"), "<i class='icon icon-file-o'></i> {$testtask->name}") . '</li>';
$selectHtml .= "</ul>";
$selectHtml .= "</div>";
$selectHtml .= "</div>";
}
$this->app->loadLang('qa');
$productIndex = '<div class="btn-group angle-btn"><div class="btn-group">' . html::a(helper::createLink('qa', 'index', 'locate=no'), $this->lang->qa->index, '', "class='btn'") . '</div></div>';
$productIndex .= $selectHtml;
$pageNav = '';
$pageActions = '';
$isMobile = $this->app->viewType == 'mhtml';
if($isMobile)
{
$this->app->loadLang('qa');
$pageNav = html::a(helper::createLink('qa', 'index'), $this->lang->qa->index) . $this->lang->colon;
}
else
{
if($this->config->global->flow == 'full')
{
$this->app->loadLang('qa');
$pageNav = '<div class="btn-group angle-btn"><div class="btn-group">' . html::a(helper::createLink('qa', 'index', 'locate=no'), $this->lang->qa->index, '', "class='btn'") . '</div></div>';
}
}
$pageNav .= $selectHtml;
$this->lang->modulePageNav = $pageNav;
$this->lang->TRActions = $pageActions;
if($this->config->global->flow != 'full') $this->lang->testtask->menu = new stdclass();
foreach($this->lang->testtask->menu as $key => $value)
{
if($this->lang->navGroup->testcase != 'qa') $this->loadModel('qa')->setSubMenu('testtask', $key, $productID);
$replace = ($key == 'product') ? $selectHtml : $productID;
if($this->lang->navGroup->testcase == 'project' and $key == 'bug') $replace = 0;
common::setMenuVars($this->lang->testtask->menu, $key, $replace);
}
if($this->lang->navGroup->testcase == 'project' && $this->app->rawMethod == 'browseunits')
{
$lang->projectQa->menu->testcase['subModule'] = 'testtask';
}
if($this->lang->navGroup->testtask == 'qa')
{
foreach($this->lang->qa->subMenu->testcase as $key => $menu)
{
common::setMenuVars($this->lang->qa->subMenu->testcase, $key, $productID);
}
$this->lang->qa->menu = $this->lang->testcase->menu;
$this->lang->testtask->menu = $this->lang->qa->subMenu->testcase;
$this->lang->qa->switcherMenu = $this->product->getSwitcher($productID, '', $branch);
}
}
/**
* Create a test task.
*
@@ -286,6 +139,28 @@ class testtaskModel extends model
return $tasks;
}
/**
* Get test tasks of a project.
*
* @param int $projectID
* @param string $orderBy
* @param object $pager
* @access public
* @return array
*/
public function getProjectTasks($projectID, $orderBy = 'id_desc', $pager = null)
{
return $this->dao->select('t1.*, t2.name AS buildName')
->from(TABLE_TESTTASK)->alias('t1')
->leftJoin(TABLE_BUILD)->alias('t2')->on('t1.build = t2.id')
->where('t1.project')->eq((int)$projectID)
->andWhere('t1.auto')->ne('unit')
->andWhere('t1.deleted')->eq(0)
->orderBy($orderBy)
->page($pager)
->fetchAll('id');
}
/**
* Get test tasks of a execution.
*
@@ -96,6 +96,8 @@ $(function()
{
$('#<?php echo $browseType?>UnitTab').addClass('selected');
$('#browseunitsTab').addClass('btn-active-text');
$('#navbar li[data-id="testtask"]').removeClass('active');
$('#navbar li[data-id="testcase"]').addClass('active');
})
</script>
<?php include '../../common/view/footer.html.php';?>
+11 -1
View File
@@ -28,10 +28,20 @@ class tree extends control
{
$this->loadModel('product');
if($this->app->openApp == 'product')
{
$this->product->setMenu($rootID);;
}
else if($this->app->openApp == 'qa')
{
$products = $this->product->getPairs('noclosed');
$this->loadModel('qa')->setMenu($products, $rootID);;
}
/* According to the type, set the module root and modules. */
if(strpos('story|bug|case', $viewType) !== false)
{
$product = $this->product->getById($rootID);
$product = $this->loadModel('product')->getById($rootID);
if(empty($product)) $this->locate($this->createLink('product', 'create'));
if(!empty($product->type) && $product->type != 'normal')
{
-5
View File
@@ -636,11 +636,6 @@ class treeModel extends model
if($startModule) $startModulePath = $startModule->path . '%';
}
$manage = $userFunc[1] == 'createBugLink' ? true : false;
/* if not manage, only get linked modules and ignore others. */
if(!$manage) $executionModules = $this->getBugTreeModules($rootID, true);
/* Get module according to product. */
$productNum = count($products);
foreach($products as $id => $product)
+2 -2
View File
@@ -26,7 +26,7 @@ li.tree-item-story > .tree-actions .tree-action[data-type=delete] {display: none
<?php $hasBranch = (strpos('story|bug|case', $viewType) !== false and (!empty($root->type) && $root->type != 'normal')) ? true : false;?>
<?php $name = $viewType == 'line' ? $lang->tree->line : (($viewType == 'doc' or $viewType == 'feedback' or $viewType == 'trainskill' or $viewType == 'trainpost') ? $lang->tree->cate : $lang->tree->name);?>
<?php $title = ($viewType == 'line' or $viewType == 'trainskill' or $viewType == 'trainpost') ? '' : ((strpos($viewType, 'doc') !== false || strpos($viewType, 'feedback') !== false) ? $lang->doc->childType : $lang->tree->child);?>
<div id="mainMenu" class="clearfix">
<!--div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php $backLink = $this->session->{$viewType . 'List'} ? $this->session->{$viewType . 'List'} : 'javascript:history.go(-1)';?>
<?php echo html::a($backLink, '<i class="icon icon-back icon-sm"></i>' . $lang->goback, '', 'class="btn btn-secondary"');?>
@@ -63,7 +63,7 @@ li.tree-item-story > .tree-actions .tree-action[data-type=delete] {display: none
</span>
</div>
</div>
</div>
</div-->
<div id="mainContent" class="main-row">
<div class="side-col col-4">
<div class="panel">
+1 -1
View File
@@ -12,7 +12,7 @@
?>
<?php include '../../common/view/header.html.php';?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'><?php common::printAdminSubMenu('message');?></div>
<div class='btn-toolbar pull-left'><?php // common::printAdminSubMenu('message');?></div>
<div class='btn-toolbar pull-right'>
<div class='btn-group'>
<div class='btn-group' id='createActionMenu'>