This commit is contained in:
hufangzhou
2021-12-02 10:04:14 +08:00
parent 7d59199f52
commit 3c8e265ab7
2 changed files with 12 additions and 5 deletions
+2 -2
View File
@@ -44,7 +44,7 @@ if(empty($type)) $type = 'product';
echo "<ul class='dropdown-menu pull-left'>";
if($canManageMenu)
{
echo '<li>' . html::a($this->createLink('tree', 'browse', "rootID=$libID&view=doc", '', true), '<i class="icon-cog-outline"></i> ' . $this->lang->doc->manageType, '', "class='iframe'") . '</li>';
echo '<li>' . html::a($this->createLink('tree', 'browse', "rootID=$libID&view=doc&currentModuleID=0&branch=0&from={$this->app->tab}", '', true), '<i class="icon-cog-outline"></i> ' . $this->lang->doc->manageType, '', "class='iframe'") . '</li>';
echo "<li class='divider'></li>";
}
if($canEditLib) echo '<li>' . html::a($this->createLink('doc', 'editLib', "rootID=$libID"), '<i class="icon-edit"></i> ' . $lang->doc->editLib, '', "class='iframe'") . '</li>';
@@ -112,7 +112,7 @@ if(empty($type)) $type = 'product';
}
else
{
common::printLink('tree', 'browse', "rootID=$libID&view=doc", $lang->doc->manageType, '', "class='btn btn-info btn-wide iframe'", '', true);
common::printLink('tree', 'browse', "rootID=$libID&view=doc&currentModuleID=0&branch=0&from={$this->app->tab}", $lang->doc->manageType, '', "class='btn btn-info btn-wide iframe'", '', true);
}
}
?>
+10 -3
View File
@@ -29,9 +29,18 @@ class tree extends control
{
$this->loadModel('product');
if(strpos($viewType, 'doc') !== false) $lib = $this->loadModel('doc')->getLibById($rootID);
if($this->app->tab == 'product')
{
$this->product->setMenu($this->session->product, $branch, 0, '', $viewType);
if($from == 'product' and strpos($viewType, 'doc') !== false)
{
$this->product->setMenu($lib->product, $branch, 0, '', $viewType);
}
else
{
$this->product->setMenu($rootID, $branch, 0, '', $viewType);
}
}
else if($this->app->tab == 'qa' and $viewType != 'caselib')
{
@@ -71,9 +80,7 @@ class tree extends control
elseif(strpos($viewType, 'doc') !== false)
{
/* The viewType is doc. */
$this->loadModel('doc');
$viewType = 'doc';
$lib = $this->doc->getLibById($rootID);
$this->view->root = $lib;
}
elseif(strpos($viewType, 'api') !== false)