* finished the feature of manage doc lib modules.

This commit is contained in:
wangchunsheng
2010-07-30 06:00:00 +00:00
parent 12e4374afe
commit 3c8f46b6d5
7 changed files with 31 additions and 26 deletions
+18 -6
View File
@@ -35,16 +35,28 @@ class tree extends control
$this->view->root = $product;
$this->view->productModules = $this->tree->getOptionMenu($rootID, 'story');
}
elseif($viewType == 'customdoc')
elseif(strpos($viewType, 'doc') !== false)
{
$lib = $this->loadModel('doc')->getLibById($rootID);
$this->view->root = $lib;
$this->loadModel('doc');
if($rootID == 'product' or $rootID == 'project')
{
$viewType = $rootID . 'doc';
$lib->id = $rootID;
$lib->name = $this->lang->doc->systemLibs[$rootID];
$this->view->root = $lib;
}
else
{
$viewType = 'customdoc';
$lib = $this->loadModel('doc')->getLibById($rootID);
$this->view->root = $lib;
}
}
if($viewType == 'story')
{
/* 设置菜单。*/
$this->product->setMenu($this->product->getPairs(), $rootID, 'product');
$this->product->setMenu($this->product->getPairs(), $rootID, 'story');
$this->lang->tree->menu = $this->lang->product->menu;
$this->lang->set('menugroup.tree', 'product');
@@ -75,10 +87,10 @@ class tree extends control
$position[] = html::a($this->createLink('testcase', 'browse', "product=$rootID"), $product->name);
$position[] = $this->lang->tree->manageCase;
}
elseif($viewType == 'customdoc')
elseif(strpos($viewType, 'doc') !== false)
{
/* 设置菜单。*/
$this->doc->setMenu($this->doc->getLibs(), $rootID);
$this->doc->setMenu($this->doc->getLibs(), $rootID, 'doc');
$this->lang->tree->menu = $this->lang->doc->menu;
$this->lang->set('menugroup.tree', 'doc');