From 6119cf2a52cd155686e292f9477556036e656e6c Mon Sep 17 00:00:00 2001 From: Yagami Date: Thu, 18 Oct 2018 09:12:02 +0800 Subject: [PATCH] * Finish task #5033. --- module/doc/control.php | 1 + module/doc/model.php | 39 ++++++++++++++++++++--------------- module/doc/view/side.html.php | 4 ++-- 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index aec01523e5..34ad3e154e 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -42,6 +42,7 @@ class doc extends control $this->session->set('docList', $this->app->getURI(true)); $this->app->loadClass('pager', $static = true); $pager = new pager(0, 5, 1); + $this->lang->modulePageActions = $this->doc->setFastMenu($this->lang->doc->fast); $this->view->title = $this->lang->doc->common . $this->lang->colon . $this->lang->doc->index; $this->view->position[] = $this->lang->doc->index; diff --git a/module/doc/model.php b/module/doc/model.php index dfd615e8f8..1bfaf8f2af 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -48,22 +48,6 @@ class docModel extends model $mainLib = isset($this->lang->doc->libTypeList[$type]) ? $this->lang->doc->libTypeList[$type] : $mainLib; - $selectHtml .= "
"; - $selectHtml .= "
"; - $selectHtml .= "" . $mainLib . " "; - $selectHtml .= "
'; - $currentLib = 0; if(strpos('product,project,custom', $type) !== false) { @@ -105,7 +89,7 @@ class docModel extends model } } - $actions = ''; + $actions = $this->setFastMenu($mainLib); $actions .= common::hasPriv('doc', 'createLib') ? html::a(helper::createLink('doc', 'createLib', "type={$type}&objectID={$currentLib}"), " " . $this->lang->doc->createLib, '', "class='btn btn-secondary iframe'") : ''; if($libID and common::hasPriv('doc', 'create')) $actions .= html::a(helper::createLink('doc', 'create', "libID=$libID"), " " . $this->lang->doc->create, '', "class='btn btn-primary'"); @@ -1490,4 +1474,25 @@ class docModel extends model return $title; } + + public function setFastMenu($mainLib) + { + $actions = ''; + $actions .= "" . $mainLib . " "; + $actions .= "'; + $actions .= '' . $this->lang->doc->search . ''; + + return $actions; + } } diff --git a/module/doc/view/side.html.php b/module/doc/view/side.html.php index c01089fd16..2c54a99762 100644 --- a/module/doc/view/side.html.php +++ b/module/doc/view/side.html.php @@ -48,7 +48,7 @@ if(!isset($type)) $type = 'product'; $icon = $tabValue == 'product' ? " " : " "; $activeClass = ($this->methodName == 'objectlibs' && $type == $tabValue && $object->id == $tabMenu->id) ? 'active' : ''; - $activeClass = ($this->methodName == 'browse' && isset($currentLib) && $currentLib->id == $mainLibID) ? 'active' : $activeClass; + $activeClass = ($this->methodName == 'browse' && isset($currentLib->id) && $currentLib->id == $mainLibID) ? 'active' : $activeClass; ?>
  • > 0):?> @@ -115,7 +115,7 @@ if(!isset($type)) $type = 'product'; $sideLibName):?> methodName == 'objectlibs' && $type == $tabValue && $object->id == $sideLibID) ? 'active' : ''; - $activeClass = ($this->methodName == 'browse' && isset($currentLib) && $currentLib->id == $sideLibID) ? 'active' : $activeClass; + $activeClass = ($this->methodName == 'browse' && isset($currentLib->id) && $currentLib->id == $sideLibID) ? 'active' : $activeClass; ?>
  • > createLink('doc', 'browse', "libID=$sideLibID"), " " . $sideLibName, '', "class='text-ellipsis' title='{$sideLibName}'");?>