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

Merge branch 'finc' into instance/de_105

parents 978c6934 4fccb9b7
1 merge request!3refs #20945 [de_105] w3c validation - syntax fixes
......@@ -95,4 +95,11 @@ queryIls[] = 'getFacetAvail:Local'
; through user input. E.g. to select an email profile according to the selected
; pickUpLocation you have to set the value to "pickUpLocation".
; By default it is left empty using the default profile "EmailHold".
;emailProfileSelector =
;emailProfileSelector =
; the ILLRequests section contains regex patterns for inter library loan item detection
; itemPattern matches the item ID, labelPattern matches the item's label
; as used in a PAIA regex filter
;[ILLRequests]
;itemPattern = "/^(?:(?!DE-15)).*$/"
;labelPattern = "/^ILL Status String$"
\ No newline at end of file
......@@ -91,4 +91,30 @@ class Connection extends \VuFind\ILS\Connection implements TranslatorAwareInterf
}
return $response;
}
/**
* Check ILLRequests
*
* A support method for checkFunction(). This is responsible for checking
* the driver configuration to determine if the system supports ILL requests.
*
* @param array $functionConfig The ILL request configuration values
* @param array $params An array of function-specific params (or null)
*
* @return mixed On success, an associative array with specific function keys
* and values either for placing requests via a form; on failure, false.
*/
protected function checkMethodILLRequests($functionConfig, $params)
{
if (
method_exists($this, 'getMyILLRequests')
&&
isset($functionConfig['daiaILLpattern'])
) {
return ['daiaILLpattern' => $functionConfig['daiaILLpattern']];
}
return false;
}
}
......@@ -108,6 +108,22 @@ class FincILS extends PAIA implements LoggerAwareInterface
*/
protected $isil;
/**
* Regex to be used in getMyILLRequests,
* finds item IDs denoting inter library loan requests
*
* @var string
*/
protected $illItemPattern;
/**
* Regex to be used in getMyILLRequests,
* finds item labels denoting inter library loan requests
*
* @var string
*/
protected $illLabelPattern;
/**
* Connection timeout in seconds used for _testILSConnection()
*
......@@ -223,6 +239,16 @@ class FincILS extends PAIA implements LoggerAwareInterface
$this->ilsTestTimeout = isset($this->config['General'])
&& isset($this->config['General']['ilsTestTimeout'])
? $this->config['General']['ilsTestTimeout'] : 90;
// set filter for reserved item IDs at ILL request
$this->illItemPattern =
(isset($this->config['ILLRequests']['itemPattern']))
? $this->config['ILLRequests']['itemPattern'] : null;
// set filter for reserved item labels at ILL request
$this->illLabelPattern =
(isset($this->config['ILLRequests']['labelPattern']))
? $this->config['ILLRequests']['labelPattern'] : null;
}
/**
......@@ -1703,4 +1729,34 @@ class FincILS extends PAIA implements LoggerAwareInterface
// overriden in FincLibero
return $limitations;
}
/**
* Customized getMyILLRequests, relies on PAIA-URI pattern
* @param array $patron
* @return array
*/
public function getMyILLRequests($patron)
{
// filters for getMyILLRequests are:
// document.item = URI has to match config pattern
if (!empty($this->illItemPattern)) {
$filter['regex']['item'] = $this->illItemPattern;
}
if (!empty($this->illLabelPattern)) {
// filter out some item according their status label
// cf. #15214
$filter['regex']['label'] = $this->illLabelPattern;
}
if (!empty($filter)) {
// get items-docs for given filters
$items = $this->paiaGetItems($patron, $filter);
return $this->mapPaiaItems($items, 'myHoldsMapping');
}
return [];
}
}
......@@ -4,7 +4,7 @@
* slider-container element
*/
?>
<div class="facet">
<li class="facet">
<?php if (!empty($this->facet['values'][0])): ?>
<?php $this->sideFacet()->setAppliedFacet($this->transEsc('Skip to facet', ['%%filter_name%%' => $this->transEsc('Year of Publication')]), $this->escapeHtmlAttr($this->title) . 'from')?>
<?php elseif (!empty($this->facet['values'][1])): ?>
......@@ -34,7 +34,6 @@
<?php endif; ?>
<input class="btn btn-default" type="submit" value="<?=$this->transEsc('Set')?>"/>
</form>
</div>
<?php if ($this->facet['type'] == 'date'): ?>
<?php $this->headScript()->appendFile('vendor/bootstrap-slider.min.js'); ?>
<?php $this->headLink()->appendStylesheet('vendor/bootstrap-slider.min.css'); ?>
......@@ -83,4 +82,5 @@ JS;
?>
<?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET'); ?>
<?php endif; ?>
</li>
<!-- finc - recommend - sidefacets - rangeslider - END -->
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