diff --git a/fid_adlr/config/vufind/HierarchyDefault.ini b/fid_adlr/config/vufind/HierarchyDefault.ini index 9ab88a3301a8edf4c79a6776e6ab157f5768db37..49711ebfe97a8d6b02a1a1f9caa4fabe4358266d 100644 --- a/fid_adlr/config/vufind/HierarchyDefault.ini +++ b/fid_adlr/config/vufind/HierarchyDefault.ini @@ -20,4 +20,10 @@ relative_path = ../../../fid/config/vufind/HierarchyDefault.ini ; ;##################### DO NOT DELETE THIS HEADER #################### ;#################################################################### - +[Collections] +; What determines which records get linked to the Collection module instead of the +; Record module? Legal values: +; All - any record with is_hierarchy set +; Top - any record where is_hierarchy = hierarchy_top +; None - never link to the collection module +link_type = "Top" diff --git a/fid_adlr/config/vufind/config.ini b/fid_adlr/config/vufind/config.ini index 3ea5d5da3b720e889a69ff405afe261fa1a58f4f..8ccf7980fed67da11429832f5b6ba1b179752ff7 100644 --- a/fid_adlr/config/vufind/config.ini +++ b/fid_adlr/config/vufind/config.ini @@ -132,4 +132,7 @@ sender_name="adlr.link Feedback" sender_email="noreply@adlr.link" [RawQueries] -new_releases="?filter%5B%5D=~de15fid_date%3A%5BNOW-30DAY%2FDAY+TO+NOW%5D&type=AllFields&filter%5B%5D=mega_collection%3A%22PDA+Print+VUB%22&sort=title&view=list" \ No newline at end of file +new_releases="?filter%5B%5D=~de15fid_date%3A%5BNOW-30DAY%2FDAY+TO+NOW%5D&type=AllFields&filter%5B%5D=mega_collection%3A%22PDA+Print+VUB%22&sort=title&view=list" + +[Collections] +collections = true \ No newline at end of file diff --git a/fid_adlr/languages/de.ini b/fid_adlr/languages/de.ini index e767aa58ef6f0646aff9d7760ecd491bd46de5c0..3e1ef570e91569bc304cdecd32937cf6c06bd669 100644 --- a/fid_adlr/languages/de.ini +++ b/fid_adlr/languages/de.ini @@ -101,7 +101,7 @@ getit_text_7 = "Dieser Titel stammt aus der Bielefeld Academic Search Engine.<br getit_text_8 = "Für diesen Titel können wir derzeit leider keine weitere Informationen zur Verfügbarkeit bereitstellen.<br/><br/>Ob der Titel per Fernleihe bestellbar ist, kann Ihnen Ihre Heimatbibliothek mitteilen. Einige Medientypen (wie z. B. Manuskripte, Schallplatten, CDs, Videos) können von der Fernleihe ausgeschlossen sein." getit_text_9 = "Online-Ressourcen können Lizenzen erfordern oder kostenpflichtig sein." getit_text_10 = "Weitere Informationen sehen Sie, wenn Sie angemeldet sind.<br /><br />Noch keinen Account? %s" -getit_text_11 = "Dieser Titel ist ein mehrbändiges Werk. Einzeltitel sind unter „Bände“ aufgeführt." +getit_text_11 = "Dieser Titel ist ein mehrbändiges Werk. Einzeltitel sind unter "%%hierarchy_tree%%" aufgeführt." getit_text_12 = "Bestellen Sie ein Leihexemplar dieser Neuerscheinung auf Kosten von adlr.link. Das Buch wird direkt an Sie geschickt.<br/><br/>" getit_text_13 = "Dieses E-Book ist für Sie über eine adlr.link-Lizenz freigeschaltet." getit_text_14 = "Einige Medientypen (wie z. B. Manuskripte, Schallplatten, CDs, Videos) können von der Fernleihe ausgeschlossen sein." @@ -118,4 +118,7 @@ ezb_electronic_10 = "Für diesen Titel können wir derzeit leider keine weitere ezb_print = "Dieser Artikel ist als Druckversion in Ihrer Heimatbibliothek vorhanden." ezb_location = "Standort" ezb_period = "Jahrgänge" -ezb_comment = "Hinweise" \ No newline at end of file +ezb_comment = "Hinweise" + +#16525 +hierarchy_tree = "Zugehörige Bände" \ No newline at end of file diff --git a/fid_adlr/languages/en.ini b/fid_adlr/languages/en.ini index e5c29153d0817fa57e885dcfafca43d002763bc8..01154384c5fca00b9dc0f11249eae57f3cdbf6c3 100644 --- a/fid_adlr/languages/en.ini +++ b/fid_adlr/languages/en.ini @@ -97,7 +97,7 @@ getit_text_7 = "This title is from the Bielefeld Academic Search Engine.<br/><br getit_text_8 = "Unfortunately, we cannot provide any further information on availability for this title at the moment.<br/><br/>Your home library can tell you whether the title can be ordered by interlibrary loan. Some media types (e.g. manuscripts, records, CDs, videos) may be excluded from interlibrary loan." getit_text_9 = "Access to electronic resources may be subject to a license or a fee." getit_text_10 = "You will see more information when you are logged in.<br/><br/>No account yet? %s" -getit_text_11 = "This title is a multi-volume work. Individual titles are listed under "Volumes“." +getit_text_11 = "This title is a multi-volume work. Individual titles are listed under "%%hierarchy_tree%%"." getit_text_12 = "Order a loan copy of this new publication at the expense of adlr.link. The book will be sent directly to you.<br/><br/>" getit_text_13 = "This e-book is free to access for you via an adlr.link license." getit_text_14 = "Some media types (e.g. manuscripts, records, CDs, videos) may be excluded from interlibrary loan." @@ -115,4 +115,7 @@ ezb_print = "This article is also available as a print version in your home libr ezb_location = "Location" Call Number = "Callnumber" ezb_period = "Period" -ezb_comment = "Notes" \ No newline at end of file +ezb_comment = "Notes" + +#16525 +hierarchy_tree = "Associated Volumes" \ No newline at end of file diff --git a/module/fid_adlr/config/module.config.php b/module/fid_adlr/config/module.config.php index 75b202f81d77f910bdf7fccf8661bcaad8ec10ce..675d65eccf7a9d9b85130ed5281cd31219401c6c 100644 --- a/module/fid_adlr/config/module.config.php +++ b/module/fid_adlr/config/module.config.php @@ -27,6 +27,7 @@ use fid_adlr\Controller\MyResearchController; use fid_adlr\Controller\MyResearchControllerFactory; use fid_adlr\Controller\RecordController; use fid_adlr\Helper\Rss; +use fid_adlr\Hierarchy\TreeRenderer\JSTree as AdlrJSTree; use VuFind\Controller\AbstractBaseWithConfigFactory; use Zend\Router\Http\Regex; use Zend\ServiceManager\Factory\InvokableFactory; @@ -117,6 +118,14 @@ $config = [ 'toc' => 'fid_adlr\RecordTab\TOC' ], ], + 'hierarchy_treerenderer' => [ + 'factories' => [ + AdlrJSTree::class => 'VuFind\Hierarchy\TreeRenderer\JSTreeFactory' + ], + 'aliases' => [ + 'jstree' => AdlrJSTree::class + ], + ], ], 'recorddriver_tabs' => [ 'finc\RecordDriver\SolrDefault' => [ diff --git a/module/fid_adlr/src/Hierarchy/TreeRenderer/JSTree.php b/module/fid_adlr/src/Hierarchy/TreeRenderer/JSTree.php new file mode 100644 index 0000000000000000000000000000000000000000..633eb47567e51cdab16872b62b251bb5a163900e --- /dev/null +++ b/module/fid_adlr/src/Hierarchy/TreeRenderer/JSTree.php @@ -0,0 +1,63 @@ +<?php +/** + * Hierarchy Tree Renderer for the JS_Tree plugin + * + * PHP version 5 + * + * Copyright (C) Villanova University 2010. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * @category VuFind + * @package HierarchyTree_Renderer + * @author Luke O'Sullivan <l.osullivan@swansea.ac.uk> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development:plugins:hierarchy_components Wiki + */ +namespace fid_adlr\Hierarchy\TreeRenderer; + +/** + * Hierarchy Tree Renderer + * + * This is a helper class for producing hierarchy trees. + * + * @category VuFind + * @package HierarchyTree_Renderer + * @author Luke O'Sullivan <l.osullivan@swansea.ac.uk> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development:plugins:hierarchy_components Wiki + */ +class JSTree extends \finc\Hierarchy\TreeRenderer\JSTree +{ + /** + * Get the URL for a record and cache it to avoid the relatively slow routing + * calls. + * + * @param string $route Route + * @param string $id Record ID + * + * @return string URL + */ + protected function getUrlFromRouteCache($route, $id) + { + static $cache = []; + if (!isset($cache[$route])) { + $params = [ + 'id' => '__record_id__' + ]; + $cache[$route] = $this->router->fromRoute($route, $params); + } + return str_replace('__record_id__', $id, $cache[$route]); + } +} diff --git a/themes/fid_adlr/scss/compiled.scss b/themes/fid_adlr/scss/compiled.scss index 42eb63b71f2c10ac325f9273d539418dc9e4f1da..edbf56aa9f471f4c9b2af866ed2a0442707488d5 100644 --- a/themes/fid_adlr/scss/compiled.scss +++ b/themes/fid_adlr/scss/compiled.scss @@ -2863,4 +2863,10 @@ footer { } } -@import 'customForms'; \ No newline at end of file +@import 'customForms'; + +#hierarchyTree .jstree-clicked { + background-color: lighten($brand-primary,30%); + padding-left: .5em; + margin-left: -.5em; +} \ No newline at end of file