Skip to content
Snippets Groups Projects
Commit 9f091f67 authored by Dorian Merz's avatar Dorian Merz Committed by Robert Lange
Browse files

refs #16883 [finc] show hierarchy tree tab only if there actually is a hierarchy tree to show

* do not show tab for single-element trees
parent 3ce1e5cb
Branches
Tags
No related merge requests found
...@@ -51,17 +51,20 @@ class HierarchyTree extends \VuFind\RecordTab\HierarchyTree ...@@ -51,17 +51,20 @@ class HierarchyTree extends \VuFind\RecordTab\HierarchyTree
else return 'hierarchy_tree'; else return 'hierarchy_tree';
} }
/** public function isActive()
* {@inheritdoc}
* Returns different descriptions according to record type
* @return string
*/
/* public function isActive()
{ {
return ( $trees = $this->getTreeList();
$this->getRecordDriver()->tryMethod('isSingleElementHierarchyRecord') if (empty($trees)) {
? false : parent::isActive() return false;
); }
foreach ($trees as $key => $value) {
if ($key !== $this->driver->getUniqueID()) {
return true;
}
}
if ($this->driver->getChildRecordCount() > 0) {
return true;
}
return false;
} }
*/
} }
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment