From d68059130506d4ca832818182aa6d2d8d9fb362d Mon Sep 17 00:00:00 2001
From: Dorian Merz <merz@ub.uni-leipzig.de>
Date: Tue, 28 Aug 2018 15:15:24 +0200
Subject: [PATCH] refs #13705

* multiple changes in hierarchy display
* adds hierarchy tab to records
* removes isSingleElementHierarchy function
---
 .../finc/src/finc/RecordDriver/SolrDefaultFincTrait.php  | 4 ++--
 module/finc/src/finc/RecordTab/HierarchyTree.php         | 9 ++++++++-
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/module/finc/src/finc/RecordDriver/SolrDefaultFincTrait.php b/module/finc/src/finc/RecordDriver/SolrDefaultFincTrait.php
index 48e1d708447..697f1cc77d7 100644
--- a/module/finc/src/finc/RecordDriver/SolrDefaultFincTrait.php
+++ b/module/finc/src/finc/RecordDriver/SolrDefaultFincTrait.php
@@ -57,7 +57,7 @@ trait SolrDefaultFincTrait
      *
      * @return bool
      */
-    public function isCollection()
+/*    public function isCollection()
     {
         // first check as always if we have a collection
         $isCollection = parent::isCollection();
@@ -71,7 +71,7 @@ trait SolrDefaultFincTrait
         // if we've come so far this record is no collection
         return false;
     }
-
+*/
     /**
      * Get all call numbers associated with the record (empty string if none).
      *
diff --git a/module/finc/src/finc/RecordTab/HierarchyTree.php b/module/finc/src/finc/RecordTab/HierarchyTree.php
index 1e764d10cea..d1fed01c1fa 100644
--- a/module/finc/src/finc/RecordTab/HierarchyTree.php
+++ b/module/finc/src/finc/RecordTab/HierarchyTree.php
@@ -62,16 +62,23 @@ class HierarchyTree extends \VuFind\RecordTab\HierarchyTree
         $this->config = $config;
     }
 
+    public function getDescription()
+    {
+        if ($this->driver->isCollection()) return parent::getDescription();
+        else return 'From same Collection';
+    }
+
     /**
      * Is this tab active?
      *
      * @return bool
      */
-    public function isActive()
+/*    public function isActive()
     {
         return (
             $this->getRecordDriver()->tryMethod('isSingleElementHierarchyRecord')
                 ? false : parent::isActive()
         );
     }
+*/
 }
-- 
GitLab