diff --git a/module/doc/control.php b/module/doc/control.php index 63c5204ecd..f566d451e0 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -158,23 +158,24 @@ class doc extends control $this->view->itemCounts = $this->doc->statLibCounts(array_keys($libs)); } - $modules = $this->doc->getDocMenu($libID, $moduleID, $orderBy == 'title_asc' ? 'name_asc' : 'id_desc', $browseType); + $attachLibs = array(); if(!empty($lib) and (!empty($lib->product) or !empty($lib->project))) { $count = $this->dao->select('count(*) as count')->from(TABLE_DOCLIB)->where('project')->eq($lib->project)->andWhere('product')->eq($lib->product)->fetch('count'); if($count == 1) { $objectLibs = $this->doc->getLibsByObject($type, $lib->$type); - if(isset($objectLibs['project'])) $modules['project'] = $objectLibs['project']; - if(isset($objectLibs['files'])) $modules['files'] = $objectLibs['files']; + if(isset($objectLibs['project'])) $attachLibs['project'] = $objectLibs['project']; + if(isset($objectLibs['files'])) $attachLibs['files'] = $objectLibs['files']; } } $this->view->breadTitle = $title; $this->view->libID = $libID; $this->view->moduleID = $moduleID; - $this->view->modules = $modules; + $this->view->modules = $this->doc->getDocMenu($libID, $moduleID, $orderBy == 'title_asc' ? 'name_asc' : 'id_desc', $browseType); $this->view->docs = $this->doc->getDocsByBrowseType($libID, $browseType, $queryID, $moduleID, $sort, $pager); + $this->view->attachLibs = $attachLibs; $this->view->users = $this->loadModel('user')->getPairs('noletter'); $this->view->orderBy = $orderBy; $this->view->browseType = $browseType; @@ -183,7 +184,7 @@ class doc extends control $this->view->from = $from; $this->view->pager = $pager; $this->view->libs = $libs; - $this->view->lib = $libID ? $lib : ''; + $this->view->currentLib = $libID ? $lib : ''; $this->display(); } diff --git a/module/doc/view/browse.html.php b/module/doc/view/browse.html.php index 7b7fb59b8c..161444648f 100644 --- a/module/doc/view/browse.html.php +++ b/module/doc/view/browse.html.php @@ -46,7 +46,7 @@ var browseType = ''; - +
@@ -98,29 +98,35 @@ var browseType = ''; - - $module):?> - - collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?> - collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?> - + + $attachLib):?>
doc->noDoc;?> " . $lang->doc->create, '', "class='btn btn-info'");?>