* Adjust the cases of the all products.
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
<?php js::set('flow', $config->global->flow);?>
|
||||
<?php $isProjectApp = $this->app->openApp == 'project'?>
|
||||
<?php $currentModule = $isProjectApp ? 'project' : 'testcase';?>
|
||||
<?php $currentMethod = $isProjectApp ? 'testcase' : 'browse';?>
|
||||
<?php $projectParam = $isProjectApp ? "projectID={$this->session->project}&" : '';?>
|
||||
<?php if(!isset($branch)) $branch = 0;?>
|
||||
<?php if($config->global->flow == 'full'):?>
|
||||
<style>
|
||||
@@ -19,8 +23,8 @@
|
||||
echo !empty($moduleID) ? $moduleName : $this->lang->tree->all;
|
||||
if(!empty($moduleID))
|
||||
{
|
||||
$removeLink = $browseType == 'bymodule' ? $this->createLink('testcase', 'browse', "productID=$productID&branch=$branch&browseType=$browseType¶m=0&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("caseModule")';
|
||||
echo html::a($removeLink, "<i class='icon icon-sm icon-close'></i>", '', "class='text-muted'");
|
||||
$removeLink = $browseType == 'bymodule' ? $this->createLink($currentModule, $currentMethod, $projectParam . "productID=$productID&branch=$branch&browseType=$browseType¶m=0&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("caseModule")';
|
||||
echo html::a($removeLink, "<i class='icon icon-sm icon-close'></i>", '', "class='text-muted' data-app='{$this->app->openApp}'");
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -28,7 +32,7 @@
|
||||
</div>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<?php
|
||||
$hasBrowsePriv = common::hasPriv('testcase', 'browse');
|
||||
$hasBrowsePriv = $isProjectApp ? common::hasPriv('project', 'testcase') : common::hasPriv('testcase', 'browse');
|
||||
$hasGroupPriv = common::hasPriv('testcase', 'groupcase');
|
||||
$hasZeroPriv = common::hasPriv('story', 'zerocase');
|
||||
$hasUnitPriv = common::hasPriv('testtask', 'browseunits');
|
||||
@@ -40,15 +44,15 @@
|
||||
if(!$config->testcase->needReview and empty($config->testcase->forceReview) and $menuType == 'wait') continue;
|
||||
if($hasBrowsePriv and $menuType == 'QUERY')
|
||||
{
|
||||
$searchBrowseLink = $this->createLink('testcase', 'browse', "productID=$productID&branch=$branch&browseType=bySearch¶m=%s");
|
||||
$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 == 'all' or $menuType == 'needconfirm' or $menuType == 'wait'))
|
||||
{
|
||||
echo html::a($this->createLink('testcase', 'browse', "productid=$productID&branch=$branch&browseType=$menuType"), "<span class='text'>{$menuItem->text}</span>", '', "class='btn btn-link' id='{$menuType}Tab'");
|
||||
echo html::a($this->createLink($currentModule, $currentMethod, $projectParam . "productID=$productID&branch=$branch&browseType=$menuType"), "<span class='text'>{$menuItem->text}</span>", '', "class='btn btn-link' id='{$menuType}Tab' data-app='{$this->app->openApp}'");
|
||||
}
|
||||
elseif($hasBrowsePriv and $menuType == 'suite' and $lang->navGroup->testcase == 'qa')
|
||||
elseif($hasBrowsePriv and $menuType == 'suite' and $this->app->openApp == 'qa')
|
||||
{
|
||||
$currentSuiteID = isset($suiteID) ? (int)$suiteID : 0;
|
||||
$currentSuite = zget($suiteList, $currentSuiteID, '');
|
||||
@@ -80,20 +84,20 @@
|
||||
}
|
||||
elseif($hasGroupPriv and $menuType == 'group')
|
||||
{
|
||||
$groupBy = isset($groupBy) ? $groupBy : '';
|
||||
$active = !empty($groupBy) ? 'btn-active-text' : '';
|
||||
$groupBy = isset($groupBy) ? $groupBy : '';
|
||||
$active = !empty($groupBy) ? 'btn-active-text' : '';
|
||||
|
||||
echo "<div id='groupTab' class='btn-group'>";
|
||||
echo html::a($this->createLink('testcase', 'groupCase', "productID=$productID&branch=$branch&groupBy=story"), "<span class='text'>{$lang->testcase->groupByStories}</span>", '', "class='btn btn-link $active'");
|
||||
echo html::a($this->createLink('testcase', 'groupCase', "productID=$productID&branch=$branch&groupBy=story"), "<span class='text'>{$lang->testcase->groupByStories}</span>", '', "class='btn btn-link $active' data-app='{$this->app->openApp}'");
|
||||
echo '</div>';
|
||||
}
|
||||
elseif($hasZeroPriv and $menuType == 'zerocase')
|
||||
{
|
||||
echo html::a($this->createLink('story', 'zeroCase', "productID=$productID&orderBy=id_desc&from={$this->lang->navGroup->testcase}"), "<span class='text'>{$lang->story->zeroCase}</span>", '', "class='btn btn-link' id='zerocaseTab'");
|
||||
echo html::a($this->createLink('story', 'zeroCase', "productID=$productID&orderBy=id_desc&from={$this->lang->navGroup->testcase}"), "<span class='text'>{$lang->story->zeroCase}</span>", '', "class='btn btn-link' id='zerocaseTab' data-app='{$this->app->openApp}'");
|
||||
}
|
||||
elseif($hasUnitPriv and $menuType == 'browseunits')
|
||||
{
|
||||
echo html::a($this->createLink('testtask', 'browseUnits', "productID=$productID"), "<span class='text'>{$lang->testcase->browseUnits}</span>", '', "class='btn btn-link' id='browseunitsTab'");
|
||||
echo html::a($this->createLink('testtask', 'browseUnits', "productID=$productID"), "<span class='text'>{$lang->testcase->browseUnits}</span>", '', "class='btn btn-link' id='browseunitsTab' data-app='{$this->app->openApp}'");
|
||||
}
|
||||
?>
|
||||
<?php endforeach;?>
|
||||
@@ -132,7 +136,7 @@
|
||||
echo "<li $class>" . html::a($link, $lang->testcase->fileImport, '', $misc) . "</li>";
|
||||
|
||||
$class = common::hasPriv('testcase', 'importFromLib') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('testcase', 'importFromLib') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('testcase', 'importFromLib') ? "data-app='{$this->app->openApp}'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'importFromLib') ? $this->createLink('testcase', 'importFromLib', "productID=$productID&branch=$branch") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->testcase->importFromLib, '', $misc) . "</li>";
|
||||
?>
|
||||
@@ -144,31 +148,31 @@
|
||||
<div class='btn-group dropdown'>
|
||||
<?php
|
||||
$actionLink = $this->createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule");
|
||||
echo html::a($actionLink, "<i class='icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-primary'");
|
||||
echo html::a($actionLink, "<i class='icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-primary' data-app='{$this->app->openApp}'");
|
||||
?>
|
||||
<button type='button' class='btn btn-primary dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
|
||||
<ul class='dropdown-menu'>
|
||||
<li><?php echo html::a($actionLink, $lang->testcase->create);?></li>
|
||||
<li><?php echo html::a($this->createLink('testcase', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$initModule"), $lang->testcase->batchCreate);?></li>
|
||||
<li><?php echo html::a($this->createLink('testcase', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$initModule"), $lang->testcase->batchCreate, '', "data-app='{$this->app->openApp}'");?></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php if($this->app->rawMethod == 'browseunits' and common::canModify('product', $product)):?>
|
||||
<?php common::printLink('testtask', 'importUnitResult', "product=$productID", "<i class='icon icon-import'></i> " . $lang->testtask->importUnitResult, '', "class='btn btn-primary'");?>
|
||||
<?php common::printLink('testtask', 'importUnitResult', "product=$productID", "<i class='icon icon-import'></i> " . $lang->testtask->importUnitResult, '', "class='btn btn-primary' data-app='{$this->app->openApp}'");?>
|
||||
<?php endif;?>
|
||||
<?php else:?>
|
||||
<div class='btn-group dropdown-hover'>
|
||||
<?php
|
||||
$link = common::hasPriv('testcase', 'create') ? $this->createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule") : '###';
|
||||
$disabled = common::hasPriv('testcase', 'create') ? '' : "disabled";
|
||||
echo html::a($link, "<i class='icon icon-plus'></i> {$lang->testcase->create} </span><span class='caret'>", '', "class='btn btn-primary $disabled'");
|
||||
echo html::a($link, "<i class='icon icon-plus'></i> {$lang->testcase->create} </span><span class='caret'>", '', "class='btn btn-primary $disabled' data-app='project'");
|
||||
?>
|
||||
<ul class='dropdown-menu'>
|
||||
<?php $disabled = common::hasPriv('testcase', 'batchCreate') ? '' : "class='disabled'";?>
|
||||
<li <?php echo $disabled?>>
|
||||
<?php
|
||||
$batchLink = $this->createLink('testcase', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$initModule");
|
||||
echo "<li>" . html::a($batchLink, "<i class='icon icon-plus'></i>" . $lang->testcase->batchCreate) . "</li>";
|
||||
echo "<li>" . html::a($batchLink, "<i class='icon icon-plus'></i>" . $lang->testcase->batchCreate, '', "data-app='{$this->app->openApp}'") . "</li>";
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user