diff --git a/devops/find-file.sh b/devops/find-file.sh new file mode 100755 index 0000000000000000000000000000000000000000..4d2634ae88c84d4c0caf8fd9fb85b85ef4f94601 --- /dev/null +++ b/devops/find-file.sh @@ -0,0 +1,57 @@ +#!/bin/bash +# Copyright (C) 2022 Leipzig University Library +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# 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, see <http://www.gnu.org/licenses/>. +# +# @author Robert Lange <lange@ub.uni-leipzig.de> +# @license https://opensource.org/licenses/GPL-3.0 GNU GPLv3 +Help() +{ + # Display Help + echo "This script looks for occurences of files on finc instance branches. Usage: find-file.sh [file name]" + echo "Example: \"./devops/find-file.sh myresearch/edit.phtml\"" +} + +while getopts ":h" option; do + case $option in + h) # display Help + Help + exit;; + \?) # incorrect option + echo "Error: Invalid option" + exit 1; + esac +done + +declare -A stringFindings=() +declare -A arrFindings=() + +for branch in $(git branch --list *instance*|cut -c 3-) +do + stringFindings+=" " + stringFindings+=$(git ls-tree -r --name-only $branch | grep "$1" | grep -v foundation5) +done + +# use asscociative array to get unique values +for element in $(echo $stringFindings | tr ";" "\n") +do + if ! [[ -z "$element" ]]; then + arrFindings["${element}"]=${element} + fi +done + +for elem in "${!arrFindings[@]}" +do + echo "${arrFindings[${elem}]}" +done | sort diff --git a/local/config/vufind/searches.ini b/local/config/vufind/searches.ini index fd329a5042bb9594579eb4aba92186220c196b05..179e1624d2ef979d5e7ad5f0271a21665db5f9d0 100644 --- a/local/config/vufind/searches.ini +++ b/local/config/vufind/searches.ini @@ -469,7 +469,7 @@ Author[] = AuthorFacets ; default_side_recommend settings and only uses this section. [AuthorModuleRecommendations] ;top[] = TopFacets:ResultsTop -;side[] = SideFacets:Results:CheckboxFacets +side[] = SideFacets:Results:CheckboxFacets top[] = AuthorInfo side[] = "ExpandFacets:Author" diff --git a/module/finc/config/module.config.php b/module/finc/config/module.config.php index 3f206c21d65272cb09a6290778af66698f39152f..eaabdac99363da8f24215064ca37ca6440b9ac52 100644 --- a/module/finc/config/module.config.php +++ b/module/finc/config/module.config.php @@ -91,7 +91,11 @@ $config = [ 'finc\AjaxHandler\GetResolverLinks' => 'finc\AjaxHandler\GetResolverLinksFactory', 'finc\AjaxHandler\GetRecordCover' => - 'finc\AjaxHandler\GetRecordCoverFactory' + 'finc\AjaxHandler\GetRecordCoverFactory', + 'finc\AjaxHandler\GetUserMediaReadyToPickup' => + 'VuFind\AjaxHandler\AbstractIlsAndUserActionFactory', + 'finc\AjaxHandler\GetUserPermanentLoans' => + 'VuFind\AjaxHandler\AbstractIlsAndUserActionFactory', ], 'aliases' => [ 'getAdditionalAccountInfo' => @@ -104,6 +108,10 @@ $config = [ 'finc\AjaxHandler\GetResolverLinks', 'getRecordCover' => 'finc\AjaxHandler\GetRecordCover', + 'getUserMediaReadyToPickup' => + 'finc\AjaxHandler\GetUserMediaReadyToPickup', + 'getUserPermanentLoans' => + 'finc\AjaxHandler\GetUserPermanentLoans', ] ], 'auth' => [ @@ -250,17 +258,25 @@ $config = [ 'catUserType' => \finc\Role\PermissionProvider\CatUserTypeFactory::class, 'ipRangeFoFor' => \finc\Role\PermissionProvider\IpRangeFoForFactory::class, 'ipRegExFoFor' => \finc\Role\PermissionProvider\IpRegExFoForFactory::class, + 'ipRangeReal' => \finc\Role\PermissionProvider\IpRangeRealFactory::class, + 'ipRegExReal' => \finc\Role\PermissionProvider\IpRegExRealFactory::class, 'finc\Role\PermissionProvider\CatUserType' => \finc\Role\PermissionProvider\CatUserTypeFactory::class, 'finc\Role\PermissionProvider\IpRangeFoFor' => \finc\Role\PermissionProvider\IpRangeFoForFactory::class, 'finc\Role\PermissionProvider\IpRegExFoFor' => \finc\Role\PermissionProvider\IpRegExFoForFactory::class, + 'finc\Role\PermissionProvider\IpRangeReal' => + \finc\Role\PermissionProvider\IpRangeRealFactory::class, + 'finc\Role\PermissionProvider\IpRegExReal' => + \finc\Role\PermissionProvider\IpRegExRealFactory::class, ], 'aliases' => [ 'CatUserType' => 'finc\Role\PermissionProvider\CatUserType', 'IpRangeFoFor' => 'finc\Role\PermissionProvider\IpRangeFoFor', 'IpRegExFoFor' => 'finc\Role\PermissionProvider\IpRegExFoFor', + 'IpRangeReal' => 'finc\Role\PermissionProvider\IpRangeReal', + 'IpRegExReal' => 'finc\Role\PermissionProvider\IpRegExReal', 'IpRange' => 'VuFind\Role\PermissionProvider\IpRange', ] ] diff --git a/module/finc/src/finc/AjaxHandler/GetUserMediaReadyToPickup.php b/module/finc/src/finc/AjaxHandler/GetUserMediaReadyToPickup.php new file mode 100644 index 0000000000000000000000000000000000000000..0d17ebbc9279e5a0f6c8b28ae1a155c548b9c4eb --- /dev/null +++ b/module/finc/src/finc/AjaxHandler/GetUserMediaReadyToPickup.php @@ -0,0 +1,44 @@ +<?php +/** + * PHP version 7 + * + * Copyright (C) Villanova University 2018. + * + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * @category VuFind + * @package AJAX + * @author Demian Katz <demian.katz@villanova.edu> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development Wiki + */ +namespace finc\AjaxHandler; + +/** + * + * @category VuFind + * @package AJAX + * @author Demian Katz <demian.katz@villanova.edu> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development Wiki + */ +class GetUserMediaReadyToPickup extends \VuFind\AjaxHandler\AbstractUserRequestAction +{ + /** + * ILS driver method for data retrieval. + * + * @var string + */ + protected $lookupMethod = 'getMyMediaReadyToPickup'; +} diff --git a/module/finc/src/finc/AjaxHandler/GetUserPermanentLoans.php b/module/finc/src/finc/AjaxHandler/GetUserPermanentLoans.php new file mode 100644 index 0000000000000000000000000000000000000000..b259aa2c3cfce77e0126ca6267f838ec8d6e751c --- /dev/null +++ b/module/finc/src/finc/AjaxHandler/GetUserPermanentLoans.php @@ -0,0 +1,78 @@ +<?php +/** + * PHP version 7 + * + * Copyright (C) Villanova University 2018. + * + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * @category VuFind + * @package AJAX + * @author Demian Katz <demian.katz@villanova.edu> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development Wiki + */ +namespace finc\AjaxHandler; + +use Zend\Mvc\Controller\Plugin\Params; + +/** + * "Get User Holds" AJAX handler + * + * @category VuFind + * @package AJAX + * @author Demian Katz <demian.katz@villanova.edu> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development Wiki + */ +class GetUserPermanentLoans extends \VuFind\AjaxHandler\AbstractUserRequestAction +{ + /** + * Handle a request. + * + * @param Params $params Parameter helper from controller + * + * @return array [response data, internal status code, HTTP status code] + */ + public function handleRequest(Params $params) + { + $this->disableSessionWrites(); // avoid session write timing bug + $patron = $this->ilsAuthenticator->storedCatalogLogin(); + if (!$patron) { + return $this->formatResponse('', self::STATUS_HTTP_NEED_AUTH, 401); + } + if (!$this->ils->checkCapability('getMyTransactions')) { + return $this->formatResponse('', self::STATUS_HTTP_ERROR, 405); + } + $items = $this->ils->getMyPermanentLoans($patron); + $counts = [ + 'ok' => 0, + 'warn' => 0, + 'overdue' => 0 + ]; + foreach ($items as $item) { + if (!isset($item['dueStatus'])) { + continue; + } + if ($item['dueStatus'] == 'overdue') { + $counts['overdue'] += 1; + } elseif ($item['dueStatus'] == 'due') { + $counts['warn'] += 1; + } else { + $counts['ok'] += 1; + } + } + return $this->formatResponse($counts); + } +} diff --git a/module/finc/src/finc/Controller/AmslResourceController.php b/module/finc/src/finc/Controller/AmslResourceController.php index cf187741d7a47407cd8f781d4542b84c638d39a2..ce15e705760e36d81934ba428c6c40a45530fd16 100644 --- a/module/finc/src/finc/Controller/AmslResourceController.php +++ b/module/finc/src/finc/Controller/AmslResourceController.php @@ -281,11 +281,11 @@ class AmslResourceController extends AbstractBase if (!$this->baseUrl) { $urlHelper = $this->getViewRenderer()->plugin('url'); - $this->baseUrl = $urlHelper('search-results') . '?filter%5B%5D=mega_collection%3A"'; + $this->baseUrl = $urlHelper('search-results') . '?filter%5B%5D=mega_collection%3A%22'; } if (!empty($searchTerm)) { - $source["href"] = $this->baseUrl . urlencode($searchTerm) . '"'; + $source["href"] = $this->baseUrl . urlencode($searchTerm) . '%22'; } } } diff --git a/module/finc/src/finc/RecordDriver/SolrMarcFinc.php b/module/finc/src/finc/RecordDriver/SolrMarcFinc.php index d9e2976d91d20ef81f53c057574bd1dd186131f9..e619a5422016887c357545087e7b20b3e4892cb1 100644 --- a/module/finc/src/finc/RecordDriver/SolrMarcFinc.php +++ b/module/finc/src/finc/RecordDriver/SolrMarcFinc.php @@ -42,13 +42,6 @@ class SolrMarcFinc extends SolrMarc { use SolrMarcFincTrait; - /** - * pattern to identify bsz - * - * @deprecated After k10plus transition maybe not longer in use. - */ - const BSZ_PATTERN = '/^(\(DE-576\))(\d+)(\w|)/'; - /** * pattern to identify kxp */ diff --git a/module/finc/src/finc/RecordDriver/SolrMarcFincTrait.php b/module/finc/src/finc/RecordDriver/SolrMarcFincTrait.php index eb642793a382bf05d1259fe53f0ae080025042db..a941ed662b4f63596850402023b6d1f3adbf9452 100644 --- a/module/finc/src/finc/RecordDriver/SolrMarcFincTrait.php +++ b/module/finc/src/finc/RecordDriver/SolrMarcFincTrait.php @@ -1359,68 +1359,6 @@ trait SolrMarcFincTrait return false; } - /** - * Get a short list of series for ISBD citation style - * - * @return array - * @link http://www.loc.gov/marc/bibliographic/bd830.html - */ - protected function getSeriesWithVolume() - { - return $this->getFieldArray('830', ['a', 'v'], false); - } - - /** - * Get local classification of UDK. - * - * @return array - * @deprecated Seems to be only for HTWK in use formerly? - */ - protected function getUDKs() - { - $array = []; - if (null != $this->getLocalMarcFieldOfLibrary()) { - $udk = $this->getMarcRecord()->getFields( - $this->getLocalMarcFieldOfLibrary() - ); - // if not return void value - if (!$udk) { - return $array; - } // end if - - foreach ($udk as $key => $line) { - // if subfield with udk exists - if ($line->getSubfield('f')) { - // get udk - $array[$key]['index'] = $line->getSubfield('f')->getData(); - // get udk notation - // fixes by update of File_MARC to version 0.8.0 - // @link https://intern.finc.info/issues/2068 - /* - if ($notation = $line->getSubfield('n')) { - // get first value - $array[$key]['notation'][] = $notation->getData(); - // iteration over udk notation - while ($record = $notation->next()) { - $array[$key]['notation'][] = $record->getData(); - $notation = $record; - } - } // end if subfield n - unset($notation); - */ - if ($record = $line->getSubfields('n')) { - // iteration over rvk notation - foreach ($record as $field) { - $array[$key]['notation'][] = $field->getData(); - } - } // end if subfield n - } // end if subfield f - } // end foreach - } - //error_log(print_r($array, true)); - return $array; - } - /** * Get addional entries for personal names. * diff --git a/module/finc/src/finc/Role/PermissionProvider/IpRangeFoFor.php b/module/finc/src/finc/Role/PermissionProvider/IpRangeFoFor.php index 14d47f1af9a888b1689a1d9ef4b6c5867601b927..03036b7f9ded96f1bb120cedd06d819c2e87aef6 100644 --- a/module/finc/src/finc/Role/PermissionProvider/IpRangeFoFor.php +++ b/module/finc/src/finc/Role/PermissionProvider/IpRangeFoFor.php @@ -46,11 +46,11 @@ namespace finc\Role\PermissionProvider; class IpRangeFoFor extends \VuFind\Role\PermissionProvider\IpRange { /** - * returns remote address based on eventual proxy headers + * Returns remote address based on eventual proxy headers * * @return string */ - private function getRemoteAddr() + protected function getRemoteAddr() { // a list of ips the request is forwarded for - first is latest $HttpXForwardedForList = explode(',', $this->request->getServer()->get('HTTP_X_FORWARDED_FOR')); diff --git a/module/finc/src/finc/Role/PermissionProvider/IpRangeReal.php b/module/finc/src/finc/Role/PermissionProvider/IpRangeReal.php new file mode 100644 index 0000000000000000000000000000000000000000..189b37cae6415b8a352af72b24255a479c1cc274 --- /dev/null +++ b/module/finc/src/finc/Role/PermissionProvider/IpRangeReal.php @@ -0,0 +1,56 @@ +<?php +/** + * IpRangeReal permission provider for VuFind. + * + * PHP version 7 + * + * Copyright (C) Villanova University 2007. + * Copyright (C) Leipzig University Library 2022. + * + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * @category VuFind + * @package Authorization + * @author André Lahmann <lahmann@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org Main Page + */ +namespace finc\Role\PermissionProvider; + +/** + * IpRangeReal permission provider for VuFind. + * + * @category VuFind + * @package Authorization + * @author André Lahmann <lahmann@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org Main Page + */ +class IpRangeReal extends \finc\Role\PermissionProvider\IpRangeFoFor +{ + /** + * Returns remote address based on eventual proxy headers + * + * @return string + */ + protected function getRemoteAddr() + { + // often provided by nginx-reverse-proxies, should be used since its the nature of the value + if ($ip = $this->request->getServer()->get('HTTP_X_REAL_IP')) { + return $ip; + } + + return $this->request->getServer()->get('REMOTE_ADDR'); + } +} diff --git a/module/finc/src/finc/Role/PermissionProvider/IpRangeRealFactory.php b/module/finc/src/finc/Role/PermissionProvider/IpRangeRealFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..f5c90a936dea9dceeef565682a9356d04a04190b --- /dev/null +++ b/module/finc/src/finc/Role/PermissionProvider/IpRangeRealFactory.php @@ -0,0 +1,74 @@ +<?php +/** + * IpRangeReal Factory Class + * + * PHP version 7 + * + * Copyright (C) Villanova University 2014. + * + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * @category VuFind + * @package Authorization + * @author Demian Katz <demian.katz@villanova.edu> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development:plugins:hierarchy_components Wiki + */ +namespace finc\Role\PermissionProvider; + +use Interop\Container\ContainerInterface; +use Zend\ServiceManager\Factory\FactoryInterface; +use Zend\ServiceManager\ServiceManager; + +/** + * IpRangeReal Factory Class + * + * @category VuFind + * @package Authorization + * @author Demian Katz <demian.katz@villanova.edu> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development:plugins:hierarchy_components Wiki + * + * @codeCoverageIgnore + */ +class IpRangeRealFactory implements FactoryInterface +{ + /** + * Create an IpRangeReal + * + * @param ContainerInterface $container Service manager + * @param string $requestedName Service being created + * @param null|array $options Extra options (optional) + * + * @return IpRangeReal + * + * @throws ServiceNotFoundException if unable to resolve the service. + * @throws ServiceNotCreatedException if an exception is raised when + * creating a service. + * @throws ContainerException if any other error occurs + */ + public function __invoke( + ContainerInterface $container, + $requestedName, + array $options = null + ) { + if (!empty($options)) { + throw new \Exception('Unexpected options sent to factory.'); + } + return new IpRangeReal( + $container->get('Request'), + $container->get('VuFind\IpAddressUtils') + ); + } +} diff --git a/module/finc/src/finc/Role/PermissionProvider/IpRegExFoFor.php b/module/finc/src/finc/Role/PermissionProvider/IpRegExFoFor.php index 1e171c3f76d97553d870ef963da82adcc9964492..1473ed55a370601b47801c9a558374dfdb0c97da 100644 --- a/module/finc/src/finc/Role/PermissionProvider/IpRegExFoFor.php +++ b/module/finc/src/finc/Role/PermissionProvider/IpRegExFoFor.php @@ -41,11 +41,11 @@ namespace finc\Role\PermissionProvider; class IpRegExFoFor extends \VuFind\Role\PermissionProvider\IpRegEx { /** - * returns remote address based on eventual proxy headers + * Returns remote address based on eventual proxy headers * * @return string */ - private function getRemoteAddr() + protected function getRemoteAddr() { // a list of ips the request is forwarded for - first is latest $HttpXForwardedForList = explode(',', $this->request->getServer()->get('HTTP_X_FORWARDED_FOR')); diff --git a/module/finc/src/finc/Role/PermissionProvider/IpRegExReal.php b/module/finc/src/finc/Role/PermissionProvider/IpRegExReal.php new file mode 100644 index 0000000000000000000000000000000000000000..432385cb439084dcc4fd124f27a669bb85529d84 --- /dev/null +++ b/module/finc/src/finc/Role/PermissionProvider/IpRegExReal.php @@ -0,0 +1,56 @@ +<?php +/** + * IpRegExReal permission provider for VuFind. + * + * PHP version 7 + * + * Copyright (C) Villanova University 2007. + * Copyright (C) Leipzig University Library 2022. + * + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * @category VuFind + * @package Authorization + * @author André Lahmann <lahmann@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org Main Page + */ +namespace finc\Role\PermissionProvider; + +/** + * IpRegExReal permission provider for VuFind. + * + * @category VuFind + * @package Authorization + * @author André Lahmann <lahmann@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org Main Page + */ +class IpRegExReal extends \finc\Role\PermissionProvider\IpRegExFoFor +{ + /** + * Returns remote address based on eventual proxy headers + * + * @return string + */ + protected function getRemoteAddr() + { + // often provided by nginx-reverse-proxies, should be used since its the nature of the value + if ($ip = $this->request->getServer()->get('HTTP_X_REAL_IP')) { + return $ip; + } + + return $this->request->getServer()->get('REMOTE_ADDR'); + } +} diff --git a/module/finc/src/finc/Role/PermissionProvider/IpRegExRealFactory.php b/module/finc/src/finc/Role/PermissionProvider/IpRegExRealFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..883971b944e1b61248b7fa7b21304c00d7c47b08 --- /dev/null +++ b/module/finc/src/finc/Role/PermissionProvider/IpRegExRealFactory.php @@ -0,0 +1,73 @@ +<?php +/** + * IpRegExReal Factory Class + * + * PHP version 7 + * + * Copyright (C) Villanova University 2014. + * + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * @category VuFind + * @package Authorization + * @author Demian Katz <demian.katz@villanova.edu> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development:plugins:hierarchy_components Wiki + */ +namespace finc\Role\PermissionProvider; + +use Interop\Container\ContainerInterface; +use Zend\ServiceManager\Factory\FactoryInterface; +use Zend\ServiceManager\ServiceManager; + +/** + * IpRegExReal Factory Class + * + * @category VuFind + * @package Authorization + * @author Demian Katz <demian.katz@villanova.edu> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development:plugins:hierarchy_components Wiki + * + * @codeCoverageIgnore + */ +class IpRegExRealFactory implements FactoryInterface +{ + /** + * Create an IpRegExReal + * + * @param ContainerInterface $container Service manager + * @param string $requestedName Service being created + * @param null|array $options Extra options (optional) + * + * @return IpRegExReal + * + * @throws ServiceNotFoundException if unable to resolve the service. + * @throws ServiceNotCreatedException if an exception is raised when + * creating a service. + * @throws ContainerException if any other error occurs + */ + public function __invoke( + ContainerInterface $container, + $requestedName, + array $options = null + ) { + if (!empty($options)) { + throw new \Exception('Unexpected options sent to factory.'); + } + return new IpRegExReal( + $container->get('Request') + ); + } +} diff --git a/themes/finc-accessibility/templates/HelpTranslations/de/advsearch.phtml b/themes/finc-accessibility/templates/HelpTranslations/de/advsearch.phtml new file mode 100644 index 0000000000000000000000000000000000000000..2fe87b276ab69c92ae89f3f294ae948c8d663411 --- /dev/null +++ b/themes/finc-accessibility/templates/HelpTranslations/de/advsearch.phtml @@ -0,0 +1,60 @@ +<h1>Hilfe zur erweiterten Suche</h1> + +<ul class="HelpMenu"> + <li><a href="#Search-Fields">Suchfelder</a></li> + <li><a href="#Search-Groups">Suchgruppen</a></li> +</ul> + +<dl class="Content"> + <dt><a name="Search-Fields"></a>Suchfelder</dt> + <dd> + <p>Wenn Sie das erste Mal die erweiterte Suche aufrufen, erscheinen + verschiedene Suchfelder. In jedem Feld können Sie einen Suchbegriff + eingeben. Folgende <a href="<?=$this->url('help-home')?>?topic=search">Suchoperatoren</a> + sind erlaubt.</p> + <p>Jedes Eingabefeld ist mit einem Auswahlmenü versehen, mit welchem Sie das + Suchfeld auswählen können (z.B. Titel, Autor). Sie können auch + die Suche beliebig kombinieren.</p> + <p>Mit der Einstellung "Suchbedingung" können Sie die Relation zwischen den + einzelnen Feldern innerhalb einer Suchgruppe festlegen.</p> + <ul> + <li>"Mit ALLEN Wörtern" - Gibt nur die Treffer zurück, die alle Wörter + bzw. Phrasen enthalten (entspricht dem boolschen UND).</li> + <li>"Mit IRGENDEINEM der Wörter" - Gibt die Treffer zurück, die mindestens + eines der Wörter oder Phrasen enthalten (entspricht dem boolschen ODER).</li> + <li>"OHNE die Wörter" - Gibt alle Treffer zurück, die nicht die + angegebenen Wörter oder Phrasen enthalten (entspricht dem boolschen NICHT). + </li> + </ul> + <p>Mit der Schaltfläche "Suchfeld hinzufügen" können weitere Suchfelder + hinzugefügt werden und mit den Kreuzchen können sie wieder entfernt werden.</p> + </dd> + + <dt><a name="Search-Groups"></a>Suchgruppen</dt> + <dd> + <p>Manche Suchen sind komplizierter und eine einfache Suche über verschiedene Felder + reicht hierfür nicht aus. Beispiel: Sie wollen nach Titeln zur Geschichte Indiens und + Chinas suchen. Wenn Sie die Suchbegriffe in das Feld "Mit ALLEN Wörtern" + eingeben, so erhalten Sie nur die Titel, welche die Geschichte von Indien + UND China behandeln. Verwenden Sie die Suchbedingung "Mit IRGENDEINEM der + Wörter", so erhalten Sie auch Titel, die nichts mit China oder Indien + zu tun haben sondern nur den Begriff "Geschichte" enthalten.</p> + <p>Mit Suchgruppen können Sie Suchfelder zu einer Suche gruppieren. Jedes + Mal, wenn Sie die Schaltfläche "Suchgruppe hinzufügen" anwählen, wird eine + neue Gruppe von Suchfeldern hinzugefügt. Sie können auch Gruppen mit dem Kreuzchen, + das rechts oben in einer Gruppe erscheint wenn mindestens zwei Gruppen angezeigt werden, + wieder aus der Suche entfernen. Mit "Mit ALLEN Wortgruppen" + oder "Mit IRGENDEINER Wortgruppe" können Sie steuern, ob für die Suche alle + Gruppen oder nur mindestens eine berücksichtigt werden sollen. + </p> + <p>Für das weiter oben beschriebene Beispiel können Sie die Suche mit den + Suchkriterien folgendermaßen lösen:</p> + <ul> + <li>Fügen Sie in die Eingabefelder der ersten Suchgruppe den Begriff "Indien" und "China" + ein und setzen Sie "Suchbedingung" auf "Mit IRGENDEINEM der Wörter".</li> + <li>Fügen Sie eine weitere Suchgruppe hinzu und geben Sie dort "Geschichte" + ein.</li> + <li>Setzen Sie die Suchbedingung auf "Mit ALLEN Wörtern".</li> + </ul> + </dd> +</dl> diff --git a/themes/finc-accessibility/templates/HelpTranslations/de/search.phtml b/themes/finc-accessibility/templates/HelpTranslations/de/search.phtml new file mode 100644 index 0000000000000000000000000000000000000000..744f1a4b88b76c534bbc68bcfd02e994bbc6bbaf --- /dev/null +++ b/themes/finc-accessibility/templates/HelpTranslations/de/search.phtml @@ -0,0 +1,149 @@ +<h1>Hilfe zu den Suchoperatoren</h1> + +<ul class="HelpMenu"> + <li><a href="#Wildcard-Searches">Suche mit Platzhaltern</a></li> + <li><a href="#Fuzzy-Searches">Unscharfe Suche</a></li> + <li><a href="#Proximity-Searches">Suche nach ähnlichen Wörtern</a></li> + <li><a href="#Range-Searches">Bereichssuche</a></li> + <li><a href="#Boosting-a-Term">Wort gewichten</a></li> + <li><a href="#Boolean-operators">Boolesche Operatoren</a> + <ul> + <li><a href="#AND">AND</a></li> + <li><a href="#+">+</a></li> + <li><a href="#OR">OR</a></li> + <li><a href="#NOT">NOT</a></li> + <li><a href="#-">-</a></li> + </ul> + </li> +</ul> + +<dl class="Content"> + <dt><a name="Wildcard-Searches"></a>Suche mit Platzhaltern</dt> + <dd> + <p>Als Platzhalter für ein beliebiges Zeichen verwenden Sie das Fragezeichen <strong>(?)</strong>.</p> + <p>Beispiel: Wenn Sie nach "Text" oder "Test" suchen wollen geben Sie </p> + <pre class="code">Te?t</pre> + <p>ein.</p> + <p>Als Platzhalter für 0 oder mehrere beliebige Zeichen verwenden Sie ein Sternchen + <strong>(*)</strong>.</p> + <p>Beispiel: Sie wollen nach "Test", "Tests" oder "Tester" suchen, dann geben + Sie:</p> + <pre class="code">Test*</pre> + <p>ein.</p> + <p>Sie können Platzhalter irgendwo platzieren:</p> + <pre class="code">Te*t</pre> + </dd> + + <dt><a name="Fuzzy-Searches"></a>Unscharfe Suche</dt> + <dd> + <p>Verwenden Sie für die unscharfe Suche die Tilde <strong>(~)</strong> am + Ende eines Wortes. + Beispiel: Sie wollen ähnlich geschriebene Wörter zu "Raum" erhalten:</p> + <pre class="code">Raum~</pre> + <p>In diese Suche werden Wörter, wie "Baum" oder "Rahm" aufgenommen.</p> + <p>Sie können die Anzahl der Wörter erhöhen oder verringern, indem Sie + einen Wert zwischen 0 und 1 hinter der Tilde setzen. + Je kleiner der Wert, desto unschärfer ist die Suche. Wird der Wert auf 1 + gesetzt, wird nur nach identisch geschriebenen Wörtern gesucht. + Beispiel:</p> + <pre class="code">Raum~0.8</pre> + <p>Wenn Sie nichts angeben, wird der Wert automatisch auf 0.5 gesetzt.</p> + </dd> + + <dt><a name="Proximity-Searches"></a>Bereichssuche</dt> + <dd> + <p> + Für die Bereichssuche verwenden Sie die Tilde <strong>(~)</strong>, die + Sie hinter eine Gruppe von Wörter setzen. + Beispiel: Um nach Ökonomie und Keynes, welche maximal 10 Wörter voneinander entfernt sind, zu + suchen, geben Sie Folgendes ein: + </p> + <pre class="code">"Ökonomie Keynes"~10</pre> + </dd> + + <dt><a name="Range-Searches"></a>Bereichssuche</dt> + <dd> + <p> + Für die Bereichssuche verwenden Sie geschweifte Klammern <strong>({ })</strong>. + Beispiel: Sie wollen ein Wort, welches mit A, B oder C anfängt suchen: + </p> + <pre class="code">{A TO C}</pre> + <p> + Das gleiche können Sie mit Zahlen, wie z.B. Jahreszahlen machen: + </p> + <pre class="code">[2002 TO 2003]</pre> + </dd> + + <dt><a name="Boosting-a-Term"></a>Worte unterschiedlich gewichten</dt> + <dd> + <p> + Sie können Wörtern mehr Bedeutung zuweisen, indem Sie diese mit einer + Zahl gewichten. Verwenden Sie hierzu ein Dächchen <strong>(^)</strong>. Beispiel: + </p> + <pre class="code">Ökonomie Keynes^5</pre> + <p>Dadurch wird das Wort "Keynes" stärker gewichtet und dadurch bei der Suche + stärker beachtet. + </p> + </dd> + + <dt><a name="Boolean-operators"></a>Boolesche Operatoren</dt> + <dd> + <p> + Boolesche Operatoren erlauben es, Wörter logisch miteinander zu verknüpfen. + Folgende Operatoren sind erlaubt: + <strong>AND</strong>, <strong>+</strong>, <strong>OR</strong>, + <strong>NOT</strong> und <strong>-</strong>. + </p> + <p>Hinweis: Boolesche Operatoren müssen großgeschrieben werden!</p> + <dl> + <dt><a name="AND"></a>AND</dt> + <dd> + <p>Die Und-Verknüpfung <strong>(AND)</strong> ist der Standardoperator. Das + bedeutet, dass wenn zwischen zwei Wörtern kein Operator gesetzt wird, + die Und-Verknüpfung verwendet wird. Wenn Sie zwei Wörter mit AND verbinden, + erhalten Sie Treffer, in denen beide Wörter vorhanden sind. + </p> + <p>Beispiel: Sie suchen nach Titeln, in denen die Wörter + "Ökonomie" und "Keynes" enthalten sind:</p> + <pre class="code">Ökonomie Keynes</pre> + <p>oder</p> + <pre class="code">Ökonomie AND Keynes</pre> + </dd> + <dt><a name="+"></a>+</dt> + <dd> + <p>Indem Sie den <strong>+</strong>-Operator vor ein Wort setzen, erhalten Sie + nur Treffer, in denen dieses Wort vorkommt. + </p> + <p>Beispiel:</p> + <pre class="code">+Ökonomie +Keynes</pre> + </dd> + <dt><a name="OR"></a>OR</dt> + <dd> + <p>Steht eine Oder-Verknüpfung <strong>(OR)</strong> zwischen zwei Wörtern, so + erhalten Sie Treffer, in denen eines oder beide Wörter gefunden wurden. + </p> + <p>Beispiel: Sie suchen nach Titeln, in denen die Phrasen "Ökonomie Keynes" oder + "Keynes" enthalten sind:</p> + <pre class="code">"Ökonomie Keynes" OR Keynes</pre> + </dd> + <dt><a name="NOT"></a>NOT</dt> + <dd> + <p>Indem Sie <strong>NOT</strong> vor ein Wort setzen, schließen Sie Treffer aus, + die dieses Wort enthalten.</p> + <p>Beispiel: Sie wollen nach Titeln suchen, welche das Wort "Ökonomie" + enthalten, aber nicht das Wort "Keynes":</p> + <pre class="code">Ökonomie NOT Keynes</pre> + <p>Hinweis: NOT muss mit mindestens zwei Wörtern verwendet werden. + Beispielsweise liefert folgende Suche keine Treffer:</p> + <pre class="code">NOT Ökonomie</pre> + </dd> + <dt><a name="-"></a>-</dt> + <dd> + <p>Wird der Operator <strong>(-)</strong> vor ein Wort gesetzt, so + werden alle Treffer ausgefiltert, die dieses Wort enthalten.</p> + <p>Beispiel:</p> + <pre class="code">Ökonomie -Keynes</pre> + </dd> + </dl> + </dd> +</dl> diff --git a/themes/finc-accessibility/templates/HelpTranslations/en/advsearch.phtml b/themes/finc-accessibility/templates/HelpTranslations/en/advsearch.phtml new file mode 100644 index 0000000000000000000000000000000000000000..38a52027bdc12e980bcaef1079285965e7c909ce --- /dev/null +++ b/themes/finc-accessibility/templates/HelpTranslations/en/advsearch.phtml @@ -0,0 +1,52 @@ +<h1>Advanced Searching Tips</h1> + +<ul class="HelpMenu"> + <li><a href="#Search-Fields">Search Fields</a></li> + <li><a href="#Search-Groups">Search Groups</a></li> +</ul> + +<dl class="Content"> + <dt><a name="Search-Fields"></a>Search Fields</dt> + <dd> + <p>When you first visit the Advanced Search page, you are presented with + several search fields. In each field, you can type the keywords you + want to search for. <a href="<?=$this->url('help-home')?>?topic=search">Search operators</a> + are allowed.</p> + <p>Each field is accompanied by a drop-down menu that lets you specify the type + of data (title, author, etc.) you are searching for. You can mix and + match search types however you like.</p> + <p>The "Match" setting lets you specify how multiple search fields should + be handled.</p> + <ul> + <li>ALL Terms - Return only records that match every search field.</li> + <li>ANY Terms - Return any records that match at least one search field.</li> + <li>NO Terms -- Return all records EXCEPT those that match search fields.</li> + </ul> + <p>The "Add Search Field" button may be used to add additional search fields + to the form. You may use as many search fields as you wish.</p> + </dd> + + <dt><a name="Search-Groups"></a>Search Groups</dt> + <dd> + <p>For certain complex searches, a single set of search fields may not be + enough. For example, suppose you want to find books about the history of + China or India. If you did an ALL Terms search for China, India, and + History, you would only get books about China AND India. If you did an + ANY Terms search, you would get books about history that had nothing to + do with China or India.</p> + <p>Search Groups provide a way to build searches from multiple groups of + search fields. Every time you click the "Add Search Group" button, a new + group of fields is added. Once you have multiple search groups, you can + remove unwanted groups with the "Remove Search Group" button, and you can + specify whether you want to match on ANY or ALL search groups.</p> + <p>In the history of China or India example described above, you could solve + the problem using search groups like this:</p> + <ul> + <li>In the first search group, enter "India" and "China" and make sure that + the "Match" setting is "ANY Terms."</li> + <li>Add a second search group and enter "history."</li> + <li>Make sure the match setting next to the Search Groups header is set to + "ALL Groups."</li> + </ul> + </dd> +</dl> diff --git a/themes/finc-accessibility/templates/HelpTranslations/en/search.phtml b/themes/finc-accessibility/templates/HelpTranslations/en/search.phtml new file mode 100644 index 0000000000000000000000000000000000000000..8a7f9dd294f6b18161b9454edba93fa3af689c29 --- /dev/null +++ b/themes/finc-accessibility/templates/HelpTranslations/en/search.phtml @@ -0,0 +1,119 @@ +<h1>Helpful Searching Tips</h1> + +<ul class="HelpMenu"> + <li><a href="#Wildcard-Searches">Wildcard Searches</a></li> + <li><a href="#Fuzzy-Searches">Fuzzy Searches</a></li> + <li><a href="#Proximity-Searches">Proximity Searches</a></li> + <li><a href="#Range-Searches">Range Searches</a></li> + <li><a href="#Boosting-a-Term">Boosting a Term</a></li> + <li><a href="#Boolean-operators">Boolean Operators</a> + <ul> + <li><a href="#AND">AND</a></li> + <li><a href="#+">+</a></li> + <li><a href="#OR">OR</a></li> + <li><a href="#NOT">NOT</a></li> + <li><a href="#-">-</a></li> + </ul> + </li> +</ul> + +<dl class="Content"> + <dt><a name="Wildcard-Searches"></a>Wildcard Searches</dt> + <dd> + <p>To perform a single character wildcard search use the <strong>?</strong> symbol.</p> + <p>For example, to search for "woman" or "women" you can use the search:</p> + <pre class="code">wom?n</pre> + <p>To perform a multiple character, 0 or more, wildcard search use the <strong>*</strong> symbol.</p> + <p>For example, to search for test, tests or tester, you can use the search: </p> + <pre class="code">test*</pre> + <p>You can also use the wildcard searches in the middle of a term.</p> + <pre class="code">te*t</pre> + <p>Note: You cannot use a * or ? symbol as the first character of a search.</p> + </dd> + + <dt><a name="Fuzzy-Searches"></a>Fuzzy Searches</dt> + <dd> + <p>Use the tilde <strong>~</strong> symbol at the end of a <strong>Single</strong> word Term. For example, to search for variant spellings of "Tchaikovsky," use the fuzzy search: </p> + <pre class="code">Tchaikovsky~</pre> + <p>An additional parameter can specify the required similarity. The value is between 0 and 1, with a value closer to 1 only terms with a higher similarity will be matched. For example:</p> + <pre class="code">Tchaikovsky~0.8</pre> + <p>The default that is used if the parameter is not given is 0.5.</p> + </dd> + + <dt><a name="Proximity-Searches"></a>Proximity Searches</dt> + <dd> + <p> + Use the tilde <strong>~</strong> symbol at the end of a <strong>Multiple</strong> word Term. + For example, to search for economics and keynes that are within 10 words apart: + </p> + <pre class="code">"economics Keynes"~10</pre> + </dd> + + <dt><a name="Range-Searches"></a>Range Searches</dt> + <dd> + <p> + To perform a range search you can use the <strong>{ }</strong> characters. + For example to search for a term that starts with either A, B, or C: + </p> + <pre class="code">{A TO C}</pre> + <p> + The same can be done with numeric fields such as the Year: + </p> + <pre class="code">[2002 TO 2003]</pre> + </dd> + + <dt><a name="Boosting-a-Term"></a>Boosting a Term</dt> + <dd> + <p> + To apply more value to a term, you can use the <strong>^</strong> character. + For example, you can try the following search: + </p> + <pre class="code">economics Keynes^5</pre> + <p>Which will give more value to the term "Keynes"</p> + </dd> + + <dt><a name="Boolean-operators"></a>Boolean Operators</dt> + <dd> + <p> + Boolean operators allow terms to be combined with logic operators. + The following operators are allowed: <strong>AND</strong>, <strong>+</strong>, <strong>OR</strong>, <strong>NOT</strong> and <strong>-</strong>. + </p> + <p>Note: Boolean operators must be ALL CAPS</p> + <dl> + <dt><a name="AND"></a>AND</dt> + <dd> + <p>The <strong>AND</strong> operator is the default conjunction operator. This means that if there is no Boolean operator between two terms, the AND operator is used. The AND operator matches records where both terms exist anywhere in the field of a record.</p> + <p>To search for records that contain "economics" and "Keynes" use the query: </p> + <pre class="code">economics Keynes</pre> + <p>or</p> + <pre class="code">economics AND Keynes</pre> + </dd> + <dt><a name="+"></a>+</dt> + <dd> + <p>The "+" or required operator requires that the term after the "+" symbol exist somewhere in the field of a record.</p> + <p>To search for records that must contain "economics" and may contain "Keynes" use the query:</p> + <pre class="code">+economics Keynes</pre> + </dd> + <dt><a name="OR"></a>OR</dt> + <dd> + <p>The OR operator links two terms and finds a matching record if either of the terms exist in a record.</p> + <p>To search for documents that contain either "economics Keynes" or just "Keynes" use the query:</p> + <pre class="code">"economics Keynes" OR Keynes</pre> + </dd> + <dt><a name="NOT"></a>NOT</dt> + <dd> + <p>The NOT operator excludes records that contain the term after NOT.</p> + <p>To search for documents that contain "economics" but not "Keynes" use the query: </p> + <pre class="code">economics NOT Keynes</pre> + <p>Note: The NOT operator cannot be used with just one term. For example, the following search will return no results:</p> + <pre class="code">NOT economics</pre> + </dd> + <dt><a name="-"></a>-</dt> + <dd> + <p>The <strong>-</strong> or prohibit operator excludes documents that contain the term after the "-" symbol.</p> + <p>To search for documents that contain "economics" but not "Keynes" use the query: </p> + <pre class="code">economics -Keynes</pre> + </dd> + </dl> + </dd> +</dl> diff --git a/themes/finc-accessibility/templates/layout/help.phtml b/themes/finc-accessibility/templates/layout/help.phtml new file mode 100644 index 0000000000000000000000000000000000000000..d542a29bd6ed75a6e4a14a012f539eba014e0d6a --- /dev/null +++ b/themes/finc-accessibility/templates/layout/help.phtml @@ -0,0 +1,12 @@ +<?=$this->doctype('XHTML5')?> +<html xmlns="http://www.w3.org/1999/xhtml" lang="<?=$this->layout()->userLang ?>" xml:lang="<?=$this->layout()->userLang ?>"> + <head> + <?php $this->headThemeResources(); ?> + <?=$this->headMeta()?> + <?=$this->headTitle() ?> + <?=$this->headLink()->setStylesheet('help.css') ?> + </head> + <body> + <?=$this->layout()->content?> + </body> +</html> diff --git a/themes/finc/js/common-finc.js b/themes/finc/js/common-finc.js index 3b80a9ac86ae05382047455ec593beb1df9b27ad..033bc3db4de9f5a0cee61d87b654ca6b6d9993b5 100644 --- a/themes/finc/js/common-finc.js +++ b/themes/finc/js/common-finc.js @@ -8,27 +8,80 @@ function setupOffcanvas() { $('.close-offcanvas').focus(); // Set focus to the back button of the sidebar $('.sidebar .active').focus(); // Special case: account sidebar: set focus on the active element }); - } - // Handle sidebar in case of config.ini [Site] offcanvas=false configuration - if ($('.sidebar').length > 0 && !($(document.body).hasClass("offcanvas"))) { - $('[data-toggle="offcanvas"]').click(function offcanvasClick(e) { - e.preventDefault(); - window.location.href = '#myresearch-sidebar'; - $('.close-offcanvas').focus(); // Set focus to the back button of the sidebar - $('.sidebar .active').focus(); // Special case: account sidebar: set focus on the active element + + // Keep focus within sidebar on mobile + $('.sidebar').on('keydown', function (e) { + if (document.body.classList.contains('active') && $(document).width() <= 767) { + if (e.key === 'Escape') { // esc + $('.close-offcanvas').click(); + } + if (e.key === 'Tab') { // tab + retainFocus(e, this); + } + } }); + } + if ($('.sidebar').length > 0) { + // Handle sidebar in case of config.ini [Site] offcanvas=false configuration + if (!($(document.body).hasClass("offcanvas"))) { + $('[data-toggle="offcanvas"]').click(function offcanvasClick(e) { + e.preventDefault(); + window.location.href = '#myresearch-sidebar'; + $('.close-offcanvas').focus(); // Set focus to the back button of the sidebar + $('.sidebar .active').focus(); // Special case: account sidebar: set focus on the active element + }); + } + // Handle sidebar in case of config.ini [Site] offcanvas=false configuration - END + $('.close-offcanvas').click(function offcanvasClick(e) { - e.preventDefault(); - window.location.href = '#content'; + // Handle sidebar in case of config.ini [Site] offcanvas=false configuration + if (!($(document.body).hasClass("offcanvas"))) { + e.preventDefault(); + window.location.href = '#content'; + } $('.search-filter-toggle').focus(); // Set focus on the toggle button }); } } +/** + * Keyboard and focus controllers + * Copied from lightbox.js + */ +var FOCUSABLE_ELEMENTS = ['a[href]', 'area[href]', 'input:not([disabled]):not([type="hidden"]):not([aria-hidden])', 'select:not([disabled]):not([aria-hidden])', 'textarea:not([disabled]):not([aria-hidden])', 'button:not([disabled]):not([aria-hidden])', 'iframe', 'object', 'embed', '[contenteditable]', '[tabindex]:not([tabindex^="-"])']; +function getFocusableNodes (element) { + let nodes = element.querySelectorAll(FOCUSABLE_ELEMENTS); + return Array.apply(null, nodes); +} + +function retainFocus(event, panel) { + var focusableNodes = getFocusableNodes(panel); + + // no focusable nodes + if (focusableNodes.length === 0) + return; + + if (!panel.contains(document.activeElement)) { + focusableNodes[0].focus(); + } else { + var focusedItemIndex = focusableNodes.indexOf(document.activeElement); + + if (event.shiftKey && focusedItemIndex === 0) { + focusableNodes[focusableNodes.length - 1].focus(); + event.preventDefault(); + } + + if (!event.shiftKey && focusableNodes.length > 0 && focusedItemIndex === focusableNodes.length - 1) { + focusableNodes[0].focus(); + event.preventDefault(); + } + } +} + /* use css class 'skip-to' to jump to landmark - RL */ $(document).ready(function () { $(document).on('click enter',".skip-to", function (e) { - if (e.type === 'enter' && e.keyCode !== 13) { + if (e.type === 'enter' && e.key !== 'Enter') { return; } diff --git a/themes/finc/scss/_customVariables.scss b/themes/finc/scss/_customVariables.scss index 6115953cf9801ff4547e71da9f23b23f44f47eab..fe67f2cfa7897c51032251a46365f6961d46a752 100644 --- a/themes/finc/scss/_customVariables.scss +++ b/themes/finc/scss/_customVariables.scss @@ -834,6 +834,9 @@ $search-filter-text-decoration: none !default; $search-filter-remove-hover-bg: $search-filter-remove-all-bg !default; $search-filter-remove-hover-color: $search-filter-remove-all-color !default; +// Note: the background value in BS3 is '$list-group-active-bg' = '$component-active-bg' = '$brand-primary'; +// we insert new value here to make it overwritable in themes +$search-filter-values-remove-bg: $brand-primary !default; $search-filter-values-remove-color: $white !default; $search-filters-margin-bottom: 4px !default; @@ -1024,6 +1027,13 @@ $adv-search-links-button-margin-bottom: em(3px) !default; $pager-margin-bottom: 0 !default; $pager-margin-top-xs: em(40px) !default; +$pager-bg: $silver !default; +$pager-hover-bg: $brand-primary; +$pager-hover-color: $black; +$pager-border: $border-default-styles !default; +$pager-border-radius: 0 !default; + + @@ -1095,6 +1105,7 @@ $sidebar-my-account-danger-success-warning-background: transparent !default; $sidebar-my-account-danger-success-warning-padding: 0 !default; // Sidebar item hover effect (doesn't exist in VF out-of-the-box); active is for selected facets +$sidebar-item-hover-color: $link-hover-color !default; $sidebar-item-hover-bg: transparentize($brand-secondary, .9) !default; $sidebar-item-active-hover-bg: transparentize($brand-primary, .1) !default; @@ -1392,3 +1403,14 @@ $amsl-sources-list-li-top-level-list-style: none !default; $amsl-sources-list-li-top-level-list-padding-bottom: .5em !default; $amsl-sources-list-panel-body-span-margin: 10px 15px 10px 0 !default; + + + + +// ***************************************************************** +// ************ Activate On Demand - Plugins *********************** +// ***************************************************************** + +$activate-on-demand-bulkaction-visible-xs: false !default; +$activate-on-demand-visited-links: false !default; +$activate-on-demand-sidebar-filter-hide-checkbox: true !default; diff --git a/themes/finc/scss/activate-on-demand/_bulkaction-visible-xs.scss b/themes/finc/scss/activate-on-demand/_bulkaction-visible-xs.scss index 50b8c3070c50bd6d1d68c975649d38f91cc48f79..bff9608340641431a85f3ae1b14968f2e2285348 100644 --- a/themes/finc/scss/activate-on-demand/_bulkaction-visible-xs.scss +++ b/themes/finc/scss/activate-on-demand/_bulkaction-visible-xs.scss @@ -1,24 +1,26 @@ -// Bulk Action Buttons and result list checkboxes get hidden on -// mobile in Bootstrap Theme - show them again. -// In finc-based themes import this SCSS partial or copy it to your own theme +@mixin plugin-bulkaction-visible-xs { + // Bulk Action Buttons and result list checkboxes get hidden on + // mobile in Bootstrap Theme - show them again. + // In finc-based themes import this SCSS partial or copy it to your own theme -@media (max-width: 767px) { - .bulkActionButtons, - .result .checkbox, - .result .record-checkbox, - .result .record-number { - display: table; - } + @media (max-width: 767px) { + .bulkActionButtons, + .result .checkbox, + .result .record-checkbox, + .result .record-number { + display: table; + } - .result .checkbox, - .result .record-checkbox, - .result .record-number { - margin-right: .5em; - } + .result .checkbox, + .result .record-checkbox, + .result .record-number { + margin-right: .5em; + } - .result, - .bulk-action-buttons, - .bulkActionButtons { - padding-left: 0; + .result, + .bulk-action-buttons, + .bulkActionButtons { + padding-left: 0; + } } } diff --git a/themes/finc/scss/activate-on-demand/_sidebar-filter-hide-checkbox.scss b/themes/finc/scss/activate-on-demand/_sidebar-filter-hide-checkbox.scss index c2638f7b745a62c8fb3997a0b9b9a20599615aca..a93bc985175187c29248521923676ac690778b92 100644 --- a/themes/finc/scss/activate-on-demand/_sidebar-filter-hide-checkbox.scss +++ b/themes/finc/scss/activate-on-demand/_sidebar-filter-hide-checkbox.scss @@ -1,45 +1,47 @@ -// improve sidebar for tablet devices +@mixin plugin-sidebar-filter-hide-checkbox { + // improve sidebar for tablet devices -// ***************************************************************** -// ************ General ******************************************** -// ***************************************************************** + // ***************************************************************** + // ************ General ******************************************** + // ***************************************************************** -.sidebar { - .facet { - &.active { - .text { - // reduce padding for active filters on tablet devices #22377 - @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) { - padding-left: $sidebar-facet-active-text-inside-padding-left-sm; + .sidebar { + .facet { + &.active { + .text { + // reduce padding for active filters on tablet devices #22377 + @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) { + padding-left: $sidebar-facet-active-text-inside-padding-left-sm; + } } } - } - @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) { - // cut text in sidebar for tablet devices #22377 - .text { - overflow: hidden; - text-overflow: ellipsis; + @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) { + // cut text in sidebar for tablet devices #22377 + .text { + overflow: hidden; + text-overflow: ellipsis; - // hide checkboxes in sidebar for tablet devices #22377 - .fa-square-o { - display: none; + // hide checkboxes in sidebar for tablet devices #22377 + .fa-square-o { + display: none; + } } } } } -} -.facet-group { - a, - .text, - .badge, - .title, - .help-link, - .facet a:not(.exclude):not(:last-of-type) { - // reduce padding for small devices #22377 - @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) { - padding: $sidebar-item-padding-sm; + .facet-group { + a, + .text, + .badge, + .title, + .help-link, + .facet a:not(.exclude):not(:last-of-type) { + // reduce padding for small devices #22377 + @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) { + padding: $sidebar-item-padding-sm; + } } } } diff --git a/themes/finc/scss/activate-on-demand/_visitedLinks.scss b/themes/finc/scss/activate-on-demand/_visitedLinks.scss index d47dcee50b5cc845fc23ac0ec329d08b6afc3656..eae2e987f51fa31bf305b137756c081daebcdb53 100644 --- a/themes/finc/scss/activate-on-demand/_visitedLinks.scss +++ b/themes/finc/scss/activate-on-demand/_visitedLinks.scss @@ -1,66 +1,68 @@ -// Import this file in your theme to style visited links in a different color -// You may also copy it to your theme and fine-tune it further (e.g. 'a:not(.btn):not(.text) ....' +@mixin plugin-visited-links { + // You may also copy it to your theme and fine-tune it further (e.g. 'a:not(.btn):not(.text) ....' -// By changing these variables in your own theme, you can override the !defaults -// This _does not_ re-style visited facets, filters, alerts -$a-visited-color: $steel !default; -$a-visited-color-standard-link-color: $steel !default;$state-link-hover-color: $black !default; -$a-visited-color-alerts: $jet !default; -$a-visited-color-active-facets: $a-visited-color-alerts !default; + // By changing these variables in your own theme, you can override the !defaults + // This _does not_ re-style visited facets, filters, alerts + $a-visited-color: $steel !default; + $a-visited-color-standard-link-color: $steel !default; + $state-link-hover-color: $black !default; + $a-visited-color-alerts: $jet !default; + $a-visited-color-active-facets: $a-visited-color-alerts !default; -// define text-decoration and visited link color _for all but_ buttons, facets and breadcrumbs -a:not(.btn):not(.text) { - text-decoration: $link-text-decoration; + // define text-decoration and visited link color _for all but_ buttons, facets and breadcrumbs + a:not(.btn):not(.text) { + text-decoration: $link-text-decoration; - // set different color for links already visited - &:visited { - color: $a-visited-color; + // set different color for links already visited + &:visited { + color: $a-visited-color; - .breadcrumb &, - .nav &, - .alert &, - .savedLists & { - color: unset; + .breadcrumb &, + .nav &, + .alert &, + .savedLists & { + color: unset; - &:focus, - &:hover { - color: $a-visited-color; + &:focus, + &:hover { + color: $a-visited-color; + } } - } - .alert &, - .savedLists & { - &:focus, - &:hover { - color: $a-visited-color-alerts; + .alert &, + .savedLists & { + &:focus, + &:hover { + color: $a-visited-color-alerts; + } } - } - &.active { - .facet & { - color: $a-visited-color-active-facets; + &.active { + .facet & { + color: $a-visited-color-active-facets; - &:focus, - &:hover { - color: $sidebar-facet-active-hover-color; + &:focus, + &:hover { + color: $sidebar-facet-active-hover-color; + } } } } } -} -// Selected/active filters on top -.sidebar .facet.active, -.sidebar a.active { + // Selected/active filters on top + .sidebar .facet.active, + .sidebar a.active { - &:visited { - // keep important - color: $sidebar-facet-active-color !important; - - &:focus, - &:hover { + &:visited { // keep important - color: $sidebar-facet-active-hover-color !important; + color: $sidebar-facet-active-color !important; + + &:focus, + &:hover { + // keep important + color: $sidebar-facet-active-hover-color !important; + } } } } diff --git a/themes/finc/scss/components/_forms.scss b/themes/finc/scss/components/_forms.scss index 1ef8ed27f76bd3d6f973b7fdcb42270c1388a35e..f500fc35e6c747068e25f78aff8578d3436eacbc 100644 --- a/themes/finc/scss/components/_forms.scss +++ b/themes/finc/scss/components/_forms.scss @@ -335,4 +335,21 @@ textarea { // Range slider in sidebar .facet-range-form { padding: $facet-range-form-padding; -} \ No newline at end of file +} + + +// ***************************************************************** +// ************ Record Forms in Profile Section ******************** +// ***************************************************************** + +#cancelILLRequest, +#cancelHold, +#cancelStorageRetrievalRequest, +#renewals { + .result .checkbox { + // display checkboxes on mobile too + @media (max-width: $screen-xs-max) { + display: block; + } + } +} diff --git a/themes/finc/scss/components/_header-active-filters.scss b/themes/finc/scss/components/_header-active-filters.scss index a09485d69e9c0a9aa3cee977bb9d7f80c91ae219..91433495e65832585aa58a041afe7b0dad94cb8e 100644 --- a/themes/finc/scss/components/_header-active-filters.scss +++ b/themes/finc/scss/components/_header-active-filters.scss @@ -37,6 +37,8 @@ // Make this the same height as .reset-filters-btn and other navigation elements // for better usability - keep '.filters' for specifity (overwriting BS3) .filters .filter-value { + // the background filter value in BS3 is '$list-group-active-bg' + background: $search-filter-values-remove-bg; height: $navigation-element-default-height; margin-bottom: $search-filters-margin-bottom; padding: $search-filters-padding; diff --git a/themes/finc/scss/components/_pagination.scss b/themes/finc/scss/components/_pagination.scss index db46743ca7c050ad55596e8c36a597c736051836..0458be07084fffb9f921815833d4a28279f7e5a5 100644 --- a/themes/finc/scss/components/_pagination.scss +++ b/themes/finc/scss/components/_pagination.scss @@ -12,7 +12,7 @@ display: none; } -// Fix pagination on XS to display fewer items and remove first and last + // Fix pagination on XS to display fewer items and remove first and last @media (max-width: $screen-xs-max) { li { // hide last and first page buttons @@ -42,5 +42,21 @@ .disabled { display: none; } + + li { + > a, + > span { + background-color: $pager-bg; + border: 1px solid $pager-border; + border-radius: $pager-border-radius; + } + + > a:hover, + > a:focus { + background-color: $pager-hover-bg; + color: $pager-hover-color; + text-decoration: $btn-text-decoration; + } + } } diff --git a/themes/finc/scss/components/_sidebar.scss b/themes/finc/scss/components/_sidebar.scss index 8a481519ecaa8698c7042e2d4edd82b77151dc5a..2d75b1571c404b7b455c971d27ade56575d824ce 100644 --- a/themes/finc/scss/components/_sidebar.scss +++ b/themes/finc/scss/components/_sidebar.scss @@ -162,10 +162,12 @@ } // Create hover-effect -.facet { +.facet, +.facet a { &:hover:not(.button), &:focus:not(.button) { background: $sidebar-item-hover-bg; + color: $sidebar-item-hover-color; .active-filters & { background: $sidebar-item-active-hover-bg; @@ -175,8 +177,8 @@ // Active facet hover color &.active:hover:not(.button), &.active:focus:not(.button) { - color: $sidebar-facet-active-hover-color; background: $sidebar-item-active-hover-bg; + color: $sidebar-facet-active-hover-color; // color icon too .fa { diff --git a/themes/finc/scss/finc.scss b/themes/finc/scss/finc.scss index 25582576e7c68b525f70b1e924dbe24401d2ffd1..8921fad525c04d245a30f0f29759d7647aaffb97 100644 --- a/themes/finc/scss/finc.scss +++ b/themes/finc/scss/finc.scss @@ -43,13 +43,27 @@ // @import 'components/admin-panel'; // @import 'components/amsl'; +// ***************************************************************** +// ************ Activate On Demand - Plugins *********************** +// ***************************************************************** + +// see Variables at 'Activate On Demand - Plugins' Section in Custom Variables -// Activate the following imports in your library's theme: // 1. To make bulk action buttons visible on small devices (Accessibility) -// @import 'activate-on-demand/bulkaction-visible-xs'; -// 2. To make visited links use a different color, use the import in anchors.scss -// 3. If you want to hide the checkboxes for the filters on SM devices, import the following file +@import 'activate-on-demand/bulkaction-visible-xs'; +@if $activate-on-demand-bulkaction-visible-xs { + @include plugin-bulkaction-visible-xs; +} +// 2. To make visited links use a different color +@import 'activate-on-demand/visitedLinks'; +@if $activate-on-demand-visited-links { + @include plugin-visited-links; +} +// 3. Hide Checkboxes in facets in siedebar on tables sizes @import 'activate-on-demand/sidebar-filter-hide-checkbox'; +@if $activate-on-demand-sidebar-filter-hide-checkbox { + @include plugin-sidebar-filter-hide-checkbox; +} // 4. ............. // ***************************************************************** diff --git a/themes/finc/templates/Recommend/SideFacets.phtml b/themes/finc/templates/Recommend/SideFacets.phtml index 2f054bfd36fbfe3164257b376f1030d72bfaa23e..571a5a3d95eba6f0d1c6d32259647a64e592a3f3 100644 --- a/themes/finc/templates/Recommend/SideFacets.phtml +++ b/themes/finc/templates/Recommend/SideFacets.phtml @@ -57,7 +57,7 @@ <div class="facet-group" id="side-panel-<?=$this->escapeHtmlAttr($title) ?>"> <?php /* finc adds h3 and aria coding; also uses a instead of button for W3C validation - #19695 */ ?> <h3> - <a <?php if (in_array($title, $collapsedFacets)): ?>class="title collapsed" aria-expanded="false"<?php else: ?>class="title" aria-expanded="true"<?php endif ?> data-toggle="collapse" href="#side-collapse-<?=$this->escapeHtmlAttr($title) ?>" > + <a <?php if (in_array($title, $collapsedFacets)): ?>class="title collapsed" aria-expanded="false"<?php else: ?>class="title" aria-expanded="true"<?php endif ?> id="control-for-side-collapse-<?=$this->escapeHtmlAttr($title)?>" data-toggle="collapse" href="#side-collapse-<?=$this->escapeHtmlAttr($title) ?>" > <?php /* finc: add span #19934 */ ?> <?=$this->transEsc($cluster['label'])?> <span class="sr-only"><?=$this->transEsc('facet_select_hint') ?></span> </a> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/toolbar.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/toolbar.phtml index b7a05b12b7666b1266eef683f277ddf19b8ab408..51191a23b23efb4df5a10d05efd7196b0b73f930 100644 --- a/themes/finc/templates/RecordDriver/DefaultRecord/toolbar.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/toolbar.phtml @@ -20,7 +20,7 @@ <?php if (count($this->driver->getCitationFormats()) > 0): ?> <li><a class="cite-record" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'Cite')?>" rel="nofollow"><i class="fa fa-asterisk" aria-hidden="true"></i> <?=$this->transEsc('Cite this')?></a></li> <?php endif; ?> - <?php if ($this->tabs['Details'] + <?php if ($this->tabs['Details'] ?? false && $this->config()->get('config')->Site->showStaffViewInLightbox ?? false): ?> <li> <a href="<?=$this->recordLink()->getTabUrl($this->driver, 'Details')?>" diff --git a/themes/finc/templates/RecordDriver/SolrAI/core.phtml b/themes/finc/templates/RecordDriver/SolrAI/core.phtml index 14671cc288a798c203e54e6961c634188ecf62e1..52d1214bdeac09051775ab904593d6771f3d268f 100644 --- a/themes/finc/templates/RecordDriver/SolrAI/core.phtml +++ b/themes/finc/templates/RecordDriver/SolrAI/core.phtml @@ -1,5 +1,6 @@ <!-- finc: recordDriver - SolrAI - core --> <?php /* Created in 4826, based on DefaultRecord/core, compare with DefaultRecord/core during updates! */ ?> +<?php $this->metadata()->generateMetatags($this->driver);?> <div class="media" vocab="http://schema.org/" resource="#record" typeof="<?= $this->driver->getSchemaOrgFormats() ?> Product"> <?php /* Use VF5.1 offcanvas toggler here, if you have a custom sidebar - CK */ ?> <?= $this->render('RecordDriver/DefaultRecord/offcanvas-toggler'); ?> diff --git a/themes/finc/templates/RecordDriver/SolrLido/core.phtml b/themes/finc/templates/RecordDriver/SolrLido/core.phtml index f071513b6f84ba0e1056f26e9c23e2446e440628..476427bd6c5626fc0cfcb65197db1886df61ba6a 100644 --- a/themes/finc/templates/RecordDriver/SolrLido/core.phtml +++ b/themes/finc/templates/RecordDriver/SolrLido/core.phtml @@ -2,6 +2,7 @@ <?php /* based on DefaultRecord/core, compare with DefaultRecord/core during updates! // keep schema tagging here in finc - CK, #13861 */ ?> +<?php $this->metadata()->generateMetatags($this->driver);?> <div class="media" vocab="http://schema.org/" resource="#record" typeof="<?=$this->driver->getSchemaOrgFormats()?> Product"> <?php /* Use VF5.1 offcanvas toggler here, if you have a custom sidebar - CK */ ?> <?=$this->render('RecordDriver/DefaultRecord/offcanvas-toggler'); ?> diff --git a/themes/finc/templates/RecordDriver/SolrMarc/core.phtml b/themes/finc/templates/RecordDriver/SolrMarc/core.phtml index 3cf2987092bda6858b6bd5e9af34e3ea0f4ace92..356d8967fda3d5649e61fbdf81cbfedecc41e5fb 100644 --- a/themes/finc/templates/RecordDriver/SolrMarc/core.phtml +++ b/themes/finc/templates/RecordDriver/SolrMarc/core.phtml @@ -1,5 +1,6 @@ <!-- finc: RecordDriver - solrMarc - core --> <?php /* based on DefaultRecord/core, compare with DefaultRecord/core during updates! */ ?> +<?php $this->metadata()->generateMetatags($this->driver);?> <div class="media" vocab="http://schema.org/" resource="#record" typeof="<?= $this->driver->getSchemaOrgFormats() ?> Product"> <?php /* Use VF5.1 offcanvas toggler here, if you have a custom sidebar - CK */ ?> <?= $this->render('RecordDriver/DefaultRecord/offcanvas-toggler'); ?> diff --git a/themes/finc/templates/amsl/sources-list.phtml b/themes/finc/templates/amsl/sources-list.phtml index 8970d0d041d4de5d3bbc0838e7a59a97c667e406..535605d7e1268ffe11502d7b1f6f2240977eda73 100644 --- a/themes/finc/templates/amsl/sources-list.phtml +++ b/themes/finc/templates/amsl/sources-list.phtml @@ -29,14 +29,13 @@ $this->layout()->breadcrumbs .= '</li> <li class="active">' . $this->transEsc('L </form> <p> - <button id="collapse-all-toggler" class="btn btn-default" href="javascript:void(0)"> + <button id="collapse-all-toggler" class="btn btn-default"> <span class="text-collapsed"><?=$this->transEsc('Expand all')?></span> <span class="text-expanded"><?=$this->transEsc('Collapse all')?></span> </button> </p> <ul id="sources-list"> - <?$itemCount = 0;?> <?php foreach ($this->sources as $label => $source): ?> <?php if (!empty($source)): ?> <li> @@ -49,11 +48,13 @@ $this->layout()->breadcrumbs .= '</li> <li class="active">' . $this->transEsc('L <?php foreach ($source as $sub_label => $collection): ?> <li> <?php if (!empty($collection['href'])): ?> - <?= $this->externalLink( - $collection["href"], - $sub_label, - ['title' => "{$this->transEsc("Search For")} {$sub_label}"] - ) ?> + <a + title="<?=$this->transEsc("Search For") . ' ' . $this->escapeHtml($sub_label)?>" + href="<?=$this->escapeHtml($collection['href'])?>" + target="_blank" + > + <?=$sub_label?> + </a> <?php else: ?> <div tabindex="0" aria-label="<?=$this->transEsc("Source Title")?>"> <?=$sub_label?> @@ -85,7 +86,6 @@ $this->layout()->breadcrumbs .= '</li> <li class="active">' . $this->transEsc('L [], true ) ?> - </a> </div> </div> <?php endif; ?> diff --git a/themes/finc/templates/cart/cart.phtml b/themes/finc/templates/cart/cart.phtml index 9eb9112c5ee1c87f1f9c64ab9515b6e693076ca7..d1d19ea46dddcb88883526bc30d39ff6b1507fcf 100644 --- a/themes/finc/templates/cart/cart.phtml +++ b/themes/finc/templates/cart/cart.phtml @@ -22,23 +22,23 @@ </label> </div> <?php if ($this->userlist()->getMode() !== 'disabled'): ?> - <button type="submit" class="toolbar-btn btn-type-save" name="saveCart" value="1" title="<?=$this->transEsc('bookbag_save')?>" value="1"> + <button type="submit" class="toolbar-btn btn-type-save" name="saveCart" value="1" title="<?=$this->transEsc('bookbag_save')?>"> <?=$this->transEsc('Save')?> </button> <?php endif; ?> - <button type="submit" class="toolbar-btn btn-type-email" name="email" value="1" title="<?=$this->transEsc('bookbag_email')?>" value="1"> + <button type="submit" class="toolbar-btn btn-type-email" name="email" value="1" title="<?=$this->transEsc('bookbag_email')?>"> <?=$this->transEsc('Email')?> </button> <?php $exportOptions = $this->export()->getActiveFormats('bulk'); if (count($exportOptions) > 0): ?> - <button type="submit" class="toolbar-btn btn-type-export" name="export" value="1" title="<?=$this->transEsc('bookbag_export')?>" value="1"> + <button type="submit" class="toolbar-btn btn-type-export" name="export" value="1" title="<?=$this->transEsc('bookbag_export')?>"> <?=$this->transEsc('Export')?> </button> <?php endif; ?> - <button type="submit" class="toolbar-btn btn-type-print dropdown-toggle" name="print" value="1" title="<?=$this->transEsc('print_selected')?>" value="1"> + <button type="submit" class="toolbar-btn btn-type-print dropdown-toggle" name="print" value="1" title="<?=$this->transEsc('print_selected')?>"> <?=$this->transEsc('Print')?> </button> <div class="btn-group" id="cartDelete"> - <button type="submit" name="delete" value="1" class="toolbar-btn btn-type-delete dropdown-toggle" data-toggle="dropdown" id="cart-delete-label" value="1"> + <button type="submit" name="delete" value="1" class="toolbar-btn btn-type-delete dropdown-toggle" data-toggle="dropdown" id="cart-delete-label"> <?=$this->transEsc('Delete')?> </button> <ul class="dropdown-menu" role="menu" aria-labelledby="cart-delete-label"> @@ -47,7 +47,7 @@ </ul> </div> <div class="btn-group"> - <button type="submit" class="toolbar-btn btn-type-empty dropdown-toggle" name="empty" value="1" data-toggle="dropdown" id="cart-empty-label" value="1"> + <button type="submit" class="toolbar-btn btn-type-empty dropdown-toggle" name="empty" value="1" data-toggle="dropdown" id="cart-empty-label"> <?=$this->transEsc('Empty Book Bag')?> </button> <ul class="dropdown-menu" role="menu" aria-labelledby="cart-empty-label"> diff --git a/themes/finc/templates/layout/layout.phtml b/themes/finc/templates/layout/layout.phtml index cd069a76a703b03dc1af4665c1b009d38d66c547..88bdc236b6a6acebea9f3a5c6fabcbdb0293d94f 100644 --- a/themes/finc/templates/layout/layout.phtml +++ b/themes/finc/templates/layout/layout.phtml @@ -215,9 +215,9 @@ if (!isset($this->layout()->searchbox)) { <?php endif; ?> <?php endforeach; ?> <?php elseif (strcmp($this->layout()->userLang, 'de') == 0): ?> - <a class="sr-only skip-to" href="#myresearch-sidebar"><?=$this->transEsc($this->overrideSideFacetCaption ?? 'Narrow Search')?></a> + <a class="sr-only skip-to hidden-xs" href="#control-for-side-collapse-facet_avail"><?=$this->transEsc($this->overrideSideFacetCaption ?? 'Narrow Search')?></a> <?php else: ?> - <a class="sr-only skip-to" href="#myresearch-sidebar"><?=$this->transEsc('skip-to')?><?=strtolower($this->transEsc($this->overrideSideFacetCaption ?? 'Narrow Search'))?></a> + <a class="sr-only skip-to hidden-xs" href="#control-for-side-collapse-facet_avail"><?=$this->transEsc('skip-to')?><?=strtolower($this->transEsc($this->overrideSideFacetCaption ?? 'Narrow Search'))?></a> <?php endif; ?> <?php endif; ?> </div> diff --git a/themes/finc/templates/search/results.phtml b/themes/finc/templates/search/results.phtml index 992c735d1eee38f90e9c379cc2cb7167174363d9..13afdc03de5909ac9673c4ee61186563dd4a2b52 100644 --- a/themes/finc/templates/search/results.phtml +++ b/themes/finc/templates/search/results.phtml @@ -173,12 +173,12 @@ <div class="searchtools hidden-print"> <strong><?=$this->transEsc('Search Tools')?>:</strong> <a href="<?=$this->results->getUrlQuery()->setViewParam('rss')?>"><i class="fa fa-bell" aria-hidden="true"></i> <?=$this->transEsc('Get RSS Feed')?></a> - — + <span class="hidden-xs hidden-sm">—</span> <a href="<?=$this->url('search-email')?>" class="mailSearch" data-lightbox id="mailSearch<?=$this->escapeHtmlAttr($this->results->getSearchId())?>"> <i class="fa fa-envelope" aria-hidden="true"></i> <?=$this->transEsc('Email this Search')?> </a> <?php if ($this->accountCapabilities()->getSavedSearchSetting() === 'enabled'): ?> - — + <span class="hidden-xs hidden-sm">—</span> <?php if (is_numeric($this->results->getSearchId())): ?> <?php if ($this->results->isSavedSearch()): ?> <a href="<?=$this->url('myresearch-savesearch')?>?delete=<?=urlencode($this->results->getSearchId())?>"><i class="fa fa-remove" aria-hidden="true"></i> <?=$this->transEsc('save_search_remove')?></a> diff --git a/themes/root/templates/HelpTranslations/en/advsearch.phtml b/themes/root/templates/HelpTranslations/en/advsearch.phtml index 316db2998031d0159e9471cdc8472cc76af8f7de..21e0337349e833a3f11a84ac5ce3a29b15106b0a 100644 --- a/themes/root/templates/HelpTranslations/en/advsearch.phtml +++ b/themes/root/templates/HelpTranslations/en/advsearch.phtml @@ -12,7 +12,7 @@ several search fields. In each field, you can type the keywords you want to search for. <a href="<?=$this->url('help-home')?>?topic=search">Search operators</a> are allowed.</p> - <p>Each field is accompanied by a drop-down menu that lets you specify the type + <p>Each field is accompanied by a drop-down that lets you specify the type of data (title, author, etc.) you are searching for. You can mix and match search types however you like.</p> <p>The "Match" setting lets you specify how multiple search fields should