* fix feature menu.

This commit is contained in:
Catouse
2016-04-20 15:29:12 +08:00
parent 149e26071f
commit 42a26d17de
5 changed files with 23 additions and 21 deletions
+5 -4
View File
@@ -19,17 +19,18 @@
$hasGroupPriv = common::hasPriv('testcase', 'groupcase');
$hasZeroPriv = common::hasPriv('story', 'zerocase');
?>
<?php foreach($app->customMenu['featurebar'] as $type => $featurebar):?>
<?php if($featurebar['status'] == 'hide') continue;?>
<?php foreach(customModel::getFeatureMenu($this->moduleName, $this->methodName) as $menuItem):?>
<?php
if($menuItem->hidden) continue;
$type = $menuItem->name;
if($hasBrowsePriv and strpos($type, 'QUERY') === 0)
{
$queryID = (int)substr($type, 5);
echo "<li id='{$type}Tab'>" . html::a($this->createLink('testcase', 'browse', "productid=$productID&branch=$branch&browseType=bySearch&param=$queryID"), $featurebar['link']) . "</li>";
echo "<li id='{$type}Tab'>" . html::a($this->createLink('testcase', 'browse', "productid=$productID&branch=$branch&browseType=bySearch&param=$queryID"), $menuItem->text) . "</li>";
}
elseif($hasBrowsePriv and ($type == 'all' or $type == 'needconfirm'))
{
echo "<li id='{$type}Tab'>" . html::a($this->createLink('testcase', 'browse', "productid=$productID&branch=$branch&browseType=$type"), $featurebar['link']) . "</li>";
echo "<li id='{$type}Tab'>" . html::a($this->createLink('testcase', 'browse', "productid=$productID&branch=$branch&browseType=$type"), $menuItem->text) . "</li>";
}
elseif($hasGroupPriv and $type == 'group')
{