* finish task #2798.

This commit is contained in:
wangyidong
2016-11-15 14:59:42 +08:00
parent 49b2e7b9ae
commit e7991f415b
6 changed files with 50 additions and 28 deletions
+11 -6
View File
@@ -1182,17 +1182,22 @@ class docModel extends model
die(js::locate('back'));
}
$type = $lib->product ? 'product' : 'custom';
$type = $lib->project ? 'project' : $type;
$mainLib = $type == 'product' ? $this->lang->productCommon : $this->lang->doc->customAB;
$mainLib = $type == 'project' ? $this->lang->projectCommon : $mainLib;
$crumb = html::a(helper::createLink('doc', 'allLibs', "type=$type"), $mainLib) . $this->lang->arrow;
if($lib->product or $lib->project)
{
$table = $lib->product ? TABLE_PRODUCT : TABLE_PROJECT;
$objectID = $lib->product ? $lib->product : $lib->project;
$object = $this->dao->select('id,name')->from($table)->where('id')->eq($objectID)->fetch();
$lib->name = $object->name . ' / ' . $lib->name;
$table = $lib->product ? TABLE_PRODUCT : TABLE_PROJECT;
$objectID = $lib->product ? $lib->product : $lib->project;
$object = $this->dao->select('id,name')->from($table)->where('id')->eq($objectID)->fetch();
if($object) $crumb .= html::a(helper::createLink('doc', 'objectLibs', "type=$type&objectID=$objectID"), $object->name) . $this->lang->arrow;
}
$parents = $moduleID ? $this->loadModel('tree')->getParents($moduleID) : array();
$crumb = html::a(helper::createLink('doc', 'browse', "libID=$libID&browseType=all&param=0&orderBy=id_desc"), $lib->name);
$crumb .= html::a(helper::createLink('doc', 'browse', "libID=$libID&browseType=all&param=0&orderBy=id_desc"), $lib->name);
foreach($parents as $module) $crumb .= $this->lang->arrow . html::a(helper::createLink('doc', 'browse', "libID=$libID&browseType=byModule&param=$module->id&orderBy=id_desc"), $module->name);
return $crumb;
}