diff --git a/module/bug/view/ajaxgetdropmenu.html.php b/module/bug/view/ajaxgetdropmenu.html.php index af69f3582d..1e41d00e47 100644 --- a/module/bug/view/ajaxgetdropmenu.html.php +++ b/module/bug/view/ajaxgetdropmenu.html.php @@ -17,7 +17,7 @@ foreach($products as $product) } $productsPinYin = common::convert2Pinyin($productNames); $linkHtml = $this->product->setParamsForLink($module, $link, $projectID, 0); -$productsHtml = count($products) > 1 ? html::a($linkHtml, $this->lang->bug->allProduct, '', "class='text-primary' title='{$this->lang->bug->allProduct}' data-key='" . zget($productsPinYin, $this->lang->bug->allProduct, '') . "' data-app='{$this->app->tab}'") : ''; +$productsHtml = (count($products) > 1 and strpos(',zeroCase,browseUnits,groupCase,', ",$method,") === false) ? html::a($linkHtml, $this->lang->bug->allProduct, '', "class='text-primary' title='{$this->lang->bug->allProduct}' data-key='" . zget($productsPinYin, $this->lang->bug->allProduct, '') . "' data-app='{$this->app->tab}'") : ''; foreach($products as $product) { diff --git a/module/product/model.php b/module/product/model.php index 549a4027ba..ada143a2d9 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -85,6 +85,8 @@ class productModel extends model if(empty($products)) return; + if($this->app->tab == 'project' and strpos(',zeroCase,browseUnits,groupCase,', ",$currentMethod,") !== false) $isQaModule = true; + $this->app->loadLang('product'); if(!$isQaModule and !$productID and !$isFeedbackModel) { diff --git a/module/testcase/control.php b/module/testcase/control.php index c7a8bec957..fb93f34117 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -245,6 +245,7 @@ class testcase extends control { $groupBy = empty($groupBy) ? 'story' : $groupBy; $productID = $this->product->saveState($productID, $this->products); + $product = $this->product->getByID($productID); if($branch === '') $branch = $this->cookie->preBranch; $this->app->loadLang('testtask'); @@ -253,7 +254,7 @@ class testcase extends control if($this->app->tab == 'project') { $products = array('0' => $this->lang->product->all) + $this->product->getProducts($this->session->project, 'all', '', false); - $this->lang->modulePageNav = $this->product->select($products, $productID, 'testcase', 'groupCase', "projectID=$projectID", $branch); + if(!$product->shadow) $this->lang->modulePageNav = $this->product->select($products, $productID, 'testcase', 'groupCase', "projectID=$projectID", $branch); } $this->session->set('caseList', $this->app->getURI(true), $this->app->tab); @@ -294,7 +295,7 @@ class testcase extends control $this->view->suiteID = 0; $this->view->moduleID = 0; $this->view->branch = $branch; - $this->view->product = $this->product->getByID($productID); + $this->view->product = $product; $this->display(); } @@ -323,12 +324,14 @@ class testcase extends control $this->loadModel('project')->setMenu($this->session->project); $products = $this->product->getProducts($this->session->project, 'all', '', false); $productID = $this->product->saveState($productID, $products); - $this->lang->modulePageNav = $this->product->select($products, $productID, 'testcase', 'zeroCase', "projectID=$projectID", $branchID); + $product = $this->product->getByID($productID); + if(!$product->shadow) $this->lang->modulePageNav = $this->product->select($products, $productID, 'testcase', 'zeroCase', "projectID=$projectID", $branchID); } else { $products = $this->product->getPairs(); $productID = $this->product->saveState($productID, $products); + $product = $this->product->getByID($productID); $this->loadModel('qa'); $this->app->rawModule = 'testcase'; foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa'; @@ -355,7 +358,7 @@ class testcase extends control $this->view->orderBy = $orderBy; $this->view->suiteList = $this->loadModel('testsuite')->getSuites($productID); $this->view->browseType = ''; - $this->view->product = $this->product->getByID($productID); + $this->view->product = $product; $this->view->pager = $pager; $this->display(); } diff --git a/module/testcase/css/groupcase.css b/module/testcase/css/groupcase.css index d71fbef76d..43d054bbf6 100644 --- a/module/testcase/css/groupcase.css +++ b/module/testcase/css/groupcase.css @@ -2,3 +2,7 @@ .group-header > a {line-height: 20px; display: block; max-height: 40px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;} .c-result {width: 80px;} .c-bugs, .c-results, .c-steps {width: 30px;} + +#subHeader #dropMenu .col-left .list-group {margin-bottom: 0px; padding-top: 10px;} +#subHeader #dropMenu .col-left {padding-bottom: 0px;} +#currentBranch + #dropMenu .col-left {padding-bottom: 30px;} diff --git a/module/testcase/css/zerocase.css b/module/testcase/css/zerocase.css new file mode 100644 index 0000000000..52b81c0521 --- /dev/null +++ b/module/testcase/css/zerocase.css @@ -0,0 +1,3 @@ +#subHeader #dropMenu .col-left .list-group {margin-bottom: 0px; padding-top: 10px;} +#subHeader #dropMenu .col-left {padding-bottom: 0px;} +#currentBranch + #dropMenu .col-left {padding-bottom: 30px;} diff --git a/module/testtask/control.php b/module/testtask/control.php index dd0111d1b5..b25782e1c9 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -155,6 +155,7 @@ class testtask extends control /* Set menu. */ $productID = $this->loadModel('product')->saveState($productID, $this->products); + $product = $this->product->getByID($productID); if($this->app->tab == 'project') { $this->lang->scrum->menu->qa['subMenu']->testcase['subModule'] = 'testtask'; @@ -167,7 +168,7 @@ class testtask extends control } $this->loadModel('project')->setMenu($projectID); - $this->lang->modulePageNav = $this->product->select($this->products, $productID, 'testtask', 'browseUnits', "projectID=$projectID", '', 0, '', false); + if(!$product->shadow) $this->lang->modulePageNav = $this->product->select($this->products, $productID, 'testtask', 'browseUnits', "projectID=$projectID", '', 0, '', false); } else { @@ -194,7 +195,7 @@ class testtask extends control $this->view->tasks = $this->testtask->getProductUnitTasks($productID, $browseType, $sort, $pager); $this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter'); $this->view->pager = $pager; - $this->view->product = $this->product->getByID($productID); + $this->view->product = $product; $this->view->suiteList = $this->loadModel('testsuite')->getSuites($productID); $this->display(); diff --git a/module/testtask/css/browseunits.css b/module/testtask/css/browseunits.css index 53e992bee1..843aaf11fe 100644 --- a/module/testtask/css/browseunits.css +++ b/module/testtask/css/browseunits.css @@ -1,2 +1,5 @@ td.pass {background-color: unset !important; border-color: unset !important; border-bottom: 1px solid #eee !important; color: green;} td.fail {background-color: unset !important; border-color: unset !important; border-bottom: 1px solid #eee !important; color: red;} + +#subHeader #dropMenu .col-left .list-group {margin-bottom: 0px; padding-top: 10px;} +#subHeader #dropMenu .col-left {padding-bottom: 0px;}