* Finish task #5040.
This commit is contained in:
@@ -46,6 +46,9 @@ class doc extends control
|
||||
$this->lang->modulePageActions = $this->doc->setFastMenu($this->lang->doc->fast);
|
||||
$this->lang->modulePageActions .= common::hasPriv('doc', 'createLib') ? html::a(helper::createLink('doc', 'createLib'), "<i class='icon icon-folder-plus'></i> " . $this->lang->doc->createLib, '', "class='btn btn-secondary iframe'") : '';
|
||||
|
||||
$actionURL = $this->createLink('doc', 'browse', "lib=0&browseType=bySearch&queryID=myQueryID");
|
||||
$this->doc->buildSearchForm(0, array(), 0, $actionURL, 'index');
|
||||
|
||||
$this->view->title = $this->lang->doc->common . $this->lang->colon . $this->lang->doc->index;
|
||||
$this->view->position[] = $this->lang->doc->index;
|
||||
$this->view->latestEditedDocs = $this->loadModel('doc')->getDocsByBrowseType(0, 'byediteddate', 0, 0, 'editedDate_desc, id_desc', $pager);
|
||||
@@ -112,7 +115,7 @@ class doc extends control
|
||||
$this->lang->set('menugroup.doc', 'project');
|
||||
}
|
||||
|
||||
$menuType = (!$type && in_array($browseType, array_keys($this->lang->doc->fastMenuList))) ? $browseType : $type;
|
||||
$menuType = (!$type && (in_array($browseType, array_keys($this->lang->doc->fastMenuList)) || $browseType == 'bysearch')) ? $browseType : $type;
|
||||
$this->doc->setMenu($menuType, $libID, $moduleID, $productID, $projectID);
|
||||
$this->session->set('docList', $this->app->getURI(true));
|
||||
|
||||
@@ -136,6 +139,7 @@ class doc extends control
|
||||
if($module) $title = $module->name;
|
||||
if($libID) $title = html::a(helper::createLink('doc', 'browse', "libID=$libID"), $this->libs[$libID], '');
|
||||
if(in_array($browseType, array_keys($this->lang->doc->fastMenuList))) $title = $this->lang->doc->fastMenuList[$browseType];
|
||||
if($browseType == 'bysearch') $title = $this->lang->doc->search;
|
||||
if($param != 0) $title = $this->doc->buildCrumbTitle($libID, $param, $title);
|
||||
if($browseType == 'fastsearch')
|
||||
{
|
||||
@@ -793,6 +797,10 @@ class doc extends control
|
||||
|
||||
/* Set Custom. */
|
||||
foreach(explode(',', $this->config->doc->customObjectLibs) as $libType) $customObjectLibs[$libType] = $this->lang->doc->customObjectLibs[$libType];
|
||||
|
||||
$actionURL = $this->createLink('doc', 'browse', "lib=0&browseType=bySearch&queryID=myQueryID");
|
||||
$this->doc->buildSearchForm(0, array(), 0, $actionURL, 'objectLibs');
|
||||
|
||||
$this->view->customObjectLibs = $customObjectLibs;
|
||||
$this->view->showLibs = $this->config->doc->custom->objectLibs;
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ $(function()
|
||||
if(browseType == 'byediteddate' || browseType == 'openedbyme' || browseType == 'collectedbyme')
|
||||
{
|
||||
$('#pageActions ul.dropdown-menu').css('left', '0px');
|
||||
$('#bysearchTab').remove();
|
||||
}
|
||||
$('#' + browseType + 'Tab').addClass('active');
|
||||
});
|
||||
|
||||
@@ -354,7 +354,7 @@ class docModel extends model
|
||||
$docQuery = str_replace("`lib` = 'all'", '1', $docQuery); // Search all lib.
|
||||
|
||||
$docs = $this->dao->select('*')->from(TABLE_DOC)->where($docQuery)
|
||||
->beginIF(!$libCond)->andWhere("lib")->eq($libID)->fi()
|
||||
->beginIF(!$libCond and $libID != 0)->andWhere("lib")->eq($libID)->fi()
|
||||
->beginIF($this->config->doc->notArticleType)->andWhere('type')->notIN($this->config->doc->notArticleType)->fi()
|
||||
->andWhere('deleted')->eq(0)
|
||||
->fetchAll('id');
|
||||
@@ -708,6 +708,12 @@ class docModel extends model
|
||||
$moduleOptionMenu = $this->loadModel('tree')->getOptionMenu($libID, 'doc', $startModuleID = 0);
|
||||
$this->config->doc->search['params']['module']['values'] = $moduleOptionMenu;
|
||||
|
||||
if($type == 'index' || $type == 'objectLibs')
|
||||
{
|
||||
unset($this->config->doc->search['fields']['module']);
|
||||
unset($this->config->doc->search['fields']['lib']);
|
||||
}
|
||||
|
||||
$this->loadModel('search')->setSearchParams($this->config->doc->search);
|
||||
}
|
||||
|
||||
@@ -1493,7 +1499,7 @@ class docModel extends model
|
||||
public function setFastMenu($fastLib)
|
||||
{
|
||||
$actions = '';
|
||||
if($this->app->methodName == 'browse') $actions .= '<a class="btn btn-link querybox-toggle" id="bysearchTab"><i class="icon icon-search muted"></i>' . $this->lang->doc->search . '</a>';
|
||||
$actions .= '<a class="btn btn-link querybox-toggle" id="bysearchTab"><i class="icon icon-search muted"></i>' . $this->lang->doc->search . '</a>';
|
||||
$actions .= "<a data-toggle='dropdown' class='btn btn-link' title=$fastLib>" . $fastLib . " <span class='caret'></span></a>";
|
||||
$actions .= "<ul class='dropdown-menu'>";
|
||||
foreach($this->lang->doc->fastMenuList as $key => $fastMenu)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<div class="main-col" data-min-width="400">
|
||||
<div class="cell<?php if($browseType == 'bysearch') echo ' show';?>" id="queryBox"></div>
|
||||
<div class="panel block-files block-sm no-margin">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-title font-normal">
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<div class='main-row split-row fade' id='mainRow'>
|
||||
<?php include './side.html.php';?>
|
||||
<div class="main-col" data-min-width="400">
|
||||
<div class="cell" id="queryBox"></div>
|
||||
<div class="row">
|
||||
<div class="col-sm-7">
|
||||
<div class="panel block-files block-sm" style="height: 290px;">
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<?php include dirname(__FILE__) . '/objectlibsbylist.html.php';?>
|
||||
<?php else:?>
|
||||
<div class="main-col" data-min-width="400">
|
||||
<div class="cell" id="queryBox"></div>
|
||||
<div class="panel block-files block-sm no-margin">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-title font-normal">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<div class="main-col" data-min-width="400">
|
||||
<div class="cell" id="queryBox"></div>
|
||||
<div class="panel block-files block-sm no-margin">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-title font-normal">
|
||||
|
||||
Reference in New Issue
Block a user