* Adjust menu for onlyTest.
This commit is contained in:
@@ -27,7 +27,37 @@ class testtaskModel extends model
|
||||
$selectHtml = $this->product->select($products, $productID, 'testtask', 'browse', '', $branch);
|
||||
foreach($this->lang->testtask->menu as $key => $value)
|
||||
{
|
||||
$replace = ($key == 'product') ? $selectHtml : $productID;
|
||||
if($this->config->global->flow != 'onlyTest')
|
||||
{
|
||||
$replace = ($key == 'product') ? $selectHtml : $productID;
|
||||
}
|
||||
else
|
||||
{
|
||||
if($key == 'product')
|
||||
{
|
||||
$replace = $selectHtml;
|
||||
}
|
||||
elseif($key == 'scope')
|
||||
{
|
||||
$scope = $this->session->testTaskVersionScope;
|
||||
$status = $this->session->testTaskVersionStatus;
|
||||
$viewName = $scope == 'local'? $products[$productID] : $this->lang->testtask->all;
|
||||
|
||||
$replace = '<li>';
|
||||
$replace .= "<a data-toggle='dropdown'>{$viewName} <span class='caret'></span></a>";
|
||||
$replace .= "<ul class='dropdown-menu' style='max-height:240px;overflow-y:auto'>";
|
||||
$replace .= "<li>" . html::a(helper::createLink('testtask', 'browse', "productID=$productID&branch=$branch&type=all,$status"), $this->lang->testtask->all) . "</li>";
|
||||
$replace .= "<li>" . html::a(helper::createLink('testtask', 'browse', "productID=$productID&branch=$branch&type=local,$status"), $products[$productID]) . "</li>";
|
||||
$replace .= "</ul></li>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$replace = array();
|
||||
$replace['productID'] = $productID;
|
||||
$replace['branch'] = $branch;
|
||||
$replace['scope'] = $this->session->testTaskVersionScope;
|
||||
}
|
||||
}
|
||||
common::setMenuVars($this->lang->testtask->menu, $key, $replace);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user