* code for issue #767.
This commit is contained in:
+24
-15
@@ -75,6 +75,14 @@ class doc extends control
|
||||
$this->loadModel('search');
|
||||
|
||||
list($libs, $libID, $object, $objectID, $objectDropdown) = $this->doc->setMenuByType('mine', 0, $libID);
|
||||
if($type != 'mine')
|
||||
{
|
||||
$objectTitle = '';
|
||||
if($type == 'view') $objectTitle = $this->lang->doc->myView;
|
||||
if($type == 'collect') $objectTitle = $this->lang->doc->myCollection;
|
||||
if($type == 'createdby') $objectTitle = $this->lang->doc->myCreation;
|
||||
if($objectTitle) $objectDropdown = "<div id='sidebarHeader'><div class='title' title='{$objectTitle}'>{$objectTitle}</div></div>";
|
||||
}
|
||||
|
||||
/* Build the search form. */
|
||||
$queryID = $browseType == 'bysearch' ? (int)$param : 0;
|
||||
@@ -107,21 +115,22 @@ class doc extends control
|
||||
$docs = $this->doc->getMineList($type, $browseType, $orderBy, $pager, $queryID);
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->doc->common;
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->docs = $docs;
|
||||
$this->view->users = $this->user->getPairs('noletter');
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->param = $param;
|
||||
$this->view->libID = $libID;
|
||||
$this->view->lib = $this->doc->getLibById($libID);
|
||||
$this->view->libTree = $this->doc->getLibTree($type != 'mine' ? 0 : $libID, $libs, 'mine', $moduleID, 0, $browseType);
|
||||
$this->view->pager = $pager;
|
||||
$this->view->type = $type;
|
||||
$this->view->objectID = 0;
|
||||
$this->view->canExport = ($this->config->edition != 'open' and common::hasPriv('doc', 'mine2export') and $type == 'mine');
|
||||
$this->view->libType = 'lib';
|
||||
$this->view->title = $this->lang->doc->common;
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->docs = $docs;
|
||||
$this->view->users = $this->user->getPairs('noletter');
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->param = $param;
|
||||
$this->view->libID = $libID;
|
||||
$this->view->lib = $this->doc->getLibById($libID);
|
||||
$this->view->libTree = $this->doc->getLibTree($type != 'mine' ? 0 : $libID, $libs, 'mine', $moduleID, 0, $browseType);
|
||||
$this->view->pager = $pager;
|
||||
$this->view->type = $type;
|
||||
$this->view->objectID = 0;
|
||||
$this->view->canExport = ($this->config->edition != 'open' and common::hasPriv('doc', 'mine2export') and $type == 'mine');
|
||||
$this->view->libType = 'lib';
|
||||
$this->view->objectDropdown = $objectDropdown;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -2765,6 +2765,11 @@ class docModel extends model
|
||||
{
|
||||
$libs = $this->getLibsByObject($type, 0, '', $appendLib);
|
||||
if($libID == 0 and !empty($libs)) $libID = reset($libs)->id;
|
||||
if(isset($libs[$libID]))
|
||||
{
|
||||
$objectTitle = zget($libs[$libID], 'name', '');
|
||||
$objectDropdown = "<div id='sidebarHeader'><div class='title' title='{$objectTitle}'>{$objectTitle}</div></div>";
|
||||
}
|
||||
|
||||
$object = new stdclass();
|
||||
$object->id = 0;
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<?php js::set('treeData', $libTree)?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div id="leftBar" class="btn-toolbar pull-left">
|
||||
<?php echo $objectDropdown;?>
|
||||
<?php if(!empty($libTree)):?>
|
||||
<?php foreach($lang->doc->featureBar['tableContents'] as $barType => $barName):?>
|
||||
<?php $active = $barType == $browseType ? 'btn-active-text' : '';?>
|
||||
|
||||
Reference in New Issue
Block a user