From 561afd758a33577653efcdae633bc6a751d045ef Mon Sep 17 00:00:00 2001
From: Chris Hallberg <crhallberg@gmail.com>
Date: Wed, 3 Jan 2018 14:39:08 -0500
Subject: [PATCH] Fix hierarchy translations for modal.

---
 .../templates/RecordTab/hierarchytree.phtml           | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/themes/bootstrap3/templates/RecordTab/hierarchytree.phtml b/themes/bootstrap3/templates/RecordTab/hierarchytree.phtml
index 3a788b8cdeb..f33349f23aa 100644
--- a/themes/bootstrap3/templates/RecordTab/hierarchytree.phtml
+++ b/themes/bootstrap3/templates/RecordTab/hierarchytree.phtml
@@ -8,13 +8,14 @@
      \Zend\View\Helper\HeadScript::SCRIPT,
      "var hierarchySettings = {\n"
      . "    lightboxMode: " . ($this->layout()->getTemplate() == 'layout/lightbox' ? 'true' : 'false') . ",\n"
-     . "    fullHierarchy: " . ($this->tab->isFullHierarchyVisible() ? 'true' : 'false') . "\n"
-     . "};\n",
+     . "    fullHierarchy: false\n" // . ($this->tab->isFullHierarchyVisible() ? 'true' : 'false') . "\n"
+     . "};\n"
+     . "VuFind.addTranslations({\n"
+     . "    'showTree': '" . $this->transEsc('hierarchy_show_tree') . "',\n"
+     . "    'hideTree': '" . $this->transEsc('hierarchy_hide_tree') . "'}\n"
+     . ");\n",
      'SET'
   );
-  $this->jsTranslations()->addStrings(
-    ['showTree' => 'hierarchy_show_tree', 'hideTree' => 'hierarchy_hide_tree']
-  );
   $this->inlineScript(\Zend\View\Helper\HeadScript::FILE, 'vendor/jsTree/jstree.min.js');
   $this->inlineScript(\Zend\View\Helper\HeadScript::FILE, 'hierarchyTree.js');
   echo $this->inlineScript();
-- 
GitLab