Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3
This commit is contained in:
@@ -1874,15 +1874,10 @@ class bug extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetDropMenu($productID, $module, $method, $extra = '', $from = '')
|
||||
public function ajaxGetDropMenu($productID, $module, $method, $extra = '')
|
||||
{
|
||||
if($from == 'qa')
|
||||
{
|
||||
$this->app->loadConfig('qa');
|
||||
foreach($this->config->qa->menuList as $menu) $this->lang->navGroup->$menu = 'qa';
|
||||
}
|
||||
|
||||
$products = $this->product->getProducts($this->session->project, $this->config->CRProduct ? 'all' : 'noclosed', 'program desc, line desc, ');
|
||||
$products = array();
|
||||
if(!empty($extra)) $products = $this->product->getProducts($extra, $this->config->CRProduct ? 'all' : 'noclosed', 'program desc, line desc, ');
|
||||
|
||||
$this->view->link = $this->product->getProductLink($module, $method, $extra);
|
||||
$this->view->productID = $productID;
|
||||
|
||||
@@ -1401,6 +1401,7 @@ class bugModel extends model
|
||||
* Get bugs of a project.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param int $productID
|
||||
* @param int $build
|
||||
* @param string $type
|
||||
* @param int $param
|
||||
@@ -1410,14 +1411,12 @@ class bugModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getProjectBugs($projectID, $build = 0, $type = '', $param = 0, $orderBy = 'id_desc', $excludeBugs = '', $pager = null)
|
||||
public function getProjectBugs($projectID, $productID = 0, $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);
|
||||
|
||||
$queryID = (int)$param;
|
||||
if($this->session->projectBugQuery == false) $this->session->set('projectBugQuery', ' 1 = 1');
|
||||
if($queryID)
|
||||
{
|
||||
@@ -1450,6 +1449,7 @@ class bugModel extends model
|
||||
$bugs = $this->dao->select('*')->from(TABLE_BUG)
|
||||
->where('deleted')->eq(0)
|
||||
->beginIF(empty($build))->andWhere('project')->eq($projectID)->fi()
|
||||
->beginIF(!empty($productID))->andWhere('product')->eq($productID)->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()
|
||||
@@ -1466,6 +1466,7 @@ class bugModel extends model
|
||||
* Get bugs of a execution.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param int $productID
|
||||
* @param int $build
|
||||
* @param string $type
|
||||
* @param int $param
|
||||
@@ -1475,14 +1476,12 @@ class bugModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getExecutionBugs($executionID, $build = 0, $type = '', $param = 0, $orderBy = 'id_desc', $excludeBugs = '', $pager = null)
|
||||
public function getExecutionBugs($executionID, $productID = 0, $build = 0, $type = '', $param = 0, $orderBy = 'id_desc', $excludeBugs = '', $pager = null)
|
||||
{
|
||||
$type = strtolower($type);
|
||||
if($type == 'bysearch')
|
||||
{
|
||||
$queryID = (int)$param;
|
||||
$products = $this->loadModel('execution')->getProducts($executionID);
|
||||
|
||||
$queryID = (int)$param;
|
||||
if($this->session->executionBugQuery == false) $this->session->set('executionBugQuery', ' 1 = 1');
|
||||
if($queryID)
|
||||
{
|
||||
@@ -1515,6 +1514,7 @@ class bugModel extends model
|
||||
$bugs = $this->dao->select('*')->from(TABLE_BUG)
|
||||
->where('deleted')->eq(0)
|
||||
->beginIF(empty($build))->andWhere('execution')->eq($executionID)->fi()
|
||||
->beginIF(!empty($productID))->andWhere('product')->eq($productID)->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()
|
||||
|
||||
@@ -17,7 +17,7 @@ foreach($products as $product)
|
||||
}
|
||||
$productsPinYin = common::convert2Pinyin($productNames);
|
||||
$linkHtml = $this->product->setParamsForLink($module, $link, $projectID, 0);
|
||||
$productsHtml = html::a($linkHtml, $this->lang->bug->allProduct, '', "class='text-important' title='{$this->lang->bug->allProduct}' data-key='" . zget($productsPinYin, $this->lang->bug->allProduct, '') . "' data-group='project'");
|
||||
$productsHtml = html::a($linkHtml, $this->lang->bug->allProduct, '', "class='text-important' title='{$this->lang->bug->allProduct}' data-key='" . zget($productsPinYin, $this->lang->bug->allProduct, '') . "' data-app='{$this->app->openApp}'");
|
||||
|
||||
foreach($products as $product)
|
||||
{
|
||||
@@ -26,7 +26,7 @@ foreach($products as $product)
|
||||
$productName .= $product->line ? zget($lines, $product->line, '') . '/' . $product->name : $product->name;
|
||||
$objectID = ($product->type != 'platform' && $module == 'branch' && $method == 'manage') ? $productID : $product->id;
|
||||
$linkHtml = $this->product->setParamsForLink($module, $link, $projectID, $product->id);
|
||||
$productsHtml .= html::a($linkHtml, $productName, '', "class='text-important $selected' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-group='project'");
|
||||
$productsHtml .= html::a($linkHtml, $productName, '', "class='text-important $selected' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='{$this->app->openApp}'");
|
||||
}
|
||||
?>
|
||||
<div class="table-row">
|
||||
|
||||
@@ -520,8 +520,7 @@ $lang->navGroup->ci = 'devops';
|
||||
$lang->navGroup->svn = 'devops';
|
||||
$lang->navGroup->git = 'devops';
|
||||
|
||||
$lang->navGroup->company = 'system';
|
||||
$lang->navGroup->ldap = 'system';
|
||||
$lang->navGroup->company = 'system';
|
||||
|
||||
$lang->navGroup->attend = 'attend';
|
||||
$lang->navGroup->leave = 'attend';
|
||||
|
||||
@@ -336,7 +336,6 @@ class custom extends control
|
||||
|
||||
unset($this->lang->admin->menu->custom['subModule']);
|
||||
$this->lang->admin->menu->system['subModule'] = 'custom';
|
||||
$this->lang->custom->menu = $this->lang->admin->menu;
|
||||
|
||||
$this->view->title = $this->lang->custom->timezone;
|
||||
$this->view->position[] = $this->lang->custom->timezone;
|
||||
|
||||
@@ -11,9 +11,6 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'><?php // common::printAdminSubMenu('system');?></div>
|
||||
</div>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='mw-500px'>
|
||||
<?php if(!function_exists('date_default_timezone_set')):?>
|
||||
@@ -35,4 +32,11 @@
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('#mainHeader #navbar li[data-id=model]').removeClass('active');
|
||||
})
|
||||
</script>
|
||||
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -221,7 +221,12 @@ class doc extends control
|
||||
$objectType = 'project';
|
||||
$objectID = $execution->project;
|
||||
}
|
||||
if($objectType == 'project' and $this->post->project) $objectID = $this->post->project;
|
||||
if($objectType == 'product' and $this->post->product) $objectID = $this->post->product;
|
||||
if($objectType == 'custom' or $objectType == 'book') $objectID = 0;
|
||||
|
||||
$this->action->create('docLib', $libID, 'Created');
|
||||
|
||||
die(js::locate($this->createLink('doc', 'objectLibs', "type=$objectType&objectID=$objectID&libID=$libID"), 'parent.parent'));
|
||||
}
|
||||
else
|
||||
@@ -491,8 +496,22 @@ class doc extends control
|
||||
else
|
||||
{
|
||||
$this->app->rawMethod = $objectType;
|
||||
|
||||
/* High light menu. */
|
||||
if($objectType)
|
||||
{
|
||||
$menu = $this->lang->doc->menu->$objectType;
|
||||
$menu['alias'] .= ',edit';
|
||||
$menu['subModule'] = 'doc';
|
||||
$this->lang->doc->menu->$objectType = $menu;
|
||||
}
|
||||
}
|
||||
|
||||
$objects = $this->doc->getOrderedObjects($objectType);
|
||||
$libs = $this->doc->getLibsByObject($objectType, $objectID);
|
||||
$this->lang->modulePageNav = $this->doc->select($objectType, $objects, $objectID, $libs, $libID);
|
||||
$this->lang->TRActions = common::hasPriv('doc', 'create') ? $this->doc->buildCreateButton4Doc($objectType, $objectID, $libID) : '';
|
||||
|
||||
$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;
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php $pageCSS .= $this->doc->appendNavCSS();?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php if($doc->contentType == 'html') include '../../common/view/kindeditor.html.php';?>
|
||||
<?php if($doc->contentType == 'markdown') include '../../common/view/markdown.html.php';?>
|
||||
|
||||
@@ -33,7 +33,7 @@ $sideWidth = common::checkNotCN() ? '270' : '238';
|
||||
if($type == 'book')
|
||||
{
|
||||
common::printLink('doc', 'editLib', "rootID=$libID", $lang->doc->editBook, '', "class='btn btn-info btn-wide iframe'", '', true);
|
||||
common::printLink('doc', 'manageBook', "bookID=$libID", $lang->doc->manageBook, '', "class='btn btn-info btn-wide iframe'", '', true);
|
||||
common::printLink('doc', 'manageBook', "bookID=$libID", $lang->doc->manageBook, '', "class='btn btn-info btn-wide'");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -836,6 +836,7 @@ class execution extends control
|
||||
* Browse bugs of a execution.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param int $productID
|
||||
* @param string $orderBy
|
||||
* @param int $build
|
||||
* @param string $type
|
||||
@@ -846,11 +847,12 @@ class execution extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function bug($executionID = 0, $orderBy = 'status,id_desc', $build = 0, $type = 'all', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
public function bug($executionID = 0, $productID = 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');
|
||||
$this->loadModel('product');
|
||||
|
||||
/* Save session. */
|
||||
$this->session->set('bugList', $this->app->getURI(true), 'execution');
|
||||
@@ -860,9 +862,12 @@ class execution extends control
|
||||
$execution = $this->commonAction($executionID);
|
||||
$executionID = $execution->id;
|
||||
$products = $this->execution->getProducts($execution->id);
|
||||
$productID = key($products); // Get the first product for creating bug.
|
||||
$branchID = isset($products[$productID]) ? $products[$productID]->branch : 0;
|
||||
|
||||
$productPairs = array('0' => $this->lang->product->all);
|
||||
foreach($products as $product) $productPairs[$product->id] = $product->name;
|
||||
$this->lang->modulePageNav = $this->product->select($productPairs, $productID, 'execution', 'bug', '', $branchID);
|
||||
|
||||
/* Header and position. */
|
||||
$title = $execution->name . $this->lang->colon . $this->lang->execution->bug;
|
||||
$position[] = html::a($this->createLink('execution', 'browse', "executionID=$executionID"), $execution->name);
|
||||
@@ -872,7 +877,7 @@ class execution extends control
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
$sort = $this->loadModel('common')->appendOrder($orderBy);
|
||||
$bugs = $this->bug->getExecutionBugs($executionID, $build, $type, $param, $sort, '', $pager);
|
||||
$bugs = $this->bug->getExecutionBugs($executionID, $productID, $build, $type, $param, $sort, '', $pager);
|
||||
$users = $this->user->getPairs('noletter');
|
||||
|
||||
/* team member pairs. */
|
||||
@@ -884,7 +889,7 @@ class execution extends control
|
||||
}
|
||||
|
||||
/* Build the search form. */
|
||||
$actionURL = $this->createLink('execution', 'bug', "executionID=$executionID&orderBy=$orderBy&build=$build&type=bysearch&queryID=myQueryID");
|
||||
$actionURL = $this->createLink('execution', 'bug', "executionID=$executionID&productID=$productID&orderBy=$orderBy&build=$build&type=bysearch&queryID=myQueryID");
|
||||
$this->execution->buildBugSearchForm($products, $queryID, $actionURL);
|
||||
|
||||
/* Assign. */
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
.table td.has-child > .plan-toggle > .icon {font-size: 16px; display: inline-block; transition: transform .2s; -ms-transform:rotate(-90deg); -moz-transform:rotate(-90deg); -o-transform:rotate(-90deg); -webkit-transform:rotate(-90deg); transform: rotate(-90deg);}
|
||||
.table td.has-child > .plan-toggle > .icon:before {text-align: left;}
|
||||
.table td.has-child > .plan-toggle.collapsed > .icon {-ms-transform:rotate(90deg); -moz-transform:rotate(90deg); -o-transform:rotate(90deg); -webkit-transform:rotate(90deg); transform: rotate(90deg);}
|
||||
.table td.hours {padding-right: 20px;}
|
||||
.table th.hours {padding-right: 8px !important;}
|
||||
.main-table tbody > tr.table-children > td:first-child::before {width: 3px;}
|
||||
.hours {text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
|
||||
@-moz-document url-prefix() {.main-table tbody > tr.table-children > td:first-child::before {width: 4px;}}
|
||||
@@ -70,9 +70,9 @@
|
||||
<th class='thWidth'><?php common::printOrderLink('PM', $orderBy, $vars, $lang->execution->owner);?></th>
|
||||
<th class='w-100px'><?php common::printOrderLink('end', $orderBy, $vars, $lang->execution->end);?></th>
|
||||
<th class='w-100px'><?php common::printOrderLink('status', $orderBy, $vars, $from == 'execution' ? $lang->execution->execStatus : $lang->execution->status);?></th>
|
||||
<th class='w-80px text-center'><?php echo $lang->execution->totalEstimate;?></th>
|
||||
<th class='w-80px text-center'><?php echo $lang->execution->totalConsumed;?></th>
|
||||
<th class='w-80px text-center'><?php echo $lang->execution->totalLeft;?></th>
|
||||
<th class='w-80px hours text-right'><?php echo $lang->execution->totalEstimate;?></th>
|
||||
<th class='w-80px hours text-right'><?php echo $lang->execution->totalConsumed;?></th>
|
||||
<th class='w-80px hours text-right'><?php echo $lang->execution->totalLeft;?></th>
|
||||
<th class='w-60px'><?php echo $lang->execution->progress;?></th>
|
||||
<th class='w-100px'><?php echo $lang->execution->burn;?></th>
|
||||
</tr>
|
||||
|
||||
@@ -11,12 +11,16 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<style>
|
||||
#subHeader #dropMenu .col-left .list-group {margin-bottom: 0px; padding-top: 10px;}
|
||||
#subHeader #dropMenu .col-left {padding-bottom: 0px;}
|
||||
</style>
|
||||
<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' : '') . "'");
|
||||
echo html::a($this->inlink('bug', "executionID={$execution->id}&productID={$productID}&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}&productID={$productID}&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>
|
||||
@@ -40,7 +44,7 @@
|
||||
<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¶m=$param&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
|
||||
<?php $vars = "executionID={$execution->id}&productID={$productID}&orderBy=%s&build=$buildID&type=$type¶m=$param&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='c-id'>
|
||||
|
||||
@@ -148,7 +148,6 @@
|
||||
<?php if($child->parent > 0) echo '<span class="label label-badge label-light">' . $this->lang->task->childrenAB . '</span> ';?>
|
||||
<?php echo html::a($this->createLink('task', 'view', "taskID=$child->id", '', '', $child->project), $child->name, null, "style='color: $child->color' data-group='project'");?>
|
||||
</td>
|
||||
<td class='c-project'><?php echo zget($projects, $child->project, '');?></td>
|
||||
<td class='c-project' title="<?php echo $child->projectName;?>"><?php echo html::a($this->createLink('execution', 'task', "executionID=$child->project", '', '', $child->project), $child->executionName, '', "data-group='execution'");?></td>
|
||||
<?php if($type != 'openedBy'): ?>
|
||||
<td class='c-user'><?php echo zget($users, $child->openedBy);?></td>
|
||||
|
||||
@@ -64,16 +64,19 @@ class productModel extends model
|
||||
* @param string $currentModule
|
||||
* @param string $currentMethod
|
||||
* @param string $extra
|
||||
* @param int $branch
|
||||
* @param int $module
|
||||
* @param string $moduleType
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function select($products, $productID, $currentModule, $currentMethod, $extra = '', $branch = 0, $module = 0, $moduleType = '')
|
||||
{
|
||||
$isProject = ($this->app->openApp == 'project' and strpos('bug,testcase,testtask', $this->app->rawMethod) !== false and isset($products[0])) ? true : false;
|
||||
$isBrowseBug = (strpos(',project,execution,', ",{$this->app->openApp},") !== false and strpos(',bug,testcase,testtask,', ",{$this->app->rawMethod},") !== false and isset($products[0])) ? true : false;
|
||||
|
||||
$this->app->loadLang('product');
|
||||
if(!$isProject and !$productID)
|
||||
if(!$isBrowseBug and !$productID)
|
||||
{
|
||||
unset($this->lang->product->menu->settings['subMenu']->branch);
|
||||
return;
|
||||
@@ -83,8 +86,10 @@ class productModel extends model
|
||||
setcookie("lastProduct", $productID, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);
|
||||
if($productID) $currentProduct = $this->getById($productID);
|
||||
|
||||
if($isProject) $extra = $this->session->project;
|
||||
if($isProject and !$productID)
|
||||
if($isBrowseBug and $this->app->openApp == 'project') $extra = $this->session->project;
|
||||
if($isBrowseBug and $this->app->openApp == 'execution') $extra = $this->session->execution;
|
||||
|
||||
if($isBrowseBug and !$productID)
|
||||
{
|
||||
$currentProduct = new stdclass();
|
||||
$currentProduct->name = $products[$productID];
|
||||
@@ -95,7 +100,7 @@ class productModel extends model
|
||||
$output = '';
|
||||
if(!empty($products))
|
||||
{
|
||||
$dropMenuLink = helper::createLink($isProject ? 'bug' : 'product', 'ajaxGetDropMenu', "objectID=$productID&module=$currentModule&method=$currentMethod&extra=$extra");
|
||||
$dropMenuLink = helper::createLink($isBrowseBug ? 'bug' : 'product', 'ajaxGetDropMenu', "objectID=$productID&module=$currentModule&method=$currentMethod&extra=$extra");
|
||||
$output = "<div class='btn-group angle-btn'><div class='btn-group'><button data-toggle='dropdown' type='button' class='btn btn-limit' id='currentItem' title='{$currentProduct->name}'><span class='text'>{$currentProduct->name}</span> <span class='caret'></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>";
|
||||
@@ -1599,9 +1604,10 @@ class productModel extends model
|
||||
{
|
||||
return helper::createLink('design', 'browse', "productID=%s");
|
||||
}
|
||||
elseif($module == 'project')
|
||||
elseif($module == 'project' or $module == 'execution')
|
||||
{
|
||||
return helper::createLink('project', $method, "projectID=$extra&productID=%s");
|
||||
$objectID = $module == 'project' ? 'projectID' : 'executionID';
|
||||
return helper::createLink($module, $method, "$objectID=$extra&productID=%s");
|
||||
}
|
||||
|
||||
return $link;
|
||||
|
||||
@@ -693,6 +693,7 @@ class project extends control
|
||||
* Project bug list.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param int $productID
|
||||
* @param string $orderBy
|
||||
* @param int $build
|
||||
* @param string $type
|
||||
@@ -703,22 +704,26 @@ class project extends control
|
||||
* @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)
|
||||
public function bug($projectID = 0, $productID = 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');
|
||||
$this->loadModel('product');
|
||||
|
||||
/* 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;
|
||||
$project = $this->project->getByID($projectID);
|
||||
$type = strtolower($type);
|
||||
$queryID = ($type == 'bysearch') ? (int)$param : 0;
|
||||
$products = $this->project->getProducts($projectID);
|
||||
$branchID = isset($products[$productID]) ? $products[$productID]->branch : 0;
|
||||
|
||||
$productPairs = array('0' => $this->lang->product->all);
|
||||
foreach($products as $product) $productPairs[$product->id] = $product->name;
|
||||
$this->lang->modulePageNav = $this->product->select($productPairs, $productID, 'project', 'bug', '', $branchID);
|
||||
|
||||
/* Header and position. */
|
||||
$title = $project->name . $this->lang->colon . $this->lang->bug->common;
|
||||
@@ -729,7 +734,7 @@ class project extends control
|
||||
$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);
|
||||
$bugs = $this->bug->getProjectBugs($projectID, $productID, $build, $type, $param, $sort, '', $pager);
|
||||
$users = $this->user->getPairs('noletter');
|
||||
|
||||
/* team member pairs. */
|
||||
@@ -739,7 +744,7 @@ class project extends control
|
||||
foreach($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");
|
||||
$actionURL = $this->createLink('project', 'bug', "projectID=$projectID&productID=$productID&orderBy=$orderBy&build=$build&type=bysearch&queryID=myQueryID");
|
||||
$this->loadModel('execution')->buildBugSearchForm($products, $queryID, $actionURL, 'project');
|
||||
|
||||
/* Assign. */
|
||||
|
||||
@@ -11,12 +11,16 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<style>
|
||||
#subHeader #dropMenu .col-left .list-group {margin-bottom: 0px; padding-top: 10px;}
|
||||
#subHeader #dropMenu .col-left {padding-bottom: 0px;}
|
||||
</style>
|
||||
<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', "projectID={$project->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', "projectID={$project->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' : '') . "'");
|
||||
echo html::a($this->inlink('bug', "projectID={$project->id}&productID={$productID}&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', "projectID={$project->id}&productID={$productID}&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>
|
||||
@@ -40,7 +44,7 @@
|
||||
<form class='main-table' method='post' id='projectBugForm' data-ride="table">
|
||||
<table class='table has-sort-head' id='bugList'>
|
||||
<?php $canBatchAssignTo = common::hasPriv('bug', 'batchAssignTo');?>
|
||||
<?php $vars = "projectID={$project->id}&orderBy=%s&build=$buildID&type=$type¶m=$param&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
|
||||
<?php $vars = "projectID={$project->id}&productID=$productID&orderBy=%s&build=$buildID&type=$type¶m=$param&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='c-id'>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#copyButton {width: 56px; background-color: #f1f1f1; opacity: 1;} /* Adjust for task #4151; */
|
||||
#copyButton {width: 80px; background-color: #f1f1f1; opacity: 1;} /* Adjust for task #4151; */
|
||||
|
||||
.title-group.required:after {display: none;}
|
||||
.title-group.required > .required:after {display: block; right: 29px; top: 5px;}
|
||||
|
||||
@@ -191,7 +191,8 @@ function setPreview()
|
||||
$('#preview a').attr('href', storyLink);
|
||||
$('#copyButton').removeClass('hidden');
|
||||
$('.title-group.required > div').attr('id', 'copyStory-input').removeClass('.required');
|
||||
$('div.colorpicker').css('right', '57px');//Adjust for task #4151;
|
||||
$('div.colorpicker').css('right', '80px');//Adjust for task #4151;
|
||||
$('#copyButton').css('width', '80px');
|
||||
}
|
||||
|
||||
setAfter();
|
||||
|
||||
@@ -11,39 +11,6 @@
|
||||
*/
|
||||
class testreportModel extends model
|
||||
{
|
||||
/**
|
||||
* Set menu.
|
||||
*
|
||||
* @param array $products
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setMenu($products, $productID, $branch = 0)
|
||||
{
|
||||
$this->loadModel('product')->setMenu($products, $productID, $branch);
|
||||
|
||||
foreach($this->lang->testtask->menu as $key => $value)
|
||||
{
|
||||
if($this->lang->navGroup->testreport != 'qa') $this->loadModel('qa')->setSubMenu('testreport', $key, $productID);
|
||||
$replace = $productID;
|
||||
if($this->lang->navGroup->testcase == 'project' and $key == 'bug') $replace = 0;
|
||||
common::setMenuVars($this->lang->testreport->menu, $key, $replace);
|
||||
}
|
||||
|
||||
if($this->lang->navGroup->testreport == '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->testreport->menu;
|
||||
$this->lang->testreport->menu = $this->lang->qa->subMenu->testtask;
|
||||
$this->lang->qa->switcherMenu = $this->product->getSwitcher($productID, '', $branch);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create report.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user