Skip to content
Snippets Groups Projects
Commit 56706dca authored by Robert Lange's avatar Robert Lange
Browse files

Merge branch 'instance/fid' into instance/fid_bbi

parents a04f7702 ba3ac017
No related merge requests found
;####################################################################
;##################### DO NOT DELETE THIS HEADER ####################
;################### Leipzig University Library © 2020 ##############
;
; This is the default ALPHA-INI-file and inherits
; all the settings from the INI-file defined in [Parent_Config] which
; points to the default INI-file located in the folder vufind2/local
;
[Parent_Config]
relative_path = ../../../config/vufind/Amsl.ini
; A comma-separated list of config sections from the parent which should be
; completely overwritten by the equivalent sections in this configuration;
; any sections not listed here will be merged on a section-by-section basis.
;override_full_sections = "Languages,AlphaBrowse_Types"
;
; Add ALPHA-specific customization after this header.
;
;##################### DO NOT DELETE THIS HEADER ####################
;####################################################################
[API]
; no caching for alpha
;ttl = 0
;####################################################################
;##################### DO NOT DELETE THIS HEADER ####################
;################### Leipzig University Library © 2020 ##############
;
; This is the ISIL-instance-specific default INI-file
; for the configuration of the Amsl API
;
[API]
;url = "https://live.amsl.technology/inhouseservices/list?do=catalog_metadataList&isil=ISIL"
response_type = 'application/json'
; max caching in seconds
; standard is 86400 i.e. one week
ttl = 86400
; Contains label patterns for two layers of source hierarchy
; these will normally be source and collection represented by main_label and sub_label, resp.
; use array_keys in double percent signs to be rendered in the labels
; the main label MUST contain the main key and the main key SHOULD identify the source
; same for the sub key and label
[Mapping]
main_key = 'source_id'
main_label = '%%source_label%%'
sortBySourceLabel = true
default_main_label = 'untitled source'
sub_key = 'collection_label'
sub_label = '%%collection_label%%'
default_sub_label = 'untitled collection'
show_link = true
; show_description can be api, local or false
; api or true displays entry from AMSL-API as defined in sub_description_key
; local displays entry from local translation file
; false does not show a description
show_description = false
;sub_description_key = 'collection_description'
[MisspelledResources]
; wrong collection label = correct collection label for links
; "" means no link
\ No newline at end of file
...@@ -384,6 +384,7 @@ class FincLibero extends FincILS implements TranslatorAwareInterface ...@@ -384,6 +384,7 @@ class FincLibero extends FincILS implements TranslatorAwareInterface
protected function getCustomData($item) protected function getCustomData($item)
{ {
$customData = []; $customData = [];
$customData['pickUpLocations'] = [];
foreach (['available', 'unavailable'] as $availability) { foreach (['available', 'unavailable'] as $availability) {
if (isset($item[$availability])) { if (isset($item[$availability])) {
foreach ($item[$availability] as $available) { foreach ($item[$availability] as $available) {
...@@ -398,17 +399,20 @@ class FincLibero extends FincILS implements TranslatorAwareInterface ...@@ -398,17 +399,20 @@ class FincLibero extends FincILS implements TranslatorAwareInterface
) { ) {
// if we have limitations qualifying for pickUpLocations, // if we have limitations qualifying for pickUpLocations,
// save those in customData // save those in customData
$customData['pickUpLocations'] = $pickUpLocations; $customData['pickUpLocations'] = array_merge(
} elseif (!isset($customData['pickUpLocations']) && isset($item['department'])) { $customData['pickUpLocations'],
$pickUpLocations
);
} elseif (empty($customData['pickUpLocations']) && isset($item['department'])) {
// if we have no explicit limitations qualifying for // if we have no explicit limitations qualifying for
// pickUpLocations, assume the item's department as single // pickUpLocations, assume the item's department as single
// pickUpLocation // pickUpLocation
$customData['pickUpLocations'] = [ $customData['pickUpLocations'] = array_merge($customData['pickUpLocations'], [
[ [
'locationID' => $item['department']['id'], 'locationID' => $item['department']['id'],
'locationDisplay' => $item['department']['content'] 'locationDisplay' => $item['department']['content']
] ]
]; ]);
} }
// deal with EmailHold information // deal with EmailHold information
if (isset($available['limitation'])) { if (isset($available['limitation'])) {
......
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