Merge branch 'sprint/174_mayue_44987,44988,44989' into 'master'
* Finish task #44987,44988,44989. See merge request easycorp/zentaopms!657
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?php $currentModule = $this->moduleName;?>
|
||||
<?php $currentMethod = $this->methodName;?>
|
||||
<?php $currentModule = $this->app->rawModule;?>
|
||||
<?php $currentMethod = $this->app->rawMethod;?>
|
||||
<?php $datatableId = $this->moduleName . ucfirst($this->methodName);?>
|
||||
|
||||
<style>
|
||||
@@ -46,7 +46,6 @@ $(function()
|
||||
var allModule = $('#showModuleModal input[name="showAllModule"]:checked').val();
|
||||
var showBranch = $('#showModuleModal input[name="showBranch"]:checked').val();
|
||||
if(typeof allModule === 'undefined') allModule = false;
|
||||
if(typeof showBranch === 'undefined') showBranch = false;
|
||||
$.ajax(
|
||||
{
|
||||
type: "POST",
|
||||
@@ -105,7 +104,7 @@ $(function()
|
||||
<td><?php echo html::radio('showAllModule', $lang->datatable->showAllModuleList, isset($config->execution->task->allModule) ? $config->execution->task->allModule : 0);?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if(!empty($product) and $product->type != 'normal' and ($this->app->tab == 'product' or $this->app->tab == 'qa')):?>
|
||||
<?php if(!empty($product) and $product->type != 'normal'):?>
|
||||
<tr>
|
||||
<td><?php echo $lang->datatable->showBranch;?></td>
|
||||
<td><?php echo html::radio('showBranch', $lang->datatable->showBranchList, isset($config->$currentModule->$currentMethod->showBranch) ? $config->$currentModule->$currentMethod->showBranch : 1);?></td>
|
||||
|
||||
@@ -137,6 +137,7 @@ class execution extends control
|
||||
$this->loadModel('task');
|
||||
$this->loadModel('datatable');
|
||||
$this->loadModel('setting');
|
||||
$this->loadModel('product');
|
||||
|
||||
if(common::hasPriv('execution', 'create')) $this->lang->TRActions = html::a($this->createLink('execution', 'create'), "<i class='icon icon-sm icon-plus'></i> " . $this->lang->execution->create, '', "class='btn btn-primary'");
|
||||
|
||||
@@ -148,7 +149,7 @@ class execution extends control
|
||||
/* Get products by execution. */
|
||||
$execution = $this->commonAction($executionID, $status);
|
||||
$executionID = $execution->id;
|
||||
$products = $this->loadModel('product')->getProductPairsByProject($executionID);
|
||||
$products = $this->product->getProductPairsByProject($executionID);
|
||||
setcookie('preExecutionID', $executionID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
|
||||
/* Save the recently five executions visited in the cookie. */
|
||||
@@ -216,6 +217,19 @@ class execution extends control
|
||||
$tasks = $this->execution->getTasks($productID, $executionID, $this->executions, $browseType, $queryID, $moduleID, $sort, $pager);
|
||||
}
|
||||
|
||||
/* Get product. */
|
||||
if(empty($productID))
|
||||
{
|
||||
$productModule = $this->tree->getById($moduleID);
|
||||
if(!empty($productModule) and $productModule->type != 'task') $product = $this->product->getById($productModule->root);
|
||||
}
|
||||
if(empty($product)) $product = $this->product->getById($productID);
|
||||
|
||||
if(!empty($product) and $product->type != 'normal')
|
||||
{
|
||||
$this->lang->datatable->showBranch = sprintf($this->lang->datatable->showBranch, $this->lang->product->branchName[$product->type]);
|
||||
}
|
||||
|
||||
/* Build the search form. */
|
||||
$actionURL = $this->createLink('execution', 'task', "executionID=$executionID&status=bySearch¶m=myQueryID");
|
||||
$this->config->execution->search['onMenuBar'] = 'yes';
|
||||
@@ -245,6 +259,7 @@ class execution extends control
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->execution = $execution;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->product = $product;
|
||||
$this->view->modules = $this->tree->getTaskOptionMenu($executionID, 0, 0, $showAllModule ? 'allModule' : '');
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->moduleTree = $this->tree->getTaskTreeMenu($executionID, $productID, $startModuleID = 0, array('treeModel', 'createTaskLink'), $extra);
|
||||
@@ -671,6 +686,7 @@ class execution extends control
|
||||
$this->loadModel('story');
|
||||
$this->loadModel('user');
|
||||
$this->loadModel('datatable');
|
||||
$this->app->loadLang('datatable');
|
||||
$this->app->loadLang('testcase');
|
||||
|
||||
$type = strtolower($type);
|
||||
@@ -778,8 +794,22 @@ class execution extends control
|
||||
foreach($plans as $plan) $allPlans += $plan;
|
||||
}
|
||||
|
||||
if($this->cookie->storyModuleParam) $this->view->module = $this->loadModel('tree')->getById($this->cookie->storyModuleParam);
|
||||
if($this->cookie->storyProductParam) $this->view->product = $this->loadModel('product')->getById($this->cookie->storyProductParam);
|
||||
if($this->cookie->storyModuleParam)
|
||||
{
|
||||
$module = $this->loadModel('tree')->getById($this->cookie->storyModuleParam);
|
||||
$this->view->module = $module;
|
||||
|
||||
$product = $this->product->getById($module->root);
|
||||
$this->lang->datatable->showBranch = sprintf($this->lang->datatable->showBranch, $this->lang->product->branchName[$product->type]);
|
||||
}
|
||||
|
||||
if($this->cookie->storyProductParam)
|
||||
{
|
||||
$product = $this->loadModel('product')->getById($this->cookie->storyProductParam);
|
||||
$this->view->product = $product;
|
||||
$this->lang->datatable->showBranch = sprintf($this->lang->datatable->showBranch, $this->lang->product->branchName[$product->type]);
|
||||
}
|
||||
|
||||
if($this->cookie->storyBranchParam)
|
||||
{
|
||||
$branchID = $this->cookie->storyBranchParam;
|
||||
|
||||
@@ -220,7 +220,8 @@
|
||||
<?php endif;?>
|
||||
<td class='c-pri'><span class='label-pri <?php echo 'label-pri-' . $story->pri?>' title='<?php echo zget($lang->story->priList, $story->pri, $story->pri);?>'><?php echo zget($lang->story->priList, $story->pri, $story->pri);?></span></td>
|
||||
<td class='c-name' title="<?php echo $story->title?>">
|
||||
<?php if(isset($branchGroups[$story->product][$story->branch])) echo "<span class='label label-outline label-badge'>" . $branchGroups[$story->product][$story->branch] . '</span>';?>
|
||||
<?php $showBranch = isset($this->config->execution->story->showBranch) ? $this->config->execution->story->showBranch : 1;?>
|
||||
<?php if(isset($branchGroups[$story->product][$story->branch]) and $showBranch) echo "<span class='label label-outline label-badge'>" . $branchGroups[$story->product][$story->branch] . '</span>';?>
|
||||
<?php if(!empty($story->module) and isset($modulePairs[$story->module])) echo "<span class='label label-gray label-badge'>{$modulePairs[$story->module]}</span> ";?>
|
||||
<?php if($story->parent > 0) echo "<span class='label'>{$lang->story->childrenAB}</span>";?>
|
||||
<?php echo html::a($storyLink,$story->title, null, "style='color: $story->color' data-app='execution'");?>
|
||||
|
||||
@@ -37,7 +37,6 @@ body {margin-bottom: 25px;}
|
||||
<?php
|
||||
if(!empty($productID))
|
||||
{
|
||||
$product = $this->product->getById($productID);
|
||||
$removeLink = $browseType == 'byproduct' ? inlink('task', "executionID=$executionID&browseType=$status¶m=0&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("productBrowseParam")';
|
||||
$moduleName = $product->name;
|
||||
$html = $moduleName . html::a($removeLink, "<i class='icon icon-sm icon-close'></i>", '', "class='text-muted'");
|
||||
|
||||
@@ -3740,7 +3740,14 @@ class storyModel extends model
|
||||
echo "</span>";
|
||||
break;
|
||||
case 'title':
|
||||
$showBranch = isset($this->config->product->browse->showBranch) ? $this->config->product->browse->showBranch : 1;
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$showBranch = isset($this->config->projectstory->story->showBranch) ? $this->config->projectstory->story->showBranch : 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$showBranch = isset($this->config->product->browse->showBranch) ? $this->config->product->browse->showBranch : 1;
|
||||
}
|
||||
if($storyType == 'requirement') echo '<span class="label label-badge label-light">SR</span> ';
|
||||
if($story->parent > 0 and isset($story->parentName)) $story->title = "{$story->parentName} / {$story->title}";
|
||||
if(isset($branches[$story->branch]) and $showBranch) echo "<span class='label label-outline label-badge'>{$branches[$story->branch]}</span> ";
|
||||
|
||||
@@ -3026,8 +3026,9 @@ class taskModel extends model
|
||||
echo "</span>";
|
||||
break;
|
||||
case 'name':
|
||||
$showBranch = isset($this->config->execution->task->showBranch) ? $this->config->execution->task->showBranch : 1;
|
||||
if($task->parent > 0 and isset($task->parentName)) $task->name = "{$task->parentName} / {$task->name}";
|
||||
if(!empty($task->product) && isset($branchGroups[$task->product][$task->branch])) echo "<span class='label label-info label-outline'>" . $branchGroups[$task->product][$task->branch] . '</span> ';
|
||||
if(!empty($task->product) and isset($branchGroups[$task->product][$task->branch]) and $showBranch) echo "<span class='label label-info label-outline'>" . $branchGroups[$task->product][$task->branch] . '</span> ';
|
||||
if($task->module and isset($modulePairs[$task->module])) echo "<span class='label label-gray label-badge'>" . $modulePairs[$task->module] . '</span> ';
|
||||
if($task->parent > 0) echo '<span class="label label-badge label-light" title="' . $this->lang->task->children . '">' . $this->lang->task->childrenAB . '</span> ';
|
||||
if(!empty($task->team)) echo '<span class="label label-badge label-light" title="' . $this->lang->task->multiple . '">' . $this->lang->task->multipleAB . '</span> ';
|
||||
|
||||
@@ -1551,7 +1551,14 @@ class testcaseModel extends model
|
||||
echo "</span>";
|
||||
break;
|
||||
case 'title':
|
||||
$showBranch = isset($this->config->testcase->browse->showBranch) ? $this->config->testcase->browse->showBranch : 1;
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
$showBranch = isset($this->config->project->testcase->showBranch) ? $this->config->project->testcase->showBranch : 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$showBranch = isset($this->config->testcase->browse->showBranch) ? $this->config->testcase->browse->showBranch : 1;
|
||||
}
|
||||
if(isset($branches[$case->branch]) and $showBranch) echo "<span class='label label-outline label-badge'>{$branches[$case->branch]}</span> ";
|
||||
if($modulePairs and $case->module and isset($modulePairs[$case->module])) echo "<span class='label label-gray label-badge'>{$modulePairs[$case->module]}</span> ";
|
||||
echo $canView ? ($fromCaseID ? html::a($caseLink, $case->title, null, "style='color: $case->color' data-app='{$this->app->tab}'") . html::a(helper::createLink('testcase', 'view', "caseID=$fromCaseID"), "[<i class='icon icon-share' title='{$this->lang->testcase->fromCase}'></i>#$fromCaseID]", '', "data-app='{$this->app->tab}'") : html::a($caseLink, $case->title, null, "style='color: $case->color' data-app='{$this->app->tab}'")) : "<span style='color: $case->color'>$case->title</span>";
|
||||
|
||||
Reference in New Issue
Block a user