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):?> - - product}"), "  " . $module->name);?> - - $type}"), "  " . $module->name);?> - - id&orderBy=$orderBy&from=$from"), "  " . $module->name);?> + + product}"), "  " . $attachLib->name);?> + + $type}"), "  " . $attachLib->name);?> + + + + + + + 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;?> + + id&orderBy=$orderBy&from=$from"), "  " . $module->name);?> + + + + - id&objectType=module");?>" title="" class='btn btn-link ajaxCollect'> ", '', "title='{$lang->tree->manage}' class='btn btn-link'")?> - diff --git a/module/doc/view/browsebygrid.html.php b/module/doc/view/browsebygrid.html.php index 0ec64df4bd..77bc98d3d7 100644 --- a/module/doc/view/browsebygrid.html.php +++ b/module/doc/view/browsebygrid.html.php @@ -9,7 +9,7 @@

- +

doc->noDoc;?> " . $lang->doc->create, '', "class='btn btn-info'");?>

@@ -31,36 +31,39 @@ - $module):?> - - collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?> - + $attachLib):?>
product}"); + $browseLink = inlink('allLibs', "type=project&product={$currentLib->product}"); } - elseif($moduleID == 'files') + elseif($libID == 'files') { - $browseLink = inlink('showFiles', "type=$type&objectID={$lib->$type}"); - } - else - { - $browseLink = inlink('browse', "libID=$libID&browseType=bymodule¶m=$module->id&orderBy=$orderBy&from=$from"); + $browseLink = inlink('showFiles', "type=$type&objectID={$currentLib->$type}"); } ?> -
collector, $this->app->user->account) !== false) ? " " : '') . $module->name;?>
-
docCount) ? $module->docCount : $module->allCount) . $lang->doc->item;?>
+
name;?>
+
allCount . $lang->doc->item;?>
+
+
+
+ + + collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?> +
+ id&orderBy=$orderBy&from=$from");?> + + +
collector, $this->app->user->account) !== false ? " " : '') . $module->name;?>
+
docCount . $lang->doc->item;?>
- id}&objectType=module", "", 'hiddenwin', "title='{$lang->doc->collect}' class='btn btn-link'");?> ", '', "title='{$lang->tree->manage}' class='btn btn-link'")?> -