- cookie->onlyScene): ?> - testcase->noScene;?> - - - createLink('testcase', 'createScene', "productID=$productID&branch=$branch&moduleID=$initModule"), " " . $lang->testcase->newScene, '', "class='btn btn-info' data-app='{$this->app->tab}'");?> - - - testcase->noCase;?> - - - createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule"), " " . $lang->testcase->create, '', "class='btn btn-info' data-app='{$this->app->tab}'");?> - + cookie->onlyScene) + { + echo "{$lang->testcase->noScene}"; + if((empty($productID) || common::canModify('product', $product)) && common::hasPriv('testcase', 'createScene') && $browseType != 'bysuite') + { + $initModule = isset($moduleID) ? (int)$moduleID : 0; + if($productID) echo html::a($this->createLink('testcase', 'createScene', "productID=$productID&branch=$branch&moduleID=$initModule"), " " . $lang->testcase->newScene, '', "class='btn btn-info' data-app='{$this->app->tab}'"); + } + } + else + { + echo "{$lang->testcase->noCase}"; + if((empty($productID) || common::canModify('product', $product)) && common::hasPriv('testcase', 'create') && $browseType != 'bysuite') + { + $initModule = isset($moduleID) ? (int)$moduleID : 0; + echo html::a($this->createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule"), " " . $lang->testcase->create, '', "class='btn btn-info' data-app='{$this->app->tab}'"); + } - - createLink('testsuite', 'linkCase', "suiteID=$param"), " " . $lang->testsuite->linkCase, '', "class='btn btn-info' data-app='{$this->app->tab}'");?> - - + if(common::hasPriv('testsuite', 'linkCase') && $browseType == 'bysuite') + { + echo html::a($this->createLink('testsuite', 'linkCase', "suiteID=$param"), " " . $lang->testsuite->linkCase, '', "class='btn btn-info' data-app='{$this->app->tab}'"); + } + } + ?>