* Finish task #44493,44494.
This commit is contained in:
@@ -205,6 +205,7 @@ class bug extends control
|
||||
$this->config->bug->search['onMenuBar'] = 'yes';
|
||||
$this->bug->buildSearchForm($productID, $this->products, $queryID, $actionURL);
|
||||
|
||||
$showBranch = isset($this->config->bug->browse->showBranch) ? $this->config->bug->browse->showBranch : 1;
|
||||
$showModule = !empty($this->config->datatable->bugBrowse->showModule) ? $this->config->datatable->bugBrowse->showModule : '';
|
||||
$productName = ($productID and isset($this->products[$productID])) ? $this->products[$productID] : $this->lang->product->allProduct;
|
||||
|
||||
@@ -238,6 +239,7 @@ class bug extends control
|
||||
$this->view->setModule = true;
|
||||
$this->view->isProjectBug = ($productID and !$this->projectID) ? false : true;
|
||||
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($productID, 'bug', $showModule) : array();
|
||||
$this->view->showBranch = $showBranch;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php $datatableId = $this->moduleName . ucfirst($this->methodName);?>
|
||||
<?php $currentModule = $this->moduleName;?>
|
||||
<?php $currentMethod = ucfirst($this->methodName);?>
|
||||
<?php $datatableId = $currentModule . $currentMethod;?>
|
||||
|
||||
<style>
|
||||
#setShowModule {margin-left: 30px;}
|
||||
</style>
|
||||
@@ -37,6 +40,8 @@ $(function()
|
||||
{
|
||||
if('<?php echo $this->app->user->account?>' == 'guest') return;
|
||||
datatableId = '<?php echo $datatableId?>';
|
||||
currentModule = '<?php echo $currentModule?>';
|
||||
currentMethod = '<?php echo $currentMethod?>';
|
||||
var value = $('#showModuleModal input[name="showModule"]:checked').val();
|
||||
var allModule = $('#showModuleModal input[name="showAllModule"]:checked').val();
|
||||
var showBranch = $('#showModuleModal input[name="showBranch"]:checked').val();
|
||||
@@ -53,6 +58,8 @@ $(function()
|
||||
value: value,
|
||||
allModule: allModule,
|
||||
showBranch: showBranch,
|
||||
currentModule: currentModule,
|
||||
currentMethod: currentMethod,
|
||||
},
|
||||
success:function(){window.location.reload();},
|
||||
url: '<?php echo $this->createLink('datatable', 'ajaxSave')?>'
|
||||
@@ -98,10 +105,10 @@ $(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($this->app->tab == 'product' and $app->moduleName == 'product' and $app->methodName == 'browse'):?>
|
||||
<?php if($this->app->tab == 'product' or $this->app->tab == 'qa'):?>
|
||||
<tr>
|
||||
<td><?php echo $lang->datatable->showBranch;?></td>
|
||||
<td><?php echo html::radio('showBranch', $lang->datatable->showBranchList, isset($config->product->browse->showBranch) ? $config->product->browse->showBranch : 1);?></td>
|
||||
<td><?php echo html::radio('showBranch', $lang->datatable->showBranchList, isset($config->$currentModule->$currentMethod->showBranch) ? $config->$currentModule->$currentMethod->showBranch : 1);?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
|
||||
@@ -38,7 +38,7 @@ class datatable extends control
|
||||
$name = 'datatable.' . $this->post->target . '.' . $this->post->name;
|
||||
$this->loadModel('setting')->setItem($account . '.' . $name, $this->post->value);
|
||||
if($this->post->allModule !== false) $this->setting->setItem("$account.execution.task.allModule", $this->post->allModule);
|
||||
if($this->post->showBranch !== false) $this->setting->setItem("$account.product.browse.showBranch", $this->post->showBranch);
|
||||
if($this->post->showBranch !== false) $this->setting->setItem($account . '.' . $this->post->currentModule . '.' . $this->post->currentMethod . '.showBranch', $this->post->showBranch);
|
||||
if($this->post->global) $this->setting->setItem('system.' . $name, $this->post->value);
|
||||
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => 'dao error.'));
|
||||
|
||||
@@ -274,6 +274,7 @@ class product extends control
|
||||
|
||||
$showModule = !empty($this->config->datatable->productBrowse->showModule) ? $this->config->datatable->productBrowse->showModule : '';
|
||||
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($productID, 'story', $showModule) : array();
|
||||
$this->view->showBranch = isset($this->config->product->browse->showBranch) ? $this->config->product->browse->showBranch : 1;
|
||||
|
||||
$productName = ($this->app->rawModule == 'projectstory' and empty($productID)) ? $this->lang->product->all : $this->products[$productID];
|
||||
|
||||
|
||||
@@ -3610,7 +3610,7 @@ class storyModel extends model
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function printCell($col, $story, $users, $branches, $storyStages, $modulePairs = array(), $storyTasks = array(), $storyBugs = array(), $storyCases = array(), $mode = 'datatable', $storyType = 'story')
|
||||
public function printCell($col, $story, $users, $branches, $storyStages, $modulePairs = array(), $storyTasks = array(), $storyBugs = array(), $storyCases = array(), $mode = 'datatable', $storyType = 'story', $showBranch = '')
|
||||
{
|
||||
/* Check the product is closed. */
|
||||
$canBeChanged = common::canBeChanged('story', $story);
|
||||
@@ -3716,10 +3716,9 @@ class storyModel extends model
|
||||
echo "</span>";
|
||||
break;
|
||||
case 'title':
|
||||
$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> ";
|
||||
if(isset($branches[$story->branch]) and !empty($showBranch)) echo "<span class='label label-outline label-badge'>{$branches[$story->branch]}</span> ";
|
||||
if($story->module and isset($modulePairs[$story->module])) echo "<span class='label label-gray label-badge'>{$modulePairs[$story->module]}</span> ";
|
||||
if($story->parent > 0) echo '<span class="label label-badge label-light" title="' . $this->lang->story->children . '">' . $this->lang->story->childrenAB . '</span> ';
|
||||
echo $canView ? html::a($storyLink, $story->title, '', "style='color: $story->color' data-app='$tab'") : "<span style='color: $story->color'>{$story->title}</span>";
|
||||
|
||||
@@ -175,6 +175,7 @@ class testcase extends control
|
||||
|
||||
$showModule = !empty($this->config->datatable->testcaseBrowse->showModule) ? $this->config->datatable->testcaseBrowse->showModule : '';
|
||||
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($productID, 'case', $showModule) : array();
|
||||
$this->view->showBranch = isset($this->config->testcase->browse->showBranch) ? $this->config->testcase->browse->showBranch : 1;
|
||||
|
||||
/* Get module tree.*/
|
||||
if($projectID and empty($productID))
|
||||
|
||||
Reference in New Issue
Block a user