lang->tree->all;
if(!empty($moduleID))
{
$removeLink = $browseType == 'bymodule' ? $this->createLink($currentModule, $currentMethod, $projectParam . "productID=$productID&branch=$branch&browseType=$browseType¶m=0&caseType=&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("caseModule")';
echo html::a($removeLink, "", '', "class='text-muted' data-app='{$this->app->tab}'");
}
?>
app->rawMethod == 'browseunits'):?>
testcase->typeList[''] = $lang->testcase->allType;
$currentTypeName = zget($lang->testcase->typeList, $caseType, '');
$currentLable = empty($currentTypeName) ? $lang->testcase->allType : $currentTypeName;
if(!isset($param)) $param = 0;
echo "
";
echo html::a('javascript:;', "{$currentLable}" . " ", '', "class='btn btn-link' data-toggle='dropdown'");
echo "
';
?>
testtask->unitTag as $key => $label):?>
$label", '', "id='{$key}UnitTab' class='btn btn-link' data-app='{$this->app->tab}'");?>
app->rawModule;
$rawMethod = $this->app->rawMethod;
if(!isset($lang->{$rawModule}->featureBar[$rawMethod]))
{
$rawModule = $app->tab == 'project' ? 'project' : 'testcase';
$rawMethod = $rawModule == 'testcase' ? 'browse' : 'testcase';
}
?>
hidden)) continue;
$menuType = $menuItem->name;
$caseType = isset($caseType) ? $caseType : '';
if(!$config->testcase->needReview and empty($config->testcase->forceReview) and $menuType == 'wait') continue;
if($hasBrowsePriv and $menuType == 'QUERY' and in_array($browseType, array('all', 'needconfirm', 'bysuite')))
{
$searchBrowseLink = $this->createLink($currentModule, $currentMethod, $projectParam . "productID=$productID&branch=$branch&browseType=bySearch¶m=%s");
$isBySearch = $browseType == 'bysearch';
include '../../common/view/querymenu.html.php';
}
elseif($hasBrowsePriv and $menuType == 'casetype')
{
if($currentModule == 'project') continue;
if($this->moduleName == 'testtask' and $this->methodName == 'browseunits') continue;
if($this->moduleName == 'story' and $this->methodName == 'zerocase') continue;
if($browseType == 'bysuite') continue;
$lang->testcase->typeList[''] = $lang->testcase->allType;
$currentTypeName = zget($lang->testcase->typeList, $caseType, '');
$currentLable = empty($currentTypeName) ? $lang->testcase->allType : $currentTypeName;
if(!isset($param)) $param = 0;
echo "- ";
foreach($lang->testcase->typeList as $type => $typeName)
{
echo '
- '; if($hasUnitPriv and $type == 'unit') { echo html::a($this->createLink('testtask', 'browseUnits', "productID=$productID&browseType=newest&orderBy=id_desc&recTotal=0&recPerPage=20&pageID=1&projectID=$projectID"), "{$lang->testcase->browseUnits}", '', " data-app='{$this->app->tab}'"); } elseif(isset($groupBy)) { echo html::a($this->createLink('testcase', 'groupCase', "productID=$productID&branch=$branch&groupBy=story&projectID=$projectID&caseType=$type"), $typeName); } else { echo html::a($this->createLink('testcase', 'browse', "productID=$productID&branch=$branch&browseType=all¶m=$param&caseType=$type"), $typeName); } echo " "; } echo '
";
echo html::a('javascript:;', "{$currentLable}" . " ", '', "class='btn btn-link' data-toggle='dropdown'");
echo "
';
}
elseif($hasBrowsePriv and $menuType == 'autocase')
{
if($this->moduleName == 'testtask' and $this->methodName == 'browseunits') continue;
if($this->moduleName == 'story' and $this->methodName == 'zerocase') continue;
if($browseType == 'bysuite' or $browseType == 'bysearch') continue;
echo html::checkbox('showAutoCase', array('1' => $lang->testcase->showAutoCase), '', $this->cookie->showAutoCase ? 'checked=checked' : '');
}
elseif($hasBrowsePriv and ($menuType == 'all' or $menuType == 'needconfirm' or $menuType == 'wait'))
{
echo html::a($this->createLink($currentModule, $currentMethod, $projectParam . "productID=$productID&branch=$branch&browseType=$menuType¶m=0&caseType=$caseType"), "{$menuItem->text}", '', "class='btn btn-link' id='{$menuType}Tab' data-app='{$this->app->tab}'");
}
elseif($hasBrowsePriv and $menuType == 'suite' and $this->app->tab == 'qa')
{
$currentSuiteID = isset($suiteID) ? (int)$suiteID : 0;
$currentSuite = zget($suiteList, $currentSuiteID, '');
$currentLable = empty($currentSuite) ? $lang->testsuite->common : $currentSuite->name;
echo "- ";
foreach($lang->testcase->typeList as $type => $typeName)
{
echo '
- '; if($hasUnitPriv and $type == 'unit') { echo html::a($this->createLink('testtask', 'browseUnits', "productID=$productID&browseType=newest&orderBy=id_desc&recTotal=0&recPerPage=20&pageID=1&projectID=$projectID"), "{$lang->testcase->browseUnits}", '', " data-app='{$this->app->tab}'"); } elseif(isset($groupBy)) { echo html::a($this->createLink('testcase', 'groupCase', "productID=$productID&branch=$branch&groupBy=story&projectID=$projectID&caseType=$type"), $typeName); } else { echo html::a($this->createLink('testcase', 'browse', "productID=$productID&branch=$branch&browseType=$browseType¶m=$param&caseType=$type"), $typeName); } echo " "; } echo '
";
echo html::a('javascript:;', "{$currentLable}" . " ", '', "class='btn btn-link' data-toggle='dropdown'");
echo "
';
}
elseif($hasGroupPriv and $menuType == 'group')
{
$groupBy = isset($groupBy) ? $groupBy : '';
$active = !empty($groupBy) ? 'btn-active-text' : '';
echo "- ";
if(empty($productID) or common::canModify('product', $product))
{
if(empty($suiteList))
{
echo '
- '; echo html::a($this->createLink('testsuite', 'create', "productID=$productID"), " " . $lang->testsuite->create); echo ' '; } } foreach($suiteList as $suiteID => $suite) { $suiteName = $suite->name; echo '
- '; echo html::a($this->createLink('testcase', 'browse', "productID=$productID&branch=$branch&browseType=bySuite¶m=$suiteID"), $suiteName); echo " "; } echo '
";
echo html::a($this->createLink('testcase', 'groupCase', "productID=$productID&branch=$branch&groupBy=story&projectID=$projectID"), "{$menuItem->text}", '', "class='btn btn-link $active' data-app='{$this->app->tab}'");
echo '
';
}
elseif($hasZeroPriv and $menuType == 'zerocase')
{
$projectID = $isProjectApp ? $this->session->project : 0;
echo html::a($this->createLink('testcase', 'zeroCase', "productID=$productID&branch=$branch&orderBy=id_desc&projectID=$projectID"), "{$menuItem->text}", '', "class='btn btn-link' id='zerocaseTab' data-app='{$this->app->tab}'");
}
?>
methodName == 'browse') echo " {$lang->testcase->bySearch}";
?>
-
createLink('testcase', 'export', "productID=$productID&orderBy=$orderBy&taskID=0&browseType=$browseType") : '#';
echo "
- " . html::a($link, $lang->testcase->export, '', $misc . "data-app={$this->app->tab}") . " "; $class = common::hasPriv('testcase', 'exportTemplate') ? '' : "class=disabled"; $misc = common::hasPriv('testcase', 'exportTemplate') ? "class='export'" : "class=disabled"; $link = common::hasPriv('testcase', 'exportTemplate') ? $this->createLink('testcase', 'exportTemplate', "productID=$productID") : '#'; echo "
- " . html::a($link, $lang->testcase->exportTemplate, '', $misc . "data-app={$this->app->tab} data-width='65%'") . " "; ?>
-
" . html::a($this->createlink('testcase', 'import', "productID=$productID&branch=$branch"), $lang->testcase->fileImport, '', "class='export' data-app={$app->tab}") . "";
$link = $this->createLink('testcase', 'importFromLib', "productID=$productID&branch=$branch&libID=0&orderBy=id_desc&browseType=&queryID=10&recTotal=0&recPerPage=20&pageID=1&projectID=$projectID");
if(common::hasPriv('testcase', 'importFromLib')) echo "
- " . html::a($link, $lang->testcase->importFromLib, '', "data-app={$app->tab}") . " "; ?>
" . $lang->testcase->automation, '', "class='btn btn-link iframe' data-width='50%'", true, true)?>
createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule");
$batchCreateLink = $this->createLink('testcase', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$initModule");
$buttonLink = '';
$buttonTitle = '';
if(common::hasPriv('testcase', 'batchCreate'))
{
$buttonLink = !empty($productID) ? $batchCreateLink : '';
$buttonTitle = $lang->testcase->batchCreate;
}
if(common::hasPriv('testcase', 'create'))
{
$buttonLink = $createTestcaseLink;
$buttonTitle = $lang->testcase->create;
}
$hidden = empty($buttonLink) ? 'hidden' : '';
echo html::a($buttonLink, " " . $buttonTitle, '', "class='btn btn-primary $hidden' data-app='{$this->app->tab}'");
?>
app->rawMethod == 'browseunits' and (empty($productID) or common::canModify('product', $product))):?>
" . $lang->testtask->importUnitResult, '', "class='btn btn-primary' data-app='{$this->app->tab}'");?>
- testcase->create);?>
- testcase->batchCreate, '', "data-app='{$this->app->tab}'");?>