diff --git a/module/doc/control.php b/module/doc/control.php index 3a42bd0932..5b30917108 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -143,6 +143,7 @@ class doc extends control if($module) $title = $module->name; if($libID) $title = $this->libs[$libID]; if(in_array($browseType, array_keys($this->lang->doc->fastMenuList))) $title = $this->lang->doc->fastMenuList[$browseType]; + if($param) $title = $this->doc->buildBreadTitle($libID, $param, $title); if($browseType == 'fastsearch') { if($this->post->searchDoc) $this->session->set('searchDoc', $this->post->searchDoc); @@ -160,7 +161,7 @@ class doc extends control $this->view->itemCounts = $this->doc->statLibCounts(array_keys($libs)); } - $this->view->title = $title; + $this->view->breadTitle = $title; $this->view->libID = $libID; $this->view->moduleID = $moduleID; $this->view->modules = $this->doc->getDocMenu($libID, $moduleID, $orderBy == 'title_asc' ? 'name_asc' : 'id_desc', $browseType); diff --git a/module/doc/css/common.css b/module/doc/css/common.css index b0dcd89fc1..f9b6058e2e 100644 --- a/module/doc/css/common.css +++ b/module/doc/css/common.css @@ -59,3 +59,4 @@ } .main-col > .panel > .panel-body {padding-top: 20px;} +.main-col .panel-title a.active{color: #0c64eb} diff --git a/module/doc/model.php b/module/doc/model.php index 94447175dc..9e56f199c8 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -1528,4 +1528,52 @@ class docModel extends model return $statisticInfo; } + + /** + * Print doc child module. + * + * @access public + */ + public function printChildModule($module, $libID, $methodName, $browseType, $moduleID) + { + if(isset($module->children)) + { + foreach($module->children as $childModule) + { + $active = ''; + if($methodName == 'browse' && $browseType == 'bymodule' && $moduleID == $childModule->id) $active = "class='active'"; + echo ''; + } + } + } + + /** + * Build doc bread title. + * + * @access public + * @return string + */ + public function buildBreadTitle($libID = 0, $param = 0, $title = '') + { + $path = $this->dao->select('path')->from(TABLE_MODULE)->where('id')->eq($param)->fetch('path'); + + $parantMoudles = $this->dao->select('id, name')->from(TABLE_MODULE) + ->where('id')->in($path) + ->andWhere('deleted')->eq(0) + ->fetchAll('id'); + + foreach($parantMoudles as $parentID => $moduleName) + { + $active = ''; + if($param == $parentID) $active = "class='active'"; + $title .= html::a(helper::createLink('doc', 'browse', "libID=$libID&browseType=byModule¶m={$parentID}"), ' > ' . $moduleName->name , '', "$active"); + } + + return $title; + } } diff --git a/module/doc/view/browse.html.php b/module/doc/view/browse.html.php index cc9899492e..ac9dc9c5e3 100644 --- a/module/doc/view/browse.html.php +++ b/module/doc/view/browse.html.php @@ -36,7 +36,7 @@ var browseType = ''; - +