* Finish task #7728.
This commit is contained in:
@@ -168,11 +168,24 @@ class doc extends control
|
||||
$this->view->itemCounts = $this->doc->statLibCounts(array_keys($libs));
|
||||
}
|
||||
|
||||
$attachLibs = array();
|
||||
if(!empty($lib) and (!empty($lib->product) or !empty($lib->project)) and $browseType != 'bymodule')
|
||||
{
|
||||
$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 and $type and isset($lib->$type))
|
||||
{
|
||||
$objectLibs = $this->doc->getLibsByObject($type, $lib->$type);
|
||||
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 = $this->doc->getDocMenu($libID, $moduleID, '`order`', $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;
|
||||
|
||||
@@ -51,7 +51,12 @@ class docModel extends model
|
||||
$mainLib = $this->lang->doc->libTypeList[$type];
|
||||
$selectHtml .= "<div class='btn-group angle-btn'>";
|
||||
$selectHtml .= "<div class='btn-group'>";
|
||||
$selectHtml .= "<a class='btn btn-limit' title=$mainLib href=" . helper::createLink('doc', 'allLibs', "type=product") . ">" . $mainLib . "</a>";
|
||||
$selectHtml .= "<a data-toggle='dropdown' class='btn btn-limit' title=$mainLib>" . $mainLib . " <span class='caret'></span></a>";
|
||||
$selectHtml .= "<ul class='dropdown-menu'>";
|
||||
foreach($this->lang->doc->libTypeList as $libType => $libName)
|
||||
{
|
||||
$selectHtml .= '<li>' . html::a(helper::createLink('doc', 'allLibs', "type=$libType"), "<i class='icon {$this->lang->doc->libIconList[$libType]}'></i> {$this->lang->doc->libTypeList[$libType]}") . '</li>';
|
||||
}
|
||||
$selectHtml .='</ul></div></div>';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user