diff --git a/.gitignore b/.gitignore index e8c1b89542e88dec12df439815950e165df4197e..ec879b1b6af547a67767c06161684e2dcdf66fa6 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,6 @@ import/solrmarc.log* /auth.json /core /.env -/lessphp_*.list \ No newline at end of file +/lessphp_*.list +/docker-compose.override.yml +/themes/finc-fid-* \ No newline at end of file diff --git a/composer.json b/composer.json index a0341cf58340c79b3bc9bd6a92e521cfb0c4e31a..9141a303b86829393aa6fe44fdfd4d6318c12941 100644 --- a/composer.json +++ b/composer.json @@ -1,26 +1,28 @@ { - "name": "vufind/vufind", - "description": "A flexible discovery layer.", + "name": "finc/fid-vufind", + "description": "finc fid vufind", "authors": [ { "name": "Demian Katz", "email": "demian.katz@villanova.edu" + }, + { + "name": "Sebastian Kehr", + "email": "kehr@ub.uni-leipzig.de" } ], "license": "GPL-2.0", "config": { "platform": { - "php": "7.0.8" + "php": "7.1", + "ext-gd": "7.1", + "ext-soap": "7.1", + "ext-json": "7.1" } }, - "repositories": [ - { - "type": "vcs", - "url": "https://github.com/demiankatz/zend-servicemanager" - } - ], "require": { - "php": ">=7.0.8", + "php": "^7.1", + "ext-json": "*", "ahand/mobileesp": "dev-master", "cap60552/php-sip2": "1.0.0", "endroid/qr-code": "2.5.0", @@ -79,7 +81,8 @@ "zendframework/zendservice-recaptcha": "3.1.0", "zf-commons/zfc-rbac": "2.6.3", "sabre/vobject": "3.5.3", - "finc/rules-evaluator": "v0.0.3" + "finc/rules-evaluator": "v0.0.3", + "finc/fid-core-module": "dev-master#85d4ca9" }, "require-dev": { "behat/mink": "1.7.1", @@ -91,12 +94,19 @@ "sebastian/phpcpd": "3.0.1", "squizlabs/php_codesniffer": "3.4.0" }, + "minimum-stability": "dev", + "prefer-stable": true, "scripts": { "phing-install-dependencies": "phing installsolr installswaggerui", "phpcs-finc": [ "vendor/bin/phpcs --standard=tests/finc/phpcs.xml" ], - "post-install-cmd": "@phing-install-dependencies", - "post-update-cmd": "@phing-install-dependencies" + "post-install-cmd": [ + "@copy-themes" + ], + "post-update-cmd": [ + "@copy-themes" + ], + "copy-themes": "php devops/composer/themes.php" } } diff --git a/composer.lock b/composer.lock index 80d9f10b208bfb2dcb05c7585c0657315ea9ec66..47882881445125ede980255ab30e1ed8a0ceee43 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f15d2b7cfe234d7c2d6f88d357ea5dda", + "content-hash": "01847b8b1e26e05ae79646098fcf0493", "packages": [ { "name": "ahand/mobileesp", @@ -172,6 +172,203 @@ "homepage": "https://github.com/container-interop/container-interop", "time": "2017-02-14T19:40:03+00:00" }, + { + "name": "doctrine/annotations", + "version": "v1.6.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "53120e0eb10355388d6ccbe462f1fea34ddadb24" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/53120e0eb10355388d6ccbe462f1fea34ddadb24", + "reference": "53120e0eb10355388d6ccbe462f1fea34ddadb24", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "php": "^7.1" + }, + "require-dev": { + "doctrine/cache": "1.*", + "phpunit/phpunit": "^6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "time": "2019-03-25T19:12:02+00:00" + }, + { + "name": "doctrine/cache", + "version": "v1.8.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/cache.git", + "reference": "d768d58baee9a4862ca783840eca1b9add7a7f57" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/cache/zipball/d768d58baee9a4862ca783840eca1b9add7a7f57", + "reference": "d768d58baee9a4862ca783840eca1b9add7a7f57", + "shasum": "" + }, + "require": { + "php": "~7.1" + }, + "conflict": { + "doctrine/common": ">2.2,<2.4" + }, + "require-dev": { + "alcaeus/mongo-php-adapter": "^1.1", + "doctrine/coding-standard": "^4.0", + "mongodb/mongodb": "^1.1", + "phpunit/phpunit": "^7.0", + "predis/predis": "~1.0" + }, + "suggest": { + "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Caching library offering an object-oriented API for many cache backends", + "homepage": "https://www.doctrine-project.org", + "keywords": [ + "cache", + "caching" + ], + "time": "2018-08-21T18:01:43+00:00" + }, + { + "name": "doctrine/lexer", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Lexer\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "lexer", + "parser" + ], + "time": "2014-09-09T13:34:57+00:00" + }, { "name": "endroid/qr-code", "version": "2.5.0", @@ -302,6 +499,48 @@ ], "time": "2018-10-23T09:00:00+00:00" }, + { + "name": "finc/fid-core-module", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://git.sc.uni-leipzig.de/ubl/finc/fid/core-module.git", + "reference": "85d4ca9" + }, + "require": { + "finc/symfony-serializer-zend-bridge": "dev-master", + "finc/vufindhttp-psrcompat": "dev-master", + "php": "^7.1", + "phpdocumentor/reflection-docblock": "^4.0", + "zendframework/zend-i18n-resources": "^2.6" + }, + "type": "library", + "extra": { + "vufind": { + "themes": { + "res/mixins/core": "finc-fid-core", + "res/mixins/registration": "finc-fid-registration" + } + } + }, + "autoload": { + "psr-4": { + "finc\\Fid\\Core\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0" + ], + "authors": [ + { + "name": "Sebastian Kehr", + "email": "kehr@ub.uni-leipzig.de" + } + ], + "description": "finc fid core module", + "time": "2019-05-06T09:21:00+00:00" + }, { "name": "finc/rules-evaluator", "version": "v0.0.3", @@ -337,76 +576,180 @@ "time": "2018-08-09T09:54:19+00:00" }, { - "name": "ghislainf/zf2-whoops", + "name": "finc/symfony-serializer-zend-bridge", "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/ghislainf/zf2-whoops.git", - "reference": "2649cf7caf400409942ddc3f8fe15b89381fc74e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ghislainf/zf2-whoops/zipball/2649cf7caf400409942ddc3f8fe15b89381fc74e", - "reference": "2649cf7caf400409942ddc3f8fe15b89381fc74e", - "shasum": "" + "url": "https://git.sc.uni-leipzig.de/ubl/finc/fid/symfony-serializer-zend-bridge.git", + "reference": "3bbbe492979cb4303eb61b7ca598886aaca9a67c" }, "require": { - "filp/whoops": "2.*", - "php": ">=5.3.3", - "zendframework/zend-config": "*", - "zendframework/zend-console": "*", - "zendframework/zend-eventmanager": "*", - "zendframework/zend-mvc": "*" + "doctrine/annotations": "^1.4", + "doctrine/cache": "^1.8", + "php": "^7.1", + "symfony/cache": "^3.4", + "symfony/property-access": "^3.4", + "symfony/property-info": "^3.4", + "symfony/serializer": "^3.4" }, - "type": "module", + "type": "library", "autoload": { - "psr-0": { - "zf2-whoops": "src/" - }, - "classmap": [ - "./Module.php" - ] + "psr-4": { + "finc\\SymfonySerializerZendBridge\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "GPL-2.0" ], "authors": [ { - "name": "Balázs Németh", - "email": "zsilbi@zsilbi.hu" - }, - { - "name": "Ghislain de Fontenay", - "homepage": "http://www.ghislainf.me/", - "role": "Developer" - }, - { - "name": "Filipe Dobreira", - "homepage": "https://github.com/filp" - }, - { - "name": "Andreas Frömer", - "homepage": "https://github.com/icanhazstring" + "name": "Sebastian Kehr", + "email": "kehr@ub.uni-leipzig.de" } ], - "description": "PHP whoops error on ZF2 framework", - "homepage": "https://github.com/ghislainf/zf2-whoops", - "time": "2016-06-06T08:41:08+00:00" + "description": "Reusable adapters for usage with zend-serializer.", + "time": "2019-04-01T15:12:38+00:00" }, { - "name": "jasig/phpcas", - "version": "1.3.6", + "name": "finc/vufindhttp-psrcompat", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/apereo/phpCAS.git", - "reference": "7972833e84f6ee5fa41f1479eab5d855109627f5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/apereo/phpCAS/zipball/7972833e84f6ee5fa41f1479eab5d855109627f5", - "reference": "7972833e84f6ee5fa41f1479eab5d855109627f5", - "shasum": "" + "url": "https://git.sc.uni-leipzig.de/ubl/finc/fid/vufindhttp-psrcompat.git", + "reference": "71ef977c8dcbf57cf55748d725fc0ecc4e5114e3" + }, + "require": { + "finc/zend-psr18bridge": "dev-master", + "php": "^7.1", + "vufind-org/vufindhttp": "~2.1" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "finc\\VuFindHttpPsrCompat\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0" + ], + "authors": [ + { + "name": "Sebastian Kehr", + "email": "kehr@ub.uni-leipzig.de" + } + ], + "description": "PSR compatibility layer for vufind-org/vufindhttp", + "time": "2019-03-15T09:49:01+00:00" + }, + { + "name": "finc/zend-psr18bridge", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://git.sc.uni-leipzig.de/ubl/finc/fid/zend-psr18bridge.git", + "reference": "6f97dd4c6949e44c144631bf428f48d4298149b8" + }, + "require": { + "php": "^7.1", + "psr/http-client": "^1.0", + "psr/http-message": "^1.0", + "zendframework/zend-psr7bridge": "^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "finc\\ZendPsr18Bridge\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0" + ], + "authors": [ + { + "name": "Sebastian Kehr", + "email": "kehr@ub.uni-leipzig.de" + } + ], + "description": "PSR 18 compatibility for zend-http clients.", + "time": "2019-03-15T09:49:28+00:00" + }, + { + "name": "ghislainf/zf2-whoops", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/ghislainf/zf2-whoops.git", + "reference": "2649cf7caf400409942ddc3f8fe15b89381fc74e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ghislainf/zf2-whoops/zipball/2649cf7caf400409942ddc3f8fe15b89381fc74e", + "reference": "2649cf7caf400409942ddc3f8fe15b89381fc74e", + "shasum": "" + }, + "require": { + "filp/whoops": "2.*", + "php": ">=5.3.3", + "zendframework/zend-config": "*", + "zendframework/zend-console": "*", + "zendframework/zend-eventmanager": "*", + "zendframework/zend-mvc": "*" + }, + "type": "module", + "autoload": { + "psr-0": { + "zf2-whoops": "src/" + }, + "classmap": [ + "./Module.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Balázs Németh", + "email": "zsilbi@zsilbi.hu" + }, + { + "name": "Ghislain de Fontenay", + "homepage": "http://www.ghislainf.me/", + "role": "Developer" + }, + { + "name": "Filipe Dobreira", + "homepage": "https://github.com/filp" + }, + { + "name": "Andreas Frömer", + "homepage": "https://github.com/icanhazstring" + } + ], + "description": "PHP whoops error on ZF2 framework", + "homepage": "https://github.com/ghislainf/zf2-whoops", + "time": "2016-06-06T08:41:08+00:00" + }, + { + "name": "jasig/phpcas", + "version": "1.3.6", + "source": { + "type": "git", + "url": "https://github.com/apereo/phpCAS.git", + "reference": "7972833e84f6ee5fa41f1479eab5d855109627f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/apereo/phpCAS/zipball/7972833e84f6ee5fa41f1479eab5d855109627f5", + "reference": "7972833e84f6ee5fa41f1479eab5d855109627f5", + "shasum": "" }, "require": { "ext-curl": "*", @@ -610,19 +953,20 @@ }, { "name": "myclabs/php-enum", - "version": "1.6.4", + "version": "1.6.6", "source": { "type": "git", "url": "https://github.com/myclabs/php-enum.git", - "reference": "550d2334d77f91b0816a5cbd6965272fe20146b8" + "reference": "32c4202886c51fbe5cc3a7c34ec5c9a4a790345e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/php-enum/zipball/550d2334d77f91b0816a5cbd6965272fe20146b8", - "reference": "550d2334d77f91b0816a5cbd6965272fe20146b8", + "url": "https://api.github.com/repos/myclabs/php-enum/zipball/32c4202886c51fbe5cc3a7c34ec5c9a4a790345e", + "reference": "32c4202886c51fbe5cc3a7c34ec5c9a4a790345e", "shasum": "" }, "require": { + "ext-json": "*", "php": ">=5.4" }, "require-dev": { @@ -650,7 +994,7 @@ "keywords": [ "enum" ], - "time": "2018-10-30T14:36:18+00:00" + "time": "2019-02-04T21:18:49+00:00" }, { "name": "ocramius/package-versions", @@ -941,16 +1285,16 @@ }, { "name": "pear/console_getopt", - "version": "v1.4.1", + "version": "v1.4.2", "source": { "type": "git", "url": "https://github.com/pear/Console_Getopt.git", - "reference": "82f05cd1aa3edf34e19aa7c8ca312ce13a6a577f" + "reference": "6c77aeb625b32bd752e89ee17972d103588b90c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pear/Console_Getopt/zipball/82f05cd1aa3edf34e19aa7c8ca312ce13a6a577f", - "reference": "82f05cd1aa3edf34e19aa7c8ca312ce13a6a577f", + "url": "https://api.github.com/repos/pear/Console_Getopt/zipball/6c77aeb625b32bd752e89ee17972d103588b90c0", + "reference": "6c77aeb625b32bd752e89ee17972d103588b90c0", "shasum": "" }, "type": "library", @@ -984,7 +1328,7 @@ } ], "description": "More info available on: http://pear.php.net/package/Console_Getopt", - "time": "2015-07-20T20:28:12+00:00" + "time": "2019-02-06T16:52:33+00:00" }, { "name": "pear/file_marc", @@ -1353,136 +1697,433 @@ } }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "./" - ], + "include-path": [ + "./" + ], + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Helgi Þormar", + "email": "dufuz@php.net", + "role": "Lead" + }, + { + "name": "Piotr Klaban", + "email": "makler@man.torun.pl", + "role": "Lead" + } + ], + "description": "More info available on: http://pear.php.net/package/Validate_ISPN", + "time": "2015-04-14T04:17:31+00:00" + }, + { + "name": "phing/phing", + "version": "2.16.1", + "source": { + "type": "git", + "url": "https://github.com/phingofficial/phing.git", + "reference": "cbe0f969e434e269af91b4160b86fe899c6e07c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phingofficial/phing/zipball/cbe0f969e434e269af91b4160b86fe899c6e07c7", + "reference": "cbe0f969e434e269af91b4160b86fe899c6e07c7", + "shasum": "" + }, + "require": { + "php": ">=5.2.0", + "symfony/yaml": "^3.1 || ^4.0" + }, + "require-dev": { + "ext-pdo_sqlite": "*", + "mikey179/vfsstream": "^1.6", + "pdepend/pdepend": "2.x", + "pear/archive_tar": "1.4.x", + "pear/http_request2": "dev-trunk", + "pear/net_growl": "dev-trunk", + "pear/pear-core-minimal": "1.10.1", + "pear/versioncontrol_git": "@dev", + "pear/versioncontrol_svn": "~0.5", + "phpdocumentor/phpdocumentor": "2.x", + "phploc/phploc": "~2.0.6", + "phpmd/phpmd": "~2.2", + "phpunit/phpunit": ">=3.7", + "sebastian/git": "~1.0", + "sebastian/phpcpd": "2.x", + "siad007/versioncontrol_hg": "^1.0", + "simpletest/simpletest": "^1.1", + "squizlabs/php_codesniffer": "~2.2" + }, + "suggest": { + "pdepend/pdepend": "PHP version of JDepend", + "pear/archive_tar": "Tar file management class", + "pear/versioncontrol_git": "A library that provides OO interface to handle Git repository", + "pear/versioncontrol_svn": "A simple OO-style interface for Subversion, the free/open-source version control system", + "phpdocumentor/phpdocumentor": "Documentation Generator for PHP", + "phploc/phploc": "A tool for quickly measuring the size of a PHP project", + "phpmd/phpmd": "PHP version of PMD tool", + "phpunit/php-code-coverage": "Library that provides collection, processing, and rendering functionality for PHP code coverage information", + "phpunit/phpunit": "The PHP Unit Testing Framework", + "sebastian/phpcpd": "Copy/Paste Detector (CPD) for PHP code", + "siad007/versioncontrol_hg": "A library for interfacing with Mercurial repositories.", + "tedivm/jshrink": "Javascript Minifier built in PHP" + }, + "bin": [ + "bin/phing" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.16.x-dev" + } + }, + "autoload": { + "classmap": [ + "classes/phing/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "classes" + ], + "license": [ + "LGPL-3.0" + ], + "authors": [ + { + "name": "Michiel Rook", + "email": "mrook@php.net" + }, + { + "name": "Phing Community", + "homepage": "https://www.phing.info/trac/wiki/Development/Contributors" + } + ], + "description": "PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.", + "homepage": "https://www.phing.info/", + "keywords": [ + "build", + "phing", + "task", + "tool" + ], + "time": "2018-01-25T13:18:09+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2017-09-11T18:02:19+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "4.3.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08", + "shasum": "" + }, + "require": { + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0", + "phpdocumentor/type-resolver": "^0.4.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "doctrine/instantiator": "~1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2017-11-30T07:14:17+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "time": "2017-07-14T14:27:02+00:00" + }, + { + "name": "psr/cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "time": "2016-08-06T20:24:11+00:00" + }, + { + "name": "psr/container", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-2-Clause" + "MIT" ], "authors": [ { - "name": "Helgi Þormar", - "email": "dufuz@php.net", - "role": "Lead" - }, - { - "name": "Piotr Klaban", - "email": "makler@man.torun.pl", - "role": "Lead" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "More info available on: http://pear.php.net/package/Validate_ISPN", - "time": "2015-04-14T04:17:31+00:00" + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "time": "2017-02-14T16:28:37+00:00" }, { - "name": "phing/phing", - "version": "2.16.1", + "name": "psr/http-client", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/phingofficial/phing.git", - "reference": "cbe0f969e434e269af91b4160b86fe899c6e07c7" + "url": "https://github.com/php-fig/http-client.git", + "reference": "496a823ef742b632934724bf769560c2a5c7c44e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phingofficial/phing/zipball/cbe0f969e434e269af91b4160b86fe899c6e07c7", - "reference": "cbe0f969e434e269af91b4160b86fe899c6e07c7", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/496a823ef742b632934724bf769560c2a5c7c44e", + "reference": "496a823ef742b632934724bf769560c2a5c7c44e", "shasum": "" }, "require": { - "php": ">=5.2.0", - "symfony/yaml": "^3.1 || ^4.0" - }, - "require-dev": { - "ext-pdo_sqlite": "*", - "mikey179/vfsstream": "^1.6", - "pdepend/pdepend": "2.x", - "pear/archive_tar": "1.4.x", - "pear/http_request2": "dev-trunk", - "pear/net_growl": "dev-trunk", - "pear/pear-core-minimal": "1.10.1", - "pear/versioncontrol_git": "@dev", - "pear/versioncontrol_svn": "~0.5", - "phpdocumentor/phpdocumentor": "2.x", - "phploc/phploc": "~2.0.6", - "phpmd/phpmd": "~2.2", - "phpunit/phpunit": ">=3.7", - "sebastian/git": "~1.0", - "sebastian/phpcpd": "2.x", - "siad007/versioncontrol_hg": "^1.0", - "simpletest/simpletest": "^1.1", - "squizlabs/php_codesniffer": "~2.2" - }, - "suggest": { - "pdepend/pdepend": "PHP version of JDepend", - "pear/archive_tar": "Tar file management class", - "pear/versioncontrol_git": "A library that provides OO interface to handle Git repository", - "pear/versioncontrol_svn": "A simple OO-style interface for Subversion, the free/open-source version control system", - "phpdocumentor/phpdocumentor": "Documentation Generator for PHP", - "phploc/phploc": "A tool for quickly measuring the size of a PHP project", - "phpmd/phpmd": "PHP version of PMD tool", - "phpunit/php-code-coverage": "Library that provides collection, processing, and rendering functionality for PHP code coverage information", - "phpunit/phpunit": "The PHP Unit Testing Framework", - "sebastian/phpcpd": "Copy/Paste Detector (CPD) for PHP code", - "siad007/versioncontrol_hg": "A library for interfacing with Mercurial repositories.", - "tedivm/jshrink": "Javascript Minifier built in PHP" + "php": "^7.0", + "psr/http-message": "^1.0" }, - "bin": [ - "bin/phing" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "2.16.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { - "classmap": [ - "classes/phing/" - ] + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "classes" - ], "license": [ - "LGPL-3.0" + "MIT" ], "authors": [ { - "name": "Michiel Rook", - "email": "mrook@php.net" - }, - { - "name": "Phing Community", - "homepage": "https://www.phing.info/trac/wiki/Development/Contributors" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.", - "homepage": "https://www.phing.info/", + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", "keywords": [ - "build", - "phing", - "task", - "tool" + "http", + "http-client", + "psr", + "psr-18" ], - "time": "2018-01-25T13:18:09+00:00" + "time": "2018-10-30T23:29:13+00:00" }, { - "name": "psr/cache", - "version": "1.0.1", + "name": "psr/http-factory", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + "url": "https://github.com/php-fig/http-factory.git", + "reference": "378bfe27931ecc54ff824a20d6f6bfc303bbd04c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/378bfe27931ecc54ff824a20d6f6bfc303bbd04c", + "reference": "378bfe27931ecc54ff824a20d6f6bfc303bbd04c", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.0.0", + "psr/http-message": "^1.0" }, "type": "library", "extra": { @@ -1492,7 +2133,7 @@ }, "autoload": { "psr-4": { - "Psr\\Cache\\": "src/" + "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1505,26 +2146,31 @@ "homepage": "http://www.php-fig.org/" } ], - "description": "Common interface for caching libraries", + "description": "Common interfaces for PSR-7 HTTP message factories", "keywords": [ - "cache", + "factory", + "http", + "message", "psr", - "psr-6" + "psr-17", + "psr-7", + "request", + "response" ], - "time": "2016-08-06T20:24:11+00:00" + "time": "2018-07-30T21:54:04+00:00" }, { - "name": "psr/container", - "version": "1.0.0", + "name": "psr/http-message", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", "shasum": "" }, "require": { @@ -1538,7 +2184,7 @@ }, "autoload": { "psr-4": { - "Psr\\Container\\": "src/" + "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1551,16 +2197,17 @@ "homepage": "http://www.php-fig.org/" } ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" ], - "time": "2017-02-14T16:28:37+00:00" + "time": "2016-08-06T14:39:51+00:00" }, { "name": "psr/log", @@ -1799,16 +2446,16 @@ }, { "name": "symfony/cache", - "version": "v3.4.22", + "version": "v3.4.24", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "38e5f4300cff5e70b714afd7cc658f5138514f94" + "reference": "669270dc501fe3c5addcc306962958334c19652c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/38e5f4300cff5e70b714afd7cc658f5138514f94", - "reference": "38e5f4300cff5e70b714afd7cc658f5138514f94", + "url": "https://api.github.com/repos/symfony/cache/zipball/669270dc501fe3c5addcc306962958334c19652c", + "reference": "669270dc501fe3c5addcc306962958334c19652c", "shasum": "" }, "require": { @@ -1865,7 +2512,7 @@ "caching", "psr6" ], - "time": "2019-01-16T13:27:11+00:00" + "time": "2019-04-01T07:08:40+00:00" }, { "name": "symfony/expression-language", @@ -1919,7 +2566,7 @@ }, { "name": "symfony/inflector", - "version": "v3.4.22", + "version": "v3.4.24", "source": { "type": "git", "url": "https://github.com/symfony/inflector.git", @@ -2031,16 +2678,16 @@ }, { "name": "symfony/polyfill-apcu", - "version": "v1.10.0", + "version": "v1.11.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-apcu.git", - "reference": "19e1b73bf255265ad0b568f81766ae2a3266d8d2" + "reference": "a502face1da6a53289480166f24de2c3c68e5c3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/19e1b73bf255265ad0b568f81766ae2a3266d8d2", - "reference": "19e1b73bf255265ad0b568f81766ae2a3266d8d2", + "url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/a502face1da6a53289480166f24de2c3c68e5c3c", + "reference": "a502face1da6a53289480166f24de2c3c68e5c3c", "shasum": "" }, "require": { @@ -2049,7 +2696,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9-dev" + "dev-master": "1.11-dev" } }, "autoload": { @@ -2083,20 +2730,20 @@ "portable", "shim" ], - "time": "2018-08-06T14:22:27+00:00" + "time": "2019-02-06T07:57:58+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.10.0", + "version": "v1.11.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" + "reference": "82ebae02209c21113908c229e9883c419720738a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", - "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a", + "reference": "82ebae02209c21113908c229e9883c419720738a", "shasum": "" }, "require": { @@ -2108,7 +2755,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9-dev" + "dev-master": "1.11-dev" } }, "autoload": { @@ -2130,7 +2777,7 @@ }, { "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" + "email": "backendtea@gmail.com" } ], "description": "Symfony polyfill for ctype functions", @@ -2141,7 +2788,7 @@ "polyfill", "portable" ], - "time": "2018-08-06T14:22:27+00:00" + "time": "2019-02-06T07:57:58+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -2161,20 +2808,143 @@ "php": ">=5.3.3" }, "suggest": { - "ext-mbstring": "For best performance" + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2018-09-21T13:07:52+00:00" + }, + { + "name": "symfony/polyfill-php70", + "version": "v1.11.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "bc4858fb611bda58719124ca079baff854149c89" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/bc4858fb611bda58719124ca079baff854149c89", + "reference": "bc4858fb611bda58719124ca079baff854149c89", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "~1.0|~2.0|~9.99", + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php70\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2019-02-06T07:57:58+00:00" + }, + { + "name": "symfony/property-access", + "version": "v3.4.24", + "source": { + "type": "git", + "url": "https://github.com/symfony/property-access.git", + "reference": "9b1c9df96a00c14445bef4cf37ad85e7239d8a4a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/property-access/zipball/9b1c9df96a00c14445bef4cf37ad85e7239d8a4a", + "reference": "9b1c9df96a00c14445bef4cf37ad85e7239d8a4a", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/inflector": "~3.1|~4.0", + "symfony/polyfill-php70": "~1.0" + }, + "require-dev": { + "symfony/cache": "~3.1|~4.0" + }, + "suggest": { + "psr/cache-implementation": "To cache access methods." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9-dev" + "dev-master": "3.4-dev" } }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" + "Symfony\\Component\\PropertyAccess\\": "" }, - "files": [ - "bootstrap.php" + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2183,58 +2953,77 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for the Mbstring extension", + "description": "Symfony PropertyAccess Component", "homepage": "https://symfony.com", "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" + "access", + "array", + "extraction", + "index", + "injection", + "object", + "property", + "property path", + "reflection" ], - "time": "2018-09-21T13:07:52+00:00" + "time": "2019-03-04T06:36:31+00:00" }, { - "name": "symfony/polyfill-php70", - "version": "v1.10.0", + "name": "symfony/property-info", + "version": "v3.4.24", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "6b88000cdd431cd2e940caa2cb569201f3f84224" + "url": "https://github.com/symfony/property-info.git", + "reference": "7a849a6765fc8481d9b7b79558ca0c5bc01972c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/6b88000cdd431cd2e940caa2cb569201f3f84224", - "reference": "6b88000cdd431cd2e940caa2cb569201f3f84224", + "url": "https://api.github.com/repos/symfony/property-info/zipball/7a849a6765fc8481d9b7b79558ca0c5bc01972c2", + "reference": "7a849a6765fc8481d9b7b79558ca0c5bc01972c2", "shasum": "" }, "require": { - "paragonie/random_compat": "~1.0|~2.0|~9.99", - "php": ">=5.3.3" + "php": "^5.5.9|>=7.0.8", + "symfony/inflector": "~3.1|~4.0" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "<3.0||>=3.2.0,<3.2.2", + "phpdocumentor/type-resolver": "<0.3.0", + "symfony/dependency-injection": "<3.3" + }, + "require-dev": { + "doctrine/annotations": "~1.0", + "phpdocumentor/reflection-docblock": "^3.0|^4.0", + "symfony/cache": "~3.1|~4.0", + "symfony/dependency-injection": "~3.3|~4.0", + "symfony/serializer": "~2.8|~3.0|~4.0" + }, + "suggest": { + "phpdocumentor/reflection-docblock": "To use the PHPDoc", + "psr/cache-implementation": "To cache results", + "symfony/doctrine-bridge": "To use Doctrine metadata", + "symfony/serializer": "To use Serializer metadata" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9-dev" + "dev-master": "3.4-dev" } }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Php70\\": "" + "Symfony\\Component\\PropertyInfo\\": "" }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2243,48 +3032,72 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Kévin Dunglas", + "email": "dunglas@gmail.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "description": "Symfony Property Info Component", "homepage": "https://symfony.com", "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" + "doctrine", + "phpdoc", + "property", + "symfony", + "type", + "validator" ], - "time": "2018-09-21T06:26:08+00:00" + "time": "2019-02-23T15:06:07+00:00" }, { - "name": "symfony/property-access", - "version": "v3.4.22", + "name": "symfony/serializer", + "version": "v3.4.24", "source": { "type": "git", - "url": "https://github.com/symfony/property-access.git", - "reference": "dedc7c1b52e1d0cd5069da0b4c727b3087897f90" + "url": "https://github.com/symfony/serializer.git", + "reference": "c74469e1560e2d8926c068b319fcca66df8fdb4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-access/zipball/dedc7c1b52e1d0cd5069da0b4c727b3087897f90", - "reference": "dedc7c1b52e1d0cd5069da0b4c727b3087897f90", + "url": "https://api.github.com/repos/symfony/serializer/zipball/c74469e1560e2d8926c068b319fcca66df8fdb4e", + "reference": "c74469e1560e2d8926c068b319fcca66df8fdb4e", "shasum": "" }, "require": { "php": "^5.5.9|>=7.0.8", - "symfony/inflector": "~3.1|~4.0", - "symfony/polyfill-php70": "~1.0" + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "phpdocumentor/type-resolver": "<0.2.1", + "symfony/dependency-injection": "<3.2", + "symfony/property-access": ">=3.0,<3.0.4|>=2.8,<2.8.4", + "symfony/property-info": "<3.1", + "symfony/yaml": "<3.4" }, "require-dev": { - "symfony/cache": "~3.1|~4.0" + "doctrine/annotations": "~1.0", + "doctrine/cache": "~1.0", + "phpdocumentor/reflection-docblock": "^3.0|^4.0", + "symfony/cache": "~3.1|~4.0", + "symfony/config": "~2.8|~3.0|~4.0", + "symfony/dependency-injection": "~3.2|~4.0", + "symfony/http-foundation": "~2.8|~3.0|~4.0", + "symfony/property-access": "~2.8|~3.0|~4.0", + "symfony/property-info": "~3.1|~4.0", + "symfony/yaml": "~3.4|~4.0" }, "suggest": { - "psr/cache-implementation": "To cache access methods." + "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.", + "doctrine/cache": "For using the default cached annotation reader and metadata cache.", + "psr/cache-implementation": "For using the metadata cache.", + "symfony/config": "For using the XML mapping loader.", + "symfony/http-foundation": "To use the DataUriNormalizer.", + "symfony/property-access": "For using the ObjectNormalizer.", + "symfony/property-info": "To deserialize relations.", + "symfony/yaml": "For using the default YAML mapping loader." }, "type": "library", "extra": { @@ -2294,7 +3107,7 @@ }, "autoload": { "psr-4": { - "Symfony\\Component\\PropertyAccess\\": "" + "Symfony\\Component\\Serializer\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -2314,20 +3127,9 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony PropertyAccess Component", + "description": "Symfony Serializer Component", "homepage": "https://symfony.com", - "keywords": [ - "access", - "array", - "extraction", - "index", - "injection", - "object", - "property", - "property path", - "reflection" - ], - "time": "2019-01-16T09:39:14+00:00" + "time": "2019-03-30T07:48:10+00:00" }, { "name": "symfony/yaml", @@ -2621,7 +3423,7 @@ { "name": "David Maus", "email": "maus@hab.de", - "role": "Developer" + "role": "developer" }, { "name": "Demian Katz", @@ -2633,6 +3435,57 @@ "homepage": "https://vufind.org/", "time": "2018-05-23T17:51:55+00:00" }, + { + "name": "webmozart/assert", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2018-12-25T11:19:39+00:00" + }, { "name": "yajra/laravel-pdo-via-oci8", "version": "v1.3.7", @@ -3086,6 +3939,72 @@ ], "time": "2018-04-09T13:21:36+00:00" }, + { + "name": "zendframework/zend-diactoros", + "version": "2.1.1", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-diactoros.git", + "reference": "c3c330192bc9cc51b7e9ce968ff721dc32ffa986" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/c3c330192bc9cc51b7e9ce968ff721dc32ffa986", + "reference": "c3c330192bc9cc51b7e9ce968ff721dc32ffa986", + "shasum": "" + }, + "require": { + "php": "^7.1", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-dom": "*", + "ext-libxml": "*", + "http-interop/http-factory-tests": "^0.5.0", + "php-http/psr7-integration-tests": "dev-master", + "phpunit/phpunit": "^7.0.2", + "zendframework/zend-coding-standard": "~1.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1.x-dev", + "dev-develop": "2.2.x-dev", + "dev-release-1.8": "1.8.x-dev" + } + }, + "autoload": { + "files": [ + "src/functions/create_uploaded_file.php", + "src/functions/marshal_headers_from_sapi.php", + "src/functions/marshal_method_from_sapi.php", + "src/functions/marshal_protocol_version_from_sapi.php", + "src/functions/marshal_uri_from_sapi.php", + "src/functions/normalize_server.php", + "src/functions/normalize_uploaded_files.php", + "src/functions/parse_cookie_header.php" + ], + "psr-4": { + "Zend\\Diactoros\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "PSR HTTP Message implementations", + "keywords": [ + "http", + "psr", + "psr-7" + ], + "time": "2019-01-05T20:13:32+00:00" + }, { "name": "zendframework/zend-dom", "version": "2.7.1", @@ -3620,6 +4539,52 @@ ], "time": "2018-05-16T16:39:13+00:00" }, + { + "name": "zendframework/zend-i18n-resources", + "version": "2.6.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-i18n-resources.git", + "reference": "530ab0af94ed1dd542665e6041d92297f7347ef3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-i18n-resources/zipball/530ab0af94ed1dd542665e6041d92297f7347ef3", + "reference": "530ab0af94ed1dd542665e6041d92297f7347ef3", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.5", + "zendframework/zend-coding-standard": "~1.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6.x-dev", + "dev-develop": "2.7.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/Resources.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Provides validator translations for zend-i18n's Translator", + "keywords": [ + "ZendFramework", + "resources", + "translations", + "zf" + ], + "time": "2018-04-30T14:47:38+00:00" + }, { "name": "zendframework/zend-inputfilter", "version": "2.10.0", @@ -4387,20 +5352,74 @@ "paginator", "zf2" ], - "time": "2018-01-30T15:52:44+00:00" + "time": "2018-01-30T15:52:44+00:00" + }, + { + "name": "zendframework/zend-psr7bridge", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-psr7bridge.git", + "reference": "99c558f96be01d535fc9692250312342d76d4098" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-psr7bridge/zipball/99c558f96be01d535fc9692250312342d76d4098", + "reference": "99c558f96be01d535fc9692250312342d76d4098", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0", + "psr/http-message": "^1.0", + "zendframework/zend-diactoros": "^1.7 || ^2.0", + "zendframework/zend-http": "^2.7" + }, + "conflict": { + "zendframework/zend-stdlib": "< 3.2.1" + }, + "require-dev": { + "phpunit/phpunit": "^5.7.15 || ^6.5.6", + "zendframework/zend-coding-standard": "~1.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev", + "dev-develop": "1.3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Psr7Bridge\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "PSR-7 <-> zend-http message conversions", + "keywords": [ + "ZendFramework", + "http", + "psr", + "psr-7", + "zend", + "zf" + ], + "time": "2018-12-20T16:48:40+00:00" }, { "name": "zendframework/zend-router", - "version": "3.2.0", + "version": "3.3.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-router.git", - "reference": "a80a7427afb8f736b9aeeb341a78dae855849291" + "reference": "b113a4cfd910ee4723079fa58a9bcf3198631620" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-router/zipball/a80a7427afb8f736b9aeeb341a78dae855849291", - "reference": "a80a7427afb8f736b9aeeb341a78dae855849291", + "url": "https://api.github.com/repos/zendframework/zend-router/zipball/b113a4cfd910ee4723079fa58a9bcf3198631620", + "reference": "b113a4cfd910ee4723079fa58a9bcf3198631620", "shasum": "" }, "require": { @@ -4408,7 +5427,7 @@ "php": "^5.6 || ^7.0", "zendframework/zend-http": "^2.8.1", "zendframework/zend-servicemanager": "^2.7.8 || ^3.3", - "zendframework/zend-stdlib": "^2.7.7 || ^3.1" + "zendframework/zend-stdlib": "^3.2.1" }, "conflict": { "zendframework/zend-mvc": "<3.0.0" @@ -4424,8 +5443,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2.x-dev", - "dev-develop": "3.3.x-dev" + "dev-master": "3.3.x-dev", + "dev-develop": "4.0.x-dev" }, "zf": { "component": "Zend\\Router", @@ -4449,7 +5468,7 @@ "zend", "zf" ], - "time": "2018-08-01T22:24:35+00:00" + "time": "2019-02-26T20:24:12+00:00" }, { "name": "zendframework/zend-serializer", @@ -4839,16 +5858,16 @@ }, { "name": "zendframework/zend-uri", - "version": "2.6.1", + "version": "2.6.2", "source": { "type": "git", "url": "https://github.com/zendframework/zend-uri.git", - "reference": "3b6463645c6766f78ce537c70cb4fdabee1e725f" + "reference": "2b0bc8b999b9b417f2c59e14511e669aa4b6286f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-uri/zipball/3b6463645c6766f78ce537c70cb4fdabee1e725f", - "reference": "3b6463645c6766f78ce537c70cb4fdabee1e725f", + "url": "https://api.github.com/repos/zendframework/zend-uri/zipball/2b0bc8b999b9b417f2c59e14511e669aa4b6286f", + "reference": "2b0bc8b999b9b417f2c59e14511e669aa4b6286f", "shasum": "" }, "require": { @@ -4882,7 +5901,7 @@ "uri", "zf" ], - "time": "2018-04-30T13:40:08+00:00" + "time": "2019-02-26T21:06:10+00:00" }, { "name": "zendframework/zend-validator", @@ -5599,36 +6618,112 @@ "time": "2019-01-28T20:25:53+00:00" }, { - "name": "doctrine/annotations", - "version": "v1.4.0", + "name": "doctrine/collections", + "version": "v1.5.0", "source": { "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "54cacc9b81758b14e3ce750f205a393d52339e97" + "url": "https://github.com/doctrine/collections.git", + "reference": "a01ee38fcd999f34d9bfbcee59dbda5105449cbf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/54cacc9b81758b14e3ce750f205a393d52339e97", - "reference": "54cacc9b81758b14e3ce750f205a393d52339e97", + "url": "https://api.github.com/repos/doctrine/collections/zipball/a01ee38fcd999f34d9bfbcee59dbda5105449cbf", + "reference": "a01ee38fcd999f34d9bfbcee59dbda5105449cbf", "shasum": "" }, "require": { - "doctrine/lexer": "1.*", - "php": "^5.6 || ^7.0" + "php": "^7.1" }, "require-dev": { - "doctrine/cache": "1.*", + "doctrine/coding-standard": "~0.1@dev", "phpunit/phpunit": "^5.7" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Collections\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Collections Abstraction library", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "array", + "collections", + "iterator" + ], + "time": "2017-07-22T10:37:32+00:00" + }, + { + "name": "doctrine/common", + "version": "v2.10.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/common.git", + "reference": "30e33f60f64deec87df728c02b107f82cdafad9d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/common/zipball/30e33f60f64deec87df728c02b107f82cdafad9d", + "reference": "30e33f60f64deec87df728c02b107f82cdafad9d", + "shasum": "" + }, + "require": { + "doctrine/annotations": "^1.0", + "doctrine/cache": "^1.0", + "doctrine/collections": "^1.0", + "doctrine/event-manager": "^1.0", + "doctrine/inflector": "^1.0", + "doctrine/lexer": "^1.0", + "doctrine/persistence": "^1.1", + "doctrine/reflection": "^1.0", + "php": "^7.1" + }, + "require-dev": { + "doctrine/coding-standard": "^1.0", + "phpunit/phpunit": "^6.3", + "squizlabs/php_codesniffer": "^3.0", + "symfony/phpunit-bridge": "^4.0.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.10.x-dev" } }, "autoload": { "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + "Doctrine\\Common\\": "lib/Doctrine/Common" } }, "notification-url": "https://packagist.org/downloads/", @@ -5655,16 +6750,161 @@ { "name": "Johannes Schmitt", "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" } ], - "description": "Docblock Annotations Parser", + "description": "PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects depend on such as better reflection support, persistence interfaces, proxies, event system and much more.", + "homepage": "https://www.doctrine-project.org/projects/common.html", + "keywords": [ + "common", + "doctrine", + "php" + ], + "time": "2018-11-21T01:24:55+00:00" + }, + { + "name": "doctrine/event-manager", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/event-manager.git", + "reference": "a520bc093a0170feeb6b14e9d83f3a14452e64b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/a520bc093a0170feeb6b14e9d83f3a14452e64b3", + "reference": "a520bc093a0170feeb6b14e9d83f3a14452e64b3", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "conflict": { + "doctrine/common": "<2.9@dev" + }, + "require-dev": { + "doctrine/coding-standard": "^4.0", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "Doctrine Event Manager component", + "homepage": "https://www.doctrine-project.org/projects/event-manager.html", + "keywords": [ + "event", + "eventdispatcher", + "eventmanager" + ], + "time": "2018-06-11T11:59:03+00:00" + }, + { + "name": "doctrine/inflector", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "5527a48b7313d15261292c149e55e26eae771b0a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/5527a48b7313d15261292c149e55e26eae771b0a", + "reference": "5527a48b7313d15261292c149e55e26eae771b0a", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^6.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Common String Manipulations with regard to casing and singular/plural rules.", "homepage": "http://www.doctrine-project.org", "keywords": [ - "annotations", - "docblock", - "parser" + "inflection", + "pluralize", + "singularize", + "string" ], - "time": "2017-02-24T16:22:25+00:00" + "time": "2018-01-09T20:05:19+00:00" }, { "name": "doctrine/instantiator", @@ -5708,34 +6948,126 @@ "authors": [ { "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2015-06-14T21:17:01+00:00" + }, + { + "name": "doctrine/persistence", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/persistence.git", + "reference": "c0f1c17602afc18b4cbd8e1c8125f264c9cf7d38" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/persistence/zipball/c0f1c17602afc18b4cbd8e1c8125f264c9cf7d38", + "reference": "c0f1c17602afc18b4cbd8e1c8125f264c9cf7d38", + "shasum": "" + }, + "require": { + "doctrine/annotations": "^1.0", + "doctrine/cache": "^1.0", + "doctrine/collections": "^1.0", + "doctrine/event-manager": "^1.0", + "doctrine/reflection": "^1.0", + "php": "^7.1" + }, + "conflict": { + "doctrine/common": "<2.10@dev" + }, + "require-dev": { + "doctrine/coding-standard": "^5.0", + "phpstan/phpstan": "^0.8", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" } ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", + "description": "The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.", + "homepage": "https://doctrine-project.org/projects/persistence.html", "keywords": [ - "constructor", - "instantiate" + "mapper", + "object", + "odm", + "orm", + "persistence" ], - "time": "2015-06-14T21:17:01+00:00" + "time": "2018-11-21T00:33:13+00:00" }, { - "name": "doctrine/lexer", - "version": "v1.0.1", + "name": "doctrine/reflection", + "version": "v1.0.0", "source": { "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" + "url": "https://github.com/doctrine/reflection.git", + "reference": "02538d3f95e88eb397a5f86274deb2c6175c2ab6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", + "url": "https://api.github.com/repos/doctrine/reflection/zipball/02538d3f95e88eb397a5f86274deb2c6175c2ab6", + "reference": "02538d3f95e88eb397a5f86274deb2c6175c2ab6", "shasum": "" }, "require": { - "php": ">=5.3.2" + "doctrine/annotations": "^1.0", + "ext-tokenizer": "*", + "php": "^7.1" + }, + "require-dev": { + "doctrine/coding-standard": "^4.0", + "doctrine/common": "^2.8", + "phpstan/phpstan": "^0.9.2", + "phpstan/phpstan-phpunit": "^0.9.4", + "phpunit/phpunit": "^7.0", + "squizlabs/php_codesniffer": "^3.0" }, "type": "library", "extra": { @@ -5744,8 +7076,8 @@ } }, "autoload": { - "psr-0": { - "Doctrine\\Common\\Lexer\\": "lib/" + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" } }, "notification-url": "https://packagist.org/downloads/", @@ -5757,22 +7089,33 @@ "name": "Roman Borschel", "email": "roman@code-factory.org" }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, { "name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com" }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, { "name": "Johannes Schmitt", "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" } ], - "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "http://www.doctrine-project.org", + "description": "Doctrine Reflection component", + "homepage": "https://www.doctrine-project.org/projects/reflection.html", "keywords": [ - "lexer", - "parser" + "reflection" ], - "time": "2014-09-09T13:34:57+00:00" + "time": "2018-06-14T14:45:07+00:00" }, { "name": "friendsofphp/php-cs-fixer", @@ -6167,158 +7510,6 @@ ], "time": "2018-02-15T16:58:55+00:00" }, - { - "name": "phpdocumentor/reflection-common", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "shasum": "" - }, - "require": { - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "time": "2017-09-11T18:02:19+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "4.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08", - "shasum": "" - }, - "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0", - "phpdocumentor/type-resolver": "^0.4.0", - "webmozart/assert": "^1.0" - }, - "require-dev": { - "doctrine/instantiator": "~1.0.5", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2017-11-30T07:14:17+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "0.4.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", - "shasum": "" - }, - "require": { - "php": "^5.5 || ^7.0", - "phpdocumentor/reflection-common": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "time": "2017-07-14T14:27:02+00:00" - }, { "name": "phploc/phploc", "version": "4.0.1", @@ -6887,6 +8078,7 @@ "mock", "xunit" ], + "abandoned": true, "time": "2018-08-09T05:50:03+00:00" }, { @@ -7654,16 +8846,16 @@ }, { "name": "symfony/console", - "version": "v3.4.22", + "version": "v3.4.23", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "069bf3f0e8f871a2169a06e43d9f3f03f355e9be" + "reference": "71ce77f37af0c5ffb9590e43cc4f70e426945c5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/069bf3f0e8f871a2169a06e43d9f3f03f355e9be", - "reference": "069bf3f0e8f871a2169a06e43d9f3f03f355e9be", + "url": "https://api.github.com/repos/symfony/console/zipball/71ce77f37af0c5ffb9590e43cc4f70e426945c5e", + "reference": "71ce77f37af0c5ffb9590e43cc4f70e426945c5e", "shasum": "" }, "require": { @@ -7722,7 +8914,7 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2019-01-25T10:42:12+00:00" + "time": "2019-02-23T15:06:07+00:00" }, { "name": "symfony/css-selector", @@ -7779,16 +8971,16 @@ }, { "name": "symfony/debug", - "version": "v3.4.22", + "version": "v3.4.23", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "667a26c4dd6bc75c67f06bc9bcd015bdecc7cbb8" + "reference": "8d8a9e877b3fcdc50ddecf8dcea146059753f782" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/667a26c4dd6bc75c67f06bc9bcd015bdecc7cbb8", - "reference": "667a26c4dd6bc75c67f06bc9bcd015bdecc7cbb8", + "url": "https://api.github.com/repos/symfony/debug/zipball/8d8a9e877b3fcdc50ddecf8dcea146059753f782", + "reference": "8d8a9e877b3fcdc50ddecf8dcea146059753f782", "shasum": "" }, "require": { @@ -7831,7 +9023,7 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2019-01-25T10:19:25+00:00" + "time": "2019-02-24T15:45:11+00:00" }, { "name": "symfony/dependency-injection", @@ -7969,16 +9161,16 @@ }, { "name": "symfony/filesystem", - "version": "v3.4.22", + "version": "v3.4.23", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "b52454ec66fe5082b7a66a491339d1f1da9a5a0d" + "reference": "acf99758b1df8e9295e6b85aa69f294565c9fedb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/b52454ec66fe5082b7a66a491339d1f1da9a5a0d", - "reference": "b52454ec66fe5082b7a66a491339d1f1da9a5a0d", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/acf99758b1df8e9295e6b85aa69f294565c9fedb", + "reference": "acf99758b1df8e9295e6b85aa69f294565c9fedb", "shasum": "" }, "require": { @@ -8015,20 +9207,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2019-01-16T13:27:11+00:00" + "time": "2019-02-04T21:34:32+00:00" }, { "name": "symfony/finder", - "version": "v3.4.22", + "version": "v3.4.23", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "7c0c627220308928e958a87c293108e5891cde1d" + "reference": "fcdde4aa38f48190ce70d782c166f23930084f9b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/7c0c627220308928e958a87c293108e5891cde1d", - "reference": "7c0c627220308928e958a87c293108e5891cde1d", + "url": "https://api.github.com/repos/symfony/finder/zipball/fcdde4aa38f48190ce70d782c166f23930084f9b", + "reference": "fcdde4aa38f48190ce70d782c166f23930084f9b", "shasum": "" }, "require": { @@ -8064,7 +9256,7 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2019-01-16T13:43:35+00:00" + "time": "2019-02-22T14:44:53+00:00" }, { "name": "symfony/polyfill-php72", @@ -8123,7 +9315,7 @@ }, { "name": "symfony/process", - "version": "v3.4.22", + "version": "v3.4.23", "source": { "type": "git", "url": "https://github.com/symfony/process.git", @@ -8298,73 +9490,27 @@ ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "time": "2017-04-07T12:08:54+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", - "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0", - "symfony/polyfill-ctype": "^1.8" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "time": "2018-12-25T11:19:39+00:00" } ], "aliases": [], - "minimum-stability": "stable", + "minimum-stability": "dev", "stability-flags": { "ahand/mobileesp": 20, "ghislainf/zf2-whoops": 20, - "pear/validate_ispn": 20 + "pear/validate_ispn": 20, + "finc/fid-core-module": 20 }, - "prefer-stable": false, + "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": ">=7.0.8" + "php": "^7.1", + "ext-json": "*" }, "platform-dev": [], "platform-overrides": { - "php": "7.0.8" + "php": "7.1", + "ext-gd": "7.1", + "ext-soap": "7.1", + "ext-json": "7.1" } } diff --git a/config/application.config.php b/config/application.config.php index b03a2416f9c369307c570a8e4f31db52cac6197c..c5548282a4991a6cdb350142170a37a379418e90 100644 --- a/config/application.config.php +++ b/config/application.config.php @@ -22,6 +22,19 @@ if ($localModules = getenv('VUFIND_LOCAL_MODULES')) { } } +/** Begin of temporarily necessary adjustments. */ +shell_exec('php devops/composer/themes.php'); +// Append custom modules. +array_push($modules, ...[ + 'Zend\Validator', + 'Zend\Serializer', + 'finc', + 'finc\VuFindHttpPsrCompat', + 'finc\SymfonySerializerZendBridge', + 'finc\Fid\Core', +]); +/** End of temporarily necessary adjustments. */ + // Set up cache directory (be sure to keep separate cache for CLI vs. web and // to account for potentially variant environment settings): $baseDir = ($local = getenv('VUFIND_LOCAL_DIR')) ? $local : 'data'; diff --git a/data/cache/.gitignore b/data/cache/.gitignore deleted file mode 100644 index c96a04f008ee21e260b28f7701595ed59e2839e3..0000000000000000000000000000000000000000 --- a/data/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore \ No newline at end of file diff --git a/devops/.gitignore b/devops/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..647c1816b17005bddc2e49bfaae84d9e2e8ee733 --- /dev/null +++ b/devops/.gitignore @@ -0,0 +1,2 @@ +/packages +!/packages/* diff --git a/devops/composer/themes.php b/devops/composer/themes.php new file mode 100644 index 0000000000000000000000000000000000000000..cc1f3706d759a97f52da041fbe9bce435ee71481 --- /dev/null +++ b/devops/composer/themes.php @@ -0,0 +1,34 @@ +<?php + +$force = in_array('--force', $argv); +$baseDir = realpath(__DIR__ . '/../..'); +/** @noinspection PhpIncludeInspection */ +require "$baseDir/vendor/autoload.php"; + +$fs = new Symfony\Component\Filesystem\Filesystem(); +$config = json_decode(file_get_contents("$baseDir/composer.lock")); + +foreach ($config->packages as $package) { + $themes = $package->extra->vufind->themes ?? []; + foreach ($themes as $themeDir => $themeName) { + if ($fs->exists($targetDir = "$baseDir/themes/$themeName") && $force) { + $fs->remove($targetDir); + } + + if (!$fs->exists($targetDir)) { + $sourceDir = "$baseDir/vendor/$package->name/$themeDir"; + $fs->mirror($sourceDir, $targetDir); + echo "Copied $sourceDir to $targetDir\n"; + } + + foreach (glob("$targetDir/languages/*", GLOB_ONLYDIR) as $dir) { + $textDomainDir = "$baseDir/languages/" . basename($dir); + if (!$fs->exists($textDomainDir)) { + $fs->mkdir($textDomainDir); + echo "Created empty directory at $textDomainDir\n"; + } + } + } +} + +clearstatcache(); \ No newline at end of file diff --git a/devops/docker/bin/fid-net.sh b/devops/docker/bin/fid-net.sh new file mode 100755 index 0000000000000000000000000000000000000000..1a4a012cb0f88a3533f1bb73c9e5f0a2af30948f --- /dev/null +++ b/devops/docker/bin/fid-net.sh @@ -0,0 +1,30 @@ +# Copyright (C) 2019 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 Sebastian Kehr <kehr@ub.uni-leipzig.de> +# @license https://opensource.org/licenses/GPL-3.0 GNU GPLv3 +#!/usr/bin/env sh + +set -e + +if [ "$1" = "create" ]; then + docker network create fid -d bridge --subnet=10.110.0.0/24 --gateway=10.110.0.1 1>/dev/null + echo "Created fid network." +elif [ "$1" = "remove" ]; then + docker network rm fid 1>/dev/null + echo "Removed fid network." +else + echo "Usage: $0 create | remove"; exit 1 +fi \ No newline at end of file diff --git a/devops/docker/composer/Dockerfile b/devops/docker/composer/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..d6a3132a668046f76bb51a4698ad32c85c33630b --- /dev/null +++ b/devops/docker/composer/Dockerfile @@ -0,0 +1,3 @@ +FROM composer:1.8.4 +COPY entrypoint.sh /entrypoint.sh +ENTRYPOINT ["/bin/sh", "/entrypoint.sh"] \ No newline at end of file diff --git a/devops/docker/composer/entrypoint.sh b/devops/docker/composer/entrypoint.sh new file mode 100644 index 0000000000000000000000000000000000000000..5befd666f5ee3f3f656cfca57ee747c397a40a64 --- /dev/null +++ b/devops/docker/composer/entrypoint.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +mkdir -p ${COMPOSER_HOME:=/tmp}; +chown -R "${OWNER:=$(stat -c "%u:%g" .)}" $COMPOSER_HOME +echo "composer:x:$OWNER:composer,,,:$COMPOSER_HOME:/bin/sh" >> /etc/passwd +COMMAND="cd $(pwd) && COMPOSER_HOME=$COMPOSER_HOME TINI_SUBREAPER= /docker-entrypoint.sh $@" +su composer -c "$COMMAND" \ No newline at end of file diff --git a/docker-compose.fid-net.yml b/docker-compose.fid-net.yml new file mode 100644 index 0000000000000000000000000000000000000000..4c5eaa9100fa5c2ca38e36e873fa291f3d5aceb1 --- /dev/null +++ b/docker-compose.fid-net.yml @@ -0,0 +1,14 @@ +version: '2.4' + +services: + php: + networks: + - default + - fid + extra_hosts: + - fid:10.110.0.2 + +networks: + fid: + name: fid + external: true \ No newline at end of file diff --git a/docker-compose.override.yml.dist b/docker-compose.override.yml.dist new file mode 100644 index 0000000000000000000000000000000000000000..a191e240bd213f26382de7a0dcdd6821f07c79f7 --- /dev/null +++ b/docker-compose.override.yml.dist @@ -0,0 +1,13 @@ +version: '2.4' +# Use this file for local overrides and extensions to docker-compose.yml. +services: + php: + <<: &volumes + volumes: +# - path/to/core-module:/usr/local/vufind/vendor/finc/fid-core-module +# - path/to/core-module/res/mixins/core:/usr/local/vufind/themes/finc-fid-core +# - path/to/core-module/res/mixins/registration:/usr/local/vufind/themes/finc-fid-registration + httpd: + <<: *volumes + grunt: + <<: *volumes \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 6aec9a960908379ac0e2b5f9b34d16d39814e345..17681814aa6bbc907c8703cbfcd1bb121fd55efb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,19 +1,40 @@ -version: '2' +version: '2.4' + services: + composer: + build: devops/docker/composer + working_dir: /usr/local/vufind + volumes: + - .:/usr/local/vufind:z + - composer-data:/tmp + - ${SSH_AUTH_SOCK}:/ssh-agent + - $HOME/.ssh/known_hosts:/etc/ssh/ssh_known_hosts + environment: + SSH_AUTH_SOCK: /ssh-agent + command: echo "Skipping composer." + php: - image: ubleipzig/vufind-php:7.2-8-debug + image: ubleipzig/vufind-php:7.1-8-debug volumes: - ./:/usr/local/vufind environment: VUFIND_LOCAL_DIR: /usr/local/vufind/fid_adlr/dev VUFIND_CACHE_DIR: /usr/local/vufind/data/cache - VUFIND_LOCAL_MODULES: finc VUFIND_ENV: development + PHP_IDE_CONFIG: serverName=finc-fid-frontend + XDEBUG_CONFIG: >- + remote_autostart=1 + remote_mode=req + remote_handler=dbgp + remote_connect_back=0 + remote_port=9000 + remote_enable=1 + remote_host=10.111.0.1 httpd: image: ubleipzig/vufind-httpd:2.4-2 ports: - - 80:80 + - 127.0.0.1:11100:80 volumes: - ./:/usr/local/vufind:ro - ./data/cache:/var/cache/vufind:ro @@ -24,7 +45,7 @@ services: db: image: mariadb:10.2 ports: - - 127.0.0.1:3306:3306 + - 127.0.0.1:11101:3306 volumes: - mariadb-data:/var/lib/mysql:z environment: @@ -36,8 +57,8 @@ services: smtp: image: useltmann/mailcollect:8-1 ports: - - '143:143' - - '25:25' + - 25:25 + - 143:143 volumes: - mail-data:/home/dev/Maildir:z @@ -45,23 +66,13 @@ services: image: ubleipzig/vufind-php:7.2-8-debug volumes: - ./:/usr/local/vufind:z - - npm-cache:/home/www-data/.npm + - npm-data:/home/www-data/.npm environment: NODE_ENV: development command: npm install && node_modules/.bin/grunt watch - composer: - image: ubleipzig/vufind-php:7.2-8-debug - volumes: - - ./:/usr/local/vufind:z - - composer-cache:/home/www-data/.composer - - ${SSH_AUTH_SOCK}:/ssh-agent - environment: - SSH_AUTH_SOCK: /ssh-agent - command: phing composer -Dcomposer_extra_params=--no-scripts - autoconfig: - image: ubleipzig/vufind-php:7.2-8-debug + image: ubleipzig/vufind-php:7.1-8-debug volumes: - ./:/usr/local/vufind:z environment: @@ -72,28 +83,30 @@ services: VF_config_ini__Authentication__hash_passwords: "true" VF_config_ini__Authentication__encrypt_ils_password: "true" VF_config_ini__Database__database: mysql://vufind:vufindpw@db/vufind - VF_config_ini__Index__url: http://172.18.113.12:8080/solr + VF_config_ini__Index__url: https://index.ub.uni-leipzig.de/solr VF_config_ini__Mail__host: smtp VF_config_ini__Mail__port: 25 VF_config_ini__Mail__username: dev VF_config_ini__Mail__pasword: dev - command: sleep 10 && autoconfig vufind deploy + entrypoint: > + sh -c 'sh -c "exit 1"; + while [ $$? -eq 1 ]; do nc -zv db:3306 &> /dev/null; done; + /docker-entrypoint $$0 $$@' + command: autoconfig vufind deploy depends_on: - db volumes: - composer-cache: {} - npm-cache: {} + npm-data: {} mail-data: {} mariadb-data: {} + composer-data: {} networks: default: - driver_opts: - com.docker.network.bridge.name: vufind-bridge driver: bridge ipam: driver: default config: - - subnet: 10.2.0.0/16 - gateway: 10.2.0.1 \ No newline at end of file + - subnet: 10.111.0.0/24 + gateway: 10.111.0.1 diff --git a/fid/.gitignore b/fid/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..052abb244a28225377a9a396d1fa919330a30b1b --- /dev/null +++ b/fid/.gitignore @@ -0,0 +1 @@ +/dev \ No newline at end of file diff --git a/local/alpha/config/vufind/FincILS.ini b/fid/config/vufind/Collection.ini similarity index 77% rename from local/alpha/config/vufind/FincILS.ini rename to fid/config/vufind/Collection.ini index 94a54c73cc9c9f929b8d9d3290b652b8e86aeca7..32de8563a3b8d0cfeb59b608cffb0d2214e8dde8 100644 --- a/local/alpha/config/vufind/FincILS.ini +++ b/fid/config/vufind/Collection.ini @@ -2,21 +2,21 @@ ;##################### DO NOT DELETE THIS HEADER #################### ;################### Leipzig University Library © 2015 ############## ; -; This is the default ALPHA-INI-file and inherits +; This is the ISIL-instance-specific default 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/FincILS.ini +relative_path = ../../../local/config/vufind/Collection.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" +;override_full_sections = "" ; -; Add ALPHA-specific customization after this header. +; Add instance-specific customization after this header. ; ;##################### DO NOT DELETE THIS HEADER #################### ;#################################################################### \ No newline at end of file diff --git a/local/alpha/config/vufind/DAIA.ini b/fid/config/vufind/DAIA.ini similarity index 77% rename from local/alpha/config/vufind/DAIA.ini rename to fid/config/vufind/DAIA.ini index 5428ab9655e03e0235236617fc8fbc387e013950..e335a47064f1519b1d5fa316430076ae6ddb9e24 100644 --- a/local/alpha/config/vufind/DAIA.ini +++ b/fid/config/vufind/DAIA.ini @@ -2,21 +2,21 @@ ;##################### DO NOT DELETE THIS HEADER #################### ;################### Leipzig University Library © 2015 ############## ; -; This is the default ALPHA-INI-file and inherits +; This is the ISIL-instance-specific default 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/DAIA.ini +relative_path = ../../../local/config/vufind/DAIA.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" +;override_full_sections = "" ; -; Add ALPHA-specific customization after this header. +; Add instance-specific customization after this header. ; ;##################### DO NOT DELETE THIS HEADER #################### -;#################################################################### +;#################################################################### \ No newline at end of file diff --git a/fid/config/vufind/EmailProfiles.ini b/fid/config/vufind/EmailProfiles.ini new file mode 100644 index 0000000000000000000000000000000000000000..50aca073e3f00f02d58dd12e27143ae96b26d5db --- /dev/null +++ b/fid/config/vufind/EmailProfiles.ini @@ -0,0 +1,22 @@ +;#################################################################### +;##################### DO NOT DELETE THIS HEADER #################### +;################### Leipzig University Library © 2015 ############## +; +; This is the ISIL-instance-specific default 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 = ../../../local/config/vufind/EmailProfiles.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 = "" + +; +; Add instance-specific customization after this header. +; +;##################### DO NOT DELETE THIS HEADER #################### +;#################################################################### \ No newline at end of file diff --git a/local/alpha/config/vufind/Amsl.ini b/fid/config/vufind/HierarchyDefault.ini similarity index 80% rename from local/alpha/config/vufind/Amsl.ini rename to fid/config/vufind/HierarchyDefault.ini index 63bb01b3c7baedc78ed8950aeb9fffb0e6b04144..63b0eaa2f5a3726270c60f8871c7f970e6bda5fe 100644 --- a/local/alpha/config/vufind/Amsl.ini +++ b/fid/config/vufind/HierarchyDefault.ini @@ -2,13 +2,13 @@ ;##################### DO NOT DELETE THIS HEADER #################### ;################### Leipzig University Library © 2015 ############## ; -; This is the default ALPHA-INI-file and inherits +; This is the ISIL-instance-specific default 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 +relative_path = ../../../local/config/vufind/HierarchyDefault.ini ; A comma-separated list of config sections from the parent which should be ; completely overwritten by the equivalent sections in this configuration; @@ -16,7 +16,7 @@ relative_path = ../../../config/vufind/Amsl.ini ;override_full_sections = "Languages,AlphaBrowse_Types" ; -; Add ALPHA-specific customization after this header. +; Add instance-specific customization after this header. ; ;##################### DO NOT DELETE THIS HEADER #################### ;#################################################################### \ No newline at end of file diff --git a/fid/config/vufind/OpenUrlRules.json b/fid/config/vufind/OpenUrlRules.json new file mode 100644 index 0000000000000000000000000000000000000000..9e26dfeeb6e641a33dae4961196235bdb965b21b --- /dev/null +++ b/fid/config/vufind/OpenUrlRules.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/fid/config/vufind/SolrAI.ini b/fid/config/vufind/SolrAI.ini new file mode 100644 index 0000000000000000000000000000000000000000..3a6997554dcd767344588dac74f7b67b818735a0 --- /dev/null +++ b/fid/config/vufind/SolrAI.ini @@ -0,0 +1,25 @@ +;#################################################################### +;##################### DO NOT DELETE THIS HEADER #################### +;################### Leipzig University Library © 2015 ############## +; +; This is the ISIL-instance-specific default 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 = ../../../local/config/vufind/SolrAI.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 instance-specific customization after this header. +; +;##################### DO NOT DELETE THIS HEADER #################### +;#################################################################### + +[General] +baseUrl = "https://ai.ub.uni-leipzig.de/blob?%s" \ No newline at end of file diff --git a/fid/config/vufind/config.ini b/fid/config/vufind/config.ini new file mode 100644 index 0000000000000000000000000000000000000000..b36982b610643bee14cc632657f8a48b69681c52 --- /dev/null +++ b/fid/config/vufind/config.ini @@ -0,0 +1,31 @@ +;#################################################################### +;##################### DO NOT DELETE THIS HEADER #################### +;################### Leipzig University Library © 2015 ############## +; +; This is the ISIL-instance-specific default 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 = ../../../local/config/vufind/config.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 = "InstitutionInfo,Export" + +; +; Add instance-specific customization after this header. +; +;##################### DO NOT DELETE THIS HEADER #################### +;#################################################################### + +[Authentication] +method = finc\Fid\Core\VuFind\Auth\Authenticator +[Catalog] +driver = finc\Fid\Core\VuFind\ILS\Driver +[Index] +url = https://index.ub.uni-leipzig.de/solr +[Site] +theme = finc-fid diff --git a/fid/config/vufind/export.ini b/fid/config/vufind/export.ini new file mode 100644 index 0000000000000000000000000000000000000000..e85a1ee3d8981f5716a2082ac88343151bc440b4 --- /dev/null +++ b/fid/config/vufind/export.ini @@ -0,0 +1,22 @@ +;#################################################################### +;##################### DO NOT DELETE THIS HEADER #################### +;################### Leipzig University Library © 2015 ############## +; +; This is the ISIL-instance-specific default 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 = ../../../local/config/vufind/export.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 = "EndNote" + +; +; Add instance-specific customization after this header. +; +;##################### DO NOT DELETE THIS HEADER #################### +;#################################################################### \ No newline at end of file diff --git a/fid/config/vufind/facets.ini b/fid/config/vufind/facets.ini new file mode 100644 index 0000000000000000000000000000000000000000..cdd31b640912e380f51353f63d740229dff30935 --- /dev/null +++ b/fid/config/vufind/facets.ini @@ -0,0 +1,22 @@ +;#################################################################### +;##################### DO NOT DELETE THIS HEADER #################### +;################### Leipzig University Library © 2015 ############## +; +; This is the ISIL-instance-specific default 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 = ../../../local/config/vufind/facets.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 = "Results,HomePage,Advanced" + +; +; Add instance-specific customization after this header. +; +;##################### DO NOT DELETE THIS HEADER #################### +;#################################################################### diff --git a/fid/config/vufind/finc-fid-core-api.ini b/fid/config/vufind/finc-fid-core-api.ini new file mode 100644 index 0000000000000000000000000000000000000000..255d1eaaed10b8bae0d34920754b89622982ab32 --- /dev/null +++ b/fid/config/vufind/finc-fid-core-api.ini @@ -0,0 +1,2 @@ +[Client] +baseUrl = http://172.18.113.133/fid-7101bb5 \ No newline at end of file diff --git a/fid/config/vufind/finc-fid-core-ils.ini b/fid/config/vufind/finc-fid-core-ils.ini new file mode 100644 index 0000000000000000000000000000000000000000..3d13e0c664a9584bcea653aa850edd54908cf242 --- /dev/null +++ b/fid/config/vufind/finc-fid-core-ils.ini @@ -0,0 +1,2 @@ +[Section] +param = value \ No newline at end of file diff --git a/fid/config/vufind/permissions.ini b/fid/config/vufind/permissions.ini new file mode 100644 index 0000000000000000000000000000000000000000..09473231d4d630422b1329ddfdffb83ce195e536 --- /dev/null +++ b/fid/config/vufind/permissions.ini @@ -0,0 +1,22 @@ +;#################################################################### +;##################### DO NOT DELETE THIS HEADER #################### +;################### Leipzig University Library © 2015 ############## +; +; This is the ISIL-instance-specific default 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 = ../../../local/config/vufind/permissions.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 = "" + +; +; Add instance-specific customization after this header. +; +;##################### DO NOT DELETE THIS HEADER #################### +;#################################################################### \ No newline at end of file diff --git a/fid/config/vufind/searches.ini b/fid/config/vufind/searches.ini new file mode 100644 index 0000000000000000000000000000000000000000..f60aa8488940ac162710f78b46f86bfba146a30e --- /dev/null +++ b/fid/config/vufind/searches.ini @@ -0,0 +1,25 @@ +;#################################################################### +;##################### DO NOT DELETE THIS HEADER #################### +;################### Leipzig University Library © 2015 ############## +; +; This is the ISIL-instance-specific default 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 = ../../../local/config/vufind/searches.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 = "Basic_Searches,Advanced_Searches" + +; +; Add instance-specific customization after this header. +; +;##################### DO NOT DELETE THIS HEADER #################### +;#################################################################### + +[IndexShards] +; needs to be empty array due to MungerInjection logic \ No newline at end of file diff --git a/fid/config/vufind/searchspecs.yaml b/fid/config/vufind/searchspecs.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6ca8f0eda0349dadeb49f1998d80d6acab7d5a02 --- /dev/null +++ b/fid/config/vufind/searchspecs.yaml @@ -0,0 +1,28 @@ +'@parent_yaml': ../../../config/vufind/searchspecs.yaml + +# Fixes unsupported "qt=edismax" query parameter setting. +# Cf. https://projekte.ub.uni-leipzig.de/issues/14850#note-1. + +Author: + DismaxHandler: dismax + +ISN: + DismaxHandler: dismax + +Subject: + DismaxHandler: dismax + +Coordinate: + DismaxHandler: dismax + +JournalTitle: + DismaxHandler: dismax + +Title: + DismaxHandler: dismax + +Series: + DismaxHandler: dismax + +AllFields: + DismaxHandler: dismax \ No newline at end of file diff --git a/fid/languages/de.ini b/fid/languages/de.ini new file mode 100644 index 0000000000000000000000000000000000000000..8ff39fd137ec235cad96b6209062c7b0ab165c28 --- /dev/null +++ b/fid/languages/de.ini @@ -0,0 +1 @@ +@parent_ini = ../../languages/de.ini \ No newline at end of file diff --git a/fid/languages/en.ini b/fid/languages/en.ini new file mode 100644 index 0000000000000000000000000000000000000000..0970dd6215f1ca3a10747d68d581bf722d32418e --- /dev/null +++ b/fid/languages/en.ini @@ -0,0 +1 @@ +@parent_ini = ../../languages/en.ini \ No newline at end of file diff --git a/languages/eu.ini b/languages/eu.ini index c74c5841c1b2c46f22e8892542b2e4e8885a5e23..e53f0ecd645ddd0a6687b4ffe0cfaa60d8d52c75 100644 --- a/languages/eu.ini +++ b/languages/eu.ini @@ -628,6 +628,7 @@ access_denied = "Ez dago sartzerik" Accession Number = "Sartzeko zenbakia" Account = "Kontua" account_block_options_missing = "Hautaketa batzuk ezabatu dira zure kontuak zerbait blokeatuta izateagatik. Xehetasunak: %%details%%" +account_has_alerts = "Tu cuenta tiene alertas" Add a Library Card = "Gehitu liburutegirako txartela" Add a Note = "Ohar bat erantsi" Add Tag = "Etiketa erantsi" @@ -667,6 +668,7 @@ Advanced Search = "Bilaketa aurreratua" advSearchError_noRights = "Baimenik gabe" advSearchError_notAdvanced = "Errorea" advSearchError_notFound = "Ez da aurkitu" +ajax_load_interrupted = "Carga interrumpida" ajaxview_label_information = "Argibidea" ajaxview_label_tools = "Tresnak" All = "Guztiak" @@ -854,6 +856,7 @@ confirm_storage_retrieval_request_cancel_selected_text = "Aukeratutako biltegira Contents = "Edukia" Contributing Source = "Ekarpen-iturria" Contributors = "Egileak" +Coordinates = "Coordenadas" Copies = "Kopiak" Copy = "Alea" Copyright = "Copyright" @@ -984,6 +987,8 @@ external_auth_heading = "Baimendutako materialerako sarbidea" external_auth_login_message = "Sartu zure erabiltzailearen izena eta pasahitza baimendutako materiala ikusteko" external_auth_unauthorized = "Ez duzu baimendutako materiala ikusteko baimena" external_auth_unauthorized_desc = "Zure sartzeko metodoa ez du baimendutako materiala ikusteko baimenik. Mesedez, irten eta sartu berriro beste metodo bat erabiltzen." +facet_list_empty = "No hay datos disponibles" +facet_list_for = "Lista de facetas para %%field%%" FAQs = "FAQ" fav_delete = "Gogokoenak ezabatu" fav_delete_deleting = "Zure gogokoenak ezabatzen ari dira." @@ -1014,6 +1019,7 @@ Find More = "Gehiago bilatu" Find New Items = "Berriak bilatu" Finding Aid = "Laguntza eskatu" Fine = "Penalizazioak" +Fine Date = "Fecha de multa" fine_limit_patron = "Ezin duzu gehiago berritu, mugara iritsi zara" Fines = "Multas" First = "Lehengoa" @@ -1033,6 +1039,7 @@ Geographic Search = "Bilaketa geografikoa" Geographic Terms = "Termino geografikoak" Geography = "Geografia" Get full text = "Testu osoa" +Get more information = "Obtener más información" Get RSS Feed = "RSS" Globe = "Global" Go = "Joan" @@ -1069,6 +1076,7 @@ history_saved_searches = "Gordetako bilaketak" history_search = "Bilaketa" history_time = "Ordua" hold_available = "Eramateko eskuragarri" +hold_available_until = "Disponible para recoger hasta %%date%%" hold_cancel = "Erreserba ezeztatu" hold_cancel_all = "Erreserba guztiak ezabatu" hold_cancel_fail = "Zure eskaera ezeztatua izan da. Mesedez, mostradoretik pasa." @@ -1132,6 +1140,7 @@ ill_request_processed = "Prozesatua" ill_request_profile_html = "Liburutegi arteko maileguari buruzo informazio gehiagorako, mesedez sartu zure liburutegi profila hemen <a href="%%url%%">Liburutegiaren katalogo profila</a>." ill_request_submit_text = "Egin eskaera" Illustrated = "Irudiduna" +ils_account_create_error = "Su cuenta no se pudo crear en nuestro sistema de gestión de bibliotecas. Si el problema persiste, por favor, contacta con tu biblioteca." ils_action_unavailable = "Eskatutako funtzioa ez dago erabiltzeko moduan liburutegi aktiboko txartelarekin." ils_connection_failed = "Mantentze lanak direla eta, gure Liburutegia Kudeatzeko Sistema ez dago erabilgarri." ils_offline_holdings_message = "Item-en erabilgarritasunari buruzko informazioa ez dabil momento honetan. Mesedez, barkatu eragozpenak. Nahi baduzu, kontakta dezakezu zerbitzu teknikoarekin laguntza gehiagorako:" @@ -1466,9 +1475,11 @@ renew_error = "Ezin da dokumentu hau berritu. Mesedez, liburutegiarekin harreman renew_fail = "Ezin da dokumentu hau berritu" renew_item = "Dokumentua berritu" renew_item_due = "Epemuga 24 ordutan" +renew_item_due_tooltip = "Ejemplares vencidos pronto" renew_item_limit = "Dokumetua ezin da berritu beritze-kopuru mugara iritsi zarelako" renew_item_no = "Dokumentu hau ezin da berritu" renew_item_overdue = "Epemugak" +renew_item_overdue_tooltip = "Ejemplares vencidos" renew_item_requested = "Dokumentu hau beste erabiltzaile batek eskatu du" renew_select_box = "Dokumentua berritu" renew_selected = "Aukeratutako dokumentuak berritu" @@ -1517,6 +1528,7 @@ search_match = "Operatzaileak" search_NOT = "BAINA EZ" search_OR = "EDO" search_save_success = "Búsqueda guardada con éxito" +search_terms = "Términos de búsqueda" search_unsave_success = "Búsqueda guardada ha sido eliminada con éxito" seconds_abbrev = "s" see all = "Guztiak ikusi" @@ -1701,6 +1713,7 @@ Video = "Bideoa" Video Clips = "Video Clips" Videos = "Bideoak" View Book Bag = "Ver Mochila" +View Complete Issue = "Ver el problema completo" View Full Collection = "Ikusi Bilduma Osoa" View Full Record = "Ikusi Erregistro Osoa" View in EDS = "EDS-n ikusita" diff --git a/local/alpha/config/vufind/ExternalCatalogue.schema.json b/local/alpha/config/vufind/ExternalCatalogue.schema.json deleted file mode 100644 index 9ebddda25a4ad481798b704333d7a6068f5fbf7d..0000000000000000000000000000000000000000 --- a/local/alpha/config/vufind/ExternalCatalogue.schema.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "External Catalogue Links", - "description": "Define external catalogue links for VuFind and filter for SolrDefault criteria", - "type": "object", - "properties": { - "id": { - "patternProperties": { - "([A-Z0-9]*)-([a-zA-Z0-9]*)": { - "properties": { - "pattern": { - "description": "URL pattern for replacement with identifier", - "type": "string" - }, - "filter": { - "patternProperties": { - "[A-Z0-9]*": { - "description": "Filter rules", - "type": [ - "string", - "array" - ] - } - } - } - } - } - } - }, - "ppn": { - "patternProperties": { - "([A-Z0-9]*)-([a-zA-Z0-9]*)": { - "properties": { - "pattern": { - "description": "URL pattern for replacement with identifier", - "type": "string" - }, - "filter": { - "patternProperties": { - "[A-Z0-9]*": { - "description": "Filter rules", - "type": [ - "string", - "array" - ] - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/local/alpha/config/vufind/config.ini b/local/alpha/config/vufind/config.ini index c5778dc1806aa5fe9f36f3d03e4d56c25039311d..e85a1ee3d8981f5716a2082ac88343151bc440b4 100644 --- a/local/alpha/config/vufind/config.ini +++ b/local/alpha/config/vufind/config.ini @@ -2,21 +2,21 @@ ;##################### DO NOT DELETE THIS HEADER #################### ;################### Leipzig University Library © 2015 ############## ; -; This is the default ALPHA-INI-file and inherits +; This is the ISIL-instance-specific default 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/config.ini +relative_path = ../../../local/config/vufind/export.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" +;override_full_sections = "EndNote" ; -; Add ALPHA-specific customization after this header. +; Add instance-specific customization after this header. ; ;##################### DO NOT DELETE THIS HEADER #################### -;#################################################################### +;#################################################################### \ No newline at end of file diff --git a/local/config/vufind/Amsl.ini b/local/config/vufind/Amsl.ini deleted file mode 100644 index 27d8d861fdfd74d1af6028cdb87ef4d57397f2f0..0000000000000000000000000000000000000000 --- a/local/config/vufind/Amsl.ini +++ /dev/null @@ -1,19 +0,0 @@ -; Configuration file for the amsl metadata resources - -; Define api endpoint for requests -[API] -url = "{url}" -response_type = 'application/json' - -; 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_id%%: %%source_label%%' -default_main_label = 'untitled source' -sub_key = 'collection_label' -sub_label = '%%collection_label%%' -default_sub_label = 'untilted collection' \ No newline at end of file diff --git a/local/config/vufind/ExternalCatalogue.schema.json b/local/config/vufind/ExternalCatalogue.schema.json deleted file mode 100644 index a394325db8c3eb9eaea5797178b58d06a42e3161..0000000000000000000000000000000000000000 --- a/local/config/vufind/ExternalCatalogue.schema.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "External Catalogue Links", - "description": "Define external catalogue links for VuFind and filter for SolrDefault criteria", - "type": "object", - "properties": { - "id": { - "patternProperties": { - "([A-Z0-9]*)-([a-zA-Z0-9]*)": { - "properties": { - "pattern": { - "description": "URL pattern for replacement with identifier", - "type": "string" - }, - "filter": { - "patternProperties": { - "[A-Z0-9]*": { - "description": "Filter rules", - "type": [ - "string", - "array" - ] - } - } - } - } - } - } - }, - "record_id": { - "patternProperties": { - "([A-Z0-9]*)-([a-zA-Z0-9]*)": { - "properties": { - "pattern": { - "description": "URL pattern for replacement with identifier", - "type": "string" - }, - "filter": { - "patternProperties": { - "[A-Z0-9]*": { - "description": "Filter rules", - "type": [ - "string", - "array" - ] - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/local/config/vufind/FincILS.ini b/local/config/vufind/FincILS.ini index e57b72e2d347dfd4b8636088ac51a2d04316f27d..f288a15ef6a89018c6e24217a42ae9db35309f06 100644 --- a/local/config/vufind/FincILS.ini +++ b/local/config/vufind/FincILS.ini @@ -7,7 +7,7 @@ ilsTestTimeout = 30 ; This setting defines key:value pairs that will identify records for which the ILS ; will be queried for status information. queryIls[] = 'getSourceID:0' -queryIls[] = 'getAccessFacet:Local Holdings' +queryIls[] = 'getFacetAvail:Local' ;DAIA configuration ;[DAIA] diff --git a/local/config/vufind/config.ini b/local/config/vufind/config.ini index 8363492a3d1366611bce0c7c4449e83dbfc6e013..b573c4f0868f3eeedec4a95274f3347c6ec5cd76 100644 --- a/local/config/vufind/config.ini +++ b/local/config/vufind/config.ini @@ -112,7 +112,9 @@ generator = "VuFind 5.1" ; are global to all handlers. [Session] type = MySQLSession -lifetime = 3600 ; Session lasts for 1 hour +lifetime = 3600 ; Session lasts for 1 +; Should stored session data be encrypted? +secure = true ; Keep-alive interval in seconds. When set to a positive value, the session is kept ; alive with a JavaScript call as long as a VuFind page is open in the browser. ; Default is 0 (disabled). When keep-alive is enabled, session lifetime above can be @@ -1343,7 +1345,17 @@ treeSearchLimit = 100 ; children (default = false). This is an alternative to the full collections support ; (see the [Collections] section), so only one of them should be enabled ; at a time e.g. unless custom record drivers are used. -;simpleContainerLinks = true +simpleContainerLinks = true +; Whether the link to the search for children shall apply default filters or not. It +; dissolves unintuitive behaviour between sum of child titles at detail view and followed +; search on link of child titles displaying only titles with hidden filter. Solr search +; will be extended by additional url parameter "&dfApplied=1" if parameter is set TRUE. +; See searches.ini->[General]->default_filters +; This may also impact pre-selected facets in the search results. Please note that the +; displayed child count in the simple container link's label will always be determined +; without default filters. +; Default value is TRUE. This will not affect implementations not using default filters. +omitDefaultFiltersInChildSearch = true ; This section will be used to configure the feedback module. ; Set "tab_enabled" to true in order to enable the feedback module. diff --git a/local/config/vufind/facets.ini b/local/config/vufind/facets.ini index 5a923cc3e02e6078c9386d135f99296fd7472c1a..5b65a19047074cc381ded4d745ce479f540a9c15 100644 --- a/local/config/vufind/facets.ini +++ b/local/config/vufind/facets.ini @@ -4,8 +4,9 @@ [Results] ; institution = Institution ; building = Library -access_facet = Access -format = Format +facet_avail = Access +;access_facet = Access +format_finc = Format ; rvk_facet = "RVK" finc_class_facet = Fachgebiet diff --git a/local/languages/de.ini b/local/languages/de.ini index 07f332e42884f14de28c451e4dcfb1bf36206dc1..8234c3a9c6b17a969df39f13fab0d1c95fe192eb 100644 --- a/local/languages/de.ini +++ b/local/languages/de.ini @@ -1,211 +1,185 @@ -; Formate entsprechend der format_map_de15.properties -Book = Buch -eBook = E-Book -ElectronicBook = E-Book -ElectronicBookPart = "E-Book-Kapitel" -ElectronicJournal = "Elektronische Zeitschrift" -Electronicjournal = "Elektronische Zeitschrift" -ElectronicSerial = "Elektronische Zeitschrift" -Electronicserial = "Elektronische Zeitschrift" -Journal = Zeitschrift -Serial = Schriftenreihe -ElectronicNewspaper = "Elektronische Zeitung" -Electronicnewspaper = "Elektronische Zeitung" -Newspaper = Zeitung -Article = Artikel -ElectronicArticle = Artikel -Electronicarticle = Artikel -ElectronicThesis = Hochschulschrift -Electronicthesis = Hochschulschrift -Thesis = Hochschulschrift -Atlas = Karte -Globe = Globus -Map = Karte -AudioTape = Tonkassette -Audiotape = Tonkassette -CD = CD -Cd = CD -DVDAudio = DVD-Audio -Dvdaudio = DVD-Audio -MusicRecording = Musiktonträger -Musicrecording = Musiktonträger -Record = Schallplatte -SoundRecordingMedium = Tonträger -Soundrecordingmedium = Tonträger -ElectronicSoundRecordingMedium = Tonaufnahme online -Electronicsoundrecordingmedium = Tonaufnahme online -SoundCassette = Tonkassette -Soundcassette = Tonkassette -SoundDisc = CD -Sounddisc = CD -SoundRecording = Tonträger -Soundrecording = Tonträger -AudioVisualMedia = Bildtonträger -Audiovisualmedia = Bildtonträger -BluRayDisc = Blu-Ray -Bluraydisc = Blu-Ray -DVDVideo = DVD-Video -Dvdvideo = DVD-Video -Filmstrip = Diafilm -MotionPicture = Film -Motionpicture = Film -Video = Video -VideoTape = Videokassette -Videotape = Videokassette -VideoCartridge = Videokassette -Videocartridge = Videokassette -VideoCassette = Videokassette -Videocassette = Videokassette -VideoDisc = DVD-Video -Videodisc = DVD-Video -VideoReel = Videokassette -Videoreel = Videokassette -ArtPrint = Kunstblatt -Artprint = Kunstblatt -Chart = Diagramm -Collage = Collage -Drawing = Zeichnung -FlashCard = "Flash Card" -Flashcard = "Flash Card" -Painting = Gemälde -Photo = Photo -Photonegative = Photonegativ -Placard = Plakat -Print = Druck -SensorImage = Fernerkundungsbilder -Sensorimage = Fernerkundungsbilder -Slide = Dia -Transparency = Transparent -CDROM = CD-ROM -Cdrom = CD-ROM -ChipCartridge = "Chip Cartridge" -Chipcartridge = "Chip Cartridge" -DiscCartridge = "Disc Cartridge" -Disccartridge = "Disc Cartridge" -DVDO = "Video online" -DVDROM = DVD-ROM -Dvdrom = DVD-ROM -FloppyDisk = Diskette -Floppydisk = Diskette -Software = Software -TapeCartridge = "Tape Cartridge" -Tapecartridge = "Tape Cartridge" -TapeCassette = "Tape Cassette" -Tapecassette = "Tape Cassette" -TapeReel = "Tape Reel" -Tapereel = "Tape Reel" -Microfiche = Mikrofiche -Microfilm = Mikrofilm -Microform = Mikroform -MusicalScore = Noten -Musicalscore = Noten -NotatedMusic = Noten -Notatedmusic = Noten -ElectronicMusicalScore = "Elektronische Noten" -Electronicmusicalscore = "Elektronische Noten" -Braille = Blindenschrift -Kit = Medienkombination -Manuscript = Handschrift -Nachlass = Nachlass -PhysicalObject = Objekt -Physicalobject = Objekt -# Electronic = Website -ElectronicResourceDataCarrier = "Elektronische Ressource auf Datenträger" -ResourceDataCarrier = "Elektronische Ressource auf Datenträger" -Electronicresourcedatacarrier = "Elektronische Ressource auf Datenträger" -ElectronicResourceRemoteAccess = "Elektronische Ressource im Fernzugriff" -Electronicresourceremoteaccess = "Elektronische Ressource im Fernzugriff" -ElectronicIntegratingResource = "Elektronische Ressource im Fernzugriff" -ReliefPrint = Druckgrafik -Unknown Format = Sonstige -### -# Formate Primo Central -Conference Proceedings = "Conference Proceedings" -conference_proceedings = "Conference Proceedings" -conference_proceeding = "Conference Proceedings" -Conferenceproceeding = "Conference Proceedings" -dissertations = Hochschulschrift -Dissertations = Hochschulschrift -Dissertation Note = Hochschulschrift -Legal Document = "Juristisches Dokument" -Multimedia = Multimedia -Newspaper Article = Artikel -Newspaper Articles = Artikel -newspaper_articles = Artikel -Reference Entry = "Reference Entry" -Review = Rezension -review = Rezension -Reviews = Rezensionen -reviews = Rezension -Text = Text -Textresource = Aufsatz -text_resource = Text -text_resources = Text -### -Accession = "Neuerwerbung" -accession = "Neuerwerbung" -Art Print = Kunstblatt -articleearticle = Artikel -Articleearticle = Artikel -Article, E-Article = Artikel -Article = Artikel -article = Artikel -Articles = Artikel -articles = Artikel -Audio Tape = Tonkassette -Audio-Visual Media = Bildtonträger -Blu-Ray Disc = "Blu-Ray" +# FormatCalculator Results +eBook = E-Book +Book = Buch +BookComponentPart = Buchkapitel +ElectronicBookComponentPart = E-Book-Kapitel +SerialComponentPart = Artikel +ElectronicSerialComponentPart = E-Artikel +Newspaper = Zeitung +ElectronicNewspaper = "Elektronische Zeitung" +Journal = Zeitschrift +ElectronicJournal = "Elektronische Zeitschrift" +Serial = Schriftenreihe +ElectronicSerial = "Elektronische Schriftenreihe" +Manuscript = Handschrift +Kit = Medienkombination +NotatedMusic = Noten +CartographicImage = "kartografisches Bild" +Slide = Dia +Sounds = Geräusche +PerformedMusic = "aufgeführte Musik" +StillImage = "unbewegtes Bild" +ComputerData = Computerdaten +Object = Gegenstand +BluRayAudio = "Blu-ray Audio" +BluRayDisc = "Blu-ray Disc" +CD = CD +CDROM = CD-ROM +FloppyDisc = "Floppy Disc" +DualDisc = "Dual Disc" +DVDAudio = "DVD Audio" +DVDROM = DVD-ROM +DVDVideo = DVD-Video +MicroSD = "Micro SD" +VinylRecord = Schallplatte +SDCard = "SD Card" +USBFlashDrive = "USB Drive" +Sheet = Blatt +Flipchart = Flipchart +Object = Gegenstand +Card = Karte +Roll = Rolle +MemoryCard = Speicherkarte +ComputerChipCartridge = Computerchip-Cartridge +ComputerDiscCartridge = Computerdisk-Cartridge +ComputerTapeCartridge = Magnetbandcartridge +ComputerTapeCassette = Magnetbandkassette +ComputerTapeReel = Magnetbandspule +OtherComputerCarrier = Computerdatenträger +ApertureCard = "Lichtundurchlässiger Mikrofiche" +Microfiche = Mikrofiche +MicroficheCassette = Mikrofichekassette +MicrofilmCartridge = Mikrofilm-Cartridge +MicrofilmCassette = Mikrofilmkassette +MicrofilmSlip = Mikrofilmlochkarte +MicrofilmRoll = Mikrofilmrolle +MicrofilmReel = Mikrofilmspule +Microopaque = Mikrofilmstreifen +OtherMicroformCarrier = Mikroform +FilmCartridge = Filmdose +FilmCassette = Filmkassette +FilmRoll = Filmrolle +FilmReel = Filmspule +Filmslip = Filmstreifen +FilmstripCartridge = Filmstreifen-Cartridge +Filmstrip = Filmstreifen für Einzelbildvorfühung +OverheadTransparency = Overheadfolie +OtherTransparentCarrier = "Projizierbares Medium" +StereographCard = Stereobild +StereographDisc = "Stereografische Disk" +OtherStereographCarrier = "Stereografische Datenträger" +AudioCartridge = Audiocartridge +AudioDisc = Audiodisk +AudioCassette = Audiokassette +AudioWireReel = Notenrolle +AudioCylinder = Phonographenzylinder +AudioTapeReel = Tonbandspule +SoundTrackReel = Tonspurspule +OtherAudioCarrier = Tonträger +MicroscopeSlide = Objektträger +OtherMicroscopeCarrier = "Trägermedium für Mikroskop-Anwendungen" +VideoTapeReel = Videobandspule +VideoCartridge = Videocartridge +VideoDisc = Videodisk +VideoCassette = Videokassette +OtherVideoCarrier = Videodatenträger +Atlas = Atlas +Globe = Globus +TactileText = "taktiler Text" +Collage = Collage +Drawing = Zeichnung +Painting = Gemälde +Print = Druck +Photonegative = Photonegativ +FlashCard = "Flash Card" +Chart = "Tabelle / Grafik" +Photo = Foto +SensorImage = Sensorbild +NotatedMovement = Bewegungsnotation +ComputerDataset = Computerdaten +ComputerProgram = Computerprogramm +ThreeDimensionalForm = "dreidimensionale Form" +ThreeDimensionalMovingImage = "dreidimensionales bewegtes Bild" +SpokenWord = "gesprochenes Wort" +CartographicThreeDimensionalForm = "kartografische dreidimensionale Form" +CartographicDataset = "kartografischer Datensatz" +CartographicMovingImage = "kartografisches bewegtes Bild" +CartographicImage = "kartografisches Bild" +CartographicTactileImage = "kartografisches taktiles Bild" +CartographicTactileThreeDimensionalForm = "kartografische taktile dreidimensionale Form" +TactileNotatedMovement = "taktile Bewegungsnotation" +TactileThreeDimensionalForm = "taktile dreidimensionale Form" +TactileNotatedMusic = "taktile Noten" +TactileImage = "taktiles Bild" +StillImage = "unbewegtes Bild" +TwoDemensionalMovingImage = Video +ExhibitionCatalogue = Ausstellungskatalog +Autobiography = Autobiografie +Bibliography = Bibliografie +IllustratedBook = Bildband +Biography = Biografie +ComicBook = Comic +Database = Datenbank +CommemorativePublication = Festschrift +Thesis = Hochschulschrift +Audiobook = Hörbuch +ConferenceProceedings = Konferenzbericht +LooseLeafCollection = Loseblattsammlung +MonographSeries = "Monographische Schriftenreihe" +Textbook = Schulbuch +Weblog = Website +Website = Website +Magazine = Zeitschrift +ManuscriptFragement = "Fragment einer Handschrift" +Correspondence = "Korrespondenz (Briefwechsel)" +PersonalDocument = Lebensdokument +SerialPart = Lieferungswerk +CollectorsItem = Sammlungsstück +SpecialPrint = Sonderdruck +EncyclopediaEntry = Lexikoneintrag +TwoDemensionalMovingImage = Video +WorkingManuscripts = Werkmanuskript + +# specific +Unknown = "unbekanntes Format" +DBIS = DBIS +LockerKey = Schließfachschlüssel +NaxosCD = "Naxos CD" + +# format_finc facet +Article, E-Article = "Artikel, E-Artikel" +Audio = Audio +Sheet = Blatt Book, E-Book = "Buch, E-Book" -Books = Bücher -books = Buch -Cassette = Kassette -Chip Cartridge = "Chip Cartridge" -Create QR Code = "QR Code erstellen" -Dvdaudio = "DVD-Audio" -dvdo = "Video online" -Ebook = E-Book -Electronic = Online-Ressource -Electronic Article = "Elektronischer Artikel" -Electronic Journal = "Elektronische Zeitschrift" -Electronic Media = "Elektronische Medien" -Electronic Newspaper = "Elektronische Zeitung" -Electronic Resource (Data Carrier) = "Elektronische Ressource auf Datenträger" -Electronic Resource (Remote Access) = "Elektronische Ressource im Fernzugriff" -Electronic Resources = Online-Ressourcen -Electronic Serial = "Elektronische Zeitschrift" -Electronic Thesis = "Elektronische Hochschulschrift" -Floppy Disk = Diskette -Images = Bilder -Journal / Newspaper = "Zeitschrift / Zeitung" -Journal Articles = "Zeitschriftenartikel" +Card = Karte +Database = Datenbank +DBIS = DBIS +Flipchart = Flipchart Journal, E-Journal = "Zeitschrift, E-Journal" -Journals = Zeitschriften -Maps = Karten -Motion Picture = Film -Music Recording = Musiktonträger -Musical Score = Noten +Kit = Medienkombination +Map = Karte Notated Music = Noten -Newspaper, E-Paper = Zeitung -Notatedmusic = Noten -Physical Object = Objekt -Sensor Image = Fernerkundungsbilder -Series = Schriftenreihe -Sound Cassette = Tonkassette -Sound Disc = CD -Sound Recording Medium = Tonträger -Sound Recording = Tonträger -Tape Cartridge = "Tape Cartridge" -Tape Cassette = "Tape Cassette" -Tape Reel = "Tape Reel" -Theses = Hochschulschriften -Video Cartridge = Videokassette -Video Cassette = Videokassette -Video Clips = Videoclips -Video Disc = Bildplatte -Video Reel = Video -Video Tape = Videokassette -Videos = Videos -Visual Media = Bildmaterial +Software = Software +Tactile Media = "Taktiles Medium" +Unknown Format = "unbekanntes Format" +Video = Video + +; refs #14912 supplement - adds detected missing format facet +BookPart = Buchkapitel +ElectronicArticle = E-Article +ElectronicBook = E-Book +ElectronicBookPart = E-Book-Kapitel +ElectronicIntegratingResource = Elektronische Ressource im Fernzugriff +ElectronicMap = Karte online +ElectronicMusicalScore = Elektronische Noten +ElectronicNotatedMusic = Elektronische Noten +ElectronicProceeding = E-Proceedings +ElectronicResourceRemoteAccess = Elektronische Ressource im Fernzugriff +ElectronicSoundRecordingMedium = Tonaufnahme online +ElectronicThesis = Elektronische Hochschulschrift +ElectronicVideo = Video +MusicalScore = Noten +VideoTape = Videodatenträger ### AND = UND @@ -1960,4 +1934,10 @@ support_by_dfg = "Die Nationallizenzen wurden gefördert durch die" (fa-home passive) = "beschaffbar" ; HierarchyTree select -hierarchyTreeSelect = "Übergeordnete Werke:" \ No newline at end of file +hierarchyTreeSelect = "Übergeordnete Werke:" + +collection_hierarchy_tree_tab = "Sammlungskontext" +Collection Items = "Enthaltene Objekte" + +; VF5.1 Offcanvas-Toggler +offcanvas-toggler-record-view = "Eintrag weiter verarbeiten" \ No newline at end of file diff --git a/local/languages/en.ini b/local/languages/en.ini index 3fc23ef9e33923768ed5627b83ef6c0a1f1b8dcc..5d77351298b74c26c0b9fbce74563f3fa757ad70 100644 --- a/local/languages/en.ini +++ b/local/languages/en.ini @@ -1,3 +1,334 @@ +;------ + +; refs #14912 new format translations due to k10plus translation + +;------ + +# FormatCalculator Results +eBook = E-Book +Book = Book +BookComponentPart = Book Component Part +ElectronicBookComponentPart = E-Book Component Part +SerialComponentPart = Article +ElectronicSerialComponentPart = E-Article +Newspaper = Newspaper +ElectronicNewspaper = Electronic Newspaper +Journal = Journal +ElectronicJournal = Electronic Journal +Serial = Serial +ElectronicSerial = Electronic Serial +Manuscript = Manuscript +Kit = Kit +NotatedMusic = Notated Music +CartographicImage = Cartographic Image +Slide = Slide +Sounds = Sounds +PerformedMusic = Performed Music +StillImage = Still Image +ComputerData = Computer Data +Object = Object +BluRayAudio = Blu Ray Audio +BluRayDisc = Blu Ray Disc +CD = CD +CDROM = CD-ROM +FloppyDisc = Floppy Disc +DualDisc = Dual Disc +DVDAudio = DVD Audio +DVDROM = DVD-ROM +DVDVideo = DVD Video +MicroSD = Micro SD +VinylRecord = Vinyl Record +SDCard = SD Card +USBFlashDrive = USB Drive +Sheet = Sheet +Flipchart = Flip Chart +Object = Object +Card = Card +Roll = Roll +MemoryCard = Memory Card +ComputerChipCartridge = Computer Chip Cartridge +ComputerDiscCartridge = Computer Disk Cartridge +ComputerTapeCartridge = Computer Tape Cartridge +ComputerTapeCassette = Computer Tape Cassette +ComputerTapeReel = Computer Tape +OtherComputerCarrier = Computer Carrier +ApertureCard = Aperture Card +Microfiche = Microfiche +MicroficheCassette = Microfiche Cassette +MicrofilmCartridge = Microfilm Cartridge +MicrofilmCassette = Microfilm Cassette +MicrofilmSlip = Microfilm Slip +MicrofilmRoll = Microfilm Roll +MicrofilmReel = Microfilm Reel +Microopaque = Micro Opaque +OtherMicroformCarrier = Microform +FilmCartridge = Film Cartridgee +FilmCassette = Film Cassette +FilmRoll = Film Roll +FilmReel = Film Reel +Filmslip = Film Slip +FilmstripCartridge = Film Strip Cartridge +Filmstrip = Film Strip +OverheadTransparency = Overhead Transparency +OtherTransparentCarrier = Other Transparent Carrier +StereographCard = Stereograph Card +StereographDisc = Stereograph Disc +OtherStereographCarrier = Other Stereograph Carrier +AudioCartridge = Audio Cartridge +AudioDisc = Audio Disk +AudioCassette = Audio Cassette +AudioWireReel = Audio Wire Reel +AudioCylinder = Audio Cylinder +AudioTapeReel = Audio Tape Reel +SoundTrackReel = Sound Track Reel +OtherAudioCarrier = Audio Carrier +MicroscopeSlide = Microscope Slide +OtherMicroscopeCarrier = Microscope Carrier +VideoTapeReel = Videotape Reel +VideoCartridge = Video Cartridge +VideoDisc = Video Disc +VideoCassette = Video Cassette +OtherVideoCarrier = Video Carrier +Atlas = Atlas +Globe = Globe +TactileText = Tactile Text +Collage = Collage +Drawing = Drawing +Painting = Painting +Print = Print +Photonegative = Photonegativ +FlashCard = Flash Card +Chart = Chart +Photo = Photo +SensorImage = Sensor Image +NotatedMovement = Notated Movement +ComputerDataset = Computer Dataset +ComputerProgram = Computer Programm +ThreeDimensionalForm = Three Dimensional Form +ThreeDimensionalMovingImage = Three Dimensional Moving Image +SpokenWord = Spoken Word +CartographicThreeDimensionalForm = Cartographic Three Dimensional Form +CartographicDataset = Cartographic Dataset +CartographicMovingImage = Cartographic Moving Image +CartographicImage = Cartographic Image +CartographicTactileImage = Cartographic Tactile Image +CartographicTactileThreeDimensionalForm = Cartographic Tactile Three Dimensional Form +TactileNotatedMovement = Tactile Notated Movement +TactileThreeDimensionalForm = Tactile Three Dimensional Form +TactileNotatedMusic = Tactile Notated Music +TactileImage = Tactile Image +StillImage = Still Image +TwoDemensionalMovingImage = Video +ExhibitionCatalogue = Exhibition Catalogue +Autobiography = Autobiography +Bibliography = Bibliography +IllustratedBook = Illustrated Book +Biography = Biography +ComicBook = Comic +Database = Database +CommemorativePublication = Commemorative Publication +Thesis = Thesis +Audiobook = Audio Book +ConferenceProceedings = Conference Proceedings +LooseLeafCollection = Loose Leaf Collection +MonographSeries = Monograph Series +Textbook = Textbook +Weblog = Weblog +Website = Website +Magazine = Magazine +ManuscriptFragement = Manuscript Fragement +Correspondence = Correspondence +PersonalDocument = Personal Document +SerialPart = Serial Part +CollectorsItem = Collectors Item +SpecialPrint = Special Print +EncyclopediaEntry = Encyclopedia Entry +TwoDemensionalMovingImage = Video +WorkingManuscripts = Working Manuscripts + +# specific +Unknown = Unknown +DBIS = DBIS +LockerKey = Locker Key +NaxosCD = Naxos CD + +# format_finc facet +Article, E-Article = Article, E-Article +Audio = Audio +Sheet = Sheet +Book, E-Book = Book, E-Book +Card = Card +Database = Database +DBIS = DBIS +Flipchart = Flipchart +Journal, E-Journal = Journal, E-Journal +Kit = Kit +Map = Map +Notated Music = Notated Music +Software = Software +Tactile Media = Tactile Media +Unknown Format = Unknown Format +Video = Video + +; refs #14912 supplement - adds detected missing format +BookPart = Chapter +ElectronicArticle = E-Article +ElectronicBook = E-Book +ElectronicBookPart = E-Chapter +ElectronicIntegratingResource = Electronic Resource +ElectronicMap = Electronic Map +ElectronicMusicalScore = Electronic Musical Score +ElectronicNotatedMusic = Electronic Notated Music +ElectronicProceeding = Electronic Proceeding +ElectronicResourceRemoteAccess = Electronic Resource +ElectronicSoundRecordingMedium = Sound Recording Online +ElectronicThesis = Electronic Thesis +ElectronicVideo = Electronic Video +MusicalScore = Musical Score +VideoTape = Video Tape + +;------ +; maybe deprecated format translations - remains after checking doubles for new format facets +;------ +;Electronicserial = Electronic Serial +;Electronicnewspaper = Electronic Newspaper +;Article = Article +;Electronicarticle = Electronic Article +;Electronicthesis = Electronic Thesis +;AudioTape = Audio Tape +;Audiotape = Audio Tape +;Cd = CD +;Dvdaudio = DVD Audio +;MusicRecording = Music Recording +;Musicrecording = Music Recording +;Record = Record +;SoundRecordingMedium = Sound Recording Medium +;Soundrecordingmedium = Sound Recording Medium +;Electronicsoundrecordingmedium = Sound Recording Online +;SoundCassette = Sound Cassette +;Soundcassette = Sound Cassette +;SoundDisc = Sound Disc +;Sounddisc = Sound Disc +;SoundRecording = Sound Recording +;Soundrecording = Sound Recording +;AudioVisualMedia = Audio Visual Media +;Audiovisualmedia = Audio Visual Media +;Bluraydisc = Blu-Ray Disc +;Dvdvideo = DVD Video +;MotionPicture = Motion Picture +;Motionpicture = Motion Picture +;Videotape = Video Tape +;Videocartridge = Video Cartridge +;Videocassette = Video Cassette +;Videodisc = Video Disc +;VideoReel = Video Reel +;Videoreel = Video Reel +;ArtPrint = Art Print +;Artprint = Art Print +;Flashcard = Flash Card +;Placard = Placard +;Sensorimage = Sensor Image +;Transparency = Transparency +;Cdrom = CD-ROM +;ChipCartridge = Chip Cartridge +;Chipcartridge = Chip Cartridge +;DiscCartridge = Disc Cartridge +;Disccartridge = Disc Cartridge +;DVDO = DVDO +;Dvdrom = DVD-ROM +;FloppyDisk = Floppy Disk +;Floppydisk = Floppy Disk +;TapeCartridge = Tape Cartridge +;Tapecartridge = Tape Cartridge +;TapeCassette = Tape Cassette +;Tapecassette = Tape Cassette +;TapeReel = Tape Reel +;Tapereel = Tape Reel +;Microform = Microform +;MusicalScore = Musical Score +;Musicalscore = Musical Score +;Notatedmusic = Notated Music +;Electronicmusicalscore = Electronic Musical Score +;Nachlass = Estate +;PhysicalObject = Physical Object +;Physicalobject = Physical Object +# Electronic = # Electronic +;ElectronicResourceDataCarrier = Electronic Resource Data Carrier +;ResourceDataCarrier = Electronic Resource Data Carrier +;Electronicresourcedatacarrier = Electronic Resource Data Carrier +;Electronicresourceremoteaccess = "Electronic Resource (Remote Access)" +;ElectronicIntegratingResource = "Electronic Resource (Remote Access)" +;Conference Proceedings = Conference Proceedings +;conference_proceedings = Conference Proceedings +;conference_proceeding = Conference Proceedings +;Conferenceproceeding = Conference Proceedings +;dissertations = Dissertations +;Dissertations = Dissertations +;Legal Document = Legal Document +;Multimedia = Multimedia +;Newspaper Article = Newspaper Article +;Newspaper Articles = Newspaper Articles +;newspaper_articles = Newspaper Articles +;Reference Entry = Reference Entry +;Review = Review +;review = Review +;reviews = Reviews +;Text = Text +;Textresource = Text Resource +;text_resource = Text Resource +;text_resources = Text Resources +;Accession = Accession +;accession = Accession +;Art Print = Art Print +;articleearticle = Article +;Articleearticle = Article +;article = Article +;Articles = Articles +;articles = Articles +;Audio Tape = Audio Tape +;Audio-Visual Media = Audio-Visual Media +;Blu-Ray Disc = Blu-Ray Disc +;books = Books +;Chip Cartridge = Chip Cartridge +;Create QR Code = Create QR Code +;dvdo = DVDO +;Ebook = E-Book +;ElectronicBook = E-Book +;ElectronicBookPart = E-Book Chapter +;Electronic Article = Electronic Article +;Electronic Journal = Electronic Journal +;Electronic Media = Electronic Media +;Electronic Newspaper = Electronic Newspaper +;Electronic Resource (Data Carrier) = Electronic Resource (Data Carrier) +;Electronic Resource (Remote Access) = Electronic Resource (Remote Access) +;Electronic Serial = Electronic Serial +;Electronic Thesis = Electronic Thesis +;Floppy Disk = Floppy Disk +;Images = Images +;Journal / Newspaper = Journal / Newspaper +;Motion Picture = Motion Picture +;Music Recording = Music Recording +;Newspaper, E-Paper = Newspaper, E-Paper +;ReliefPrint = Relief Print +;Sound Cassette = Sound Cassette +;Sound Disc = Sound Disc +;Sound Recording Medium = Sound Recording Medium +;Sound Recording = Sound Recording +;Tape Cartridge = Tape Cartridge +;Tape Cassette = Tape Cassette +;Tape Reel = Tape Reel +;Theses = Theses +;Video Cartridge = Video Cartridge +;Video Cassette = Video Cassette +;Video Disc = Video Disc +;Video Reel = Video Reel +;Video Tape = Video Tape +;Visual Media = Visual Media + +;------ +; end of remaining format tanslations +;------ + AND = AND APA Citation = "APA Citation" Access = Access @@ -11,7 +342,6 @@ Address = Address Address Additional = "Address Addendum" Advanced = Advanced Audience = Audience -Audio = Audio # Author = Creator Author = "Author / Corporation" Available = Available @@ -20,8 +350,6 @@ Backtrace = Backtrace Bag = Bag Balance = Balance Bereich = Area -Bibliography = Bibliography -Book = Book Bookchapter = "Book Chapter" Bookmark = Bookmark Books = Books @@ -32,7 +360,6 @@ Browse = Browse Browse the Collection = "Browse the Collection" By = By By Alphabetical = "In Alphabetic Order" -CD = CD Cannot find similar records = "Cannot find similar records." Cassette = Cassette Checkedoutpermanent = "Checked Out Permanent Items" @@ -95,7 +422,6 @@ Geography = Geography # German = Deutsch German = German Get full text = "Get additional information online" -Globe = Globe # Greek = Ελληνικά Greek = Greek Grid = Grid @@ -129,9 +455,7 @@ Issue = Issue Italian = Italian # Japanese = 日本語 Japanese = Japanese -Journal = Journal Journals = Journals -Kit = Kit Kollektion = Collection Kontakt = Contact Language = Language @@ -147,8 +471,6 @@ Lockaccount = "Block my Account" Login = "My Account" Login-to-account = "Login" Logout = Logout -Manuscript = Manuscript -Map = Map Maps = Maps Membercode = "Library Card No." Message = Message @@ -163,7 +485,6 @@ MyResearch Help = "MyResearch Help" NOT = NOT Narrow Search = "Refine my Results" Nep = "Acquisition" -Newspaper = Newspaper Next = Next No Preference = "No Preference" No Tags = "No Tags" @@ -185,14 +506,12 @@ Password New = "New password" Password Strength = "Password strength" Past = Past Permanent Checked Out Items = "Checked Out Permanent Items" -Photo = Photo Place a Hold = "Request" Please check back soon = "Please check back soon." Please contact the Library Reference Department for assistance = "Please contact staff." # Portuguese = "Português" Portuguese = Portuguese Prev = Prev -Print = Print Private = Private Profile = Profile Provider = Provider @@ -223,15 +542,12 @@ See also = "See Also" Select your carrier = "Select your Carrier" Selfcheckout = "Self-Checkout" Send = Send -Serial = Serial Series = Series Set = Set Set Multipart = Series Showing = Showing # Simplified Chinese = "䏿–‡(简体)" Simplified Chinese = "Simplified Chinese" -Slide = Slide -Software = Software Sort = "Sorted by" # Spanish = Español Spanish = Spanish @@ -254,12 +570,10 @@ Topic = Topic Topics = Topics # Turkish = Türkçe Turkish = Turkish -Unknown = Unknown Username = "User ID" Username cannot be blank = "User name cannot be blank" Valid until = "Card valid until" VHS = VHS -Video = Video Videos = Videos View online: Full view Book Preview from the Hathi Trust = "View Online: View full book preview from Hathi Trust" Volume = Volume @@ -372,7 +686,6 @@ delete_list = "Delete List" delete_selected = "Delete Selected" delete_selected_favorites = "Delete Selected Favorites" delete_selected_reserves = "Cancel Selected Reservations" -eBook = E-Book edit_list = "Edit List" edit_list_fail = "Sorry, you are not permitted to edit this list" edit_list_success = "List successfully updated." @@ -470,7 +783,7 @@ hold_empty_selection = "No holds were selected" hold_error_blocked = "You do not have sufficient privileges to place a hold on this item." hold_error_fail = "Your request failed. Please contact staff" hold_invalid_pickup = "An invalid pick up location was entered. Please try again" -hold_login = "for Hold and Recall Information" +hold_login = "for Hold and Recall Information" hold_place = "Place Request" hold_place_fail_missing = "Your request failed. Some data was missing. Please contact staff" hold_place_success = "Your request was successful" @@ -605,7 +918,7 @@ sysmsg_readyforcollection_after = " item(s) available for collection." sysmsg_readyforcollection_before = "There are" sysmsg_user_blocked_status = "Your account is blocked. Please contact staff." title = "Title" -title_ordered_by_library = "This title has been ordered by the library. It is not available yet." +title_ordered_by_library = "This title has been ordered by the library. It is not available yet." too_many_favorites = "This list is too large to display all at once. Try rearranging your favorites into more lists or limiting using tags." too_many_new_items = "There are too many new items to display in a single list. Try limiting your search." too_many_reserves = "There are too many course reserves to display in a single list. Try limiting your search." @@ -675,177 +988,6 @@ DE-Zi4 = "Zittau/Görlitz University of Applied Sciences" DE-Zwi2 = "University of Applied Sciences Zwickau" ;Dresden SLUB = "Sächsische Landesbibliothek & Staats- und Universitätsbibliothek Dresden (SLUB)" -;------ -;missing lines from de.ini (compiled from files in /usr/local/vufind2/languages, /usr/local/vufind2/local/dev/languages) -;------ -ElectronicJournal = Electronic Journal -ElectronicSerial = Electronic Serial -Electronicserial = Electronic Serial -ElectronicNewspaper = Electronic Newspaper -Electronicnewspaper = Electronic Newspaper -Article = Article -ElectronicArticle = Electronic Article -Electronicarticle = Electronic Article -ElectronicThesis = Electronic Thesis -Electronicthesis = Electronic Thesis -Thesis = Thesis -Atlas = Atlas -AudioTape = Audio Tape -Audiotape = Audio Tape -Cd = CD -DVDAudio = DVD Audio -Dvdaudio = DVD Audio -MusicRecording = Music Recording -Musicrecording = Music Recording -Record = Record -SoundRecordingMedium = Sound Recording Medium -Soundrecordingmedium = Sound Recording Medium -ElectronicSoundRecordingMedium = Sound Recording Online -Electronicsoundrecordingmedium = Sound Recording Online -SoundCassette = Sound Cassette -Soundcassette = Sound Cassette -SoundDisc = Sound Disc -Sounddisc = Sound Disc -SoundRecording = Sound Recording -Soundrecording = Sound Recording -AudioVisualMedia = Audio Visual Media -Audiovisualmedia = Audio Visual Media -BluRayDisc = Blu-Ray Disc -Bluraydisc = Blu-Ray Disc -DVDVideo = DVD Video -Dvdvideo = DVD Video -Filmstrip = Filmstrip -MotionPicture = Motion Picture -Motionpicture = Motion Picture -VideoTape = Video Tape -Videotape = Video Tape -VideoCartridge = Video Cartridge -Videocartridge = Video Cartridge -VideoCassette = Video Cassette -Videocassette = Video Cassette -VideoDisc = Video Disc -Videodisc = Video Disc -VideoReel = Video Reel -Videoreel = Video Reel -ArtPrint = Art Print -Artprint = Art Print -Chart = Chart -Collage = Collage -Drawing = Drawing -FlashCard = Flash Card -Flashcard = Flash Card -Painting = Painting -Photonegative = Photo Negative -Placard = Placard -SensorImage = Sensor Image -Sensorimage = Sensor Image -Transparency = Transparency -CDROM = CD-ROM -Cdrom = CD-ROM -ChipCartridge = Chip Cartridge -Chipcartridge = Chip Cartridge -DiscCartridge = Disc Cartridge -Disccartridge = Disc Cartridge -DVDO = DVDO -DVDROM = DVD-ROM -Dvdrom = DVD-ROM -FloppyDisk = Floppy Disk -Floppydisk = Floppy Disk -TapeCartridge = Tape Cartridge -Tapecartridge = Tape Cartridge -TapeCassette = Tape Cassette -Tapecassette = Tape Cassette -TapeReel = Tape Reel -Tapereel = Tape Reel -Microfiche = Microfiche -Microform = Microform -MusicalScore = Musical Score -Musicalscore = Musical Score -NotatedMusic = Notated Music -Notatedmusic = Notated Music -ElectronicMusicalScore = Electronic Musical Score -Electronicmusicalscore = Electronic Musical Score -Nachlass = Estate -PhysicalObject = Physical Object -Physicalobject = Physical Object -# Electronic = # Electronic -ElectronicResourceDataCarrier = Electronic Resource Data Carrier -ResourceDataCarrier = Electronic Resource Data Carrier -Electronicresourcedatacarrier = Electronic Resource Data Carrier -ElectronicResourceRemoteAccess = "Electronic Resource (Remote Access)" -Electronicresourceremoteaccess = "Electronic Resource (Remote Access)" -ElectronicIntegratingResource = "Electronic Resource (Remote Access)" -Unknown Format = Unknown Format -Conference Proceedings = Conference Proceedings -conference_proceedings = Conference Proceedings -conference_proceeding = Conference Proceedings -Conferenceproceeding = Conference Proceedings -dissertations = Dissertations -Dissertations = Dissertations -Legal Document = Legal Document -Multimedia = Multimedia -Newspaper Article = Newspaper Article -Newspaper Articles = Newspaper Articles -newspaper_articles = Newspaper Articles -Reference Entry = Reference Entry -Review = Review -review = Review -reviews = Reviews -Text = Text -Textresource = Text Resource -text_resource = Text Resource -text_resources = Text Resources -Accession = Accession -accession = Accession -Art Print = Art Print -articleearticle = Article -Articleearticle = Article -Article, E-Article = Article, E-Article -article = Article -Articles = Articles -articles = Articles -Audio Tape = Audio Tape -Audio-Visual Media = Audio-Visual Media -Blu-Ray Disc = Blu-Ray Disc -Book, E-Book = Book, E-Book -books = Books -Chip Cartridge = Chip Cartridge -Create QR Code = Create QR Code -dvdo = DVDO -Ebook = E-Book -ElectronicBook = E-Book -ElectronicBookPart = E-Book Chapter -Electronic Article = Electronic Article -Electronic Journal = Electronic Journal -Electronic Media = Electronic Media -Electronic Newspaper = Electronic Newspaper -Electronic Resource (Data Carrier) = Electronic Resource (Data Carrier) -Electronic Resource (Remote Access) = Electronic Resource (Remote Access) -Electronic Serial = Electronic Serial -Electronic Thesis = Electronic Thesis -Floppy Disk = Floppy Disk -Images = Images -Journal / Newspaper = Journal / Newspaper -Journal, E-Journal = Journal, E-Journal -Motion Picture = Motion Picture -Music Recording = Music Recording -Notated Music = Notated Music -Newspaper, E-Paper = Newspaper, E-Paper -ReliefPrint = Relief Print -Sound Cassette = Sound Cassette -Sound Disc = Sound Disc -Sound Recording Medium = Sound Recording Medium -Sound Recording = Sound Recording -Tape Cartridge = Tape Cartridge -Tape Cassette = Tape Cassette -Tape Reel = Tape Reel -Theses = Theses -Video Cartridge = Video Cartridge -Video Cassette = Video Cassette -Video Disc = Video Disc -Video Reel = Video Reel -Video Tape = Video Tape -Visual Media = Visual Media Accompanying material = Accompanying Material Additional Information = Additional Information Additional Searches = Additional Searches @@ -1896,4 +2038,12 @@ support_by_dfg = "National licenses were sponsored by " (fa-home passive) = "available on request" ; HierarchyTree select -hierarchyTreeSelect = "Parent items:" \ No newline at end of file +hierarchyTreeSelect = "Parent items:" + +collection_hierarchy_tree_tab = "Collection Context" + +DigitalCollection = Digital Collection +Digital Collection = Digital Collection + +; VF5.1 Offcanvas-Toggler +offcanvas-toggler-record-view = "Further processing options" \ No newline at end of file diff --git a/module/VuFind/src/VuFind/Search/Base/Params.php b/module/VuFind/src/VuFind/Search/Base/Params.php index d035b0ff1169fbe5baf43ec5987a43239346f297..144ce83e701d62338b1563244620cf48fb956cd4 100644 --- a/module/VuFind/src/VuFind/Search/Base/Params.php +++ b/module/VuFind/src/VuFind/Search/Base/Params.php @@ -805,10 +805,11 @@ class Params /** * Detects if a filter is advanced (true) or simple (false). An advanced - * filter is currently defined as one surrounded by parentheses, while a - * simple filter is of the form field:value. Advanced filters are used to - * express more complex queries, such as combining multiple values from - * multiple fields using boolean operators. + * filter is currently defined as one surrounded by parentheses (possibly + * with a leading exclusion operator), while a simple filter is of the form + * field:value. Advanced filters are used to express more complex queries, + * such as combining multiple values from multiple fields using boolean + * operators. * * @param string $filter A filter string * @@ -816,7 +817,7 @@ class Params */ public function isAdvancedFilter($filter) { - if (substr($filter, 0, 1) == '(') { + if (substr($filter, 0, 1) == '(' || substr($filter, 0, 2) == '-(') { return true; } return false; diff --git a/module/finc/config/module.config.php b/module/finc/config/module.config.php index f99cbf4e5086488641eaf396725eccfde3452b31..41679f8983dd6be183047f40c61dd014e8f98055 100644 --- a/module/finc/config/module.config.php +++ b/module/finc/config/module.config.php @@ -12,7 +12,6 @@ $config = [ 'finc\Rewrite' => 'finc\Rewrite\Factory', 'VuFind\Export' => 'finc\Service\Factory::getExport', 'VuFind\SessionManager' => 'finc\Session\ManagerFactory', - 'VuFind\CookieManager' => 'finc\Service\Factory::getCookieManager' ], 'delegators' => [ 'VuFindSearch\Service' => [ @@ -22,13 +21,22 @@ $config = [ ], 'controllers' => [ 'factories' => [ - 'ajax' => 'finc\Controller\Factory::getAjaxController', + //'ajax' => 'finc\Controller\Factory::getAjaxController', + 'finc\Controller\AjaxController' => + 'VuFind\Controller\AjaxControllerFactory', 'dds' => 'finc\Controller\Factory::getDocumentDeliveryServiceController', 'my-research' => 'finc\Controller\Factory::getMyResearchController', 'record' => 'finc\Controller\Factory::getRecordController', 'resources' => 'finc\Controller\Factory::getAmslResourceController' ], + 'aliases' => [ + //'AJAX' => 'finc\Controller\AjaxController', + //'ajax' => 'finc\Controller\AjaxController' + + // Overrides: + 'VuFind\Controller\AjaxController' => 'finc\Controller\AjaxController' + ] ], 'controller_plugins' => [ 'factories' => [ @@ -37,6 +45,28 @@ $config = [ ], 'vufind' => [ 'plugin_managers' => [ + 'ajaxhandler' => [ + 'factories' => [ + 'finc\AjaxHandler\GetAdditionalAccountInfo' => + 'VuFind\AjaxHandler\AbstractIlsAndUserActionFactory', + 'finc\AjaxHandler\GetIlsStatus' => + 'VuFind\AjaxHandler\GetIlsStatusFactory', + 'finc\AjaxHandler\GetItemStatuses' => + 'VuFind\AjaxHandler\GetItemStatusesFactory', + 'finc\AjaxHandler\GetResolverLinks' => + 'finc\AjaxHandler\GetResolverLinksFactory' + ], + 'aliases' => [ + 'getAdditionalAccountInfo' => + 'finc\AjaxHandler\GetAdditionalAccountInfo', + 'getIlsStatus' => + 'finc\AjaxHandler\GetIlsStatus', + 'getItemStatuses' => + 'finc\AjaxHandler\GetItemStatuses', + 'getResolverLinks' => + 'finc\AjaxHandler\GetResolverLinks' + ] + ], 'ils_driver' => [ 'factories' => [ 'fincils' => 'finc\ILS\Driver\Factory::getFincILS', @@ -61,7 +91,12 @@ $config = [ 'solrai' => 'finc\RecordDriver\Factory::getSolrAI', 'solris' => 'finc\RecordDriver\Factory::getSolrIS', 'solrlido' => 'finc\RecordDriver\Factory::getSolrLido', - 'solrlidondl' => 'finc\RecordDriver\Factory::getSolrLidoNdl' + 'solrlidondl' => 'finc\RecordDriver\Factory::getSolrLidoNdl', + 'solrdico' => 'finc\RecordDriver\Factory::getSolrDico', + 'solrdefaultfinc' => 'finc\RecordDriver\Factory::getSolrDefault', + ], + 'aliases' => [ + 'solrdefault' => 'solrdefaultfinc', ], ], 'recordtab' => [ @@ -82,6 +117,21 @@ $config = [ 'redi' => 'finc\Resolver\Driver\Factory::getRedi' ], ], + 'hierarchy_treedataformatter' => [ + 'invokables' => [ + 'json' => 'finc\Hierarchy\TreeDataFormatter\NoCollections', + ], + ], + 'hierarchy_treedatasource' => [ + 'factories' => [ + 'solr' => 'finc\Hierarchy\TreeDataSource\Factory::getSolr', + ], + ], + 'hierarchy_treerenderer' => [ + 'factories' => [ + 'jstree' => 'finc\Hierarchy\TreeRenderer\Factory::getJSTree' + ], + ], ], 'recorddriver_tabs' => [ 'finc\RecordDriver\SolrDefault' => [ @@ -154,6 +204,14 @@ $config = [ ], 'defaultTab' => null, ], + 'finc\RecordDriver\SolrDico' => [ + 'tabs' => [ + 'CollectionList' => 'CollectionList', + 'HierarchyTree' => 'HierarchyTree', + 'Details' => 'StaffViewArray', + ], + 'defaultTab' => 'CollectionList', + ], ], ], // Authorization configuration: diff --git a/module/finc/src/finc/AjaxHandler/GetAdditionalAccountInfo.php b/module/finc/src/finc/AjaxHandler/GetAdditionalAccountInfo.php new file mode 100644 index 0000000000000000000000000000000000000000..96a7ca446394680744c9a89ddf866096a8cf2003 --- /dev/null +++ b/module/finc/src/finc/AjaxHandler/GetAdditionalAccountInfo.php @@ -0,0 +1,83 @@ +<?php +/** + * "Get Additional Account Info" AJAX handler + * + * PHP version 7 + * + * Copyright (C) Leipzig University Library 2019. + * + * 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 Frank Morgner <morgnerf@ub.uni-leipzig.de> + * @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 Additional Account Info" AJAX handler + * + * Get additional account infos + * + * @category VuFind + * @package AJAX + * @author Frank Morgner <morgnerf@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development Wiki + */ +class GetAdditionalAccountInfo extends \VuFind\AjaxHandler\AbstractIlsAndUserAction +{ + /** + * Get additional information for display in my research area. + * + * This method currently only returns the items/entries count of the ILS methods + * given as post values. + * + * @param Params $params Parameter helper from controller + * + * @return array [response data, HTTP status code] + */ + public function handleRequest(Params $params) + { + $this->disableSessionWrites(); // avoid session write timing bug + // collect data for views to be counted + $viewsToCount = $params->fromPost('views', $params->fromQuery('views')); + + try { + $patron = $this->ilsAuthenticator->storedCatalogLogin(); + if ($patron) { + $additionalAccountInfos = []; + $additionalAccountInfos['countViewItems'] = $this->ils->countItems( + $viewsToCount, + $patron + ); + + $additionalAccountInfos['countFines'] = $this->ils->getFinesTotal( + $patron + ); + return $this->formatResponse(compact('additionalAccountInfos')); + } + } catch (\Exception $e) { + // Do nothing -- just fail through to the error message below. + } + return $this->formatResponse( + $this->translate('An error has occurred'), + self::STATUS_HTTP_ERROR + ); + } +} diff --git a/module/finc/src/finc/AjaxHandler/GetIlsStatus.php b/module/finc/src/finc/AjaxHandler/GetIlsStatus.php new file mode 100644 index 0000000000000000000000000000000000000000..cfd95b0ee7e1aca092fb8feb5c5d550030d8bf13 --- /dev/null +++ b/module/finc/src/finc/AjaxHandler/GetIlsStatus.php @@ -0,0 +1,74 @@ +<?php +/** + * "Get ILS Status" AJAX handler + * + * PHP version 7 + * + * Copyright (C) Villanova University 2018. + * Copyright (C) Leipzig University Library 2019. + * + * 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> + * @author André Lahmann <lahmann@ub.uni-leipzig.de> + * @author Frank Morgner <morgnerf@ub.uni-leipzig.de> + * @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 ILS Status" AJAX handler + * + * This will check the ILS for being online and will return the ils-offline + * template upon failure. + * + * @category VuFind + * @package AJAX + * @author Demian Katz <demian.katz@villanova.edu> + * @author André Lahmann <lahmann@ub.uni-leipzig.de> + * @author Frank Morgner <morgnerf@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development Wiki + */ +class GetIlsStatus extends \VuFind\AjaxHandler\GetIlsStatus +{ + /** + * Get Ils Status + * + * This will check the ILS for being online and will return the ils-offline + * template upon failure. + * + * @param Params $params Parameter helper from controller + * + * @return array [response data, HTTP status code] + */ + public function handleRequest(Params $params) + { + $this->disableSessionWrites(); + $offlineModeMsg = $params->fromPost( + 'offlineModeMsg', + $params->fromQuery('offlineModeMsg') + ); + if ($this->ils->getOfflineMode(true) == 'ils-offline') { + $html = $this->renderer + ->render('Helpers/ils-offline.phtml', compact('offlineModeMsg')); + } + return $this->formatResponse(['html' => $html ?? '']); + } +} diff --git a/module/finc/src/finc/AjaxHandler/GetItemStatuses.php b/module/finc/src/finc/AjaxHandler/GetItemStatuses.php new file mode 100644 index 0000000000000000000000000000000000000000..0e301af60211cad8961385c07cc7856e2e8d3cd9 --- /dev/null +++ b/module/finc/src/finc/AjaxHandler/GetItemStatuses.php @@ -0,0 +1,302 @@ +<?php +/** +* "Get Item Status" AJAX handler +* +* PHP version 7 +* +* Copyright (C) Villanova University 2018. +* Copyright (C) Leipzig University Library 2019. +* +* 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> +* @author Chris Delis <cedelis@uillinois.edu> +* @author Tuan Nguyen <tuan@yorku.ca> +* @author Frank Morgner <morgnerf@ub.uni-leipzig.de> +* @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 Item Status" AJAX handler + * + * This is responsible for printing the holdings information for a + * collection of records in JSON format. + * + * @category VuFind + * @package AJAX + * @author Demian Katz <demian.katz@villanova.edu> + * @author Chris Delis <cedelis@uillinois.edu> + * @author Tuan Nguyen <tuan@yorku.ca> + * @author Frank Morgner <morgnerf@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development Wiki + */ +class GetItemStatuses extends \VuFind\AjaxHandler\GetItemStatuses +{ + /** + * Support method for getItemStatuses() -- process a single bibliographic record + * for location settings other than "group". + * + * Method is nearly identical with VuFind core method, only the 2nd parameter of + * reduceServices() differs. + * + * @param array $record Information on items linked to a single bib + * record + * @param array $messages Custom status HTML + * (keys = available/unavailable) + * @param string $locationSetting The location mode setting used for + * pickValue() + * @param string $callnumberSetting The callnumber mode setting used for + * pickValue() + * + * @return array Summarized availability information + */ + protected function getItemStatus( + $record, + $messages, + $locationSetting, + $callnumberSetting + ) { + // Summarize call number, location and availability info across all items: + $callNumbers = $locations = []; + $use_unknown_status = $available = false; + $services = []; + + foreach ($record as $info) { + // Find an available copy + if ($info['availability']) { + $available = true; + } + // Check for a use_unknown_message flag + if (isset($info['use_unknown_message']) + && $info['use_unknown_message'] == true + ) { + $use_unknown_status = true; + } + // Store call number/location info: + $callNumbers[] = $info['callnumber']; + $locations[] = $info['location']; + // Store all available services + if (isset($info['services'])) { + $services = array_merge($services, $info['services']); + } + } + + $callnumberHandler = $this->getCallnumberHandler( + $callNumbers, + $callnumberSetting + ); + + // Determine call number string based on findings: + $callNumber = $this->pickValue( + $callNumbers, + $callnumberSetting, + 'Multiple Call Numbers' + ); + + // Determine location string based on findings: + $location = $this->pickValue( + $locations, + $locationSetting, + 'Multiple Locations', + 'location_' + ); + + if (!empty($services)) { + // 2nd parameter $available only differs from VuFind core method + $availability_message = $this + ->reduceServices( + $services, + $available ? 'available' : 'unavailable' + ); + } else { + $availability_message = $use_unknown_status + ? $messages['unknown'] + : $messages[$available ? 'available' : 'unavailable']; + } + + // Send back the collected details: + return [ + 'id' => $record[0]['id'], + 'availability' => ($available ? 'true' : 'false'), + 'availability_message' => $availability_message, + 'location' => htmlentities($location, ENT_COMPAT, 'UTF-8'), + 'locationList' => false, + 'reserve' => + ($record[0]['reserve'] == 'Y' ? 'true' : 'false'), + 'reserve_message' => $record[0]['reserve'] == 'Y' + ? $this->translate('on_reserve') + : $this->translate('Not On Reserve'), + 'callnumber' => htmlentities($callNumber, ENT_COMPAT, 'UTF-8'), + 'callnumber_handler' => $callnumberHandler + ]; + } + + /** + * Reduce an array of service names to a human-readable string. + * + * @param array $services Names of available services. + * @param string $availability + * + * @return string + */ + protected function reduceServices( + array $services, + $availability = 'available' + ) { + // Normalize, dedup and sort available services + $normalize = function ($in) { + return strtolower(preg_replace('/[^A-Za-z]/', '', $in)); + }; + $services = array_map($normalize, array_unique($services)); + sort($services); + + // Do we need to deal with a preferred service? + $preferred = isset($this->config->Item_Status->preferred_service) + ? $normalize($this->config->Item_Status->preferred_service) : false; + if (false !== $preferred && in_array($preferred, $services)) { + $services = [$preferred]; + } + + return $this->renderer->render( + 'ajax/status-'.$availability.'-services.phtml', + ['services' => $services] + ); + } + + /** + * Handle a request. + * + * Please note! Method seems to be identical to VuFind core method. + * + * @param Params $params Parameter helper from controller + * + * @return array [response data, HTTP status code] + */ + public function handleRequest(Params $params) + { + $this->disableSessionWrites(); // avoid session write timing bug + $ids = $params->fromPost('id', $params->fromQuery('id', [])); + + //$catalog = $this->getILS(); + try { + $results = $this->ils->getStatuses($ids); + } catch (ILSException $e) { + // If the ILS fails, send an error response instead of a fatal + // error; we don't want to confuse the end user unnecessarily. + error_log($e->getMessage()); + foreach ($ids as $id) { + $results[] = [ + [ + 'id' => $id, + 'error' => 'An error has occurred' + ] + ]; + } + } + + if (!is_array($results)) { + // If getStatuses returned garbage, let's turn it into an empty array + // to avoid triggering a notice in the foreach loop below. + $results = []; + } + + // In order to detect IDs missing from the status response, create an + // array with a key for every requested ID. We will clear keys as we + // encounter IDs in the response -- anything left will be problems that + // need special handling. + $missingIds = array_flip($ids); + + // Load messages for response: + $messages = [ + 'available' => $this->renderer->render('ajax/status-available.phtml'), + 'unavailable' => + $this->renderer->render('ajax/status-unavailable.phtml'), + 'unknown' => $this->renderer->render('ajax/status-unknown.phtml') + ]; + + // Load callnumber and location settings: + $callnumberSetting = isset($this->config->Item_Status->multiple_call_nos) + ? $this->config->Item_Status->multiple_call_nos : 'msg'; + $locationSetting = isset($this->config->Item_Status->multiple_locations) + ? $this->config->Item_Status->multiple_locations : 'msg'; + $showFullStatus = isset($this->config->Item_Status->show_full_status) + ? $this->config->Item_Status->show_full_status : false; + + // Loop through all the status information that came back + $statuses = []; + foreach ($results as $recordNumber => $record) { + // Filter out suppressed locations: + $record = $this->filterSuppressedLocations($record); + + // Skip empty records: + if (count($record)) { + if ($locationSetting == "group") { + $current = $this->getItemStatusGroup( + $record, + $messages, + $callnumberSetting + ); + } else { + $current = $this->getItemStatus( + $record, + $messages, + $locationSetting, + $callnumberSetting + ); + } + // If a full status display has been requested, append the HTML: + if ($showFullStatus) { + $current['full_status'] = $this->renderer->render( + 'ajax/status-full.phtml', + [ + 'statusItems' => $record, + 'callnumberHandler' => $this->getCallnumberHandler() + ] + ); + } + $current['record_number'] = array_search($current['id'], $ids); + $statuses[] = $current; + + // The current ID is not missing -- remove it from the missing list. + unset($missingIds[$current['id']]); + } + } + + // If any IDs were missing, send back appropriate dummy data + foreach ($missingIds as $missingId => $recordNumber) { + $statuses[] = [ + 'id' => $missingId, + 'availability' => 'false', + 'availability_message' => $messages['unavailable'], + 'location' => $this->translate('Unknown'), + 'locationList' => false, + 'reserve' => 'false', + 'reserve_message' => $this->translate('Not On Reserve'), + 'callnumber' => '', + 'missing_data' => true, + 'record_number' => $recordNumber + ]; + } + + // Done + return $this->formatResponse(compact('statuses')); + } +} diff --git a/module/finc/src/finc/AjaxHandler/GetResolverLinks.php b/module/finc/src/finc/AjaxHandler/GetResolverLinks.php new file mode 100644 index 0000000000000000000000000000000000000000..ede2a0813fb502a8cf97cba198d2245d09ecf18f --- /dev/null +++ b/module/finc/src/finc/AjaxHandler/GetResolverLinks.php @@ -0,0 +1,178 @@ +<?php +/** + * "Get Resolver Links" AJAX handler + * + * PHP version 7 + * + * Copyright (C) Villanova University 2018. + * Copyright (C) Leipzig University Library 2019. + * + * 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> + * @author Graham Seaman <Graham.Seaman@rhul.ac.uk> + * @author Gregor Gawol <gawol@ub.uni-leipzig.de> + * @author Frank Morgner <morgnerf@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development Wiki + */ +namespace finc\AjaxHandler; + +use VuFind\Resolver\Driver\PluginManager as ResolverManager; +use VuFind\Resolver\Connection; +use VuFind\Session\Settings as SessionSettings; +use Zend\Config\Config; +use Zend\Mvc\Controller\Plugin\Params; +use Zend\View\Renderer\RendererInterface; + +/** + * "Get Resolver Links" AJAX handler + * + * Fetch Links from resolver given an OpenURL and format as HTML + * and output the HTML content in JSON object. + * + * @category VuFind + * @package AJAX + * @author Demian Katz <demian.katz@villanova.edu> + * @author Graham Seaman <Graham.Seaman@rhul.ac.uk> + * @author Gregor Gawol <gawol@ub.uni-leipzig.de> + * @author Frank Morgner <morgnerf@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development Wiki + */ +class GetResolverLinks extends \VuFind\AjaxHandler\GetResolverLinks +{ + /** + * Resolver configuration + * + * @var Config + */ + protected $resolverConfig; + + + /** + * Constructor + * + * @param SessionSettings $ss Session settings + * @param ResolverManager $pm Resolver driver plugin manager + * @param RendererInterface $renderer View renderer + * @param Config $config Top-level VuFind configuration (config.ini) + * @param Config $resolver Top-level VuFind configuration (Resolver.ini) + */ + public function __construct( + SessionSettings $ss, + ResolverManager $pm, + RendererInterface $renderer, + Config $config, + Config $resolver + ) { + parent::__construct($ss, $pm, $renderer, $config); + $this->resolverConfig = $resolver; + } + + /** + * Handle a request. + * + * Method can handle multiple link resolvers. VuFind standard configuration + * of [OpenUrl] config.ini is replaced by finc defined Resolver.ini. Therefore + * parameter $config is currently out of use. + * + * @param Params $params Parameter helper from controller + * + * @return array [response data, HTTP status code] + */ + public function handleRequest(Params $params) + { + $this->disableSessionWrites(); // avoid session write timing bug + $openUrl = $params()->fromQuery('openurl', ''); + $requestedResolver = $params()->fromQuery('resolvertype', ''); + $searchClassId = $params()->fromQuery('searchClassId', ''); + + //$config = $this->getConfig('Resolver'); + $resolvers = explode(',', $this->resolverConfig->General->active_resolvers); + + if (in_array($requestedResolver, $resolvers) + && isset($this->resolverConfig->$requestedResolver)) { + $resolverType = isset($this->resolverConfig->$requestedResolver->resolver) + ? $this->resolverConfig->$requestedResolver->resolver : 'generic'; + if (!$this->pluginManager->has($resolverType)) { + return $this->formatResponse( + $this->translate("Could not load driver for $resolverType"), + self::STATUS_HTTP_ERROR + ); + } + + $resolver = new Connection($this->pluginManager->get($resolverType)); + if (isset($this->resolverConfig->$requestedResolver->resolver_cache)) { + $resolver->enableCache( + $this->resolverConfig->$requestedResolver->resolver_cache + ); + } + $result = $resolver->fetchLinks($openUrl); + + // Sort the returned links into categories based on service type: + $electronic = $print = $services = []; + foreach ($result as $link) { + switch (isset($link['service_type']) ? $link['service_type'] : '') { + case 'getHolding': + $print[] = $link; + break; + case 'getWebService': + $services[] = $link; + break; + case 'getDOI': + // Special case -- modify DOI text for special display: + $link['title'] = $this->translate('Get full text'); + $link['coverage'] = ''; + break; + case 'getFullTxt': + default: + $electronic[] = $link; + break; + } + } + + // Get the OpenURL base: + if (isset($this->resolverConfig->$requestedResolver) + && isset($this->resolverConfig->$requestedResolver->url) + ) { + // Trim off any parameters (for legacy compatibility -- default config + // used to include extraneous parameters): + list($base) = explode( + '?', + $this->resolverConfig->$requestedResolver->url + ); + } else { + $base = false; + } + + $moreOptionsLink = $resolver->supportsMoreOptionsLink() + ? $resolver->getResolverUrl($openUrl) : ''; + + // Render the links using the view: + $view = [ + 'openUrlBase' => $base, 'openUrl' => $openUrl, 'print' => $print, + 'electronic' => $electronic, 'services' => $services, + 'searchClassId' => $searchClassId, 'resolver' => $requestedResolver, + 'moreOptionsLink' => $moreOptionsLink + ]; + } + $html = $this->renderer->render('ajax/resolverLinks.phtml', $view); + + // output HTML encoded in JSON object + return $this->formatResponse(compact('html')); + } +} diff --git a/module/finc/src/finc/AjaxHandler/GetResolverLinksFactory.php b/module/finc/src/finc/AjaxHandler/GetResolverLinksFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..bac9ae52ddff9bb32cbf46e9228d21fdf5ae613f --- /dev/null +++ b/module/finc/src/finc/AjaxHandler/GetResolverLinksFactory.php @@ -0,0 +1,78 @@ +<?php +/** + * Factory for GetResolverLinks AJAX handler. + * + * PHP version 7 + * + * Copyright (C) Villanova University 2018. + * Copyright (C) Leipzig University Library 2019. + * + * 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> + * @author Frank Morgner <morgnerf@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development Wiki + */ +namespace finc\AjaxHandler; + +use Interop\Container\ContainerInterface; + +/** + * Factory for GetResolverLinks AJAX handler. + * + * @category VuFind + * @package AJAX + * @author Demian Katz <demian.katz@villanova.edu> + * @author Frank Morgner <morgnerf@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development Wiki + */ +class GetResolverLinksFactory implements \Zend\ServiceManager\Factory\FactoryInterface +{ + /** + * Create an object + * + * @param ContainerInterface $container Service manager + * @param string $requestedName Service being created + * @param null|array $options Extra options (optional) + * + * @return object + * + * @throws ServiceNotFoundException if unable to resolve the service. + * @throws ServiceNotCreatedException if an exception is raised when + * creating a service. + * @throws \Exception if any other error occurs + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function __invoke( + ContainerInterface $container, + $requestedName, + array $options = null + ) { + if (!empty($options)) { + throw new \Exception('Unexpected options passed to factory.'); + } + return new $requestedName( + $container->get(\VuFind\Session\Settings::class), + $container->get(\VuFind\Resolver\Driver\PluginManager::class), + $container->get('ViewRenderer'), + $container->get(\VuFind\Config\PluginManager::class)->get('config'), + $container->get(\VuFind\Config\PluginManager::class)->get('Resolver') + ); + } +} diff --git a/module/finc/src/finc/Controller/AjaxController.php b/module/finc/src/finc/Controller/AjaxController.php index 7ff1c973f958fdcbd02f0a17ae1c7ac063ec93bc..476d93ef302170a910fefe09208be76509d79e7a 100644 --- a/module/finc/src/finc/Controller/AjaxController.php +++ b/module/finc/src/finc/Controller/AjaxController.php @@ -2,9 +2,10 @@ /** * Ajax Controller Module * - * PHP version 5 + * PHP version 7 * * Copyright (C) Villanova University 2010. + * Copyright (C) Leipzig University Library 2019. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, @@ -27,9 +28,6 @@ */ namespace finc\Controller; -use VuFind\Exception\Auth as AuthException; -use VuFind\View\Helper\Root\SafeMoneyFormat; - /** * This controller handles global AJAX functionality * @@ -41,393 +39,4 @@ use VuFind\View\Helper\Root\SafeMoneyFormat; */ class AjaxController extends \VuFind\Controller\AjaxController { - /** - * Fetch Links from resolver given an OpenURL and format as HTML - * and output the HTML content in JSON object. - * - * @return \Zend\Http\Response - * @author Gregor Gawol <gawol@ub.uni-leipzig.de> - * @author Graham Seaman <Graham.Seaman@rhul.ac.uk> - */ - protected function getResolverLinksAjax() - { - $this->disableSessionWrites(); // avoid session write timing bug - $openUrl = $this->params()->fromQuery('openurl', ''); - $requestedResolver = $this->params()->fromQuery('resolvertype', ''); - $searchClassId = $this->params()->fromQuery('searchClassId', ''); - - $config = $this->getConfig('Resolver'); - $resolvers = explode(',', $config->General->active_resolvers); - - if (in_array($requestedResolver, $resolvers) && isset($config->$requestedResolver)) { - $resolverType = isset($config->$requestedResolver->resolver) - ? $config->$requestedResolver->resolver : 'other'; - $pluginManager = $this->serviceLocator - ->get('VuFind\ResolverDriverPluginManager'); - if (!$pluginManager->has($resolverType)) { - return $this->output( - $this->translate("Could not load driver for $resolverType"), - self::STATUS_ERROR, - 500 - ); - } - $resolver = new \VuFind\Resolver\Connection( - $pluginManager->get($resolverType) - ); - if (isset($config->$requestedResolver->resolver_cache)) { - $resolver->enableCache($config->$requestedResolver->resolver_cache); - } - $result = $resolver->fetchLinks($openUrl); - - // Sort the returned links into categories based on service type: - $electronic = $print = $services = []; - foreach ($result as $link) { - switch (isset($link['service_type']) ? $link['service_type'] : '') { - case 'getHolding': - $print[] = $link; - break; - case 'getWebService': - $services[] = $link; - break; - case 'getDOI': - // Special case -- modify DOI text for special display: - $link['title'] = $this->translate('Get full text'); - $link['coverage'] = ''; - break; - case 'getFullTxt': - default: - $electronic[] = $link; - break; - } - } - - // Get the OpenURL base: - if (isset($config->$requestedResolver) && isset($config->$requestedResolver->url)) { - // Trim off any parameters (for legacy compatibility -- default config - // used to include extraneous parameters): - list($base) = explode('?', $config->$requestedResolver->url); - } else { - $base = false; - } - - // Render the links using the view: - $view = [ - 'openUrlBase' => $base, 'openUrl' => $openUrl, 'print' => $print, - 'electronic' => $electronic, 'services' => $services, - 'searchClassId' => $searchClassId, 'resolver' => $requestedResolver - ]; - } - $html = $this->getViewRenderer()->render('ajax/resolverLinks.phtml', $view); - - // output HTML encoded in JSON object - return $this->output($html, self::STATUS_OK); - } - - /** - * Get Item Statuses - * - * This is responsible for printing the holdings information for a - * collection of records in JSON format. - * - * @return \Zend\Http\Response - * @author Chris Delis <cedelis@uillinois.edu> - * @author Tuan Nguyen <tuan@yorku.ca> - */ - protected function getItemStatusesAjax() - { - $this->disableSessionWrites(); // avoid session write timing bug - $catalog = $this->getILS(); - $ids = $this->params()->fromPost('id', $this->params()->fromQuery('id')); - - // Call getStatuses only if the ILS is not in offline mode - if ($catalog->getOfflineMode() === false) { - $results = $catalog->getStatuses($ids); - if (!is_array($results)) { - // If getStatuses returned garbage, let's turn it into an empty array - // to avoid triggering a notice in the foreach loop below. - $results = []; - } - } else { - $results = []; - } - - // In order to detect IDs missing from the status response, create an - // array with a key for every requested ID. We will clear keys as we - // encounter IDs in the response -- anything left will be problems that - // need special handling. - $missingIds = array_flip($ids); - - // Get access to PHP template renderer for partials: - $renderer = $this->getViewRenderer(); - - // Load messages for response: - $messages = [ - 'available' => $renderer->render('ajax/status-available.phtml'), - 'unavailable' => $renderer->render('ajax/status-unavailable.phtml'), - 'unknown' => $renderer->render('ajax/status-unknown.phtml') - ]; - - // Load callnumber and location settings: - $config = $this->getConfig(); - $callnumberSetting = isset($config->Item_Status->multiple_call_nos) - ? $config->Item_Status->multiple_call_nos : 'msg'; - $locationSetting = isset($config->Item_Status->multiple_locations) - ? $config->Item_Status->multiple_locations : 'msg'; - $showFullStatus = isset($config->Item_Status->show_full_status) - ? $config->Item_Status->show_full_status : false; - - // Loop through all the status information that came back - $statuses = []; - foreach ($results as $recordNumber => $record) { - // Filter out suppressed locations: - $record = $this->filterSuppressedLocations($record); - - // Skip empty records: - if (count($record)) { - if ($locationSetting == "group") { - $current = $this->getItemStatusGroup( - $record, - $messages, - $callnumberSetting - ); - } else { - $current = $this->getItemStatus( - $record, - $messages, - $locationSetting, - $callnumberSetting - ); - } - // If a full status display has been requested, append the HTML: - if ($showFullStatus) { - $current['full_status'] = $renderer->render( - 'ajax/status-full.phtml', - [ - 'statusItems' => $record, - 'callnumberHandler' => $this->getCallnumberHandler() - ] - ); - } - $current['record_number'] = array_search($current['id'], $ids); - $statuses[] = $current; - - // The current ID is not missing -- remove it from the missing list. - unset($missingIds[$current['id']]); - } - } - - // If any IDs were missing, send back appropriate dummy data - foreach ($missingIds as $missingId => $recordNumber) { - $statuses[] = [ - 'id' => $missingId, - 'availability' => 'false', - 'availability_message' => $messages['unavailable'], - 'location' => $this->translate('Unknown'), - 'locationList' => false, - 'reserve' => 'false', - 'reserve_message' => $this->translate('Not On Reserve'), - 'callnumber' => '', - 'missing_data' => true, - 'record_number' => $recordNumber - ]; - } - - // Done - return $this->output($statuses, self::STATUS_OK); - } - - /** - * Get additional information for display in my research area. - * - * This method currently only returns the items/entries count of the ILS methods - * given as post values. - * - * @return \Zend\Http\Response - */ - protected function getAdditionalAccountInfoAjax() - { - $this->disableSessionWrites(); // avoid session write timing bug - - // Stop now if the user does not have valid catalog credentials available: - if (!is_array($patron = $this->catalogLogin())) { - return $patron; - } - - $catalog = $this->getILS(); - - // initialize the return array - $additionalAccountInfos = []; - - // collect data for views to be counted - $viewsToCount = $this->params() - ->fromPost('views', $this->params()->fromQuery('views')); - - $additionalAccountInfos['countViewItems'] = $catalog->countItems( - $viewsToCount, - $patron - ); - - $additionalAccountInfos['countFines'] = $catalog->getFinesTotal( - $patron - ); - - // Done - return $this->output($additionalAccountInfos, self::STATUS_OK); - } - - /** - * Get Ils Status - * - * This will check the ILS for being online and will return the ils-offline - * template upon failure. - * - * @return \Zend\Http\Response - * @author André Lahmann <lahmann@ub.uni-leipzig.de> - */ - protected function getIlsStatusAjax() - { - $this->disableSessionWrites(); // avoid session write timing bug - $offlineModeMsg = $this->params()->fromPost( - 'offlineModeMsg', - $this->params()->fromQuery('offlineModeMsg') - ); - if ($this->getILS()->getOfflineMode() == 'ils-offline') { - return $this->output( - $this->getViewRenderer()->render( - 'Helpers/ils-offline.phtml', - ['offlineModeMsg' => $offlineModeMsg] - ), - self::STATUS_OK - ); - } - return $this->output('', self::STATUS_OK); - } - - /** - * Support method for getItemStatuses() -- process a single bibliographic record - * for location settings other than "group". - * - * @param array $record Information on items linked to a single bib - * record - * @param array $messages Custom status HTML - * (keys = available/unavailable) - * @param string $locationSetting The location mode setting used for - * pickValue() - * @param string $callnumberSetting The callnumber mode setting used for - * pickValue() - * - * @return array Summarized availability information - */ - protected function getItemStatus( - $record, - $messages, - $locationSetting, - $callnumberSetting - ) { - // Summarize call number, location and availability info across all items: - $callNumbers = $locations = []; - $use_unknown_status = $available = false; - $services = []; - - foreach ($record as $info) { - // Find an available copy - if ($info['availability']) { - $available = true; - } - // Check for a use_unknown_message flag - if (isset($info['use_unknown_message']) - && $info['use_unknown_message'] == true - ) { - $use_unknown_status = true; - } - // Store call number/location info: - $callNumbers[] = $info['callnumber']; - $locations[] = $info['location']; - // Store all available services - if (isset($info['services'])) { - $services = array_merge($services, $info['services']); - } - } - - $callnumberHandler = $this->getCallnumberHandler( - $callNumbers, - $callnumberSetting - ); - - // Determine call number string based on findings: - $callNumber = $this->pickValue( - $callNumbers, - $callnumberSetting, - 'Multiple Call Numbers' - ); - - // Determine location string based on findings: - $location = $this->pickValue( - $locations, - $locationSetting, - 'Multiple Locations', - 'location_' - ); - - if (!empty($services)) { - $availability_message = $this - ->reduceServices( - $services, - $available ? 'available' : 'unavailable' - ); - } else { - $availability_message = $use_unknown_status - ? $messages['unknown'] - : $messages[$available ? 'available' : 'unavailable']; - } - - // Send back the collected details: - return [ - 'id' => $record[0]['id'], - 'availability' => ($available ? 'true' : 'false'), - 'availability_message' => $availability_message, - 'location' => htmlentities($location, ENT_COMPAT, 'UTF-8'), - 'locationList' => false, - 'reserve' => - ($record[0]['reserve'] == 'Y' ? 'true' : 'false'), - 'reserve_message' => $record[0]['reserve'] == 'Y' - ? $this->translate('on_reserve') - : $this->translate('Not On Reserve'), - 'callnumber' => htmlentities($callNumber, ENT_COMPAT, 'UTF-8'), - 'callnumber_handler' => $callnumberHandler - ]; - } - - /** - * Reduce an array of service names to a human-readable string. - * - * @param array $services Names of available services. - * @param string $availability - * - * @return string - */ - protected function reduceServices( - array $services, - $availability = 'available' - ) { - // Normalize, dedup and sort available services - $normalize = function ($in) { - return strtolower(preg_replace('/[^A-Za-z]/', '', $in)); - }; - $services = array_map($normalize, array_unique($services)); - sort($services); - - // Do we need to deal with a preferred service? - $config = $this->getConfig(); - $preferred = isset($config->Item_Status->preferred_service) - ? $normalize($config->Item_Status->preferred_service) : false; - if (false !== $preferred && in_array($preferred, $services)) { - $services = [$preferred]; - } - - return $this->getViewRenderer()->render( - 'ajax/status-'.$availability.'-services.phtml', - ['services' => $services] - ); - } } diff --git a/module/finc/src/finc/Cookie/CookieManager.php b/module/finc/src/finc/Cookie/CookieManager.php deleted file mode 100644 index 6dbd76ea92ca26e3660d766b7b87168164dbb88c..0000000000000000000000000000000000000000 --- a/module/finc/src/finc/Cookie/CookieManager.php +++ /dev/null @@ -1,81 +0,0 @@ -<?php -/** - * Cookie Manager - * - * PHP version 5 - * - * Copyright (C) Villanova University 2015. - * - * 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 Cookie - * @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\Cookie; - -/** - * Cookie Manager - * - * @category VuFind - * @package Cookie - * @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 CookieManager extends \VuFind\Cookie\CookieManager -{ - /** - * The name of the session cookie - * - * @var string - */ - protected $sessionName; - - /** - * Constructor - * - * @param array $cookies Cookie array to manipulate (e.g. $_COOKIE) - * @param string $path Cookie base path (default = /) - * @param string $domain Cookie domain - * @param bool $secure Are cookies secure only? (default = false) - * @param string $sessionName Session cookie name (if null defaults to PHP - * settings) - */ - public function __construct( - $cookies, - $path = '/', - $domain = null, - $secure = false, - $sessionName = null - ) { - $this->cookies = $cookies; - $this->path = $path; - $this->domain = $domain; - $this->secure = $secure; - $this->sessionName = $sessionName; - } - - /** - * Get the name of the cookie - * - * @return mixed - */ - public function getSessionName() - { - return $this->sessionName; - } -} diff --git a/module/finc/src/finc/Hierarchy/TreeDataFormatter/NoCollections.php b/module/finc/src/finc/Hierarchy/TreeDataFormatter/NoCollections.php new file mode 100644 index 0000000000000000000000000000000000000000..5d1fbf8a3538b07a70a246d491df917b057a3d0b --- /dev/null +++ b/module/finc/src/finc/Hierarchy/TreeDataFormatter/NoCollections.php @@ -0,0 +1,67 @@ +<?php +/** + * Hierarchy Tree Data Formatter (JSON) + * + * PHP version 5 + * + * Copyright (C) Villanova University 2015. + * + * 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 HierarchyTree_DataFormatter + * @author Dorian Merz <merz@ub.uni-leipzig.de> + * @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\Hierarchy\TreeDataFormatter; + +/** + * Hierarchy Tree Data Formatter (JSON) + * + * @category VuFind + * @package HierarchyTree_DataFormatter + * @author Dorian Merz <merz@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development:plugins:hierarchy_components Wiki + */ +class NoCollections extends \VuFind\Hierarchy\TreeDataFormatter\Json +{ + /** + * {@inheritdoc} + * Always returns false in our case, since we always want Record links + * @param object $fields + * @return bool + */ + protected function isCollection($fields) + { + //always return false to ensure Record-Links only + return false; + } + + /** + * {@inheritdoc} + * Our version avoids unnecessary evaluation of getTitlesInHierarchy() + * @param object $record + * @param string $parentID + * @return string + */ + protected function pickTitle($record, $parentID) + { + if (!isset($parentID) || empty($parentID)) { + return $record->title ?? $record->id; + } + return parent::pickTitle($record, $parentID); + } +} diff --git a/module/finc/src/finc/Hierarchy/TreeDataSource/Factory.php b/module/finc/src/finc/Hierarchy/TreeDataSource/Factory.php new file mode 100644 index 0000000000000000000000000000000000000000..36cec38b5913a2b8361e03cef1491615bfc48c2a --- /dev/null +++ b/module/finc/src/finc/Hierarchy/TreeDataSource/Factory.php @@ -0,0 +1,75 @@ +<?php +/** + * Hierarchy Data Source Factory Class + * + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * @category VuFind + * @package HierarchyTree_DataSource + * @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\Hierarchy\TreeDataSource; + +use Zend\ServiceManager\ServiceManager; + +/** + * Hierarchy Data Source Factory Class + * + * This is identical to the VuFind equivalent ensuring the correct namespace + * to load \de_15\Hierarchy\TreeDataSource\Solr + * + * @category VuFind + * @package HierarchyTree_DataSource + * @author Dorian Merz <merz@ub.uni-leipzig.de> + * @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 Factory +{ + /** + * Factory for Solr driver. + * + * @param ServiceManager $sm Service manager. + * + * @return Solr + */ + public static function getSolr(ServiceManager $sm) + { + $cacheDir = $sm->getServiceLocator()->get('VuFind\CacheManager') + ->getCacheDir(false); + $hierarchyFilters = $sm->getServiceLocator()->get('VuFind\Config') + ->get('HierarchyDefault'); + $filters = isset($hierarchyFilters->HierarchyTree->filterQueries) + ? $hierarchyFilters->HierarchyTree->filterQueries->toArray() + : []; + $solr = $sm->getServiceLocator()->get('VuFind\Search\BackendManager') + ->get('Solr')->getConnector(); + $formatterManager = $sm->getServiceLocator() + ->get('VuFind\HierarchyTreeDataFormatterPluginManager'); + return new Solr( + $solr, + $formatterManager, + rtrim($cacheDir, '/') . '/hierarchy', + $filters + ); + } +} diff --git a/module/finc/src/finc/Hierarchy/TreeDataSource/Solr.php b/module/finc/src/finc/Hierarchy/TreeDataSource/Solr.php new file mode 100644 index 0000000000000000000000000000000000000000..2b193b20d4e1e42ad847a69abd60fe53d8a12111 --- /dev/null +++ b/module/finc/src/finc/Hierarchy/TreeDataSource/Solr.php @@ -0,0 +1,122 @@ +<?php +/** + * Hierarchy Tree Data Source (Solr) + * + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * @category VuFind + * @package HierarchyTree_DataSource + * @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 finc\Hierarchy\TreeDataSource; + +use VuFind\Hierarchy\TreeDataSource\Solr as VuFindBase; +use VuFindSearch\Query\Query; +use VuFindSearch\Backend\Solr\Connector; +use VuFindSearch\ParamBag; +use VuFind\RecordDriver\AbstractBase as RecordDriver; + +/** + * Hierarchy Tree Data Source (Solr) + * + * This extends the base helper class to enable additional configuration of the answer set. + * + * @category VuFind + * @package HierarchyTree_DataSource + * @author Dorian Merz <merz@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development:plugins:hierarchy_components Wiki + */ +class Solr extends VuFindBase +{ + /** + * @var RecordDriver + */ + protected $recordDriver; + + /** + * Search Solr. + * + * @param string $q Search query + * @param int $rows Max rows to retrieve (default = int max / 2 since Solr + * may choke with higher values) + * + * @return array + */ + protected function searchSolr($q, $rows = 1073741823) + { + $filters = $this->filters; + if ($this->isTopElementQuery($q) || (isset($this->recordDriver) && $this->recordDriver->isCollection())) { + $filters[] = "format:DigitalCollection"; + } + $params = new ParamBag( + [ + 'q' => [$q], + 'fq' => $filters, + 'hl' => ['false'], + 'fl' => ['title,id,hierarchy_parent_id,hierarchy_top_id,' + . 'is_hierarchy_id,hierarchy_sequence,title_in_hierarchy,recordtype'], + 'wt' => ['json'], + 'json.nl' => ['arrarr'], + 'rows' => [$rows], // Integer max + 'start' => [0] + ] + ); + $response = $this->solrConnector->search($params); + return json_decode($response); + } + + /** + * @param RecordDriver $recordDriver + * + * @return object $recordDriver + */ + public function setRecordDriver(RecordDriver $recordDriver) + { + $this->recordDriver = $recordDriver; + } + + /** + * Decides whether a query looks for a hierarchy root node + * @param string $query + * @return bool + */ + protected function isTopElementQuery($query) + { + if (preg_match('/^hierarchy_top_id\:\"?([^\"]+)\"?$/', $query, $matches)) { + $id = $matches[1]; + $params = new ParamBag( + [ + 'q' => ["hierarchy_top_id:\"$id\" AND id:\"$id\" AND format:DigitalCollection"], + 'hl' => ['false'], + 'fl' => ['id'], + 'wt' => ['json'], + 'json.nl' => ['arrarr'], + 'rows' => [1], // Integer max + 'start' => [0] + ] + ); + $response = $this->solrConnector->search($params); + $return = json_decode($response); + return $return->response->numFound != 0; + } + return false; + } +} diff --git a/module/finc/src/finc/Hierarchy/TreeRenderer/Factory.php b/module/finc/src/finc/Hierarchy/TreeRenderer/Factory.php new file mode 100644 index 0000000000000000000000000000000000000000..2335209593ac08a9da5958dbc6b74dd175ce7438 --- /dev/null +++ b/module/finc/src/finc/Hierarchy/TreeRenderer/Factory.php @@ -0,0 +1,60 @@ +<?php +/** + * Hierarchy Renderer Factory Class + * + * 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 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\Hierarchy\TreeRenderer; + +use Zend\ServiceManager\ServiceManager; + +/** + * Hierarchy Renderer Factory Class + * + * This is a factory class to build objects for rendering hierarchies. + * + * @category VuFind + * @package HierarchyTree_DataSource + * @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 Factory +{ + /** + * Factory for JSTree renderer. + * + * @param ServiceManager $sm Service manager. + * + * @return JSTree + */ + public static function getJSTree(ServiceManager $sm) + { + return new JSTree( + $sm->getServiceLocator()->get('ControllerPluginManager')->get('Url') + ); + } +} diff --git a/module/finc/src/finc/Hierarchy/TreeRenderer/JSTree.php b/module/finc/src/finc/Hierarchy/TreeRenderer/JSTree.php new file mode 100644 index 0000000000000000000000000000000000000000..36e45a39a81943456cf13f7aa03b8991f9c8788e --- /dev/null +++ b/module/finc/src/finc/Hierarchy/TreeRenderer/JSTree.php @@ -0,0 +1,117 @@ +<?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 finc\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 \VuFind\Hierarchy\TreeRenderer\JSTree +{ + /** + * Constructor + * + * @param \Zend\Mvc\Controller\Plugin\Url $router Router plugin for urls + */ + public function __construct(\Zend\Mvc\Controller\Plugin\Url $router) + { + parent::__construct($router); + } + + /** + * Use the router to build the appropriate URL based on context + * + * @param object $node JSON object of a node/top node + * @param string $context Record or Collection + * + * @return string + */ + protected function getContextualUrl($node, $context) + { + if ($node->type == 'collection') { + return $this->getUrlFromRouteCache('collection', $node->id); + } else { + $url = $this->getUrlFromRouteCache('record', $node->id); + return $url; + } + } + + /** + * 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])) { + if ($route == 'collection') { + $params = [ + 'id' => '__record_id__', + 'tab' => 'HierarchyTree' + ]; + $options = [ + 'query' => [ + 'recordID' => '__record_id__' + ] + ]; + $cache[$route] = $this->router->fromRoute($route, $params, $options); + } else { + $params = [ + 'id' => '__record_id__', + 'tab' => 'Description' + ]; + $cache[$route] = $this->router->fromRoute($route, $params); + } + } + return str_replace('__record_id__', $id, $cache[$route]); + } + + /** + * @return \VuFind\Hierarchy\TreeDataSource\AbstractBase + */ + public function getDataSource() + { + if (!isset($this->dataSource)) { + $this->dataSource = parent::getDataSource(); + } + $this->dataSource->setRecordDriver($this->recordDriver); + return $this->dataSource; + } +} diff --git a/module/finc/src/finc/ILS/Driver/FincILS.php b/module/finc/src/finc/ILS/Driver/FincILS.php index c1af3d75ab9ba60cbeb075dc6f7a294f0557d770..cdde4452a2e3ebbaaf129640579e629039f1b593 100644 --- a/module/finc/src/finc/ILS/Driver/FincILS.php +++ b/module/finc/src/finc/ILS/Driver/FincILS.php @@ -1422,7 +1422,11 @@ class FincILS extends PAIA implements LoggerAwareInterface list($methodName, $methodReturn) = explode(':', $value); // if we have one mismatch we can already stop as this record does // not qualify for querying the ILS - if (!in_array($methodReturn, (array) $this->getRecord($id)->tryMethod($methodName))) { + if ($methodReturn === "") { + if (!is_null($this->getRecord($id)->tryMethod($methodName))) { + return false; + } + } elseif (!in_array($methodReturn, (array) $this->getRecord($id)->tryMethod($methodName))) { return false; } } diff --git a/module/finc/src/finc/ILS/Driver/FincTheca.php b/module/finc/src/finc/ILS/Driver/FincTheca.php index 3fe62b8c2b59aa7c3eeac98e21752489a4b8cdcc..a0dd99c5ab6a3a5a27bc0c6124220420dd4c9eb5 100644 --- a/module/finc/src/finc/ILS/Driver/FincTheca.php +++ b/module/finc/src/finc/ILS/Driver/FincTheca.php @@ -88,7 +88,7 @@ class FincTheca extends FincILS protected function getStatusViaMediennummer($record_id) { $result = []; - if ($ilsRecordId = $this->_getRecord($record_id)->tryMethod('getMediennummer')) { + if ($ilsRecordId = $this->getRecord($record_id)->tryMethod('getMediennummer')) { $this->identifier_type = 'mediennr'; $result = parent::doGetStatus($ilsRecordId); foreach ($result as &$item) { diff --git a/module/finc/src/finc/ILS/Driver/LiberoDingTrait.php b/module/finc/src/finc/ILS/Driver/LiberoDingTrait.php index 3e640872c0aaa139047b73ad5edf646a69935196..7216649a848c6de7e300dc05922e2bed64db935f 100644 --- a/module/finc/src/finc/ILS/Driver/LiberoDingTrait.php +++ b/module/finc/src/finc/ILS/Driver/LiberoDingTrait.php @@ -162,7 +162,7 @@ trait LiberoDingTrait */ public function balanceFinesOfUser($patron, $amount) { - $params = $this->_getLiberoDingRequestParams(); + $params = $this->getLiberoDingRequestParams(); $params['memberCode'] = $patron['cat_username']; $params['password'] = $patron['cat_password']; $params['amount'] = $amount; @@ -172,7 +172,7 @@ trait LiberoDingTrait $this->getWebScraperUrl() .'payAnyFee.jsp', $params, null, - $this->_getLiberoDingRequestHeaders() + $this->getLiberoDingRequestHeaders() ); } catch (\Exception $e) { throw new ILSException($e->getMessage()); @@ -189,7 +189,7 @@ trait LiberoDingTrait // reload PAIA session by paia login again $this->refreshLogin($patron['cat_username'], $patron['cat_password']); - return $this->_getLiberoDingResultBool($result); + return $this->getLiberoDingResultBool($result); } /** @@ -203,7 +203,7 @@ trait LiberoDingTrait */ protected function getSystemMessages($patron) { - $params = $this->_getLiberoDingRequestParams(); + $params = $this->getLiberoDingRequestParams(); $params['memberCode'] = $patron['cat_username']; $params['password'] = $patron['cat_password']; @@ -212,7 +212,7 @@ trait LiberoDingTrait $this->getWebScraperUrl() .'getMySystemMessages.jsp', $params, null, - $this->_getLiberoDingRequestHeaders() + $this->getLiberoDingRequestHeaders() ); } catch (\Exception $e) { throw new ILSException($e->getMessage()); @@ -227,7 +227,7 @@ trait LiberoDingTrait return false; } - return $this->_getLiberoDingResult($result, 'getMySystemMessages'); + return $this->getLiberoDingResult($result, 'getMySystemMessages'); } /** @@ -248,7 +248,7 @@ trait LiberoDingTrait $messageIdList = null, $toDate = null ) { - $params = $this->_getLiberoDingRequestParams(); + $params = $this->getLiberoDingRequestParams(); $params['memberCode'] = $patron['cat_username']; $params['password'] = $patron['cat_password']; @@ -264,7 +264,7 @@ trait LiberoDingTrait $this->getWebScraperUrl() .'removeMySystemMessages.jsp', $params, null, - $this->_getLiberoDingRequestHeaders() + $this->getLiberoDingRequestHeaders() ); } catch (\Exception $e) { throw new ILSException($e->getMessage()); @@ -279,7 +279,7 @@ trait LiberoDingTrait return false; } - return $this->_getLiberoDingResult($result, 'removeMySystemMessages'); + return $this->getLiberoDingResult($result, 'removeMySystemMessages'); } /** @@ -303,7 +303,7 @@ trait LiberoDingTrait { $map = self::_profileDataMapper(true); - $params = $this->_getLiberoDingRequestParams(); + $params = $this->getLiberoDingRequestParams(); $params['memberCode'] = $patron['cat_username']; $params['password'] = $patron['cat_password']; @@ -325,7 +325,7 @@ trait LiberoDingTrait $this->getWebScraperUrl() .'setMyProfile.jsp', $params, null, - $this->_getLiberoDingRequestHeaders() + $this->getLiberoDingRequestHeaders() ); } catch (\Exception $e) { throw new ILSException($e->getMessage()); @@ -340,7 +340,7 @@ trait LiberoDingTrait return false; } - return $this->_getLiberoDingResultBool($result); + return $this->getLiberoDingResultBool($result); } /** @@ -379,7 +379,7 @@ trait LiberoDingTrait */ protected function getLiberoDingProfile($patron, $mapped = true) { - $params = $this->_getLiberoDingRequestParams(); + $params = $this->getLiberoDingRequestParams(); $params['memberCode'] = $patron['cat_username']; $params['password'] = $patron['cat_password']; @@ -388,7 +388,7 @@ trait LiberoDingTrait $this->getWebScraperUrl() .'getMyProfile.jsp', $params, null, - $this->_getLiberoDingRequestHeaders() + $this->getLiberoDingRequestHeaders() ); } catch (\Exception $e) { throw new ILSException($e->getMessage()); @@ -406,8 +406,8 @@ trait LiberoDingTrait if ($mapped) { // define of disabled fields $mappeddata = []; - $map = self::_profileDataMapper(); - $data = $this->_getLiberoDingResult($result, 'getMyProfile'); + $map = self::profileDataMapper(); + $data = $this->getLiberoDingResult($result, 'getMyProfile'); foreach ($data as $key => $value) { if ($key == 'disabledInputs') { @@ -426,7 +426,7 @@ trait LiberoDingTrait return $mappeddata; } - return $this->_getLiberoDingResult($result, 'getMyProfile'); + return $this->getLiberoDingResult($result, 'getMyProfile'); } @@ -441,7 +441,7 @@ trait LiberoDingTrait */ public function changeUserPin($newPin, $patron) { - $params = $this->_getLiberoDingRequestParams(); + $params = $this->getLiberoDingRequestParams(); $params['memberCode'] = $patron['cat_username']; $params['password'] = $patron['cat_password']; $params['newPin'] = $newPin; @@ -451,7 +451,7 @@ trait LiberoDingTrait $this->getWebScraperUrl() .'changeUserPin.jsp', $params, null, - $this->_getLiberoDingRequestHeaders() + $this->getLiberoDingRequestHeaders() ); } catch (\Exception $e) { throw new ILSException($e->getMessage()); @@ -466,7 +466,7 @@ trait LiberoDingTrait return false; } - return $this->_getLiberoDingResult($result, 'changeUserPinOk'); + return $this->getLiberoDingResult($result, 'changeUserPinOk'); } /** @@ -478,7 +478,7 @@ trait LiberoDingTrait * @return array Return array of mappings. * @access private */ - private static function _profileDataMapper($reverse = false) + private static function profileDataMapper($reverse = false) { $array = [ "GNAM" => 'firstname', @@ -513,7 +513,7 @@ trait LiberoDingTrait * * @return array */ - private function _getLiberoDingRequestParams() + private function getLiberoDingRequestParams() { return [ 'dbName' => $this->getDbName(), @@ -527,7 +527,7 @@ trait LiberoDingTrait * * @return array */ - private function _getLiberoDingRequestHeaders() + private function getLiberoDingRequestHeaders() { return [ 'User-Agent' => 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)' @@ -543,7 +543,7 @@ trait LiberoDingTrait * * @return mixed */ - private function _getLiberoDingResult($result, $resultKey) + private function getLiberoDingResult($result, $resultKey) { // get result as array $details = json_decode($result->getBody(), true); @@ -564,7 +564,7 @@ trait LiberoDingTrait * @return array * @access private */ - private function _getLiberoDingResultBool($result) + private function getLiberoDingResultBool($result) { // get result as array $details = json_decode($result->getBody(), true); diff --git a/module/finc/src/finc/ILS/Driver/PAIA.php b/module/finc/src/finc/ILS/Driver/PAIA.php index 638dcfbda3762deaeeca59f4da238d6927695909..579991694b2ae73935a3f6e7c6ee52e7ce069054 100644 --- a/module/finc/src/finc/ILS/Driver/PAIA.php +++ b/module/finc/src/finc/ILS/Driver/PAIA.php @@ -64,9 +64,13 @@ class PAIA extends \VuFind\ILS\Driver\PAIA const SCOPE_READ_ITEMS = 'read_items'; const SCOPE_WRITE_ITEMS = 'write_items'; const SCOPE_CHANGE_PASSWORD = 'change_password'; + const SCOPE_READ_NOTIFICATIOS = 'read_notifications'; + const SCOPE_DELETE_NOTIFICATIONS = 'delete_notifications'; protected $last_error = null; + protected $notificationsPrefix; + /** * Constructor * @@ -81,6 +85,20 @@ class PAIA extends \VuFind\ILS\Driver\PAIA $this->sessionManager = $sessionManager; } + /** + * {@inheritdoc} + * Additionally sets notificationsPrefix config + * + * @return void + */ + public function init() + { + parent::init(); + if (isset($this->config['PAIA']['paiaNotificationsPrefix'])) { + $this->notificationsPrefix = $this->config['PAIA']['paiaNotificationsPrefix']; + } + } + /** * This method cancels a list of holds for a specific patron. * @@ -721,6 +739,145 @@ class PAIA extends \VuFind\ILS\Driver\PAIA return []; } + /** + * Helper function to generate cache key + * @param array $patron + * @return string + */ + private function notificationsCacheKey($patron) + { + return $patron['cat_username'].'_notifications'; + } + + /** + * Helper function to retrieve notification ID + * @param string $messageId + * @return string + */ + private function getPaiaNotificationsId($messageId) + { + if (isset($this->notificationsPrefix) + && + strpos($messageId, $this->notificationsPrefix) === 0 + ) { + return substr($messageId, strlen($this->notificationsPrefix)); + } + return $messageId; + } + + /** + * PAIA support method for PAIA core method 'notifications' + * + * @param array $patron Array with patron information + * + * @return array|mixed Array of system notifications for the patron + * @throws \Exception + * @throws ILSException You are not entitled to read notifications + */ + protected function paiaGetSystemMessages($patron) + { + // check if user has appropriate scope + if (!$this->paiaCheckScope(self::SCOPE_READ_NOTIFICATIOS)) { + throw new ILSException('You are not entitled to read notifications.'); + } + + if ($this->paiaCacheEnabled) { + $response = $this->getCachedData($this->notificationsCacheKey($patron)); + if (!empty($response)) { + return $response; + } + } + + try { + $response = $this->paiaGetAsArray( + 'core/'.$patron['cat_username'].'/notifications' + ); + } catch (\Exception $e) { + // all error handling is done in paiaHandleErrors so pass on the excpetion + throw $e; + } + //$response = array_slice($response,0,20); + foreach ($response as &$message) { + //Fernleihmedium erhalten.[Barcode]7016265550[Titel: *]König von Deutschland + if (preg_match('/\[Barcode\](\w\d*)/', $message['about'], $matches)) { + $message['barcode'] = $matches[1]; + } + if (preg_match('/\[Titel(.*)\](.+)/', $message['about'], $matches)) { + $message['title'] = $matches[2]; + } + $message['message'] = $message['about']; + //2017-08-10T16:59:00+02:00 + $date = date_create_from_format(\DATE_RFC3339, $message['date']); + if ($date !== false) { + $message['datetime'] = $date->format('d.m.Y H:i'); + } else { + //$errs = date_get_last_errors(); + $message['datetime'] = $message['date']; + } + $message['messageid'] = $message['item']; + } + + if ($this->paiaCacheEnabled) { + $this->putCachedData($this->notificationsCacheKey($patron), $response); + } + + return $response; + } + + /** + * PAIA support method for PAIA core method DELETE 'notifications' + * + * @param array $patron Array with patron information + * @param string $messageId + * @param bool $keepCache decides whether to keep the cache or flush it, TRUE or FALSE, resp. + * @return array|mixed Array of system notifications for the patron + * @throws \Exception + * @throws ILSException You are not entitled to read notifications + */ + protected function paiaRemoveSystemMessage($patron, $messageId, $keepCache = false) + { + // check if user has appropriate scope + if (!$this->paiaCheckScope(self::SCOPE_DELETE_NOTIFICATIONS)) { + throw new ILSException('You are not entitled to delete notifications.'); + } + + try { + $response = $this->paiaDeleteRequest( + 'core/'.$patron['cat_username'].'/notifications/'.$this->getPaiaNotificationsId($messageId) + ); + } catch (\Exception $e) { + // all error handling is done in paiaHandleErrors so pass on the excpetion + throw $e; + } + + if (!$keepCache && $this->paiaCacheEnabled) { + $this->removeCachedData($this->notificationsCacheKey($patron)); + } + + return $response; + } + + /** + * Removes patron's system notifcations + * @param array $patron + * @param array $messageIds + * @return bool + */ + protected function paiaRemoveSystemMessages($patron, array $messageIds) + { + foreach ($messageIds as $messageId) { + if (!$this->paiaRemoveSystemMessage($patron, $messageId, true)) { + return false; + } + } + + if ($this->paiaCacheEnabled) { + $this->removeCachedData($this->notificationsCacheKey($patron)); + } + + return true; + } + /** * This PAIA helper function allows custom overrides for mapping of PAIA response * to getMyHolds data structure. @@ -1310,4 +1467,48 @@ class PAIA extends \VuFind\ILS\Driver\PAIA { return $this->last_error; } + + /** + * DELETE data on foreign host + * + * @param string $file DELETE target URL + * @param string $access_token PAIA access token for current session + * + * @return bool|string + * @throws ILSException + */ + protected function paiaDeleteRequest($file, $access_token = null) + { + if (is_null($access_token)) { + $access_token = $this->getSession()->access_token; + } + + $http_headers = [ + 'Authorization' => 'Bearer ' . $access_token, + 'Content-type' => 'application/json; charset=UTF-8', + ]; + + try { + $client = $this->httpService->createClient( + $this->paiaURL . $file, + \Zend\Http\Request::METHOD_DELETE, + $this->paiaTimeout + ); + $client->setHeaders($http_headers); + $result = $client->send(); + } catch (\Exception $e) { + throw new ILSException($e->getMessage()); + } + + if (!$result->isSuccess()) { + // log error for debugging + $this->debug( + 'HTTP status ' . $result->getStatusCode() . + ' received' + ); + return false; + } + // return TRUE on success + return true; + } } diff --git a/module/finc/src/finc/RecordDriver/Factory.php b/module/finc/src/finc/RecordDriver/Factory.php index 0443677521ba0d3967fd55fc0def6b6bec3f3d94..23e34468e292bb70ab02cbbd8e25a21c6483be2d 100644 --- a/module/finc/src/finc/RecordDriver/Factory.php +++ b/module/finc/src/finc/RecordDriver/Factory.php @@ -242,4 +242,19 @@ class Factory $container->get('VuFind\DateConverter') ); } + + /** + * Factory for SolrDico record driver + * + * @param ContainerInterface $container Service Manager + * @return SolrDico + */ + public static function getSolrDico(ContainerInterface $container) + { + return new SolrDico( + $container->get('VuFind\Config')->get('config'), + null, //$container->get('VuFind\Config')->get('SolrDico'), + $container->get('VuFind\Config')->get('searches') + ); + } } diff --git a/module/finc/src/finc/RecordDriver/SolrDefaultFincTrait.php b/module/finc/src/finc/RecordDriver/SolrDefaultFincTrait.php index 7981bee042c41bf4352f448525fdc9e2209f2805..bb2686bef5888d19edcdd39f6c271401af633c6e 100644 --- a/module/finc/src/finc/RecordDriver/SolrDefaultFincTrait.php +++ b/module/finc/src/finc/RecordDriver/SolrDefaultFincTrait.php @@ -60,6 +60,8 @@ trait SolrDefaultFincTrait */ public function isCollection() { + return $this->getRecordType() === 'dico'; + /* // first check as always if we have a collection $isCollection = parent::isCollection(); @@ -71,6 +73,19 @@ trait SolrDefaultFincTrait // if we've come so far this record is no collection return false; + */ + } + + /** + * Has collection children + * + * @return bool + * @access public + * @link https://projekte.ub.uni-leipzig.de/issues/14742 + */ + public function hasChildren() + { + return parent::isCollection(); } /** @@ -515,6 +530,33 @@ trait SolrDefaultFincTrait return 'noOrigName'; } + /** + * Get an array of publication details + * + * @return array of multi-value strings or as fallback array of publication detail objects + * @link https://projekte.ub.uni-leipzig.de/issues/15070 refs #15070 + */ + public function getPublicationDetails() + { + // use latest multi-value field + $imprint = $this->getImprint(); + + if (!empty($imprint)) { + return $imprint; + } + + // use fallback + $imprint = parent::getPublicationDetails(); + + // sort publication object to prevent irritation by multiple locations + usort($imprint, function ($a, $b) { + return $a->getDate() > $b->getDate(); + }); + + return $imprint; + } + + /** * Get the main author of the record. * @@ -523,7 +565,7 @@ trait SolrDefaultFincTrait */ public function getPrimaryAuthor() { - return $this->_filterAuthorDates(parent::getPrimaryAuthor()); + return $this->filterAuthorDates(parent::getPrimaryAuthor()); } /** @@ -533,7 +575,7 @@ trait SolrDefaultFincTrait */ public function getPrimaryAuthors() { - return $this->_filterAuthorDates(parent::getPrimaryAuthors()); + return $this->filterAuthorDates(parent::getPrimaryAuthors()); } /** @@ -544,7 +586,7 @@ trait SolrDefaultFincTrait public function getPrimaryAuthorsOrig() { return isset($this->fields['author_orig']) ? - $this->_filterAuthorDates($this->fields['author_orig']) : []; + $this->filterAuthorDates($this->fields['author_orig']) : []; } /** @@ -554,7 +596,7 @@ trait SolrDefaultFincTrait */ public function getSecondaryAuthors() { - return $this->_filterAuthorDates(parent::getSecondaryAuthors()); + return $this->filterAuthorDates(parent::getSecondaryAuthors()); } /** @@ -566,7 +608,7 @@ trait SolrDefaultFincTrait public function getSecondaryAuthorsOrig() { return isset($this->fields['author2_orig']) ? - $this->_filterAuthorDates($this->fields['author2_orig']) : []; + $this->filterAuthorDates($this->fields['author2_orig']) : []; } /** @@ -576,7 +618,7 @@ trait SolrDefaultFincTrait */ public function getCorporateAuthors() { - return $this->_filterAuthorDates(parent::getCorporateAuthors()); + return $this->filterAuthorDates(parent::getCorporateAuthors()); } /** @@ -587,7 +629,7 @@ trait SolrDefaultFincTrait public function getCorporateAuthorsOrig() { return isset($this->fields['author_corporate_orig']) ? - $this->_filterAuthorDates($this->fields['author_corporate_orig']) : []; + $this->filterAuthorDates($this->fields['author_corporate_orig']) : []; } /** @@ -598,7 +640,7 @@ trait SolrDefaultFincTrait public function getCorporateSecondaryAuthors() { return isset($this->fields['author_corporate2']) ? - $this->_filterAuthorDates($this->fields['author_corporate2']) : []; + $this->filterAuthorDates($this->fields['author_corporate2']) : []; } /** @@ -609,7 +651,7 @@ trait SolrDefaultFincTrait public function getCorporateSecondaryAuthorsOrig() { return isset($this->fields['author_corporate2_orig']) ? - $this->_filterAuthorDates($this->fields['author_corporate2_orig']) : []; + $this->filterAuthorDates($this->fields['author_corporate2_orig']) : []; } /** @@ -803,15 +845,23 @@ trait SolrDefaultFincTrait } /** - * After giving a record ids as e.g. ppn of the BSZ check if a record exists. - * This method can be used to indicate a direct link than to form a general - * look for query. + * After giving a record ids as e.g. ppn of the context check (KXP|BSZ) if a + * foreign record exists. This method can be used to indicate a direct link + * than to form a general look for query. * - * @param array $array Array of record ids to test. + * Please note: 1) This method can be simplified if it is necessary only to + * map record_id to id but you need the solr to check if the item really + * exists in the Solr infrastructure to maybe no displaying a false link later + * on. 2) There's legacy component to rewrite back real Solr record_id in + * return container. Can be useful if there are still any successive methods + * in action. * - * @return int mixed If success return at least one finc id otherwise null. + * @param array $array Array of record ids to test. + * @param string $context Context where to search related items. + * + * @return null|mixed If success return at least one finc id otherwise null. */ - protected function addFincIDToRecord($array) + protected function addFincIDToRecord($array, $context = 'kxp_id_str') { // record ids $rids = []; @@ -831,15 +881,18 @@ trait SolrDefaultFincTrait } } + // Solr query remains necessary if it is desired to check if solr + // infrastructure contains really the foreign items + // build the query: if (count($rids) == 1) { // single query: - $value = 'record_id:' . $rids[0]['rid'] + $value = $context . ':' . $rids[0]['rid'] . ' AND source_id:' . $rids[0]['sid']; } elseif (count($rids) > 1) { // multi query: foreach ($rids as $rid) { - $parts[] = '(record_id:' . $rid['rid'] + $parts[] = '('. $context .':' . $rid['rid'] . ' AND source_id:' . $rid['sid'] . ')'; } $value = '(' . implode(' OR ', $parts) . ')'; @@ -848,7 +901,7 @@ trait SolrDefaultFincTrait } $query = new \VuFindSearch\Query\Query($value); $bag = new ParamBag(); - $bag->set('fl', 'id,record_id'); + $bag->set('fl', 'id, record_id,' . $context); $records = $this->searchService ->search('Solr', $query, 0, count($rids), $bag); @@ -857,7 +910,10 @@ trait SolrDefaultFincTrait && !empty($records) ) { foreach ($records as $record) { - $retval[$record->getRID()] = $record->getUniqueID(); + $retval[$record->getField($context)]['id'] = + $record->getUniqueID(); + $retval[$record->getField($context)]['record_id'] = + $record->getRID(); } } @@ -865,7 +921,8 @@ trait SolrDefaultFincTrait foreach ($array as &$val) { if (isset($val['record_id'])) { if (isset($retval[($val['record_id'])])) { - $val['id'] = $retval[($val['record_id'])]; + $val['id'] = $retval[($val['record_id'])]['id']; + $val['record_id'] = $retval[($val['record_id'])]['record_id']; } } } @@ -1045,13 +1102,20 @@ trait SolrDefaultFincTrait } /** - * Get a precompiled string of publication details stored in the Solr field - * imprint. + * Get publication details stored in the Solr field imprint_str_mv as an array of strings + * Or if empty use value of Solr field 'imprint' from method 'getImprint' as string * - * @return string + * @return string|array */ public function getImprint() { + if (isset($this->fields['imprint_str_mv']) && is_array($this->fields['imprint_str_mv'])) { + $imprints = array_filter($this->fields['imprint_str_mv']); + if (!empty($imprints)) { + return $imprints; + } + } + return isset($this->fields['imprint']) ? $this->fields['imprint'] : ''; } @@ -1136,7 +1200,7 @@ trait SolrDefaultFincTrait * * @return array */ - private function _filterAuthorDates($authordata) + private function filterAuthorDates($authordata) { $filter = function ($author) { if (preg_match( @@ -1273,4 +1337,15 @@ trait SolrDefaultFincTrait return isset($this->fields['facet_avail']) ? $this->fields['facet_avail'] : []; } + + /** + * Get K10Plus PPN for this record + * This will be stored in 'kxp_id_str' + * + * @return array + */ + public function getKxpId() { + return isset($this->fields['kxp_id_str']) + ? $this->fields['kxp_id_str'] : []; + } } diff --git a/module/finc/src/finc/RecordDriver/SolrDico.php b/module/finc/src/finc/RecordDriver/SolrDico.php new file mode 100644 index 0000000000000000000000000000000000000000..c18b6323c5f9d13acae3e22426ed6bc5b51dda0b --- /dev/null +++ b/module/finc/src/finc/RecordDriver/SolrDico.php @@ -0,0 +1,141 @@ +<?php +/** + * finc specific model for Digital Collection records with a fullrecord in Solr. + * + * PHP version 5 + * + * Copyright (C) Leipzig University Library 2015. + * + * 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 RecordDrivers + * @author Dorian Merz <merz@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link http://vufind.org/wiki/vufind2:record_drivers Wiki + */ +namespace finc\RecordDriver; + +/** + * finc specific model for LIDO records with a fullrecord in Solr. + * + * @category VuFind + * @package RecordDrivers + * @author Frank Morgner <morgnerf@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link http://vufind.org/wiki/vufind2:record_drivers Wiki + */ +class SolrDico extends SolrDefault +{ + const INVALID_FULL_RECORD = 'invalid'; + + /** + * @var array with record data + */ + private $fullrecord; + + /** + * Constructor + * + * @param \Zend\Config\Config $mainConfig VuFind main configuration (omit + * for built-in defaults) + * @param \Zend\Config\Config $recordConfig Record-specific configuration + * file (omit to use $mainConfig as $recordConfig) + * @param \Zend\Config\Config $searchSettings Search-specific configuration + * file + */ + public function __construct($mainConfig = null, $recordConfig = null, $searchSettings = null) + { + parent::__construct($mainConfig, $recordConfig, $searchSettings); + } + + /** + * Returns Decoded JSON fullrecord or empty array on error + * @return array|string + */ + protected function getFullRecord() + { + if (!isset($this->fullrecord)) { + if (isset($this->fields['fullrecord'])) { + try { + $this->fullrecord = json_decode($this->fields['fullrecord'])[0]; + } catch (\Exception $e) { + $this->fullrecord = self::INVALID_FULL_RECORD; + } + } + } + if ($this->fullrecord == self::INVALID_FULL_RECORD) { + return []; + } else { + return $this->fullrecord; + } + } + + /** + * Returns Field value either from + * * solr fields + * * the full record + * * or parent::getField() + * in respective priority + * @param string $field + * @return mixed + */ + public function getField($field) + { + if (isset($this->fields[$field])) { + return $this->fields[$field]; + } + $fullrecord = $this->getFullRecord(); + if (isset($fullrecord->{$field})) { + return $fullrecord->{$field}; + } + return parent::getField($field); + } + + /** + * Magic function to enable short hand field retrieval + * @param string $name + * @param null $arguments + * @return mixed|null + */ + public function __call($name, $arguments = null) + { + if (method_exists($this, $name)) { + return call_user_func_array([$this,$name], $arguments); + } + if (strpos($name, 'get') === 0) { + return $this->getField(lcfirst(substr($name, 3))); + } + return null; + } + + /** + * Returns the object'S licence information from the full record + * @return array + */ + public function getLicenceInfo() + { + $prefix = "object_rights_statement_"; + $fields = [ + "code" => null, + "text" => null, + "url" => null, + "icon" => null, + ]; + foreach ($fields as $key => &$field) { + $field = $this->getField($prefix.$key); + } + return $fields; + } +} diff --git a/module/finc/src/finc/RecordDriver/SolrMarc.php b/module/finc/src/finc/RecordDriver/SolrMarc.php index 356ffc8eb9cccd4697352e2d005fe5ab20f4ba7d..6ad89476d78005fc05211295cad168aeda724bd6 100644 --- a/module/finc/src/finc/RecordDriver/SolrMarc.php +++ b/module/finc/src/finc/RecordDriver/SolrMarc.php @@ -269,17 +269,6 @@ class SolrMarc extends SolrDefault return $this->getFieldArray('500'); } - /** - * Get human readable publication dates for display purposes (may not be suitable - * for computer processing -- use getPublicationDates() for that). - * - * @return array - */ - public function getHumanReadablePublicationDates() - { - return $this->getPublicationInfo('c'); - } - /** * Get an array of newer titles for the record. * @@ -294,66 +283,6 @@ class SolrMarc extends SolrDefault return in_array('785', $fieldsNames) ? [] : parent::getNewerTitles(); } - /** - * Get the item's publication information - * - * @param string $subfield The subfield to retrieve ('a' = location, 'c' = date) - * - * @return array - */ - protected function getPublicationInfo($subfield = 'a') - { - // Get string separator for publication information: - $separator = isset($this->mainConfig->Record->marcPublicationInfoSeparator) - ? $this->mainConfig->Record->marcPublicationInfoSeparator : ' '; - - // First check old-style 260 field: - $results = $this->getFieldArray('260', [$subfield], true, $separator); - - // Now track down relevant RDA-style 264 fields; we only care about - // copyright and publication places (and ignore copyright places if - // publication places are present). This behavior is designed to be - // consistent with default SolrMarc handling of names/dates. - $pubResults = $copyResults = []; - - $fields = $this->getMarcRecord()->getFields('264'); - if (is_array($fields)) { - foreach ($fields as $currentField) { - $currentVal = $this - ->getSubfieldArray($currentField, [$subfield], true, $separator); - if (!empty($currentVal)) { - switch ($currentField->getIndicator('2')) { - case '1': - $pubResults = array_merge($pubResults, $currentVal); - break; - case '4': - $copyResults = array_merge($copyResults, $currentVal); - break; - } - } - } - } - $replace260 = isset($this->mainConfig->Record->replaceMarc260) - ? $this->mainConfig->Record->replaceMarc260 : false; - if (count($pubResults) > 0) { - return $replace260 ? $pubResults : array_merge($results, $pubResults); - } elseif (count($copyResults) > 0) { - return $replace260 ? $copyResults : array_merge($results, $copyResults); - } - - return $results; - } - - /** - * Get the item's places of publication. - * - * @return array - */ - public function getPlacesOfPublication() - { - return $this->getPublicationInfo(); - } - /** * Get an array of playing times for the record (if applicable). * diff --git a/module/finc/src/finc/RecordDriver/SolrMarcFinc.php b/module/finc/src/finc/RecordDriver/SolrMarcFinc.php index 299e373a232578a1b0a359ae735619628c13bc3d..b61f4049ddfca0de8cade087acb6f1f7e0da5775 100644 --- a/module/finc/src/finc/RecordDriver/SolrMarcFinc.php +++ b/module/finc/src/finc/RecordDriver/SolrMarcFinc.php @@ -44,9 +44,16 @@ class SolrMarcFinc extends SolrMarc /** * pattern to identify bsz + * + * @deprecated After k10plus transition maybe not longer in use. */ const BSZ_PATTERN = '/^(\(DE-576\))(\d+)(\w|)/'; + /** + * pattern to identify kxp + */ + const KXP_PATTERN = '/^(\(DE-627\))(\d+)(\w|)/'; + /** * List of isil of institution * diff --git a/module/finc/src/finc/RecordDriver/SolrMarcFincTrait.php b/module/finc/src/finc/RecordDriver/SolrMarcFincTrait.php index 94b31f8c1b52254a766a1620c95120aa38d040bd..5b7e80215aed2d73f0a7282890b545b79e9eeaaa 100644 --- a/module/finc/src/finc/RecordDriver/SolrMarcFincTrait.php +++ b/module/finc/src/finc/RecordDriver/SolrMarcFincTrait.php @@ -105,7 +105,7 @@ trait SolrMarcFincTrait if (true === in_array($isil, $this->isil)) { $isISIL = true; } - } elseif (!$this->_isEBLRecord()) { + } elseif (!$this->isEBLRecord()) { $isISIL = true; } @@ -165,7 +165,7 @@ trait SolrMarcFincTrait * * @return bool */ - private function _isEBLRecord() + private function isEBLRecord() { $values = $this->getFieldArray('912', ['a']); if (isset($this->mainConfig->Ebl->product_sigel)) { @@ -331,7 +331,7 @@ trait SolrMarcFincTrait foreach ($linkFields as $current) { $text = $current->getData(); // Extract parenthetical prefixes: - if (preg_match(self::BSZ_PATTERN, $text, $matches)) { + if (preg_match(self::KXP_PATTERN, $text, $matches)) { //$id = $this->checkIfRecordExists($matches[2]); //if ($id != null) { $array[$key]['record_id'] = $matches[2].$matches[3]; @@ -529,64 +529,6 @@ trait SolrMarcFincTrait return count($array) ? array_pop($array) : ''; } - /** - * Get an array of publication detail lines with original notations combining - * information from MARC field 260 and linked content in 880. - * - * @return array - */ - public function getPublicationDetails() - { - $retval = []; - - $marcFields = ['260', '264']; - - // loop through all defined marcFields - foreach ($marcFields as $marcField) { - // now select all fields for the current marcField - if ($fields = $this->getMarcRecord()->getFields($marcField)) { - // loop through all fields of the current marcField - foreach ($fields as $i => $current) { - // Marc 264abc should only be displayed if Ind.2==1 - // Display any other Marc field if defined above - if ($marcField != '264' - || ($marcField == '264' && $current->getIndicator(2) == 1) - ) { - $place = $current->getSubfield('a') - ? $current->getSubfield('a')->getData() : null; - $name = $current->getSubfield('b') - ? $current->getSubfield('b')->getData() : null; - $date = $current->getSubfield('c') - ? $current->getSubfield('c')->getData() : null; - - // Build objects to represent each set of data; these will - // transform seamlessly into strings in the view layer. - $retval[] = new \VuFind\RecordDriver\Response\PublicationDetails( - $place, - $name, - $date - ); - - // Build the publication details with additional graphical notations - // for the current set of publication details - if ($linkedField = $this->getLinkedField($current, $i)) { - $retval[] = new \VuFind\RecordDriver\Response\PublicationDetails( - $linkedField->getSubfield('a') - ? $linkedField->getSubfield('a')->getData() : null, - $linkedField->getSubfield('b') - ? $linkedField->getSubfield('b')->getData() : null, - $linkedField->getSubfield('c') - ? $linkedField->getSubfield('c')->getData() : null - ); - } - } - } - } - } - - return $retval; - } - /** * Get an array of title detail lines with original notations combining * information from MARC field 245 and linked content in 880. @@ -704,7 +646,18 @@ trait SolrMarcFincTrait } } } - + if ($fields = $this->getMarcRecord()->getFields('730')) { + foreach ($fields as $field) { + if ($a = ($field->getSubfield('a'))) { + $workTitles[] = + $truncateTrail($a->getData()) + . (($n = $field->getSubfield('n')) ? + ', ' . $truncateTrail($n->getData()) : '') + . (($p = $field->getSubfield('p')) ? + ', ' . $truncateTrail($p->getData()) : ''); + } + } + } return $workTitles; } @@ -1075,7 +1028,7 @@ trait SolrMarcFincTrait foreach ($linkFields as $current) { $text = $current->getData(); // Extract parenthetical prefixes: - if (preg_match(self::BSZ_PATTERN, $text, $matches)) { + if (preg_match(self::KXP_PATTERN, $text, $matches)) { $array[$key]['record_id'] = $matches[2] . $matches[3]; if (null != ($sid = $this->getSourceID())) { $array[$key]['source_id'] = $sid; @@ -1114,84 +1067,47 @@ trait SolrMarcFincTrait $retval = []; $defaultHeading = 'Note'; // container for collecting recordIDs to the result array #12941 - $tempIds = []; - $fields = $this->getMarcRecord()->getFields('787'); - if (!$fields) { + $entires = $this->getMarcRecord()->getFields('787'); + if (!$entires) { return null; } - foreach ($fields as $field) { + foreach ($entires as $key => $line) { // don't do anything unless we have something in $a - if ($a = $field->getSubfield('a')) { - // do we have a main entry heading? - if ($i = $field->getSubfield('i')) { - // build the text to be displayed from subfields $a and/or $t - $text = ($t = $field->getSubfield('t')) - ? $a->getData() . ': ' . $t->getData() - : $a->getData(); - - $linkFields = $field->getSubfields('w'); - foreach ($linkFields as $current) { - $ids = $current->getData(); - - // Extract parenthetical prefixes: - if (preg_match(self::BSZ_PATTERN, $ids, $matches)) { - // use the same key to set the record_id into the - // $retval array like it is used for the other - // content below - $tempIds[$i->getData()]['record_id'] - = $matches[2] . $matches[3]; + if ($a = $line->getSubfield('a')) { + $retval[$key]['subject'] = ($line->getSubfield('i')) + ? $line->getSubfield('i')->getData() : $defaultHeading; + // build the text to be displayed from subfields $a and/or $t + $retval[$key]['text'] = ($t = $line->getSubfield('t')) + ? $a->getData() . ': ' . $t->getData() + : $a->getData(); + $linkFields = $line->getSubfields('w'); + foreach ($linkFields as $current) { + $ids = $current->getData(); + + // Extract parenthetical prefixes: + if (preg_match(self::KXP_PATTERN, $ids, $matches)) { + // use the same key to set the record_id into the + // $retval array like it is used for the other + // content below + $retval[$key]['record_id'] + = $matches[2] . $matches[3]; + if (null != ($sid = $this->getSourceID())) { + $retval[$key]['source_id'] = $sid; } - } // end foreach - - // add ids already here to the temporary array - // instead of the end of the function with the return value - $tempIds = $this->addFincIDToRecord($tempIds); - - // does a linked record exist - $link = ($w = $field->getSubfield('w')) - ? $w->getData() : ''; - - // we expect the links to be ppns prefixed with an ISIL so - // strip the ISIL - $ppn = preg_replace( - "/^\(([A-z])+\-([A-z0-9])+\)\s?/", - "", - $link - ); - - $record_id = null; - if (!empty($tempIds[$i->getData()]['id'])) { - $record_id = $tempIds[$i->getData()]['record_id']; - } - - $id = null; - if (!empty($tempIds[$i->getData()]['id'])) { - $id = $tempIds[$i->getData()]['id']; } - - // let's use the main entry heading as associative key and - // push the gathered content into the retval array - // add recordIDs 'record_id' and 'id' to the result array - // cmp. #12941 - $retval[$i->getData()][] = [ - 'text' => $text, - 'link' => (!empty($ppn) ? $ppn : $link), - 'record_id' => $record_id, - 'id' => $id - ]; - } else { - // no main entry heading found, so push subfield a's content - // into retval using the defaultHeading - $retval[$defaultHeading][] = [ - 'text' => $a->getData(), - 'link' => '' - ]; } } } - - return $retval; + // add ids already here to the temporary array + // instead of the end of the function with the return value + $retval = $this->addFincIDToRecord($retval); + // rearrange return array to collect same subjects below on unique key + $array = []; + foreach ($retval as $item) { + $array[(sha1($item['subject']))][] = $item; + } + return $array; } /** @@ -1238,7 +1154,7 @@ trait SolrMarcFincTrait foreach ($linkFields as $current) { $text = $current->getData(); // Extract parenthetical prefixes: - if (preg_match(self::BSZ_PATTERN, $text, $matches)) { + if (preg_match(self::KXP_PATTERN, $text, $matches)) { $array[$key]['record_id'] = $matches[2].$matches[3]; if (null != ($sid = $this->getSourceID())) { $array[$key]['source_id'] = $sid; @@ -1284,7 +1200,7 @@ trait SolrMarcFincTrait foreach ($linkFields as $current) { $text = $current->getData(); // Extract parenthetical prefixes: - if (preg_match(self::BSZ_PATTERN, $text, $matches)) { + if (preg_match(self::KXP_PATTERN, $text, $matches)) { $array[$key]['record_id'] = $matches[2].$matches[3]; if (null != ($sid = $this->getSourceID())) { $array[$key]['source_id'] = $sid; @@ -1505,7 +1421,7 @@ trait SolrMarcFincTrait foreach ($linkFields as $current) { $text = $current->getData(); // Extract parenthetical prefixes: - if (preg_match(self::BSZ_PATTERN, $text, $matches)) { + if (preg_match(self::KXP_PATTERN, $text, $matches)) { $array[$i]['record_id'] = $matches[2] . $matches[3]; if (null != ($sid = $this->getSourceID())) { @@ -1536,7 +1452,7 @@ trait SolrMarcFincTrait { $array = []; $fields = [ - '773' => ['a'=>['',''], 't'=>[': ',''], 'g'=>[' ; ','']], + '773' => ['a'=>['',': '], 't'=>['',''], 'g'=>[' ; ','']], '490' => ['a'=>['','']], '800' => ['a'=>['',': '], 't'=>['',''], 'v'=>[' ; ',''] ,'g'=>[' ; ','']], '810' => ['a'=>['',': '], 't'=>['',''], 'v'=>[' ; ',''] ,'g'=>[' ; ','']], @@ -1609,7 +1525,7 @@ trait SolrMarcFincTrait foreach ($linkFields as $current) { $text = $current->getData(); // Extract parenthetical prefixes: - if (preg_match(self::BSZ_PATTERN, $text, $matches)) { + if (preg_match(self::KXP_PATTERN, $text, $matches)) { $array[$i]['record_id'] = $matches[2] . $matches[3]; if (null != ($sid = $this->getSourceID())) { @@ -1691,21 +1607,27 @@ trait SolrMarcFincTrait $idRetrieval = function ($value) { // use preg_match to get rid of the isil - preg_match("/^(\([A-z]*-[A-z0-9]*\))?\s*([A-z0-9]*)\s*$/", $value, $matches); + preg_match(self::KXP_PATTERN, $value, $matches); if (!empty($matches[2])) { - $query = 'record_id:' . $matches[2]; + $query = 'kxp_id_str:' . $matches[2]; if ($sid = $this->fields['source_id']) { $query .= ' AND source_id:'.$sid; } - $result = $this->searchService->search('Solr', new Query($query)); + $result = $this->searchService->search( + 'Solr', + new Query($query) + ); if (count($result) === 0) { - $this->debug('Could not retrieve id for record with ' . $query); + $this->debug( + 'Could not retrieve id for record with ' . $query + ); return null; } return current($result->getRecords())->getUniqueId(); } $this->debug( - 'Pregmatch pattern in getHierarchyParentID failed for ' . $value + 'Pregmatch pattern in getHierarchyParentID failed for ' + . $value ); return $value; }; @@ -2178,6 +2100,89 @@ trait SolrMarcFincTrait return $array; } + /** + * Get RVK notation + * + * @return array + * @access public + */ + public function getRVK() + { + $array = []; + + $rvk = $this->getMarcRecord()->getFields('084'); + // if not return void value + if (!$rvk) { + return $array; + } // end if + foreach ($rvk as $key => $line) { + // if subfield with rvk exists + if ($line->getSubfield('2') + && ($line->getSubfield('2')->getData() == 'rvk') + ) { + // get rvk + if ($line->getSubfield('a')) { + $array[] = $line->getSubfield('a')->getData(); + } // end if subfield a + } // end if subfield 2 + } // end foreach + return $array; + } + + /** + * Get BK notation + * + * @return array + * @access public + */ + public function getBK() + { + $array = []; + + $bkl = $this->getMarcRecord()->getFields('084'); + // if not return void value + if (!$bkl) { + return $array; + } // end if + foreach ($bkl as $key => $line) { + // if subfield with bkl exists + if ($line->getSubfield('2') + && ($line->getSubfield('2')->getData() == 'bkl') + ) { + // get bkl + if ($line->getSubfield('a')) { + $array[] = $line->getSubfield('a')->getData(); + } // end if subfield a + } // end if subfield 2 + } // end foreach + return $array; + } + + /** + * Get DDC notation + * + * @return array + * @access public + */ + public function getDDC() + { + $array = []; + + $ddc = $this->getMarcRecord()->getFields('082'); + // if not return void value + if (!$ddc) { + return $array; + } // end if + foreach ($ddc as $key => $line) { + // if subfield with ddc exists + if ($line->getSubfield('a')) { + // get rvk + $array[] = $line->getSubfield('a')->getData(); + } // end if subfield a + } // end foreach + return $array; + } + /** * Get an array of citations and references notes. * diff --git a/module/finc/src/finc/RecordTab/HierarchyTree.php b/module/finc/src/finc/RecordTab/HierarchyTree.php index 1e764d10cea6fdadb8e025556afcb183a42a88c5..8b11cf47280d206a946cc757ae1cc16928349efc 100644 --- a/module/finc/src/finc/RecordTab/HierarchyTree.php +++ b/module/finc/src/finc/RecordTab/HierarchyTree.php @@ -63,15 +63,16 @@ class HierarchyTree extends \VuFind\RecordTab\HierarchyTree } /** - * Is this tab active? - * - * @return bool + * {@inheritdoc} + * Returns different descriptions according to record type + * @return string */ - public function isActive() + public function getDescription() { - return ( - $this->getRecordDriver()->tryMethod('isSingleElementHierarchyRecord') - ? false : parent::isActive() - ); + if ($this->driver->isCollection()) { + return 'collection_hierarchy_tree_tab'; + } else { + return 'hierarchy_tree'; + } } } diff --git a/module/finc/src/finc/Resolver/Driver/Ezb.php b/module/finc/src/finc/Resolver/Driver/Ezb.php index 5ad065432c7ce00f48845b3a683f2bd3a02a7113..f9315e7117ca8a1e868632278d48ca85de22e41d 100644 --- a/module/finc/src/finc/Resolver/Driver/Ezb.php +++ b/module/finc/src/finc/Resolver/Driver/Ezb.php @@ -54,6 +54,7 @@ use \VuFind\Resolver\Driver\AbstractBase; class Ezb extends AbstractBase implements TranslatorAwareInterface { use \VuFind\I18n\Translator\TranslatorAwareTrait; + use ResolverTrait; /** * Base URL for link resolver @@ -130,9 +131,9 @@ class Ezb extends AbstractBase implements TranslatorAwareInterface $openURL .= isset($parsed['zdbid']) ? '%26zdbid%3D' . $parsed['zdbid'] : ''; - // Make the call to the EZB and load results - $url = $this->baseUrl . '?' . $openURL; + $url = $this->getResolverUrl($openURL); + // Make the call to the EZB and load results $feed = $this->httpClient->setUri($url)->send()->getBody(); return $feed; } diff --git a/module/finc/src/finc/Resolver/Driver/Factory.php b/module/finc/src/finc/Resolver/Driver/Factory.php index dfdb2ce883576f06a763c2784d8bc5240dd5a844..2393eade3a1a29261874836f160999718bd354ec 100644 --- a/module/finc/src/finc/Resolver/Driver/Factory.php +++ b/module/finc/src/finc/Resolver/Driver/Factory.php @@ -64,12 +64,11 @@ class Factory * @param ServiceManager $sm Service manager. * * @return finc\Resolver\Driver\Redi - * @todo Not implemented in finc module yet? */ public static function getRedi(ServiceManager $sm) { $config = $sm->getServiceLocator()->get('VuFind\Config')->get('Resolver'); - return new \VuFind\Resolver\Driver\Redi( + return new Redi( $config->Redi->url, $sm->getServiceLocator()->get('VuFind\Http')->createClient() ); diff --git a/module/finc/src/finc/Resolver/Driver/Redi.php b/module/finc/src/finc/Resolver/Driver/Redi.php new file mode 100644 index 0000000000000000000000000000000000000000..d6435fe2f95efa6b227c53b8d1dccada9e37825a --- /dev/null +++ b/module/finc/src/finc/Resolver/Driver/Redi.php @@ -0,0 +1,47 @@ +<?php +/** + * ReDi Link Resolver Driver + * + * PHP version 5 + * + * Copyright (C) Leipzig University Library 2015 + * + * @category VuFind + * @package Resolver_Drivers + * @author Robert Lange <lange@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development:plugins:link_resolver_drivers Wiki + */ +namespace finc\Resolver\Driver; + +use \VuFind\Resolver\Driver\Redi as RediBase; + +/** + * Redi Link Resolver Driver + * + * @category VuFind + * @package Resolver_Drivers + * @author Robert Lange <lange@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development:plugins:link_resolver_drivers Wiki + */ +class Redi extends RediBase +{ + use ResolverTrait; + + /** + * Fetch Links + * + * Fetches a set of links corresponding to an OpenURL + * + * @param string $openURL openURL (url-encoded) + * + * @return string raw XML returned by resolver + */ + public function fetchLinks($openURL) + { + $url = $this->getResolverUrl($openURL); + $feed = $this->httpClient->setUri($url)->send()->getBody(); + return $feed; + } +} diff --git a/module/finc/src/finc/Resolver/Driver/ResolverTrait.php b/module/finc/src/finc/Resolver/Driver/ResolverTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..29ad59d61ef1e3545d8f9faf45eb78a84f6cdfed --- /dev/null +++ b/module/finc/src/finc/Resolver/Driver/ResolverTrait.php @@ -0,0 +1,70 @@ +<?php +/** + * Finc Resolver Trait + * + * PHP version 5 + * + * Copyright (C) Leipzig University Library 2015 + * + * 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. + * + * @category VuFind + * @package Resolver_Drivers + * @author Robert Lange <lange@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development:plugins:link_resolver_drivers Wiki + */ +namespace finc\Resolver\Driver; + +use \Zend\Config\Exception\InvalidArgumentException; + +/** + * Finc Link Resolver Driver + * + * @category VuFind + * @package Resolver_Drivers + * @author Robert Lange <lange@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development:plugins:link_resolver_drivers Wiki + */ +trait ResolverTrait +{ + /** + * Get Resolver Url + * + * Transform the OpenURL as needed to get a working link to the resolver. + * + * @param string $openURL openURL (url-encoded) + * + * @return string Returns resolver specific url + */ + public function getResolverUrl($openURL) + { + if (empty($this->baseUrl)) { + throw new InvalidArgumentException( + 'Base url for link resolver is not correctly configured.' + ); + } + + if (empty($openURL)) { + return $this->baseUrl; + } + + if ($openURL[0] === '?' || $openURL[0] === '&') { + $openURL = substr($openURL, 1, strlen($openURL)-1); + } + + if (strpos($this->baseUrl, '?') === false) { + return $this->baseUrl . '?' . $openURL; + } else { + return $this->baseUrl . '&' . $openURL; + } + } +} diff --git a/module/finc/src/finc/Service/Factory.php b/module/finc/src/finc/Service/Factory.php index 26f63d3cc441f21cd79a9a4ea1de0c62ed733826..08cf0434e66b791ba648250bc5aa40f5c2e46c7a 100644 --- a/module/finc/src/finc/Service/Factory.php +++ b/module/finc/src/finc/Service/Factory.php @@ -105,43 +105,6 @@ class Factory ); } - /** - * Construct the cookie manager. - * - * @param ServiceManager $sm Service manager. - * - * @return \VuFind\Cookie\CookieManager - */ - public static function getCookieManager(ServiceManager $sm) - { - $config = $sm->get('VuFind\Config')->get('config'); - $path = '/'; - if (isset($config->Cookies->limit_by_path) - && $config->Cookies->limit_by_path - ) { - $path = $sm->get('Request')->getBasePath(); - if (empty($path)) { - $path = '/'; - } - } - $secure = isset($config->Cookies->only_secure) - ? $config->Cookies->only_secure - : false; - $domain = isset($config->Cookies->domain) - ? $config->Cookies->domain - : null; - $session_name = isset($config->Cookies->session_name) - ? $config->Cookies->session_name - : null; - return new \finc\Cookie\CookieManager( - $_COOKIE, - $path, - $domain, - $secure, - $session_name - ); - } - /** * Construct the export helper. * diff --git a/module/finc/src/finc/Service/MungerInjectionDelegatorFactory.php b/module/finc/src/finc/Service/MungerInjectionDelegatorFactory.php index 77db439ee90d664805b405c8796576a55e617cce..1d65c7b2af5bdcd2a310a71e820c74c1c86059a4 100644 --- a/module/finc/src/finc/Service/MungerInjectionDelegatorFactory.php +++ b/module/finc/src/finc/Service/MungerInjectionDelegatorFactory.php @@ -38,7 +38,6 @@ use Zend\Config\Config; use Zend\EventManager\EventInterface; use Zend\ServiceManager\Factory\DelegatorFactoryInterface; - /** * Munger Injection Factory * @@ -102,7 +101,7 @@ class MungerInjectionDelegatorFactory implements DelegatorFactoryInterface ); } $shards = $searchConfig->IndexShards->toArray(); - if ($excludedShards = $searchConfig->ShardPreferences->on_user_search_only) { + if ($excludedShards = $searchConfig->ShardPreferences->on_user_search_only ?? null) { $shards = array_diff_key($shards, array_flip(explode(',', $excludedShards))); } if (!empty($shards)) { diff --git a/module/finc/src/finc/View/Helper/Root/Factory.php b/module/finc/src/finc/View/Helper/Root/Factory.php index 51b9bd83a577290a26949aa0f10de5d41911e67e..81d0c40a62f41c908d441dcedf78dc08a8df9b90 100644 --- a/module/finc/src/finc/View/Helper/Root/Factory.php +++ b/module/finc/src/finc/View/Helper/Root/Factory.php @@ -90,10 +90,12 @@ class Factory */ public static function getRecordLink(ContainerInterface $container) { + $config = $container->get('VuFind\Config')->get('config'); return new RecordLink( $container->get('VuFind\RecordRouter'), $container->get('VuFind\RecordLoader'), - $container->get('VuFind\Search') + $container->get('VuFind\Search'), + $config->Hierarchy->toArray() ); } diff --git a/module/finc/src/finc/View/Helper/Root/OpenUrl.php b/module/finc/src/finc/View/Helper/Root/OpenUrl.php index 787a92ee61fd4db9eb4d98b8083689f828c00e8a..8c09c58f1a9867962114423468e8237f67fb3d72 100644 --- a/module/finc/src/finc/View/Helper/Root/OpenUrl.php +++ b/module/finc/src/finc/View/Helper/Root/OpenUrl.php @@ -27,6 +27,9 @@ */ namespace finc\View\Helper\Root; +use finc\Resolver\Driver\Ezb; +use finc\Resolver\Driver\Redi; + /** * OpenUrl view helper * @@ -87,6 +90,21 @@ class OpenUrl extends \Zend\View\Helper\AbstractHelper */ protected $recordResolvers = false; + /** + * Sufficient Resolvers attributes - at least one per resolver + * + * @var array + */ + protected $sufficientResolverParams = [ + Redi::class => [ + 'getAIRecord' + ], + Ezb::class => [ + 'getCleanISSN', + 'getZdbId' + ] + ]; + /** * Constructor * @@ -206,16 +224,7 @@ class OpenUrl extends \Zend\View\Helper\AbstractHelper } $openurl = $this->recordDriver->getOpenURL(); - - if (isset($this->config->$resolver->custom_params)) { - foreach ($this->config->$resolver->custom_params as $customParam) { - list($key, $value) = explode(':', $customParam); - $customValue = $this->recordDriver->tryMethod($value); - if ($customValue) { - $openurl .= "&" . $key . "=" . $customValue; - } - } - } + $openurl = $this->addCustomParams($resolver, $openurl); $embedAutoLoad = (isset($this->config->General->embed_auto_load) ? $this->config->General->embed_auto_load : false); @@ -307,6 +316,7 @@ class OpenUrl extends \Zend\View\Helper\AbstractHelper if (!$this->recordDriver->getOpenUrl() || !$this->checkContext() || !$this->checkIfRulesApply() + || !$this->checkValidParams() ) { return false; } @@ -491,4 +501,68 @@ class OpenUrl extends \Zend\View\Helper\AbstractHelper // no rule matched return false; } + + /** + * @param string $resolverName + * @param string $url + * @return string $url + */ + public function addCustomParams($resolverName, $url) + { + if (isset($this->config->$resolverName->custom_params)) { + foreach ($this->config->$resolverName->custom_params as $customParam) { + list($key, $value) = explode(':', $customParam); + if (strpos($url, $key) !== false) { + // don't override existing key + continue; + } + if (method_exists($this->recordDriver, $value)) { + $customValue = $this->recordDriver->tryMethod($value); + if ($customValue) { + // assume dynamic value + $url .= "&" . $key . "=" . $customValue; + } + } else { + // assume static value + $url .= "&" . $key . "=" . $value; + } + } + } + return $url; + } + + /** + * Checks openUrlResolver for sufficient params + * + * @return bool + */ + public function checkValidParams() + { + foreach ($this->recordResolvers as $resolver) { + foreach ($this->sufficientResolverParams as $resolverClazz => $paramMethods) { + try { + if ($resolver === (new \ReflectionClass($resolverClazz))->getShortName()) { + if (count($paramMethods) == 0) { + // no param required + return true; + } + foreach ($paramMethods as $paramMethod) { + if ($paramMethod && method_exists($this->recordDriver, $paramMethod) + && is_callable(array($this->recordDriver, $paramMethod)) + && call_user_func(array($this->recordDriver, $paramMethod)) + ) { + return true; + } + } + } + } catch (\ReflectionException $exception) { + // allow unexpected resolver + return true; + } + } + } + + // no sufficient param found + return false; + } } diff --git a/module/finc/src/finc/View/Helper/Root/Record.php b/module/finc/src/finc/View/Helper/Root/Record.php index e635a5f71ec9108c54864b104812c189ddac958d..0a1befaef0915df16df1b185eafe757a933f6e3a 100644 --- a/module/finc/src/finc/View/Helper/Root/Record.php +++ b/module/finc/src/finc/View/Helper/Root/Record.php @@ -487,7 +487,7 @@ class Record extends \VuFind\View\Helper\Root\Record "Elektronische Reproduktion" ); $onlineEditions = []; - $recordLinkHelper = $this->getView()->RecordLink(); + $recordLinkHelper = $this->getView()->plugin('recordLink'); foreach ($this->driver->tryMethod('getAdditionals') as $add) { if (isset($add['identifier']) && in_array($add['identifier'], $online_keys)) { diff --git a/module/finc/src/finc/View/Helper/Root/RecordDataFormatterFactory.php b/module/finc/src/finc/View/Helper/Root/RecordDataFormatterFactory.php index b6b8c99c5c10b6c32178e92a74ce703e8d5a0a48..2867335c86c34d4991a0a90204679d2cbba00c34 100644 --- a/module/finc/src/finc/View/Helper/Root/RecordDataFormatterFactory.php +++ b/module/finc/src/finc/View/Helper/Root/RecordDataFormatterFactory.php @@ -2,10 +2,9 @@ /** * Factory for record driver data formatting view helper * - * PHP version 5 + * PHP version 7 * * Copyright (C) Villanova University 2016. - * Copyright (C) The National Library of Finland 2017. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, @@ -23,7 +22,6 @@ * @category VuFind * @package View_Helpers * @author Demian Katz <demian.katz@villanova.edu> - * @author Konsta Raunio <konsta.raunio@helsinki.fi> * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link https://vufind.org/wiki/development:architecture:record_data_formatter * Wiki diff --git a/module/finc/src/finc/View/Helper/Root/RecordLink.php b/module/finc/src/finc/View/Helper/Root/RecordLink.php index 4162fa982ebf4812e5ed97ae3c0da70be8960566..21fe564f6cf1775e144ce71dc7a2a9b34ed85fbb 100644 --- a/module/finc/src/finc/View/Helper/Root/RecordLink.php +++ b/module/finc/src/finc/View/Helper/Root/RecordLink.php @@ -45,6 +45,13 @@ use VuFindSearch\Service as SearchService; */ class RecordLink extends \VuFind\View\Helper\Root\RecordLink { + /** + * Hierarchy Configuration + * + * @var array $hierarchyConfig + */ + protected $hierarchyConfig; + /** * Record router * @@ -72,15 +79,36 @@ class RecordLink extends \VuFind\View\Helper\Root\RecordLink * @param \VuFind\Record\Router $router Record router * @param \VuFind\Record\Loader $loader Record loader * @param SearchService $ss Search service + * @param array $hierarchyConfig Hierarchy configuration */ public function __construct( Router $router, Loader $loader, - SearchService $ss + SearchService $ss, + $hierarchyConfig ) { $this->router = $router; $this->recordLoader = $loader; $this->searchService = $ss; + $this->hierarchyConfig = $hierarchyConfig; + } + + /** + * Get child record search url + * + * @param \VuFind\RecordDriver\AbstractBase $driver + * + * @return string + * @access public + */ + public function getChildRecordSearchUrl($driver) + { + if (isset($this->hierarchyConfig['omitDefaultFiltersInChildSearch']) + && $this->hierarchyConfig['omitDefaultFiltersInChildSearch']) { + return (parent::getChildRecordSearchUrl($driver)) + . '&dfApplied=1'; + } + return parent::getChildRecordSearchUrl($driver); } /** diff --git a/module/finc/src/finc/View/Helper/Root/SideFacet.php b/module/finc/src/finc/View/Helper/Root/SideFacet.php index d0584faa8d42699181898011ac9df0513eb6b49b..240b5abd29b89c68c0424847ccf0df155a639a4c 100644 --- a/module/finc/src/finc/View/Helper/Root/SideFacet.php +++ b/module/finc/src/finc/View/Helper/Root/SideFacet.php @@ -29,6 +29,8 @@ */ namespace finc\View\Helper\Root; +use Zend\View\Helper\AbstractHelper; + /** * Permissions view helper * @@ -39,7 +41,7 @@ namespace finc\View\Helper\Root; * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link https://vufind.org/wiki/development Wiki */ -class SideFacet extends \Zend\View\Helper\AbstractHelper +class SideFacet extends AbstractHelper { /** * VuFind configuration diff --git a/module/finc/tests/unit-tests/src/fincTest/Resolver/Driver/EzbTest.php b/module/finc/tests/unit-tests/src/fincTest/Resolver/Driver/EzbTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9841f6a87386e6af50723c016e0f1b1186185313 --- /dev/null +++ b/module/finc/tests/unit-tests/src/fincTest/Resolver/Driver/EzbTest.php @@ -0,0 +1,101 @@ +<?php +/** + * Finc Resolver Ezb Test Class + * + * PHP version 5 + * + * Copyright (C) Leipzig University Library 2017. + * + * 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. + * + * @category Finc + * @package Tests + * @author Robert Lange <lange@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development:testing:unit_tests Wiki + */ +namespace FincTest\Resolver\Driver\Root; + +use Zend\Http\Client\Adapter\Test as TestAdapter; +use finc\Resolver\Driver\Ezb; + +/** + * Finc Resolver Redi Test Class + * + * @category Finc + * @package Tests + * @author Robert Lange <lange@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development:testing:unit_tests Wiki + */ +class EzbTest extends \VuFindTest\Resolver\Driver\EzbTest +{ + protected $adapter; + protected $client; + + protected function initEmpty() + { + $this->adapter = new TestAdapter(); + $this->client = new \Zend\Http\Client(); + $this->client->setAdapter($this->adapter); + } + + protected function getInstance($baseUrl = false) + { + $this->initEmpty(); + return $ezb = new Ezb( + $baseUrl !== false ? (object) ['url' => $baseUrl] : (object) $this->openUrlConfig['OpenURL'], + $this->client + ); + } + + public function testGetResolverUrl() + { + $openUrl = "x=1&y=2"; + $this->assertEquals( + "{$this->openUrlConfig['OpenURL']['url']}?$openUrl", + $this->getInstance()->getResolverUrl($openUrl) + ); + } + + public function testGetResolverUrlWithQuestionMarkInBaseUrl() + { + $baseUrl = "{$this->openUrlConfig['OpenURL']['url']}?site=xyz"; + $openUrl = "x=1&y=2"; + $this->assertEquals("$baseUrl&$openUrl", $this->getInstance($baseUrl)->getResolverUrl($openUrl)); + } + + public function testGetResolverUrlNoParams() + { + $this->assertEquals($this->openUrlConfig['OpenURL']['url'], $this->getInstance()->getResolverUrl("")); + } + + public function testEmptyBaseUrlException() + { + $this->expectException(\Zend\Config\Exception\InvalidArgumentException::class); + $this->getInstance("")->getResolverUrl("xyz"); + } + + public function testRemoveLeadingConnectorFromOpenUrl() + { + $baseUrl = "http://services.dnb.de/fize-service/gvr/full.xml"; + $openUrl = "&x=1&y=2"; + $this->assertEquals( + "http://services.dnb.de/fize-service/gvr/full.xml?x=1&y=2", + $this->getInstance($baseUrl)->getResolverUrl($openUrl) + ); + + $openUrl = "?x=1&y=2"; + $this->assertEquals( + "http://services.dnb.de/fize-service/gvr/full.xml?x=1&y=2", + $this->getInstance($baseUrl)->getResolverUrl($openUrl) + ); + } +} diff --git a/module/finc/tests/unit-tests/src/fincTest/Resolver/Driver/RediTest.php b/module/finc/tests/unit-tests/src/fincTest/Resolver/Driver/RediTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0d375d90e760927d32d70d158b49908de154b2c9 --- /dev/null +++ b/module/finc/tests/unit-tests/src/fincTest/Resolver/Driver/RediTest.php @@ -0,0 +1,94 @@ +<?php +/** + * Finc Resolver Redi Test Class + * + * PHP version 5 + * + * Copyright (C) Leipzig University Library 2017. + * + * 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. + * + * @category Finc + * @package Tests + * @author Robert Lange <lange@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development:testing:unit_tests Wiki + */ +namespace FincTest\Resolver\Driver\Root; + +use Zend\Http\Client\Adapter\Test as TestAdapter; +use finc\Resolver\Driver\Redi; + +/** + * Finc Resolver Redi Test Class + * + * @category Finc + * @package Tests + * @author Robert Lange <lange@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development:testing:unit_tests Wiki + */ +class RediTest extends \VuFindTest\Resolver\Driver\RediTest +{ + protected $adapter; + protected $client; + + protected function initEmpty() + { + $this->adapter = new TestAdapter(); + $this->client = new \Zend\Http\Client(); + $this->client->setAdapter($this->adapter); + } + + protected function getInstance($baseUrl = false) + { + $this->initEmpty(); + return $redi = new Redi( + $baseUrl !== false ? $baseUrl : $this->openUrlConfig['OpenURL']['url'], + $this->client + ); + } + + public function testGetResolverUrl() + { + $openUrl = "x=1&y=2"; + $this->assertEquals( + "{$this->openUrlConfig['OpenURL']['url']}?$openUrl", + $this->getInstance()->getResolverUrl($openUrl) + ); + } + + public function testGetResolverUrlWithQuestionMarkInBaseUrl() + { + $baseUrl = "{$this->openUrlConfig['OpenURL']['url']}?site=xyz"; + $openUrl = "x=1&y=2"; + $this->assertEquals("$baseUrl&$openUrl", $this->getInstance($baseUrl)->getResolverUrl($openUrl)); + } + + public function testGetResolverUrlNoParams() + { + $this->assertEquals($this->openUrlConfig['OpenURL']['url'], $this->getInstance()->getResolverUrl("")); + } + + public function testGetResolverUrlWHZ() + { + $openUrl = "rl_site=whz&issn=1941-9511"; + $this->assertEquals( + "http://www.redi-bw.de/links/whz?rl_site=whz&rl_site=whz&issn=1941-9511", + $this->getInstance("http://www.redi-bw.de/links/whz?rl_site=whz")->getResolverUrl($openUrl) + ); + } + + public function testEmptyBaseUrlException() + { + $this->expectException(\Zend\Config\Exception\InvalidArgumentException::class); + $this->getInstance("")->getResolverUrl(""); + } +} diff --git a/module/finc/tests/unit-tests/src/fincTest/View/Helper/Root/OpenUrlTest.php b/module/finc/tests/unit-tests/src/fincTest/View/Helper/Root/OpenUrlTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6866f6c4b789da801a6c8430e86b4645bddc2a66 --- /dev/null +++ b/module/finc/tests/unit-tests/src/fincTest/View/Helper/Root/OpenUrlTest.php @@ -0,0 +1,270 @@ +<?php +/** + * Open Url Test Class + * + * PHP version 5 + * + * Copyright (C) Leipzig University Library 2017. + * + * 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 Finc + * @package Tests + * @author Robert Lange <lange@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development:testing:unit_tests Wiki + */ +namespace FincTest\View\Helper\Root; + +use finc\View\Helper\Root\OpenUrl; + +/** + * Open Url Test Class + * + * @category Finc + * @package Tests + * @author Robert Lange <lange@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development:testing:unit_tests Wiki + */ +class OpenUrlTest extends \VuFindTest\View\Helper\Root\OpenUrlTest +{ + const ISSN = 456; + const OPEN_URL = "open=url"; + const ZDB_ID = 123; + + public function testAddCustomParamsNoParams() + { + $instance = $this->getInstance(); + $nonConfigParams = "key1=value1&foo=bar&key2=value2"; + $this->assertEquals("{$nonConfigParams}", $instance->addCustomParams('Ezb', $nonConfigParams)); + $this->assertEquals("{$nonConfigParams}", $instance->addCustomParams('Redi', $nonConfigParams)); + } + + public function testAddCustomStaticParamsForEzb() + { + $config = $this->getBaseConfigObject(); + $config->General->active_resolvers = 'Ezb, Redi'; + $config->Ezb->custom_params = ['foo:bar']; + $instance = $this->getInstance($config); + $nonConfigParams = "key1=value1&key2=value2"; + $this->assertEquals("{$nonConfigParams}&foo=bar", $instance->addCustomParams('Ezb', $nonConfigParams)); + $this->assertEquals("{$nonConfigParams}", $instance->addCustomParams('Redi', $nonConfigParams)); + } + + public function testDONTOverrideExistingParamsForEzb() + { + $config = $this->getBaseConfigObject(); + $config->General->active_resolvers = 'Ezb, Redi'; + $config->Ezb->custom_params = ['foo:bar']; + $instance = $this->getInstance($config); + $nonConfigParams = "key1=value1&foo=bar&key2=value2"; + $this->assertEquals("{$nonConfigParams}", $instance->addCustomParams('Ezb', $nonConfigParams)); + $this->assertEquals("{$nonConfigParams}", $instance->addCustomParams('Redi', $nonConfigParams)); + } + + public function testAddCustomStaticParamsForRedi() + { + $config = $this->getBaseConfigObject(); + $config->General->active_resolvers = 'Ezb, Redi'; + $config->Redi->custom_params = ['foo:bar']; + $instance = $this->getInstance($config); + $nonConfigParams = "key1=value1&key2=value2"; + $this->assertEquals("{$nonConfigParams}", $instance->addCustomParams('Ezb', $nonConfigParams)); + $this->assertEquals("{$nonConfigParams}&foo=bar", $instance->addCustomParams('Redi', $nonConfigParams)); + } + + public function testDONTOverrideExistingParamsForRedi() + { + $config = $this->getBaseConfigObject(); + $config->General->active_resolvers = 'Ezb, Redi'; + $config->Redi->custom_params = ['foo:bar']; + $instance = $this->getInstance($config); + $nonConfigParams = "key1=value1&foo=bar&key2=value2"; + $this->assertEquals("{$nonConfigParams}", $instance->addCustomParams('Ezb', $nonConfigParams)); + $this->assertEquals("{$nonConfigParams}", $instance->addCustomParams('Redi', $nonConfigParams)); + } + + public function testAddCustomDynamicParamsForEzb() + { + $config = $this->getBaseConfigObject(); + $config->General->active_resolvers = 'Ezb, Redi'; + $config->Ezb->custom_params = ['zdbid:getZdbId']; + $instance = $this->getInstance($config); + $nonConfigParams = "key1=value1&foo=bar&key2=value2"; + + $this->assertEquals( + "{$nonConfigParams}&zdbid=" . self::ZDB_ID, + $instance->addCustomParams('Ezb', $nonConfigParams) + ); + $this->assertEquals("{$nonConfigParams}", $instance->addCustomParams('Redi', $nonConfigParams)); + } + + public function testAddCustomDynamicParamsForRedi() + { + $config = $this->getBaseConfigObject(); + $config->General->active_resolvers = 'Ezb, Redi'; + $config->Redi->custom_params = ['issn:getCleanISSN']; + $instance = $this->getInstance($config); + $nonConfigParams = "key1=value1&foo=bar&key2=value2"; + + $this->assertEquals( + "{$nonConfigParams}&issn=" . self::ISSN, + $instance->addCustomParams('Redi', $nonConfigParams) + ); + $this->assertEquals("{$nonConfigParams}", $instance->addCustomParams('Ezb', $nonConfigParams)); + } + + public function testValidateParamsEzbFalse() + { + $this->rulesConfig['Ezb'] = [0 => ['include' => ["methods" => "getSourceID"]]]; + $instance = $this->getInstance(); + + $this->assertFalse($instance->isActive()); + } + + public function testValidateParamsEzbTrue() + { + $this->rulesConfig['Ezb'] = [0 => ['include' => ["methods" => "getSourceID"]]]; + $instanceWithIssn = $this->getInstance(false, true, false); + $this->assertTrue($instanceWithIssn->isActive()); + + $instanceWithZdbId = $this->getInstance(false, false, true); + $this->assertTrue($instanceWithZdbId->isActive()); + + $instanceWithIssnAndZdbId = $this->getInstance(false, true, true); + $this->assertTrue($instanceWithIssnAndZdbId->isActive()); + } + + /* + Helper Functions + */ + + /** + * @param bool $config + * @param bool $recordHasIssn + * @param bool $recordHasZdbId + * @return \finc\View\Helper\Root\OpenUrl + */ + protected function getInstance($config = false, $recordHasIssn = false, $recordHasZdbId = false) + { + if (empty($config)) { + $config = $this->getBaseConfigObject(); + } + $driver = $this->getBasicFincMockDriver('finc\RecordDriver\SolrDefault', $recordHasIssn, $recordHasZdbId); + $context = new \VuFind\View\Helper\Root\Context(); + $openUrlClazz = new OpenUrl($context, $this->rulesConfig, $config); + $openUrlClazz->__invoke($driver, "results"); + + return $openUrlClazz; + } + + /** + * Get mock driver that returns an openURL. + * + * @param string $class Class to mock + * + * @param bool $hasIssn + * @param bool $hasZdbId + * @return \PHPUnit_Framework_MockObject_MockObject + */ + protected function getBasicFincMockDriver( + $class = 'finc\RecordDriver\SolrDefault', + $hasIssn = false, + $hasZdbId = false + ) { + $driver = $this->getMockBuilder($class) + ->disableOriginalConstructor()->getMock(); + + $driver->method('tryMethod') + ->will($this->returnCallback(array($this, 'getCallback'))); + + $driver->method('getOpenUrl') + ->willReturn(self::OPEN_URL); + + if ($hasIssn) { + $driver->method('getCleanISSN') + ->willReturn(self::ISSN); + } + + if ($hasZdbId) { + $driver->method('getZdbId') + ->willReturn(self::ZDB_ID); + } + + return $driver; + } + + public function getCallback($foo) + { + if ($foo == "getZdbId") { + return self::ZDB_ID; + } + + if ($foo == "getCleanISSN") { + return self::ISSN; + } + + return null; + } + + protected function getBaseConfigObject() + { + $openUrlConfig = [ + 'OpenURL' => [ + 'url' => "http://services.d-nb.de/fize-service/gvr/full.xml", + 'rfr_id' => "www.ub.uni-leipzig.de", + 'resolver' => "ezb", + 'window_settings' => "toolbar=no", + 'show_in_results' => false, + 'show_in_record' => false, + 'show_in_holdings' => true, + 'embed' => true, + 'replace_other_urls' => true + ], + ]; + + $config = [ + 'General' => [ + 'active_resolvers' => 'Ezb, Redi' + ], + 'Redi' => [ + 'url' => 'http://www.redi-bw.de/links/whz', + 'resolver' => 'redi', + ], + 'Ezb' => [ + 'url' => 'http://services.dnb.de/fize-service/gvr/full.xml', + 'resolver' => 'ezb', + ], + 'openUrlConfig' => $openUrlConfig + ]; + + return $this->arrayToObject($config); + } + + public function arrayToObject($array) + { + $obj = new \stdClass(); + foreach ($array as $k => $v) { + if (strlen($k)) { + if (is_array($v)) { + $obj->{$k} = $this->arrayToObject($v); //RECURSION + } else { + $obj->{$k} = $v; + } + } + } + return $obj; + } +} diff --git a/package-lock.json b/npm-shrinkwrap.json similarity index 85% rename from package-lock.json rename to npm-shrinkwrap.json index 5cf49c26ec74e7aed60b18b079e1c63de3c299c9..4e02f6dd33299116f1cdac0fec181cd4ff222c15 100644 --- a/package-lock.json +++ b/npm-shrinkwrap.json @@ -1,6 +1,6 @@ { "name": "vufind", - "version": "4.1.3", + "version": "5.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -49,22 +49,6 @@ "readable-stream": "2.3.3" } }, - "argparse": { - "version": "0.1.16", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-0.1.16.tgz", - "integrity": "sha1-z9AeD7uj1srtBJ+9dY1A9lGW9Xw=", - "requires": { - "underscore": "1.7.0", - "underscore.string": "2.4.0" - }, - "dependencies": { - "underscore.string": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.4.0.tgz", - "integrity": "sha1-jN2PusTi0uoefi6Al8QvRCKA+Fs=" - } - } - }, "array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", @@ -86,11 +70,6 @@ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" }, - "async": { - "version": "0.1.22", - "resolved": "https://registry.npmjs.org/async/-/async-0.1.22.tgz", - "integrity": "sha1-D8GqoIig4+8Ovi2IMbqw3PiEUGE=" - }, "async-foreach": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz", @@ -206,15 +185,23 @@ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, - "coffee-script": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.3.3.tgz", - "integrity": "sha1-FQ1rTLUiiUNp7+1qIQHCC8f0pPQ=" + "coffeescript": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-1.10.0.tgz", + "integrity": "sha1-56qDAZF+9iGzXYo580jc3R234z4=" + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } }, - "colors": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", - "integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w=" + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "combined-stream": { "version": "1.0.5", @@ -301,11 +288,6 @@ "assert-plus": "1.0.0" } }, - "dateformat": { - "version": "1.0.2-1.2.3", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.2-1.2.3.tgz", - "integrity": "sha1-sCIMAt6YYXQztyhRz0fePfLNvuk=" - }, "debug": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz", @@ -367,11 +349,6 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, - "esprima": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz", - "integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0=" - }, "eventemitter2": { "version": "0.4.14", "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", @@ -417,40 +394,6 @@ "pinkie-promise": "2.0.1" } }, - "findup-sync": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.1.3.tgz", - "integrity": "sha1-fz56l7gjksZTvwZYm9hRkOk8NoM=", - "requires": { - "glob": "3.2.11", - "lodash": "2.4.2" - }, - "dependencies": { - "glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz", - "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=", - "requires": { - "inherits": "2.0.3", - "minimatch": "0.3.0" - } - }, - "lodash": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", - "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=" - }, - "minimatch": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", - "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=", - "requires": { - "lru-cache": "2.7.3", - "sigmund": "1.0.1" - } - } - } - }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -539,6 +482,7 @@ "version": "3.1.21", "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", + "dev": true, "requires": { "graceful-fs": "1.2.3", "inherits": "1.0.2", @@ -548,7 +492,8 @@ "inherits": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", - "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=" + "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=", + "dev": true } } }, @@ -593,33 +538,245 @@ "graceful-fs": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", - "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=" + "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=", + "dev": true }, "grunt": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/grunt/-/grunt-0.4.5.tgz", - "integrity": "sha1-VpN81RlDJK3/bSB2MYMqnWuk5/A=", - "requires": { - "async": "0.1.22", - "coffee-script": "1.3.3", - "colors": "0.6.2", - "dateformat": "1.0.2-1.2.3", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.0.3.tgz", + "integrity": "sha512-/JzmZNPfKorlCrrmxWqQO4JVodO+DVd5XX4DkocL/1WlLlKVLE9+SdEIempOAxDhWPysLle6afvn/hg7Ck2k9g==", + "requires": { + "coffeescript": "1.10.0", + "dateformat": "1.0.12", "eventemitter2": "0.4.14", "exit": "0.1.2", - "findup-sync": "0.1.3", - "getobject": "0.1.0", - "glob": "3.1.21", - "grunt-legacy-log": "0.1.3", - "grunt-legacy-util": "0.2.0", - "hooker": "0.2.3", - "iconv-lite": "0.2.11", - "js-yaml": "2.0.5", - "lodash": "0.9.2", - "minimatch": "0.2.14", - "nopt": "1.0.10", - "rimraf": "2.2.8", - "underscore.string": "2.2.1", - "which": "1.0.9" + "findup-sync": "0.3.0", + "glob": "7.0.6", + "grunt-cli": "1.2.0", + "grunt-known-options": "1.1.0", + "grunt-legacy-log": "2.0.0", + "grunt-legacy-util": "1.1.1", + "iconv-lite": "0.4.24", + "js-yaml": "3.5.5", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "nopt": "3.0.6", + "path-is-absolute": "1.0.1", + "rimraf": "2.6.3" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.3" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "1.0.3" + }, + "dependencies": { + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + } + } + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.5.0" + } + }, + "colors": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=" + }, + "dateformat": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", + "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=", + "requires": { + "get-stdin": "4.0.1", + "meow": "3.7.0" + } + }, + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=" + }, + "findup-sync": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz", + "integrity": "sha1-N5MKpdgWt3fANEXhlmzGeQpMCxY=", + "requires": { + "glob": "5.0.15" + }, + "dependencies": { + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + } + } + }, + "glob": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", + "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "grunt-legacy-log": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-2.0.0.tgz", + "integrity": "sha512-1m3+5QvDYfR1ltr8hjiaiNjddxGdQWcH0rw1iKKiQnF0+xtgTazirSTGu68RchPyh1OBng1bBUjLmX8q9NpoCw==", + "requires": { + "colors": "1.1.2", + "grunt-legacy-log-utils": "2.0.1", + "hooker": "0.2.3", + "lodash": "4.17.11" + } + }, + "grunt-legacy-log-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.0.1.tgz", + "integrity": "sha512-o7uHyO/J+i2tXG8r2bZNlVk20vlIFJ9IEYyHMCQGfWYru8Jv3wTqKZzvV30YW9rWEjq0eP3cflQ1qWojIe9VFA==", + "requires": { + "chalk": "2.4.2", + "lodash": "4.17.11" + } + }, + "grunt-legacy-util": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-1.1.1.tgz", + "integrity": "sha512-9zyA29w/fBe6BIfjGENndwoe1Uy31BIXxTH3s8mga0Z5Bz2Sp4UCjkeyv2tI449ymkx3x26B+46FV4fXEddl5A==", + "requires": { + "async": "1.5.2", + "exit": "0.1.2", + "getobject": "0.1.0", + "hooker": "0.2.3", + "lodash": "4.17.11", + "underscore.string": "3.3.5", + "which": "1.3.1" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": "2.1.2" + } + }, + "js-yaml": { + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.5.5.tgz", + "integrity": "sha1-A3fDgBfKvHMisNH7zSWkkWQfL74=", + "requires": { + "argparse": "1.0.10", + "esprima": "2.7.3" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.8" + } + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "requires": { + "abbrev": "1.1.1" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "requires": { + "glob": "7.1.3" + }, + "dependencies": { + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + } + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "3.0.0" + } + }, + "underscore.string": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.5.tgz", + "integrity": "sha512-g+dpmgn+XBneLmXXo+sGlW5xQEt4ErkS3mgeN2GFbremYeMBSJKr9Wf2KJplQVaiPY/f7FN6atosWYNm9ovrYg==", + "requires": { + "sprintf-js": "1.1.2", + "util-deprecate": "1.0.2" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "2.0.0" + } + } } }, "grunt-cli": { @@ -753,66 +910,6 @@ "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-1.1.0.tgz", "integrity": "sha1-pCdO6zL6dl2lp6OxcSYXzjsUQUk=" }, - "grunt-legacy-log": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-0.1.3.tgz", - "integrity": "sha1-7ClCboAwIa9ZAp+H0vnNczWgVTE=", - "requires": { - "colors": "0.6.2", - "grunt-legacy-log-utils": "0.1.1", - "hooker": "0.2.3", - "lodash": "2.4.2", - "underscore.string": "2.3.3" - }, - "dependencies": { - "lodash": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", - "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=" - }, - "underscore.string": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz", - "integrity": "sha1-ccCL9rQosRM/N+ePo6Icgvcymw0=" - } - } - }, - "grunt-legacy-log-utils": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-0.1.1.tgz", - "integrity": "sha1-wHBrndkGThFvNvI/5OawSGcsD34=", - "requires": { - "colors": "0.6.2", - "lodash": "2.4.2", - "underscore.string": "2.3.3" - }, - "dependencies": { - "lodash": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", - "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=" - }, - "underscore.string": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz", - "integrity": "sha1-ccCL9rQosRM/N+ePo6Icgvcymw0=" - } - } - }, - "grunt-legacy-util": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-0.2.0.tgz", - "integrity": "sha1-kzJIhNv343qf98Am3/RR2UqeVUs=", - "requires": { - "async": "0.1.22", - "exit": "0.1.2", - "getobject": "0.1.0", - "hooker": "0.2.3", - "lodash": "0.9.2", - "underscore.string": "2.2.1", - "which": "1.0.9" - } - }, "grunt-less-to-sass": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/grunt-less-to-sass/-/grunt-less-to-sass-0.0.10.tgz", @@ -860,6 +957,11 @@ "ansi-regex": "2.1.1" } }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, "has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", @@ -901,11 +1003,6 @@ "sshpk": "1.13.1" } }, - "iconv-lite": { - "version": "0.2.11", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz", - "integrity": "sha1-HOYKOleGSiktEyH/RgnKS7llrcg=" - }, "image-size": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.4.0.tgz", @@ -1008,15 +1105,6 @@ "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.3.2.tgz", "integrity": "sha512-Y2/+DnfJJXT1/FCwUebUhLWb3QihxiSC42+ctHLGogmW2jPY6LCapMdFZXRvVP2z6qyKW7s6qncE/9gSqZiArw==" }, - "js-yaml": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-2.0.5.tgz", - "integrity": "sha1-olrmUJmZ6X3yeMZxnaEb0Gh3Q6g=", - "requires": { - "argparse": "0.1.16", - "esprima": "1.0.4" - } - }, "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", @@ -1099,11 +1187,6 @@ } } }, - "lodash": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-0.9.2.tgz", - "integrity": "sha1-jzSZxSRdNG1oLlsNO0B2fgnxqSw=" - }, "lodash.assign": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", @@ -1126,7 +1209,8 @@ "lru-cache": { "version": "2.7.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", - "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=" + "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", + "dev": true }, "map-obj": { "version": "1.0.1", @@ -1180,6 +1264,7 @@ "version": "0.2.14", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", + "dev": true, "requires": { "lru-cache": "2.7.3", "sigmund": "1.0.1" @@ -1310,14 +1395,6 @@ } } }, - "nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", - "requires": { - "abbrev": "1.1.1" - } - }, "noptify": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/noptify/-/noptify-0.0.3.tgz", @@ -1615,6 +1692,11 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", "integrity": "sha1-iTMSr2myEj3vcfV4iQAWce6yyFM=" }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, "sass-graph": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", @@ -1691,7 +1773,8 @@ "sigmund": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", - "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=" + "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", + "dev": true }, "signal-exit": { "version": "3.0.2", @@ -1730,6 +1813,11 @@ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=" }, + "sprintf-js": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==" + }, "sshpk": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", @@ -1854,16 +1942,6 @@ "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", "optional": true }, - "underscore": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", - "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=" - }, - "underscore.string": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.2.1.tgz", - "integrity": "sha1-18D6KvXVoaZ/QlPa7pgTLnM/Dxk=" - }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", diff --git a/themes/bootstrap3/scss/components/offcanvas.scss b/themes/bootstrap3/scss/components/offcanvas.scss index e52919d0bd8059e7acef3cbf4747c03d4d14105d..020b7c0d3977a352fccb51376290405a038f44a8 100644 --- a/themes/bootstrap3/scss/components/offcanvas.scss +++ b/themes/bootstrap3/scss/components/offcanvas.scss @@ -2,10 +2,12 @@ $offcanvas-offset: 80vw !default; // Width of open menu .offcanvas-overlay { display: none; } +// Fix you-cannot-extend-from-inside-media-query error: +// Since .search-filter-toggle is only used on XS devices anyway, +// we can move the @extend outside the media query -- CK #14674 .search-filter-toggle { - /*@extend .btn; + @extend .btn; @extend .btn-default; - */ margin-top: 1rem; margin-bottom: 1rem; } @@ -24,16 +26,6 @@ $offcanvas-offset: 80vw !default; // Width of open menu } .offcanvas .close-offcanvas { display: block; } - .search-filter-toggle { - /* refs #14565 uncommented by vf 5.1 update - grunt says that you may not @extend an outer selector from within @media. - @to-do fixing bug - @extend .btn; - @extend .btn-default; - */ - margin-top: 1rem; - margin-bottom: 1rem; - } body.offcanvas { overflow-x: hidden; /* Prevent scroll on narrow devices */ diff --git a/themes/bootstrap3/templates/myresearch/bulk-action-buttons.phtml b/themes/bootstrap3/templates/myresearch/bulk-action-buttons.phtml index c45b65be814f752315ead128e55978daa25fcac0..5faab89bab08a6b54ab8b691dba047df130846cc 100644 --- a/themes/bootstrap3/templates/myresearch/bulk-action-buttons.phtml +++ b/themes/bootstrap3/templates/myresearch/bulk-action-buttons.phtml @@ -1,6 +1,6 @@ -<?php if (isset($list)): ?> - <input type="hidden" name="listID" value="<?=$this->escapeHtmlAttr($list->id)?>" /> - <input type="hidden" name="listName" value="<?=$this->escapeHtmlAttr($list->title)?>" /> +<?php if (isset($locations)): ?> + <input type="hidden" name="listID" value="<?=$this->escapeHtmlAttr($locations->id)?>" /> + <input type="hidden" name="listName" value="<?=$this->escapeHtmlAttr($locations->title)?>" /> <?php endif; ?> <?php $user = $this->auth()->isLoggedIn(); ?> <div class="bulkActionButtons"> diff --git a/themes/finc-fid/theme.config.php b/themes/finc-fid/theme.config.php new file mode 100644 index 0000000000000000000000000000000000000000..34952145d067dfd81ea5eb8b1622249d7b038716 --- /dev/null +++ b/themes/finc-fid/theme.config.php @@ -0,0 +1,28 @@ +<?php +/** + * Copyright (C) 2019 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 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. + * + * @author Sebastian Kehr <kehr@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU GPLv2 + */ + +return [ + 'extends' => 'finc', + 'mixins' => [ + 'finc-fid-core', + 'finc-fid-registration' + ], +]; \ No newline at end of file diff --git a/themes/finc/css/print.css b/themes/finc/css/print.css deleted file mode 100644 index 44619cbd04d07d6ceedf181902d6e37f4af1b998..0000000000000000000000000000000000000000 --- a/themes/finc/css/print.css +++ /dev/null @@ -1 +0,0 @@ -*{background-color:#FFF;color:#000}a[href]:after{content:''}.container{margin:0}.hidden-print,.hidden-print *{display:none !important}@media print{body{padding:0}.main .container,.main .container-fluid,footer .container{border:0}.search-results-col{width:100%}.media-body .middle{width:88%}.print-full-width{width:85%}.info-col table{border:0}.record[class^='source']{border:0}.record-tabs li:not(.active){display:none}.record-tabs .table{border:0}.tab-content>.active{display:inline}.result:nth-of-type(2n){background-color:#fff}} diff --git a/themes/finc/js/check_item_statuses.js b/themes/finc/js/check_item_statuses.js index 8741775e9b40a808c20a1fe7c67f5fc2f18f00d8..50ac88dea84ba00615607a8bf73a1944eeacd43a 100644 --- a/themes/finc/js/check_item_statuses.js +++ b/themes/finc/js/check_item_statuses.js @@ -17,7 +17,17 @@ function displayItemStatus(result, $item) { $item.removeClass('js-item-pending'); $item.find('.status').empty().append(result.availability_message); $item.find('.ajax-availability').removeClass('ajax-availability hidden'); - if (typeof(result.full_status) != 'undefined' + if (typeof(result.error) != 'undefined' + && result.error.length > 0 + ) { + // Only show error message if we also have a status indicator active: + if ($item.find('.status').length > 0) { + $item.find('.callnumAndLocation').empty().addClass('text-danger').append(result.error); + } else { + $item.find('.callnumAndLocation').addClass('hidden'); + } + $item.find('.callnumber,.hideIfDetailed,.location').addClass('hidden'); + } else if (typeof(result.full_status) != 'undefined' && result.full_status.length > 0 && $item.find('.callnumAndLocation').length > 0 ) { @@ -57,7 +67,7 @@ function displayItemStatus(result, $item) { } $item.find('.locationDetails').removeClass('hidden'); $item.find('.locationDetails').html(locationListHTML); - // next three lines finc-specific, added in #5737, check functionality, CK + // next three lines finc-specific, added in #5737, check functionality, CK - Fixme 5.1 } else if (result.callnumber.length == 0 && result.location.length == 0) { // hide location and callnumber information if both are empty $item.find('.callnumAndLocation').addClass('hidden'); @@ -77,7 +87,8 @@ function itemStatusFail(response, textStatus) { return; } // display the error message on each of the ajax status place holder - $('.js-item-pending').addClass('text-danger').append(response.responseJSON.data); + $('.js-item-pending .callnumAndLocation').addClass('text-danger').empty().removeClass('hidden') + .append(typeof response.responseJSON.data === 'string' ? response.responseJSON.data : VuFind.translate('error_occurred')); } var itemStatusIds = []; @@ -100,9 +111,10 @@ function runItemAjaxForQueue() { data: {'id': itemStatusIds} }) .done(function checkItemStatusDone(response) { - for (var j = 0; j < response.data.length; j++) { - displayItemStatus(response.data[j], itemStatusEls[response.data[j].id]); - itemStatusIds.splice(itemStatusIds.indexOf(response.data[j].id), 1); + for (var j = 0; j < response.data.statuses.length; j++) { + var status = response.data.statuses[j]; + displayItemStatus(status, itemStatusEls[status.id]); + itemStatusIds.splice(itemStatusIds.indexOf(status.id), 1); } itemStatusRunning = false; }) @@ -121,6 +133,8 @@ function itemQueueAjax(id, el) { itemStatusEls[id] = el; itemStatusTimer = setTimeout(runItemAjaxForQueue, itemStatusDelay); el.addClass('js-item-pending').removeClass('hidden'); + el.find('.callnumAndLocation').removeClass('hidden'); + el.find('.callnumAndLocation .ajax-availability').removeClass('hidden'); el.find('.status').removeClass('hidden'); } @@ -133,10 +147,11 @@ function checkItemStatus(el) { itemQueueAjax(id + '', $item); } +var itemStatusObserver = null; function checkItemStatuses(_container) { - var container = _container instanceof Element - ? _container - : document.body; + var container = typeof _container === 'undefined' + ? document.body + : _container; var ajaxItems = $(container).find('.ajaxItem'); for (var i = 0; i < ajaxItems.length; i++) { @@ -148,8 +163,6 @@ function checkItemStatuses(_container) { itemStatusObserver.disconnect(); } } - -var itemStatusObserver = null; $(document).ready(function checkItemStatusReady() { if (typeof Hunt === 'undefined') { checkItemStatuses(); diff --git a/themes/finc/js/collection_record.js b/themes/finc/js/collection_record.js index 366be1cf3498f57e8fe23a75db7f6c3e06401148..5c085b9525facd53c22400ea0fecf4dca2a010d6 100644 --- a/themes/finc/js/collection_record.js +++ b/themes/finc/js/collection_record.js @@ -7,7 +7,7 @@ function showMoreInfoToggle() { if ($("#collectionInfo").find('tr').length < 1) { return; } - // finc: Keep Accordion OPEN on load + // finc-specific: Keep Accordion OPEN on load - CK // toggleCollectionInfo(); $("#moreInfoToggle").removeClass('hidden'); //$("#moreInfoToggle").click(function moreInfoToggleClick(e) { diff --git a/themes/finc/js/finc.js b/themes/finc/js/finc.js deleted file mode 100644 index 440877206e00b76e9ffda95037718e9ef5c3dd0a..0000000000000000000000000000000000000000 --- a/themes/finc/js/finc.js +++ /dev/null @@ -1,11 +0,0 @@ -// remove when fixed in BS, obsolete in VF5; also remove respective line in theme.config.php; CK - -// Remove/add aria-hidden + add modalTitle for screen-reader access, check of .focus() is necessary -$(document).on('shown.bs.modal', function () { - $('#modal').attr('aria-hidden', 'false').show().focus(); - $('#modal h2').attr('id', 'modalTitle'); -}); - -$(document).on('hidden.bs.modal', function () { - $('#modal').attr('aria-hidden', 'true').hide(); -}); diff --git a/themes/finc/js/hierarchyTree.js b/themes/finc/js/hierarchyTree.js index cc1ca90e4dcc9334b08c3777a8422f425cc8057d..d3db7ac718c594542dc9ee4c75afa837c372bc56 100644 --- a/themes/finc/js/hierarchyTree.js +++ b/themes/finc/js/hierarchyTree.js @@ -189,6 +189,7 @@ $(document).ready(function hierarchyTreeReady() { $("#hierarchyLoading").addClass('hide'); var tree = $("#hierarchyTree").jstree(true); tree.select_node(htmlID); + // finc-specific: opens full hierarchy tree by default #14067 - CK tree.open_all(); if (!inLightbox && hierarchyContext === "Collection") { @@ -237,7 +238,7 @@ $(document).ready(function hierarchyTreeReady() { }, types: { record: { - // remove file icon, insert via SCSS, CK + // finc-specific: remove file icon, insert via SCSS -- CK // icon: 'fa fa-file-o' }, collection: { diff --git a/themes/finc/js/openurl.js b/themes/finc/js/openurl.js index a103e375c61dc68a2ac4b7874a6f3b26e2197e24..32456f36e7c04290abecd394f11d02e837abd81a 100644 --- a/themes/finc/js/openurl.js +++ b/themes/finc/js/openurl.js @@ -14,7 +14,7 @@ VuFind.register('openurl', function OpenUrl() { url: url }) .done(function getResolverLinksDone(response) { - $target.removeClass('ajax_availability').empty().append(response.data); + $target.removeClass('ajax_availability').empty().append(response.data.html); }) .fail(function getResolverLinksFail(response, textStatus) { $target.removeClass('ajax_availability').addClass('text-danger').empty(); @@ -37,7 +37,7 @@ VuFind.register('openurl', function OpenUrl() { // Locate the target area for displaying the results: var target = controls.next('div.resolver'); - // finc-specific, #5334; To chose the right resolver we have to get the resolvertype: + // finc-specific, #5334; to chose the right resolver, we have to get the resolvertype: var resolvertype = element.children('span.resolvertype:first').attr('title'); // If the target is already visible, a previous click has populated it; diff --git a/themes/finc/js/sources-display.js b/themes/finc/js/sources-display.js index 10b718826607bae43807ac6e9c69fef9bfaae5de..7fe2902a9d273fb226f231ae235b93a57e1e9227 100644 --- a/themes/finc/js/sources-display.js +++ b/themes/finc/js/sources-display.js @@ -1,4 +1,5 @@ -// Collapse nearest element on clicl +// finc-specific file to list amsl resources on extra page etc, cf. #11004 - CK +// Collapse nearest element on click $('.collapse-toggler').click(function () { $(this).next().collapse('toggle'); }); diff --git a/themes/finc/scss/_customVariables.scss b/themes/finc/scss/_customVariables.scss index c3c5503d22532552f756116b32aaccd8a64e57cf..10b824ffaa5b9b4009d8a59ddca5eb403e22599e 100644 --- a/themes/finc/scss/_customVariables.scss +++ b/themes/finc/scss/_customVariables.scss @@ -23,6 +23,7 @@ $line-height-base: 1.5 !default; $brand-primary: #1779ba !default; $brand-secondary: #e7e7e7 !default; $brand-danger: #cc4b37 !default; // darker red = #a94442 +$brand-danger-transparent: transparentize($brand-danger, .1) !default; // used e.g. for invalid form fields $brand-info: #008cba !default; $brand-success: #43ac6a !default; // darker green = #3c763d $brand-warning: #f08a24 !default; diff --git a/themes/finc/scss/compiled.scss b/themes/finc/scss/compiled.scss index 87454c4e71d4defd49c79f74e11be084f9553b2c..f46adc1cd27fcdf62b82b0957e925cd63c49267f 100644 --- a/themes/finc/scss/compiled.scss +++ b/themes/finc/scss/compiled.scss @@ -65,6 +65,12 @@ section { // width: auto; // } // + +// Prevent content from jumping when changing tabs in record view +html { + overflow-y: scroll; +} + // Add top-padding to body to accommodate fixed navbar; -- padding should equal navbar-height -- // the home page, however, has a lower navbar because there is no breadcrumbs there body { @@ -83,6 +89,11 @@ body { @media (min-width: $screen-md-min) { padding-top: $navbar-height; } + + //// for print + @media print { + padding-top: 0; + } } // Collapse/Hide empty containers -- DO NOT INCLUDE span (dropdown carets are empty spans) NOR DIV (slider track handles) @@ -182,21 +193,6 @@ form { label { font-weight: normal; } - - // For INLINE, left-floated 'hits per page' and 'sort by' selectors use - &.limit, - &.search-sort { - float: left; - } - - &.limit { - margin-right: ($grid-gutter-width / 2); - } - - // limit the width of the select field if necessary - more select details below - &.sort select { - max-width: 12em; - } } //// Set max-width to make sure boxes don't bleed over the edge on XS (e.g. acquisitionpda, source_id:3 @@ -280,7 +276,32 @@ input[type='text'] { padding: ($grid-gutter-width / 4); } -//// Select - for limit and sort-select widths see above +// red-bordered input field, when empty, requires "form" for specifity, CK + +form { + // create enough space for red border + input:invalid, + textarea:invalid { + margin-right: 2px; + } + + input { + // show red border only when submitted empty or when in focus + &:invalid { + box-shadow: inherit; + } + + &:focus { + &:invalid, + &:required:invalid { + border-color: $brand-danger-transparent; + box-shadow: 0 0 2px 1px $brand-danger-transparent; + } + } + } +} + +//// Select - for limit and sort-select widths see below ////// remove browser styles on select boxes and add custom styles (below) select, select.form-control { @@ -415,28 +436,8 @@ select { .text-danger { background-color: $brand-danger; - padding: ($grid-gutter-width / 8); } -//// Off-Canvas -@media only screen and (max-width: $screen-xs-max) { - body.offcanvas .offcanvas-toggle { - background: transparentize($brand-primary, .2); - color: $white; - display: block; - height: auto; - line-height: normal; - padding: 1.5rem 0; - position: fixed; - text-align: center; - top: 50%; - width: calc(2em - 1px); - z-index: 5; - } -} - -//// Off-Canvas - END - //// DATE-RANGE slider (CSS is included in bootstrap-slider.min.css - currently no SCSS version!) ////// Keep enough room for slider handles; PLS note: there are sliders in sidefacets and adv. search .slider-container { @@ -547,6 +548,13 @@ table.collapse.in { width: $thumbnail-width-small; } } + + // push COVER down on SM and XS + .media-left { + @media only screen and (max-width: $screen-sm-max) { + margin-top: 15px; + } + } } //// Sprites for Mediaicons @@ -1024,6 +1032,7 @@ header, } } } + // Searchbox see below // Set max height for xs devices @@ -1175,19 +1184,45 @@ header, @media only screen and (min-width: $screen-sm-min) and (max-width: 994px) { flex: 0 1 75%; } + + // Float "Find" button next to searchbox on XS and SM + @media only screen and (max-width: $screen-sm-max) { + padding-left: 0; + + .searchForm { + display: flex; + + input { + flex-grow: 2; + flex-shrink: 2; + } + + .navbar { + flex-grow: 1; + flex-shrink: 1; + } + + // take out of flexbox flow + .checkbox { + position: absolute; + top: 40px; + } + } + } + } //// this will get search box and buttons in line -.searchForm { - .navbar-left { - // push searchbox down on mobile + add border for better looks - @media only screen and (max-width: $screen-xs-max) { - border: 1px solid $border-color; - margin-bottom: ($grid-gutter-width / 4); - margin-top: 0; - } + +.navbar-left { + // push searchbox down on mobile + @media only screen and (max-width: $screen-xs-max) { + margin-bottom: ($grid-gutter-width / 4); + margin-top: 0; } +} +.searchForm { .list-unstyled li { float: left; @@ -1200,6 +1235,10 @@ header, } } + input { + float: left; + } + // Keep filters, shards etc; apply same styles to checkboxes on HOME and all other pages, // therefore use .searchForm as parent .checkbox { @@ -1209,6 +1248,8 @@ header, input { margin-left: 0; + margin-right: .25rem; + margin-top: 0; } } @@ -1321,6 +1362,11 @@ footer { background-color: $main-bg; border: 1px solid $border-color; padding-bottom: $grid-gutter-width / 1.5; + + @media print { + border: 0; + padding: 0; + } } footer { @@ -1333,6 +1379,10 @@ footer { .mainbody, .sidebar { padding-top: $content-top-padding; + + @media only screen and (max-width: $screen-sm-max) { + padding-top: 0; + } } ////// Bulk Action Toolbar @@ -1342,11 +1392,64 @@ footer { padding-top: ($grid-gutter-width / 2); } +// SEARCH-CONTROLS +// remove flex display +.search-header { + display: block; +} + +.search-stats { + flex-grow: unset; +} + +.hit-stats { + clear: both; + float: none; +} + //// Push hits count down to align with limit and sort select boxes .hits-count { padding-top: .5em; } +// For INLINE, left-floated 'hits per page' and 'sort by' selectors use +.limit, +.search-sort { + float: left; +} + +.limit { + margin-right: ($grid-gutter-width / 2); + + @media only screen and (max-width: $screen-xs-max) { + float: right; + margin-bottom: 7px; + margin-right: 0; + } +} + +// limit the width of the select field if necessary - for more select details, see FORMS section above +.sort select { + max-width: 12em; +} + +//// Off-Canvas +@media only screen and (max-width: $screen-sm-max) { + // Define position of VF5.1 offcanvas toggler + .search-stats, + .search-controls { + clear: both; + } + + // Float this left for lefthand-side sidebar + .offcanvas-toogler { + float: right; + } +} + +//// Off-Canvas - END +// SEARCH CONTROLS - END + //// Search Results padding ////// pulled out via .search-results, use negative gutter-width divided by 2 ////// then add padding on results, to create normal column padding appearance @@ -1368,6 +1471,11 @@ footer { padding-bottom: ($grid-gutter-width / 2); width: 100%; // make full width, otherwise ugly look + // remove padding for print + @media print { + padding: 0; + } + // Alternating colors in search results &:nth-of-type(2n) { background-color: $brand-secondary; @@ -1397,7 +1505,8 @@ footer { .savedLists { &.alert { - color: $state-light-text-on-dark; } + color: $state-light-text-on-dark; + } ul { list-style: none; @@ -1414,6 +1523,12 @@ footer { .media-left { min-width: 16%; text-align: center; + + //// remove left padding for print + @media print { + padding-left: 0; + } + } } @@ -1449,6 +1564,10 @@ footer { .pagination, .searchtools { @include content-centered-display-as-table; + + @media print { + display: none; + } } //// Fix pagination on XS to display fewer items and remove first and last @@ -1466,6 +1585,25 @@ footer { } } +// Display searchtools-links as buttons on XS, SM +@media screen and (max-width: $screen-sm-max) { + .searchtools { + a { + background-color: $white; + border: 1px solid $iron; + color: $oil; + // align on top of each other + display: block; + margin-bottom: 5px; + padding: 6px 12px; + text-align: center; + touch-action: manipulation; + vertical-align: middle; + white-space: nowrap; + } + } +} + ////// Pagination & Searchtools - END //// Search results - END @@ -1542,7 +1680,7 @@ footer { font-size: 150%; margin-left: 0; margin-top: -5px; - min-width: 18px;// do not translate into em + min-width: 18px; // do not translate into em } li.jstree-facet, @@ -1598,7 +1736,6 @@ footer { } - ////// Hierarchy tree - END ////// Tabs - END @@ -1706,6 +1843,12 @@ footer { // MAIN CONTENT - END // SIDEBAR +@media only screen and (max-width: $screen-sm-max) { + .sidebar h4 { + text-align: center; + } +} + //// pull content to right border for sidebar right .container .sidebar { &.right { @@ -1862,6 +2005,7 @@ footer { } } +// Keep padding at 2px or "Add to Bookbag" in Record View will be out of line .nav .btn-bookbag-toggle a { padding-left: 2px; } diff --git a/themes/finc/scss/print.scss b/themes/finc/scss/print.scss new file mode 100644 index 0000000000000000000000000000000000000000..8206a48e875e07297fe82f2a324955db8a3ee5fd --- /dev/null +++ b/themes/finc/scss/print.scss @@ -0,0 +1,100 @@ +@import 'customVariables'; +@import 'customMixins'; + +* { + background-color: #FFF; + color: #000; +} + +// hide following urls +a[href]:after { + content: ''; +} + +// print margins +.container { + margin: 0; +} + +// print utilities +.hidden-print, +.hidden-print * { + display: none !important; +} + +//// Make full width for printing +@media print { + body { + padding: 0; + } + + .main .container, + .main .container-fluid, + footer .container { + border: 0; + } + + .search-results-col { + width: 100%; + + .record-icon { + display: none; + } + } + + .result-body { + width: 90%; + } + + .media-body { + line-height: 1.75; + + .middle { + width: 88%; + } + } + + .print-full-width { + width: 100%; + + .nav-tabs > li.active > a, + .tab-content, + .table { + border: 0; + } + + .holdings, + .description, + .details { + font-size: 120%; + font-weight: bold; + } + } + + .info-col table { + border: 0; + } + + .record[class^='source'] { + border: 0; + } + + .record-tabs li:not(.active) { + display: none; + } + + .record-tabs .table { + border: 0; + } + + .tab-content > .active { + display: inline; + } + + .result:nth-of-type(2n) { + background-color: $snow; + } + + .print-full-width {} + +} diff --git a/themes/finc/templates/Auth/AbstractBase/resetpassword.phtml b/themes/finc/templates/Auth/AbstractBase/resetpassword.phtml index 064e2e0e1a6f771fc961997f680e184f03e180cb..184e6745915cf88cb2a9eae328ec5838607aa931 100644 --- a/themes/finc/templates/Auth/AbstractBase/resetpassword.phtml +++ b/themes/finc/templates/Auth/AbstractBase/resetpassword.phtml @@ -1,10 +1,10 @@ -<!-- finc: auth - abstractbase - resetpassword (custom finc template)--> -<? /* compare with BS login templates in Auth during updates */ ?> -<? +<!-- finc: auth - abstractbase - resetpassword (custom finc template) --> +<?php /* compare with BS login templates in Auth during updates */ ?> +<?php // Set page title. $this->headTitle($this->translate('Reset Password')); ?> -<h2><?=$this->transEsc('Reset Password') ?></h2> +<h2><?=$this->transEsc('Reset Password')?></h2> <form method="post" name="resetPasswordForm" action="<?=$this->url('myresearch-resetpassword')?>"> <?=$this->flashmessages()?> <p> @@ -13,23 +13,23 @@ $this->headTitle($this->translate('Reset Password')); <div class="form-group"> <label class="control-label"><?=$this->transEsc('First Name')?>:</label> - <input type="text" class="form-control" name="firstname" <?=isset($firstname) ? 'value="'.$firstname.'" ' : ''?>required /> - </div> + <input type="text" class="form-control" name="firstname" <?=isset($firstname) ? 'value="' . $firstname . '" ' : ''?>required/> + </div> <div class="form-group"> <label class="control-label"><?=$this->transEsc('Last Name')?>:</label> - <input type="text" class="form-control" name="lastname" <?=isset($lastname) ? 'value="'.$lastname.'" ' : ''?>required/> - </div> + <input type="text" class="form-control" name="lastname" <?=isset($lastname) ? 'value="' . $lastname . '" ' : ''?>required/> + </div> <div class="form-group"> <label class="control-label"><?=$this->transEsc('Username')?>:</label> - <input type="text" class="form-control" name="username" <?=isset($username) ? 'value="'.$username.'" ' : ''?>required/> - </div> + <input type="text" class="form-control" name="username" <?=isset($username) ? 'value="' . $username . '" ' : ''?>required/> + </div> <div class="form-group"> <label class="control-label"><?=$this->transEsc('Email')?>:</label> - <input type="email" class="form-control" name="email" <?=isset($email) ? 'value="'.$email.'" ' : ''?>required/> - </div> - <?=$this->recaptcha()->html($this->useRecaptcha) ?> + <input type="email" class="form-control" name="email" <?=isset($email) ? 'value="' . $email . '" ' : ''?>required/> + </div> + <?=$this->recaptcha()->html($this->useRecaptcha)?> <div class="form-group"> - <input class="btn btn-transparent" name="submit" type="submit" aria-label="submit form" value="<?=$this->transEsc('recovery_title') ?>"/> - </div> + <input class="btn btn-transparent" name="submit" type="submit" aria-label="submit form" value="<?=$this->transEsc('recovery_title')?>"/> + </div> </form> <!-- finc: auth - abstractbase - resetpassword - END --> diff --git a/themes/finc/templates/Citation/apa.phtml b/themes/finc/templates/Citation/apa.phtml index 6597ea147cd1ad37e0c5ef6915ced934d0da8b3f..1b40871412d5660f64424006e504abf2eee26a38 100644 --- a/themes/finc/templates/Citation/apa.phtml +++ b/themes/finc/templates/Citation/apa.phtml @@ -1,9 +1,9 @@ -<? if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?> -<? if (!empty($this->year)): ?><? if (!empty($this->authors)): ?> <? endif; ?>(<?=$this->escapeHtml($this->year)?>). <? endif; ?> -<? endif; ?> -<i><?=$this->escapeHtml($this->title)?></i><? if ($this->periodAfterTitle): ?>. <? endif ?> -<? if (empty($this->authors)): ?> -<? if (!empty($this->year)): ?> (<?=$this->escapeHtml($this->year)?>). <? endif; ?> -<? endif; ?> -<? if (!empty($this->edition)): ?>(<?=$this->escapeHtml($this->edition)?>). <? endif; ?> -<? if (!empty($this->publisher)): ?><?=$this->escapeHtml($this->publisher)?>.<? endif; ?> +<?php if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?> + <?php if (!empty($this->year)): ?><?php if (!empty($this->authors)): ?><?php endif; ?>(<?=$this->escapeHtml($this->year)?>). <?php endif; ?> +<?php endif; ?> +<i><?=$this->escapeHtml($this->title)?></i><?php if ($this->periodAfterTitle): ?>. <?php endif ?> +<?php if (empty($this->authors)): ?> + <?php if (!empty($this->year)): ?> (<?=$this->escapeHtml($this->year)?>). <?php endif; ?> +<?php endif; ?> +<?php if (!empty($this->edition)): ?>(<?=$this->escapeHtml($this->edition)?>). <?php endif; ?> +<?php if (!empty($this->publisher)): ?><?=$this->escapeHtml($this->publisher)?>.<?php endif; ?> diff --git a/themes/finc/templates/Citation/apaai-article.phtml b/themes/finc/templates/Citation/apaai-article.phtml index f97da1bee41b95c06a0c5f2fb70ffbe4eb3728d3..cd69639c7db79bdfedd39f817f280b8f610a277b 100644 --- a/themes/finc/templates/Citation/apaai-article.phtml +++ b/themes/finc/templates/Citation/apaai-article.phtml @@ -1,7 +1,7 @@ -<? if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?> <? endif; ?> -<? if (!empty($this->year)): ?>(<?=$this->escapeHtml($this->year)?>). <? endif; ?> -<?=$this->escapeHtml($this->title)?><? if ($this->periodAfterTitle): ?>. <? endif ?> -<i><?=$this->escapeHtml($this->journal)?><? if (!empty($this->volume) || !empty($this->issue) || !empty($this->pageRange)): ?>, <? endif; ?> -<? if (!empty($this->volume)): ?><?=$this->escapeHtml($this->volume)?><? endif; ?></i><? if (!empty($this->issue)): ?>(<?=$this->escapeHtml($this->issue)?>)<? endif; ?> -<? if (!empty($this->volume) || !empty($this->issue)): ?>, <? endif; ?> -<? if (!empty($this->pageRange)): ?><?=$this->escapeHtml($this->pageRange)?>. <? if (isset($this->doi)): ?>doi:<?=$this->escapeHtml($this->doi)?><? endif; ?><? endif; ?> +<?php if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?><?php endif; ?> +<?php if (!empty($this->year)): ?>(<?=$this->escapeHtml($this->year)?>). <?php endif; ?> +<?=$this->escapeHtml($this->title)?><?php if ($this->periodAfterTitle): ?>. <?php endif ?> +<i><?=$this->escapeHtml($this->journal)?><?php if (!empty($this->volume) || !empty($this->issue) || !empty($this->pageRange)): ?>, <?php endif; ?> + <?php if (!empty($this->volume)): ?><?=$this->escapeHtml($this->volume)?><?php endif; ?></i><?php if (!empty($this->issue)): ?>(<?=$this->escapeHtml($this->issue)?>)<?php endif; ?> +<?php if (!empty($this->volume) || !empty($this->issue)): ?>, <?php endif; ?> +<?php if (!empty($this->pageRange)): ?><?=$this->escapeHtml($this->pageRange)?>. <?php if (isset($this->doi)): ?>doi:<?=$this->escapeHtml($this->doi)?><?php endif; ?><?php endif; ?> diff --git a/themes/finc/templates/Citation/apaai.phtml b/themes/finc/templates/Citation/apaai.phtml index 9d5af544c6aa5b5e31d102e52655fbc3b46a2fee..376c740b2725448c6631cabfb6650dd547f7182e 100644 --- a/themes/finc/templates/Citation/apaai.phtml +++ b/themes/finc/templates/Citation/apaai.phtml @@ -1,9 +1,9 @@ -<? if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?> -<? if (!empty($this->year)): ?>(<?=$this->escapeHtml($this->year)?>). <? endif; ?> -<? endif; ?> -<i><?=$this->escapeHtml($this->title)?></i><? if ($this->periodAfterTitle): ?>. <? endif ?> -<? if (empty($this->authors)): ?> -<? if (!empty($this->year)): ?>(<?=$this->escapeHtml($this->year)?>). <? endif; ?> -<? endif; ?> -<? if (!empty($this->edition)): ?>(<?=$this->escapeHtml($this->edition)?>). <? endif; ?> -<? if (!empty($this->publisher)): ?><?=$this->escapeHtml($this->publisher)?>.<? endif; ?> +<?php if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?> + <?php if (!empty($this->year)): ?>(<?=$this->escapeHtml($this->year)?>). <?php endif; ?> +<?php endif; ?> +<i><?=$this->escapeHtml($this->title)?></i><?php if ($this->periodAfterTitle): ?>. <?php endif ?> +<?php if (empty($this->authors)): ?> + <?php if (!empty($this->year)): ?>(<?=$this->escapeHtml($this->year)?>). <?php endif; ?> +<?php endif; ?> +<?php if (!empty($this->edition)): ?>(<?=$this->escapeHtml($this->edition)?>). <?php endif; ?> +<?php if (!empty($this->publisher)): ?><?=$this->escapeHtml($this->publisher)?>.<?php endif; ?> diff --git a/themes/finc/templates/Citation/isbd-article.phtml b/themes/finc/templates/Citation/isbd-article.phtml index d48629a9faa5705ad90000670fd8e159822ed5a7..a82ff2fc4eb88ab0622f86892cdce5ae24b884fa 100644 --- a/themes/finc/templates/Citation/isbd-article.phtml +++ b/themes/finc/templates/Citation/isbd-article.phtml @@ -1,5 +1,5 @@ -<? if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?>. <? endif; ?> -"<?=$this->title?><? if ($this->periodAfterTitle): ?>.<? endif ?>" +<?php if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?>. <?php endif; ?> +"<?=$this->title?><?php if ($this->periodAfterTitle): ?>.<?php endif ?>" <i><?=$this->escapeHtml($this->journal)?></i> -<? if (!empty($this->numberAndDate)): ?><?=$this->escapeHtml($this->numberAndDate)?><? if (!empty($this->pageRange)): ?>: <? endif; ?><? endif; ?> -<? if (!empty($this->pageRange)): ?><?=$this->escapeHtml($this->pageRange)?><? endif; ?>. +<?php if (!empty($this->numberAndDate)): ?><?=$this->escapeHtml($this->numberAndDate)?><?php if (!empty($this->pageRange)): ?>: <?php endif; ?><?php endif; ?> +<?php if (!empty($this->pageRange)): ?><?=$this->escapeHtml($this->pageRange)?><?php endif; ?>. diff --git a/themes/finc/templates/Citation/isbd.phtml b/themes/finc/templates/Citation/isbd.phtml index ac0c8e5954542c56631b9109b99ef6cb0e913f63..650a8ba6b82066d4193a46f023817dd6a888e8e4 100644 --- a/themes/finc/templates/Citation/isbd.phtml +++ b/themes/finc/templates/Citation/isbd.phtml @@ -1,7 +1,7 @@ -<? if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?>:<br /><? endif; ?> +<?php if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?>:<br/><?php endif; ?> <span><i><?=$this->escapeHtml($this->title)?></i></span> -<? if (!empty($this->edition)): ?>. — <?=$this->escapeHtml($this->edition)?> <? endif; ?> -<? if (!empty($this->publisher)): ?>. — <?=$this->escapeHtml($this->publisher)?><? endif; ?> -<? if (!empty($this->physical)): ?>. — <?=$this->escapeHtml($this->physical)?><? endif; ?> -<? if (!empty($this->series)): ?>. — <?=$this->escapeHtml($this->series)?><? endif; ?> -<? if (!empty($this->isbn)): ?>. — ISBN <?=$this->escapeHtml($this->isbn)?><? endif; ?> +<?php if (!empty($this->edition)): ?>. — <?=$this->escapeHtml($this->edition)?><?php endif; ?> +<?php if (!empty($this->publisher)): ?>. — <?=$this->escapeHtml($this->publisher)?><?php endif; ?> +<?php if (!empty($this->physical)): ?>. — <?=$this->escapeHtml($this->physical)?><?php endif; ?> +<?php if (!empty($this->series)): ?>. — <?=$this->escapeHtml($this->series)?><?php endif; ?> +<?php if (!empty($this->isbn)): ?>. — ISBN <?=$this->escapeHtml($this->isbn)?><?php endif; ?> diff --git a/themes/finc/templates/Citation/mla-article.phtml b/themes/finc/templates/Citation/mla-article.phtml index 9d61df1bc537ae42d4f0425f4e704ca74d3d4192..c82aee5546ebd58de4321860de0c003cd31a83e1 100644 --- a/themes/finc/templates/Citation/mla-article.phtml +++ b/themes/finc/templates/Citation/mla-article.phtml @@ -1,6 +1,6 @@ -<? if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?>. <? endif; ?> -"<?=$this->title?><? if ($this->periodAfterTitle): ?>.<? endif ?>" +<?php if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?>. <?php endif; ?> +"<?=$this->title?><?php if ($this->periodAfterTitle): ?>.<?php endif ?>" <i><?=$this->escapeHtml($this->journal)?></i> -<? if (!empty($this->numberAndDate)): ?><?=$this->escapeHtml($this->numberAndDate)?><? if (!empty($this->pageRange)): ?>: <? endif; ?><? endif; ?> -<? if (!empty($this->pageRange)): ?><?=$this->escapeHtml($this->pageRange)?><? endif; ?>. -<? if (!empty($this->year)): ?><? if (!empty($this->publisher)): ?>, <? endif; ?>(<?=$this->escapeHtml($this->year)?>)<? endif; ?><? if (!empty($this->year) || !empty($this->publisher)): ?>.<? endif; ?> +<?php if (!empty($this->numberAndDate)): ?><?=$this->escapeHtml($this->numberAndDate)?><?php if (!empty($this->pageRange)): ?>: <?php endif; ?><?php endif; ?> +<?php if (!empty($this->pageRange)): ?><?=$this->escapeHtml($this->pageRange)?><?php endif; ?>. +<?php if (!empty($this->year)): ?><?php if (!empty($this->publisher)): ?>, <?php endif; ?>(<?=$this->escapeHtml($this->year)?>)<?php endif; ?><?php if (!empty($this->year) || !empty($this->publisher)): ?>.<?php endif; ?> diff --git a/themes/finc/templates/Citation/mla.phtml b/themes/finc/templates/Citation/mla.phtml index e748d275c6d225e27d7dcc08d4d4388b204b5995..8d991e6dd6e49903301fefa6a7efe5fb7291b218 100644 --- a/themes/finc/templates/Citation/mla.phtml +++ b/themes/finc/templates/Citation/mla.phtml @@ -1,5 +1,5 @@ -<? if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?>. <? endif; ?> -<i><?=$this->escapeHtml($this->title)?></i><? if ($this->periodAfterTitle): ?>.<? endif ?> -<? if (!empty($this->edition)): ?><?=$this->escapeHtml($this->edition)?> <? endif; ?> -<? if (!empty($this->publisher)): ?><?=$this->escapeHtml($this->publisher)?><? endif; ?> -<? if (!empty($this->year)): ?><? if (!empty($this->publisher)): ?>, <? endif; ?><?=$this->escapeHtml($this->year)?><? endif; ?><? if (!empty($this->year) || !empty($this->publisher)): ?>.<? endif; ?> +<?php if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?>. <?php endif; ?> +<i><?=$this->escapeHtml($this->title)?></i><?php if ($this->periodAfterTitle): ?>.<?php endif ?> +<?php if (!empty($this->edition)): ?><?=$this->escapeHtml($this->edition)?><?php endif; ?> +<?php if (!empty($this->publisher)): ?><?=$this->escapeHtml($this->publisher)?><?php endif; ?> +<?php if (!empty($this->year)): ?><?php if (!empty($this->publisher)): ?>, <?php endif; ?><?=$this->escapeHtml($this->year)?><?php endif; ?><?php if (!empty($this->year) || !empty($this->publisher)): ?>.<?php endif; ?> diff --git a/themes/finc/templates/Citation/mlaai-article.phtml b/themes/finc/templates/Citation/mlaai-article.phtml index 14955a3ff92e985f53f6fdb0a858bf8421c3ce84..161343cb748b16b3715c9ab35ca0f7ae5f0df05c 100644 --- a/themes/finc/templates/Citation/mlaai-article.phtml +++ b/themes/finc/templates/Citation/mlaai-article.phtml @@ -1,10 +1,10 @@ -<? if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?>. <? endif; ?> -"<?=$this->escapeHtml($this->title)?>"<? if ($this->periodAfterTitle): ?>.<? endif ?> <i><?=$this->escapeHtml($this->journal)?>, -<? if (!empty($this->volume)): ?> <?=$this->escapeHtml($this->volume)?><? endif; ?></i><? if (!empty($this->issue)): ?>.<?=$this->escapeHtml($this->issue)?><? endif; ?> -<? if (!empty($this->year)): ?> -<? if (!empty($this->volume) || !empty($this->issue)): ?> (<? endif; ?> -<?=$this->escapeHtml($this->year)?> -<? if (!empty($this->volume) || !empty($this->issue)): ?>)<? endif; ?> -<? endif; ?> -<? if (!empty($this->pageRange)): ?>: <?=$this->escapeHtml($this->pageRange)?>. <? endif; ?> -<? /*if (!empty($this->year)): ?><? if (!empty($this->publisher)): ?>, <? endif; ?>(<?=$this->escapeHtml($this->year)?>)<? endif;*/ ?><? if (!empty($this->year) && !empty($this->publisher)): ?>.<? endif; ?> +<?php if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?>. <?php endif; ?> +"<?=$this->escapeHtml($this->title)?>"<?php if ($this->periodAfterTitle): ?>.<?php endif ?> <i><?=$this->escapeHtml($this->journal)?>, + <?php if (!empty($this->volume)): ?> <?=$this->escapeHtml($this->volume)?><?php endif; ?></i><?php if (!empty($this->issue)): ?>.<?=$this->escapeHtml($this->issue)?><?php endif; ?> +<?php if (!empty($this->year)): ?> + <?php if (!empty($this->volume) || !empty($this->issue)): ?> (<?php endif; ?> + <?=$this->escapeHtml($this->year)?> + <?php if (!empty($this->volume) || !empty($this->issue)): ?>)<?php endif; ?> +<?php endif; ?> +<?php if (!empty($this->pageRange)): ?>: <?=$this->escapeHtml($this->pageRange)?>. <?php endif; ?> +<?php /*if (!empty($this->year)): ?><?php if (!empty($this->publisher)): ?>, <?php endif; ?>(<?=$this->escapeHtml($this->year)?>)<?php endif;*/ ?><?php if (!empty($this->year) && !empty($this->publisher)): ?>.<?php endif; ?> diff --git a/themes/finc/templates/Citation/mlaai.phtml b/themes/finc/templates/Citation/mlaai.phtml index 5828d63bc41f8a4866b2248662201b8578123ba8..397d6a1b900bc15a8c43a4a4f982adb666a248bd 100644 --- a/themes/finc/templates/Citation/mlaai.phtml +++ b/themes/finc/templates/Citation/mlaai.phtml @@ -1,5 +1,5 @@ -<? if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?>. <? endif; ?> -<i><?=$this->escapeHtml($this->title)?></i><? if ($this->periodAfterTitle): ?>.<? endif ?> -<? if (!empty($this->edition)): ?><?=$this->escapeHtml($this->edition)?> <? endif; ?> -<? if (!empty($this->publisher)): ?><?=$this->escapeHtml($this->publisher)?><? endif; ?> -<? if (!empty($this->year)): ?><? if (!empty($this->publisher)): ?>, <? endif; ?>(<?=$this->escapeHtml($this->year)?>)<? endif; ?><? if (!empty($this->year) || !empty($this->publisher)): ?>.<? endif; ?> +<?php if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?>. <?php endif; ?> +<i><?=$this->escapeHtml($this->title)?></i><?php if ($this->periodAfterTitle): ?>.<?php endif ?> +<?php if (!empty($this->edition)): ?><?=$this->escapeHtml($this->edition)?><?php endif; ?> +<?php if (!empty($this->publisher)): ?><?=$this->escapeHtml($this->publisher)?><?php endif; ?> +<?php if (!empty($this->year)): ?><?php if (!empty($this->publisher)): ?>, <?php endif; ?>(<?=$this->escapeHtml($this->year)?>)<?php endif; ?><?php if (!empty($this->year) || !empty($this->publisher)): ?>.<?php endif; ?> diff --git a/themes/finc/templates/Email/acquisition-html.phtml b/themes/finc/templates/Email/acquisition-html.phtml index 0aaf25f1133166c5ff164fa4d8ba5e447dc78580..894eea1e581654b9853e9aeabc4eec822a1c5480 100644 --- a/themes/finc/templates/Email/acquisition-html.phtml +++ b/themes/finc/templates/Email/acquisition-html.phtml @@ -1,38 +1,38 @@ <?=$this->doctype('HTML5')?> <html> <head> - <? /* <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> TEST IF THIS WORKS, fixme CK */ ?> - <title>Erwerbungsvorschlag</title> + <?php /* <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> TEST IF THIS WORKS, fixme CK */ ?> + <title>Erwerbungsvorschlag</title> </head> <body style="font-family: Arial, Verdana, sans-serif;"> <h2>Erwerbungsvorschlag</h2> <table> - <tr valign="top"> - <td> - Name: <strong><?=$lastname ?>, <?=$firstname ?></strong><br /> - Lesekarte-Nr.: <strong><?=$username ?></strong><br /> - E-mail: <a href="mailto:<?=$email ?>"><?=$email ?></a><br /> - <?=(isset($group) && !empty($group)) ? "Benutzergruppe: ". $group . "<br />" : ""?> - </td> - <td> </td> - <td> - hat folgenden Titel zur Erwerbung empfohlen:<br /> - <br /> - <strong><?=$proposal?></strong><br /> - <br /> - Begründung für Empfehlung: - <br /><br /> - <strong><?=$statement?></strong> - <br /><br /><br /> - für das Fachgebiet: <strong><?=$this->transEsc("PDA::fos_" . $field_of_study)?></strong><br /> - <br /> - </td> - </tr> - <tr valign="top"> - <td colspan="3"> - Zeitpunkt der Bestellung: <?=$timestamp ?> - </td> - </tr> + <tr valign="top"> + <td> + Name: <strong><?=$lastname?>, <?=$firstname?></strong><br/> + Lesekarte-Nr.: <strong><?=$username?></strong><br/> + E-mail: <a href="mailto:<?=$email?>"><?=$email?></a><br/> + <?=(isset($group) && !empty($group)) ? "Benutzergruppe: " . $group . "<br />" : ""?> + </td> + <td> </td> + <td> + hat folgenden Titel zur Erwerbung empfohlen:<br/> + <br/> + <strong><?=$proposal?></strong><br/> + <br/> + Begründung für Empfehlung: + <br/><br/> + <strong><?=$statement?></strong> + <br/><br/><br/> + für das Fachgebiet: <strong><?=$this->transEsc("PDA::fos_" . $field_of_study)?></strong><br/> + <br/> + </td> + </tr> + <tr valign="top"> + <td colspan="3"> + Zeitpunkt der Bestellung: <?=$timestamp?> + </td> + </tr> </table> </body> </html> diff --git a/themes/finc/templates/Email/acquisitionpda-html.phtml b/themes/finc/templates/Email/acquisitionpda-html.phtml index 7be6f2b1e4bac8c5c77bed7634948d4af0029b6d..1042882d2133e6030fc981baa01ddc50db554f48 100644 --- a/themes/finc/templates/Email/acquisitionpda-html.phtml +++ b/themes/finc/templates/Email/acquisitionpda-html.phtml @@ -1,147 +1,147 @@ <?=$this->doctype('HTML5')?> <html> <head> - <? /* <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> TEST IF THIS WORKS, fixme CK */ ?> - <title>Benutzergesteuerte Erwerbung</title> + <?php /* <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> TEST IF THIS WORKS, fixme CK */ ?> + <title>Benutzergesteuerte Erwerbung</title> </head> <body style="font-family: Arial, Verdana, sans-serif;"> <h2 style="padding:10px 0;">Benutzergesteuerte Erwerbung</h2> <table width="800" border="0"> - <tr valign="top"> - <td width="390"> - Name: <strong><?= $lastname ?>, <?= $firstname ?></strong><br/> - Lesekarte-Nr.: <strong><?= $username ?></strong><br/> - Email: <a href="mailto:<?= $email ?>"><?= $email ?></a><br/> - <?=(isset($group) && !empty($group)) ? "Benutzergruppe: ". $group . "<br/>" : ""?> - <br/> - <? if ($statement): ?> - Begründung des Benutzers: - <br/><br/> - <span style="font-size: 12px"><?= $statement ?></span> - <br/><br/> - <? endif; ?> - </td> - <td width="20"> </td> - <td width="390"> - hat folgenden Titel bestellt:<br/> - <br/> - <strong><?= $title ?></strong><br/> - <? if ($author): ?>von - <? foreach ($author as $auth): ?> - <?= $auth ?> - <? endforeach; ?> - <? endif; ?><br/> - <br/> - Link: <a href="<?=$this->serverUrl($this->recordLink()->getUrl($driver))?>" title="<?= $title ?>"><?=$this->serverUrl($this->recordLink()->getUrl($driver))?></a><br/> - Katalog-ID: <a href="<?= $this->serverUrl($this->recordLink()->getUrl($driver)) ?>" - title="<?= $title ?>"><?= $id ?></a><br/> - <br/> - für das Fachgebiet: <?= $this->transEsc('PDA::fos_' . $field_of_study) ?><br/> - <br/> - <table> - <? if ($price): ?> - <tr> - <td width="100" style="font-size: 11px">Preis:</td> - <td width="5"> </td> - <td style="font-size: 11px"> - <?= $this->safeMoneyFormat($price) ?> - </td> - </tr> - <? endif; ?> - <? if ($publisher): ?> - <tr> - <td style="font-size: 11px">Verlag:</td> - <td width="5"> </td> - <td style="font-size: 11px"> - <? foreach ($publisher as $pub): ?> - <?= $pub ?> - <? endforeach; ?> - </td> - </tr> - <? endif; ?> - <? if ($format): ?> - <tr> - <td style="font-size: 11px">Format:</td> - <td width="5"> </td> - <td style="font-size: 11px"> - <? foreach ($format as $for): ?> - <?= $this->transEsc($for) ?> - <? endforeach; ?> - </td> - </tr> - <? endif; ?> - <? if ($language): ?> - <tr> - <td style="font-size: 11px">Sprache:</td> - <td width="5"> </td> - <td style="font-size: 11px"> - <? foreach ($language as $lang): ?> - <?= $this->transEsc($lang) ?> - <? endforeach; ?> - </td> - </tr> - <? endif; ?> - <? if ($publishDate): ?> - <tr> - <td style="font-size: 11px">veröffentlicht:</td> - <td width="5"> </td> - <td style="font-size: 11px"> - <? foreach ($publishDate as $date): ?> - <?= $date ?> - <? endforeach; ?> - </td> - </tr> - <? endif; ?> - <? if ($isbn): ?> - <tr> - <td style="font-size: 11px">ISBN/ISN:</td> - <td width="5"> </td> - <td style="font-size: 11px"> - <? foreach ($isbn as $isn): ?> - <?= $isn ?> - <? endforeach; ?> - </td> - </tr> - <? endif; ?> - <? if ($physical): ?> - <tr> - <td style="font-size: 11px">Beschreibung:</td> - <td width="5"> </td> - <td style="font-size: 11px"> - <? foreach ($physical as $phys): ?> - <?= $phys ?> - <? endforeach; ?> - </td> - </tr> - <? endif; ?> - <? if ($footnote): ?> - <tr> - <td style="font-size: 11px">Fussnote:</td> - <td width="5"> </td> - <td style="font-size: 11px"> - <? foreach ($footnote as $foot): ?> - <?= $foot ?> - <? endforeach; ?> - </td> - </tr> - <? endif; ?> - <? if ($source_id): ?> - <tr> - <td style="font-size: 11px">Quelle:</td> - <td width="5"> </td> - <td style="font-size: 11px"> - <?= $this->transEsc('sid_' . $source_id) ?> - </td> - </tr> - <? endif; ?> - </table> - </td> - </tr> - <tr valign="top"> - <td width="800" colspan="3"> - Zeitpunkt der Bestellung: <?= $timestamp ?> - </td> - </tr> + <tr valign="top"> + <td width="390"> + Name: <strong><?=$lastname?>, <?=$firstname?></strong><br/> + Lesekarte-Nr.: <strong><?=$username?></strong><br/> + Email: <a href="mailto:<?=$email?>"><?=$email?></a><br/> + <?=(isset($group) && !empty($group)) ? "Benutzergruppe: " . $group . "<br/>" : ""?> + <br/> + <?php if ($statement): ?> + Begründung des Benutzers: + <br/><br/> + <span style="font-size: 12px"><?=$statement?></span> + <br/><br/> + <?php endif; ?> + </td> + <td width="20"> </td> + <td width="390"> + hat folgenden Titel bestellt:<br/> + <br/> + <strong><?=$title?></strong><br/> + <?php if ($author): ?>von + <?php foreach ($author as $auth): ?> + <?=$auth?> + <?php endforeach; ?> + <?php endif; ?><br/> + <br/> + Link: <a href="<?=$this->serverUrl($this->recordLink()->getUrl($driver))?>" title="<?=$title?>"><?=$this->serverUrl($this->recordLink()->getUrl($driver))?></a><br/> + Katalog-ID: <a href="<?=$this->serverUrl($this->recordLink()->getUrl($driver))?>" + title="<?=$title?>"><?=$id?></a><br/> + <br/> + für das Fachgebiet: <?=$this->transEsc('PDA::fos_' . $field_of_study)?><br/> + <br/> + <table> + <?php if ($price): ?> + <tr> + <td width="100" style="font-size: 11px">Preis:</td> + <td width="5"> </td> + <td style="font-size: 11px"> + <?=$this->safeMoneyFormat($price)?> + </td> + </tr> + <?php endif; ?> + <?php if ($publisher): ?> + <tr> + <td style="font-size: 11px">Verlag:</td> + <td width="5"> </td> + <td style="font-size: 11px"> + <?php foreach ($publisher as $pub): ?> + <?=$pub?> + <?php endforeach; ?> + </td> + </tr> + <?php endif; ?> + <?php if ($format): ?> + <tr> + <td style="font-size: 11px">Format:</td> + <td width="5"> </td> + <td style="font-size: 11px"> + <?php foreach ($format as $for): ?> + <?=$this->transEsc($for)?> + <?php endforeach; ?> + </td> + </tr> + <?php endif; ?> + <?php if ($language): ?> + <tr> + <td style="font-size: 11px">Sprache:</td> + <td width="5"> </td> + <td style="font-size: 11px"> + <?php foreach ($language as $lang): ?> + <?=$this->transEsc($lang)?> + <?php endforeach; ?> + </td> + </tr> + <?php endif; ?> + <?php if ($publishDate): ?> + <tr> + <td style="font-size: 11px">veröffentlicht:</td> + <td width="5"> </td> + <td style="font-size: 11px"> + <?php foreach ($publishDate as $date): ?> + <?=$date?> + <?php endforeach; ?> + </td> + </tr> + <?php endif; ?> + <?php if ($isbn): ?> + <tr> + <td style="font-size: 11px">ISBN/ISN:</td> + <td width="5"> </td> + <td style="font-size: 11px"> + <?php foreach ($isbn as $isn): ?> + <?=$isn?> + <?php endforeach; ?> + </td> + </tr> + <?php endif; ?> + <?php if ($physical): ?> + <tr> + <td style="font-size: 11px">Beschreibung:</td> + <td width="5"> </td> + <td style="font-size: 11px"> + <?php foreach ($physical as $phys): ?> + <?=$phys?> + <?php endforeach; ?> + </td> + </tr> + <?php endif; ?> + <?php if ($footnote): ?> + <tr> + <td style="font-size: 11px">Fussnote:</td> + <td width="5"> </td> + <td style="font-size: 11px"> + <?php foreach ($footnote as $foot): ?> + <?=$foot?> + <?php endforeach; ?> + </td> + </tr> + <?php endif; ?> + <?php if ($source_id): ?> + <tr> + <td style="font-size: 11px">Quelle:</td> + <td width="5"> </td> + <td style="font-size: 11px"> + <?=$this->transEsc('sid_' . $source_id)?> + </td> + </tr> + <?php endif; ?> + </table> + </td> + </tr> + <tr valign="top"> + <td width="800" colspan="3"> + Zeitpunkt der Bestellung: <?=$timestamp?> + </td> + </tr> </table> </body> </html> diff --git a/themes/finc/templates/Email/acquisitionpda-plain.phtml b/themes/finc/templates/Email/acquisitionpda-plain.phtml index 0fc6999aabcb14e807a3e4fc8e8f6e0a14523752..17c42d516f68a73ff866a3188921026ceb05cc66 100644 --- a/themes/finc/templates/Email/acquisitionpda-plain.phtml +++ b/themes/finc/templates/Email/acquisitionpda-plain.phtml @@ -12,9 +12,9 @@ hat folgenden Titel bestellt: <?= $title ?> -<? if ($author): ?> - von <? foreach ($author as $au): ?><?= $au ?> <? endforeach; ?> -<? endif; ?> +<?php if ($author): ?> + von <?php foreach ($author as $au): ?><?= $au ?> <?php endforeach; ?> +<?php endif; ?> Link: <?= $this->serverUrl($this->recordLink()->getUrl($driver)) ?> @@ -22,49 +22,49 @@ für das Fachgebiet: <?= $this->transEsc('PDA::fos_' . $field_of_study) ?> ------------------------------------------ -<? if ($statement): ?>Begründung des Benutzers: +<?php if ($statement): ?>Begründung des Benutzers: <?= $statement ?> -<? endif; ?> +<?php endif; ?> ------------------------------------------ -<? if ($price): ?> +<?php if ($price): ?> Preis: <?= $this->safeMoneyFormat($price) ?> -<? endif; ?> -<? if ($publisher): ?> - Verlag: <? foreach ($publisher as $pub): ?><?= $pub ?> <? endforeach; ?> +<?php endif; ?> +<?php if ($publisher): ?> + Verlag: <?php foreach ($publisher as $pub): ?><?= $pub ?> <?php endforeach; ?> -<? endif; ?> -<? if ($format): ?> - Format: <? foreach ($format as $form): ?><?= $this->transEsc($form) ?> <? endforeach; ?> +<?php endif; ?> +<?php if ($format): ?> + Format: <?php foreach ($format as $form): ?><?= $this->transEsc($form) ?> <?php endforeach; ?> -<? endif; ?> -<? if ($language): ?> - Sprache: <? foreach ($language as $lang): ?><?= $this->transEsc($lang) ?> <? endforeach; ?> +<?php endif; ?> +<?php if ($language): ?> + Sprache: <?php foreach ($language as $lang): ?><?= $this->transEsc($lang) ?> <?php endforeach; ?> -<? endif; ?> -<? if ($publishDate): ?> - veröffentlicht: <? foreach ($publishDate as $date): ?><?= $date ?> <? endforeach; ?> +<?php endif; ?> +<?php if ($publishDate): ?> + veröffentlicht: <?php foreach ($publishDate as $date): ?><?= $date ?> <?php endforeach; ?> -<? endif; ?> -<? if ($isbn): ?> - ISBN/ISN: <? foreach ($isbn as $isn): ?><?= $isn ?> <? endforeach; ?> +<?php endif; ?> +<?php if ($isbn): ?> + ISBN/ISN: <?php foreach ($isbn as $isn): ?><?= $isn ?> <?php endforeach; ?> -<? endif; ?> -<? if ($physical): ?> - Beschreibung: <? foreach ($physical as $desc): ?><?= $desc ?> <? endforeach; ?> +<?php endif; ?> +<?php if ($physical): ?> + Beschreibung: <?php foreach ($physical as $desc): ?><?= $desc ?> <?php endforeach; ?> -<? endif; ?> -<? if ($footnote): ?> - Fussnote: <? foreach ($footnote as $ftn): ?><?= $ftn ?> <? endforeach; ?> +<?php endif; ?> +<?php if ($footnote): ?> + Fussnote: <?php foreach ($footnote as $ftn): ?><?= $ftn ?> <?php endforeach; ?> -<? endif; ?> -<? if ($source_id): ?> +<?php endif; ?> +<?php if ($source_id): ?> Quelle: <?= $this->transEsc('sid_' . $source_id) ?> -<? endif; ?> +<?php endif; ?> ------------------------------------------ diff --git a/themes/finc/templates/Email/dds-html.phtml b/themes/finc/templates/Email/dds-html.phtml index 17126d8119cf4d256802a8f19cee35e82bb55368..5c6309ff470964a23af34c3cd16f15e8a1ae8f71 100644 --- a/themes/finc/templates/Email/dds-html.phtml +++ b/themes/finc/templates/Email/dds-html.phtml @@ -1,146 +1,146 @@ <?=$this->doctype('HTML5')?> <html> <head> - <? /* <meta http-equiv="content-type" content="text/html; charset=utf-8"> TEST IF THIS WORKS, fixme CK */ ?> - <title><?=$this->translate("Dokumentenlieferdienst")?></title> + <?php /* <meta http-equiv="content-type" content="text/html; charset=utf-8"> TEST IF THIS WORKS, fixme CK */ ?> + <title><?=$this->translate("Dokumentenlieferdienst")?></title> </head> <body style="font-family: Arial, Verdana, sans-serif;"> <p><strong>AUFTRAGGEBER:</strong></p> <table width="820" border="0"> - <tr valign="top"> - <td width="25%"><strong>Name:</strong></td> - <td width="75%"><?=$this->username?></td> - </tr> - <tr valign="top"> - <td width="25%"><strong>Telefon:</strong></td> - <td width="75%"><?=$this->phone?></td> - </tr> - <tr valign="top"> - <td width="25%"><strong>E-Mail:</strong></td> - <td width="75%"><?=$this->email?></td> - </tr> - <tr valign="top"> - <td width="25%"><strong>Lesekartennummer:</strong></td> - <td width="75%"><?=$this->userid?></td> - </tr> - <tr valign="top"> - <td width="25%"><strong>Einrichtung:</strong></td> - <td width="75%"><?=$this->department?></td> - </tr> - <? if (($this->group)): ?> - <tr valign="top"> - <td width="25%"><strong>Status:</strong></td> - <td width="75%"><?=$this->group?></td> - </tr> - <? endif; ?> + <tr valign="top"> + <td width="25%"><strong>Name:</strong></td> + <td width="75%"><?=$this->username?></td> + </tr> + <tr valign="top"> + <td width="25%"><strong>Telefon:</strong></td> + <td width="75%"><?=$this->phone?></td> + </tr> + <tr valign="top"> + <td width="25%"><strong>E-Mail:</strong></td> + <td width="75%"><?=$this->email?></td> + </tr> + <tr valign="top"> + <td width="25%"><strong>Lesekartennummer:</strong></td> + <td width="75%"><?=$this->userid?></td> + </tr> + <tr valign="top"> + <td width="25%"><strong>Einrichtung:</strong></td> + <td width="75%"><?=$this->department?></td> + </tr> + <?php if (($this->group)): ?> + <tr valign="top"> + <td width="25%"><strong>Status:</strong></td> + <td width="75%"><?=$this->group?></td> + </tr> + <?php endif; ?> </table> -<hr /> +<hr/> <p><strong>ANGABEN ZUM GEWÜNSCHTEN ARTIKEL:<strong></p> <table width="820" border="0"> - <tr valign="top"> - <td width="25%"><strong>Autor:</strong></td> - <td width="75%"><?=$this->author?></td> - </tr> - <tr valign="top"> - <td width="25%"><strong>Aufsatztitel:</strong></td> - <td width="75%"><?=$this->article?></td> - </tr> - <tr valign="top"> - <td width="25%"><strong>Zeitschriftentitel:</strong></td> - <td width="75%"><?=$this->journal?></td> - </tr> - <tr valign="top"> - <td width="25%"><strong>ISSN:</strong></td> - <td width="75%"><?=$this->issn?></td> - </tr> - <tr valign="top"> - <td width="25%"><strong>Erscheinungsjahr:</strong></td> - <td width="75%"><?=$this->publishdate?></td> - </tr> - <tr valign="top"> - <td width="25%"><strong>Band/Heft:</strong></td> - <td width="75%"><?=$this->number?></td> - </tr> - <tr valign="top"> - <td width="25%"><strong>Seiten:</strong></td> - <td width="75%"><?=$this->pages?></td> - </tr> - <tr valign="top"> - <td width="25%"><strong>Bemerkungen:</strong></td> - <td width="75%"><?=$this->remarks?></td> - </tr> + <tr valign="top"> + <td width="25%"><strong>Autor:</strong></td> + <td width="75%"><?=$this->author?></td> + </tr> + <tr valign="top"> + <td width="25%"><strong>Aufsatztitel:</strong></td> + <td width="75%"><?=$this->article?></td> + </tr> + <tr valign="top"> + <td width="25%"><strong>Zeitschriftentitel:</strong></td> + <td width="75%"><?=$this->journal?></td> + </tr> + <tr valign="top"> + <td width="25%"><strong>ISSN:</strong></td> + <td width="75%"><?=$this->issn?></td> + </tr> + <tr valign="top"> + <td width="25%"><strong>Erscheinungsjahr:</strong></td> + <td width="75%"><?=$this->publishdate?></td> + </tr> + <tr valign="top"> + <td width="25%"><strong>Band/Heft:</strong></td> + <td width="75%"><?=$this->number?></td> + </tr> + <tr valign="top"> + <td width="25%"><strong>Seiten:</strong></td> + <td width="75%"><?=$this->pages?></td> + </tr> + <tr valign="top"> + <td width="25%"><strong>Bemerkungen:</strong></td> + <td width="75%"><?=$this->remarks?></td> + </tr> </table> -<p>Literaturbestellung / Dokumentenlieferdienst der UBL<br /> - Datum: <?=$this->time?></p> +<p>Literaturbestellung / Dokumentenlieferdienst der UBL<br/> + Datum: <?=$this->time?></p> -<hr /> +<hr/> <p><strong>BEARBEITUNGSVERMERKE DER BIBLIOTHEK:</strong></p> -<? if ($this->division == '15'): ?> -<table width="820" border="0"> +<?php if ($this->division == '15'): ?> + <table width="820" border="0"> <tr valign="top"> - <td width="25%"><strong>Signatur:</strong></td> - <td width="75%"> </td> + <td width="25%"><strong>Signatur:</strong></td> + <td width="75%"> </td> </tr> <tr valign="top"> - <td width="25%"><strong>Erledigt am:</strong></td> - <td width="75%"> </td> + <td width="25%"><strong>Erledigt am:</strong></td> + <td width="75%"> </td> </tr> <tr valign="top"> - <td width="25%"><strong>Lieferung an:</strong></td> - <td width="75%">zbmed.fernleihe@medizin.uni-leipzig.de oder Ordner X:\ubl-kopien\Medizin</td> + <td width="25%"><strong>Lieferung an:</strong></td> + <td width="75%">zbmed.fernleihe@medizin.uni-leipzig.de oder Ordner X:\ubl-kopien\Medizin</td> </tr> -</table> -<? else: ?> -<table width="820" border="0"> + </table> +<?php else: ?> + <table width="820" border="0"> <tr valign="top"> - <td colspan="3">A) WEITERLEITUNG INNERHALB DER UBL:</td> + <td colspan="3">A) WEITERLEITUNG INNERHALB DER UBL:</td> </tr> <tr valign="top"> - <td width="5%"> </td> - <td width="20%"><strong>Standort:</strong></td> - <td width="75%"> </td> + <td width="5%"> </td> + <td width="20%"><strong>Standort:</strong></td> + <td width="75%"> </td> </tr> <tr valign="top"> - <td width="5%"> </td> - <td width="20%"><strong>Signatur:</strong></td> - <td width="75%"> </td> + <td width="5%"> </td> + <td width="20%"><strong>Signatur:</strong></td> + <td width="75%"> </td> </tr> <tr valign="top"> - <td colspan="3">B) SUBITO-BESTELLUNG:</td> + <td colspan="3">B) SUBITO-BESTELLUNG:</td> </tr> <tr valign="top"> - <td width="5%"> </td> - <td width="20%"><strong>Bestellnummer:</strong></td> - <td width="75%"> </td> + <td width="5%"> </td> + <td width="20%"><strong>Bestellnummer:</strong></td> + <td width="75%"> </td> </tr> <tr valign="top"> - <td width="5%"> </td> - <td width="20%"><strong>Bestelldatum:</strong></td> - <td width="75%"> </td> + <td width="5%"> </td> + <td width="20%"><strong>Bestelldatum:</strong></td> + <td width="75%"> </td> </tr> <tr valign="top"> - <td width="5%"> </td> - <td width="20%"><strong>Lieferbibliothek:</strong></td> - <td width="75%"> </td> + <td width="5%"> </td> + <td width="20%"><strong>Lieferbibliothek:</strong></td> + <td width="75%"> </td> </tr> <tr valign="top"> - <td width="5%"> </td> - <td width="20%"><strong>Eingang des Artikels:</strong></td> - <td width="75%"> </td> + <td width="5%"> </td> + <td width="20%"><strong>Eingang des Artikels:</strong></td> + <td width="75%"> </td> </tr> <tr valign="top"> - <td width="5%"> </td> - <td width="20%"><strong>Eingang der Rechnung:</strong></td> - <td width="75%"> </td> + <td width="5%"> </td> + <td width="20%"><strong>Eingang der Rechnung:</strong></td> + <td width="75%"> </td> </tr> -</table> -<? endif; ?> -<? if (!empty($this->subito_url)): ?> -<p> + </table> +<?php endif; ?> +<?php if (!empty($this->subito_url)): ?> + <p> Bestelllink für Subito: <a href="<?=$this->subito_url?>"><?=$this->subito_url?></a> -</p> -<? endif; ?> + </p> +<?php endif; ?> </body> </html> diff --git a/themes/finc/templates/Email/dds-text.phtml b/themes/finc/templates/Email/dds-text.phtml index aca5f625b3300e16f7014ec0d867c6009258eac9..e31cbc3edf9f7f30f6a18e9dc2ecb5306fe33879 100644 --- a/themes/finc/templates/Email/dds-text.phtml +++ b/themes/finc/templates/Email/dds-text.phtml @@ -39,14 +39,14 @@ Datum: <?=$this->time?> ------------------------------------------------------------------- BEARBEITUNGSVERMERKE DER BIBLIOTHEK: -<? if ($this->division == '15') :?> +<?php if ($this->division == '15') :?> Signatur: Erledigt am: Lieferung an: zbmed.fernleihe@medizin.uni-leipzig.de oder Ordner X:\ubl-kopien\Medizin -<? else :?> +<?php else :?> A) WEITERLEITUNG INNERHALB DER UBL: Standort: @@ -64,6 +64,6 @@ Lieferbibliothek: Eingang des Artikels: Eingang der Rechnung: -<? endif; ?> +<?php endif; ?> <?=!empty($this->subito_url) ? 'Bestelllink für Subito: ' . $this->subito_url : ''?> \ No newline at end of file diff --git a/themes/finc/templates/Email/journalhold-html.phtml b/themes/finc/templates/Email/journalhold-html.phtml index d64dfa380ab541aa8d9428fcde332e6375825952..04bde33c945cf81ca4639135fac4f5c524a04fd0 100644 --- a/themes/finc/templates/Email/journalhold-html.phtml +++ b/themes/finc/templates/Email/journalhold-html.phtml @@ -1,70 +1,70 @@ <?=$this->doctype('HTML5')?> <html> <head> - <? /* <meta http-equiv="content-type" content="text/html; charset=utf-8"> TEST IF THIS WORKS, fixme CK */ ?> - <title><?=$this->translate("Zeitschriftenbestellung")?></title> + <?php /* <meta http-equiv="content-type" content="text/html; charset=utf-8"> TEST IF THIS WORKS, fixme CK */ ?> + <title><?=$this->translate("Zeitschriftenbestellung")?></title> </head> <body style="font-family: Arial, Verdana, sans-serif;"> <table width="820" border="0"> - <tr valign="top"> - <td width="275"> - <strong>Signatur:</strong><br /> - <?=$this->callnumber?> - </td> - <td width="275"> - <strong>Heft / Jahrgang / Band:</strong><br /> - <?=$this->year?> / <?=$this->issue?> / <?=$this->volume?> - </td> - <td width="50"> - - </td> - <td width="220" rowspan="3" align="center" valign="top"> - <strong><?=$this->callnumber?></strong><br /> - Jahrgang / Band / Heft:<br /> - <strong><?=$this->year?> / <?=$this->issue?> / <?=$this->volume?></strong><br /> - <strong><?=$this->record['title']?></strong><br /><br /> - </td> - </tr> - <tr> - <td colspan="3"> </td> - </tr> - <tr valign="top"> - <td colspan="2"> - <strong>Titel:</strong> <?=$this->record['title']?><br /> - <strong>Standort:</strong> <?=$this->pickUpLocation?><br /> - <? if (isset($this->itemStatus['item_notes'])): ?> - <strong>Anmerkungen zum Exemplar:</strong> - <ul> - <? foreach ($this->itemStatus['item_notes'] as $note): ?> - <li><?=$note?></li> - <? endforeach; ?> - </ul> - <? endif; ?> - </td> - <td> </td> - <td> </td> - </tr> - <tr valign="bottom"> - <td colspan="2"> - <?if (!empty($this->comment)): ?> - <p> - <strong>Kommentar des Benutzers:</strong><br /> - <?=$this->comment?> - </p> - <? endif; ?> - <p> - <strong>wurde bestellt von:</strong><br /> - <?/*<strong>Email:</strong> <?=$this->patron['email']?><br />*/?> - <strong>Name:</strong> <?=$this->patron['lastname']?>, <?=$this->patron['firstname']?><br /> - <strong>Benutzerkarte:</strong> <?=$this->patron['cat_username']?><br /> - </p> - </td> - <td> </td> - <td align="center" valign="top" style="font-size: 16px"> - <strong><?=$this->patron['lastname']?>, <?=$this->patron['firstname']?></strong><br /> - <strong><?=$this->patron['cat_username']?></strong> - </td> - </tr> + <tr valign="top"> + <td width="275"> + <strong>Signatur:</strong><br/> + <?=$this->callnumber?> + </td> + <td width="275"> + <strong>Heft / Jahrgang / Band:</strong><br/> + <?=$this->year?> / <?=$this->issue?> / <?=$this->volume?> + </td> + <td width="50"> + + </td> + <td width="220" rowspan="3" align="center" valign="top"> + <strong><?=$this->callnumber?></strong><br/> + Jahrgang / Band / Heft:<br/> + <strong><?=$this->year?> / <?=$this->issue?> / <?=$this->volume?></strong><br/> + <strong><?=$this->record['title']?></strong><br/><br/> + </td> + </tr> + <tr> + <td colspan="3"> </td> + </tr> + <tr valign="top"> + <td colspan="2"> + <strong>Titel:</strong> <?=$this->record['title']?><br/> + <strong>Standort:</strong> <?=$this->pickUpLocation?><br/> + <?php if (isset($this->itemStatus['item_notes'])): ?> + <strong>Anmerkungen zum Exemplar:</strong> + <ul> + <?php foreach ($this->itemStatus['item_notes'] as $note): ?> + <li><?=$note?></li> + <?php endforeach; ?> + </ul> + <?php endif; ?> + </td> + <td> </td> + <td> </td> + </tr> + <tr valign="bottom"> + <td colspan="2"> + <?php if (!empty($this->comment)): ?> + <p> + <strong>Kommentar des Benutzers:</strong><br/> + <?=$this->comment?> + </p> + <?php endif; ?> + <p> + <strong>wurde bestellt von:</strong><br/> + <?php /*<strong>Email:</strong> <?=$this->patron['email']?><br />*/ ?> + <strong>Name:</strong> <?=$this->patron['lastname']?>, <?=$this->patron['firstname']?><br/> + <strong>Benutzerkarte:</strong> <?=$this->patron['cat_username']?><br/> + </p> + </td> + <td> </td> + <td align="center" valign="top" style="font-size: 16px"> + <strong><?=$this->patron['lastname']?>, <?=$this->patron['firstname']?></strong><br/> + <strong><?=$this->patron['cat_username']?></strong> + </td> + </tr> </table> </body> </html> diff --git a/themes/finc/templates/Email/journalhold-plain.phtml b/themes/finc/templates/Email/journalhold-plain.phtml index 2b6cb7c434f86a41a935f1962aad55a39c9fcd16..a0a5d6996f994fb710acdbd59447c4f6bfcd4c40 100644 --- a/themes/finc/templates/Email/journalhold-plain.phtml +++ b/themes/finc/templates/Email/journalhold-plain.phtml @@ -26,10 +26,10 @@ Weitere Informationen: Standort: <?=$this->pickUpLocation?> Anmerkungen zum Exemplar: -<? if (isset($this->itemStatus['item_notes'])): foreach ($this->itemStatus['item_notes'] as $note): ?> +<?php if (isset($this->itemStatus['item_notes'])): foreach ($this->itemStatus['item_notes'] as $note): ?> * <?=$note?> -<? endforeach; endif; ?> +<?php endforeach; endif; ?> Kommentar des Benutzers: diff --git a/themes/finc/templates/Email/reporterrors-html.phtml b/themes/finc/templates/Email/reporterrors-html.phtml index 44dc103184033b5ebc49dfe85171af2aad91b327..0b828d9c9f5b440c540f4bade4d8833f7d9fccc4 100644 --- a/themes/finc/templates/Email/reporterrors-html.phtml +++ b/themes/finc/templates/Email/reporterrors-html.phtml @@ -1,55 +1,55 @@ <?=$this->doctype('HTML5')?> <html> <head> - <? /* <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> TEST IF THIS WORKS, fixme CK */ ?> - <title>Fehlermeldung durch Benutzer</title> + <?php /* <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> TEST IF THIS WORKS, fixme CK */ ?> + <title>Fehlermeldung durch Benutzer</title> </head> <body style="font-family: Arial, Verdana, sans-serif;"> <h2 style="padding:10px 0;">Fehlermeldung durch Benutzer</h2> <table width="800" border="0"> - <? if ($reply_requested): ?> - <? if (isset($lastname) && isset($firstname)): ?> - <tr> + <?php if ($reply_requested): ?> + <?php if (isset($lastname) && isset($firstname)): ?> + <tr> <td width="30%">Name:</td> <td width="70%"><strong><?=$lastname?>, <?=$firstname?></strong></td> - </tr> - <? endif; ?> - <? if (isset($email)): ?> - <tr> + </tr> + <?php endif; ?> + <?php if (isset($email)): ?> + <tr> <td width="30%">Email:</td> <td width="70%"><a href="mailto:<?=$email?>"><?=$email?></a></td> - </tr> - <tr> + </tr> + <tr> <td width="100%" colspan="2"><strong>Um Rückmeldung wird gebeten.</strong></td> - </tr> - <? endif; ?> - <? endif; ?> - <? if ($comment): ?> - <tr> - <td width="30%">Meldung des Benutzers::</td> - <td width="70%"><span style="font-size: 12px"><?= $comment ?></span></td> - </tr> - <? endif; ?> + </tr> + <?php endif; ?> + <?php endif; ?> + <?php if ($comment): ?> <tr> - <td width="30%">Gemeldeter Titel:</td> - <td width="70%"> - <strong><?= $title ?></strong><br/> - <? if ($author): ?>von - <? foreach ($author as $auth): ?> - <?= $auth ?> - <? endforeach; ?> - <? endif; ?><br/> - <br/> - Link: <a href="<?=$this->serverUrl($this->recordLink()->getUrl($driver))?>" title="<?= $title ?>"><?=$this->serverUrl($this->recordLink()->getUrl($driver))?></a><br/> - Katalog-ID: <a href="<?= $this->serverUrl($this->recordLink()->getUrl($driver)) ?>" - title="<?= $title ?>"><?= $id ?></a><br/> - </td> - </tr> - <tr valign="top"> - <td width="100%" colspan="2"> - Zeitpunkt der Meldung: <?= $timestamp ?> - </td> + <td width="30%">Meldung des Benutzers::</td> + <td width="70%"><span style="font-size: 12px"><?=$comment?></span></td> </tr> + <?php endif; ?> + <tr> + <td width="30%">Gemeldeter Titel:</td> + <td width="70%"> + <strong><?=$title?></strong><br/> + <?php if ($author): ?>von + <?php foreach ($author as $auth): ?> + <?=$auth?> + <?php endforeach; ?> + <?php endif; ?><br/> + <br/> + Link: <a href="<?=$this->serverUrl($this->recordLink()->getUrl($driver))?>" title="<?=$title?>"><?=$this->serverUrl($this->recordLink()->getUrl($driver))?></a><br/> + Katalog-ID: <a href="<?=$this->serverUrl($this->recordLink()->getUrl($driver))?>" + title="<?=$title?>"><?=$id?></a><br/> + </td> + </tr> + <tr valign="top"> + <td width="100%" colspan="2"> + Zeitpunkt der Meldung: <?=$timestamp?> + </td> + </tr> </table> </body> </html> diff --git a/themes/finc/templates/Email/reporterrors-plain.phtml b/themes/finc/templates/Email/reporterrors-plain.phtml index 3bd0a8c5acf58d77421209a0ac8bcabd1453c8e3..9b7ade0fb21149c10c3a034610eee443bcee5a4f 100644 --- a/themes/finc/templates/Email/reporterrors-plain.phtml +++ b/themes/finc/templates/Email/reporterrors-plain.phtml @@ -1,37 +1,37 @@ == Fehlermeldung durch Benutzer == -<? if ($reply_requested): ?> - <? if (isset($lastname) && isset($firstname)): ?> +<?php if ($reply_requested): ?> + <?php if (isset($lastname) && isset($firstname)): ?> Name: <?=$lastname?>, <?=$firstname?> - <? endif; ?> - <? if (isset($email)): ?> + <?php endif; ?> + <?php if (isset($email)): ?> Email: <?=$email?> Um Rückmeldung wird gebeten. - <? endif; ?> -<? endif; ?> + <?php endif; ?> +<?php endif; ?> Gemeldeter Titel: <?= $title ?> -<? if ($author): ?> - von <? foreach ($author as $au): ?><?= $au ?> <? endforeach; ?> -<? endif; ?> +<?php if ($author): ?> + von <?php foreach ($author as $au): ?><?= $au ?> <?php endforeach; ?> +<?php endif; ?> Link: <?= $this->serverUrl($this->recordLink()->getUrl($driver)) ?> ------------------------------------------ -<? if ($comment): ?> +<?php if ($comment): ?> Meldung des Benutzers: <?= $comment ?> -<? endif; ?> +<?php endif; ?> ------------------------------------------ diff --git a/themes/finc/templates/Email/resetpassword-html.phtml b/themes/finc/templates/Email/resetpassword-html.phtml index 0eb1ff22bd891dbbc479dd65563b7b4605169aa7..850461ff0e642ab68c69652aa949e7760c6fce0d 100644 --- a/themes/finc/templates/Email/resetpassword-html.phtml +++ b/themes/finc/templates/Email/resetpassword-html.phtml @@ -1,35 +1,35 @@ <?=$this->doctype('HTML5')?> <html> <head> - <? /* <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> TEST IF THIS WORKS, fixme CK */ ?> - <title>Zurücksetzen des Passwortes für Benutzer</title> + <?php /* <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> TEST IF THIS WORKS, fixme CK */ ?> + <title>Zurücksetzen des Passwortes für Benutzer</title> </head> <body style="font-family: Arial, Verdana, sans-serif;"> <h2 style="padding:10px 0;">Zurücksetzen des Passwortes für Benutzer</h2> <table width="800" border="0"> - <? if (isset($lastname) && isset($firstname)): ?> + <?php if (isset($lastname) && isset($firstname)): ?> <tr> - <td width="30%">Name:</td> - <td width="70%"><strong><?=$lastname?>, <?=$firstname?></strong></td> + <td width="30%">Name:</td> + <td width="70%"><strong><?=$lastname?>, <?=$firstname?></strong></td> </tr> - <? endif; ?> - <? if (isset($username)): ?> - <tr> - <td width="30%">Benutzernummer:</td> - <td width="70%"><strong><?=$username?></strong></td> - </tr> - <? endif; ?> - <? if (isset($email)): ?> + <?php endif; ?> + <?php if (isset($username)): ?> <tr> - <td width="30%">Email:</td> - <td width="70%"><a href="mailto:<?=$email?>"><?=$email?></a></td> + <td width="30%">Benutzernummer:</td> + <td width="70%"><strong><?=$username?></strong></td> </tr> - <? endif; ?> - <tr valign="top"> - <td width="100%" colspan="2"> - Zeitpunkt der Anfrage: <?= $timestamp ?> - </td> + <?php endif; ?> + <?php if (isset($email)): ?> + <tr> + <td width="30%">Email:</td> + <td width="70%"><a href="mailto:<?=$email?>"><?=$email?></a></td> </tr> + <?php endif; ?> + <tr valign="top"> + <td width="100%" colspan="2"> + Zeitpunkt der Anfrage: <?=$timestamp?> + </td> + </tr> </table> </body> </html> diff --git a/themes/finc/templates/Email/resetpassword-plain.phtml b/themes/finc/templates/Email/resetpassword-plain.phtml index 1eecd5711febc47f48cb31dfdf33227d3d8ff2a0..55796f06ab0462bd8c74e37ef0bea576a3fb2944 100644 --- a/themes/finc/templates/Email/resetpassword-plain.phtml +++ b/themes/finc/templates/Email/resetpassword-plain.phtml @@ -1,19 +1,19 @@ == Zurücksetzen des Passwortes für Benutzer == -<? if (isset($lastname) && isset($firstname)): ?> +<?php if (isset($lastname) && isset($firstname)): ?> Name: <?=$lastname?>, <?=$firstname?> -<? endif; ?> -<? if (isset($username)): ?> +<?php endif; ?> +<?php if (isset($username)): ?> Benutzernummer: <?=$username?> -<? endif; ?> -<? if (isset($email)): ?> +<?php endif; ?> +<?php if (isset($email)): ?> Email: <?=$email?> -<? endif; ?> +<?php endif; ?> Zeitpunkt der Anfrage: <?= $timestamp ?> \ No newline at end of file diff --git a/themes/finc/templates/Helpers/branchinfo.phtml b/themes/finc/templates/Helpers/branchinfo.phtml index 31c2ff1a60451fda41b5c77ea3b666ea767cf9e8..248ce1ff9088e8082342672edf7467d5f5cca618 100644 --- a/themes/finc/templates/Helpers/branchinfo.phtml +++ b/themes/finc/templates/Helpers/branchinfo.phtml @@ -1,78 +1,78 @@ <!-- helpers - branchinfo.phtml --> <tr class="holding-info"> <td colspan="4"> - <? /* Keep the accordion-toggler! It makes the link appear as an accordion header - CK */?> + <?php /* Keep the accordion-toggler! It makes the link appear as an accordion header - CK */ ?> <a href="#<?=$info['branchno']?>" class="accordion-toggler" data-toggle="collapse" aria-expanded="false"><?=$this->transEsc('Address-Contact-Hours')?></a> <div id="<?=$info['branchno']?>" class="collapse" aria-expanded="false"> <div class="branch-address col-xs-12 col-sm-6"> - <strong><?=$info['branch']?></strong><br/> + <strong><?=$info['branch']?></strong><br/> <?=$info['streetaddress']?><br/> <?=$info['postalcode']?> <?=$info['city']?> </div> <div class="branch-contact col-xs-12 col-sm-6"> - <? if (isset($info['tel'])): ?> - <? if (is_array($info['tel'])): ?> - <? foreach ($info['tel'] as $tel): ?> + <?php if (isset($info['tel'])): ?> + <?php if (is_array($info['tel'])): ?> + <?php foreach ($info['tel'] as $tel): ?> <?=$this->transEsc('Tel')?>: <?=$tel?><br/> - <? endforeach; ?> - <? else: ?> + <?php endforeach; ?> + <?php else: ?> <?=$this->transEsc('Tel')?>: <?=$info['tel']?><br/> - <? endif; ?> - <? endif; ?> - <? if (isset($info['fax'])): ?> + <?php endif; ?> + <?php endif; ?> + <?php if (isset($info['fax'])): ?> <?=$this->transEsc('Fax')?>: <?=$info['fax']?><br/> - <? endif; ?> - <? if ( + <?php endif; ?> + <?php if ( isset($info['email']) && is_array($info['email']) && count($info['email']) > 0 ): ?> - <? foreach ($info['email'] as $email): ?> + <?php foreach ($info['email'] as $email): ?> <?=$this->transEsc('Email')?>: <?=$email?><br/> - <? endforeach; ?> - <? else: ?> + <?php endforeach; ?> + <?php else: ?> <?=$this->transEsc('Email')?>: <?=$info['email']?><br/> - <? endif; ?> - <? if (isset($info['url'])): ?> + <?php endif; ?> + <?php if (isset($info['url'])): ?> <a href="<?=$info['url']?>" title="<?=$info['branch']?>"> - <? if (isset($info['branch'])): ?> + <?php if (isset($info['branch'])): ?> <?=$this->transEsc('Link to')?> - <? else: ?> + <?php else: ?> <?=$info['url']?> - <? endif; ?> + <?php endif; ?> </a> - <? endif; ?> + <?php endif; ?> </div> <div class="branch-hours col-xs-12"> - <? if ( + <?php if ( isset($info['openinghours']) && is_array($info['openinghours']) && count($info['openinghours']) > 0 ): ?> - <? if (isset($info['branchpart'])): ?> + <?php if (isset($info['branchpart'])): ?> <strong><?=$info['branchpart']?></strong> - <? endif; ?> - <? if ($info['branchno'] != 'zw02'): ?> - <?=$this->transEsc('Opening hours')?><br /> - <? endif; ?> - <? foreach ($info['openinghours'] as $line): ?> - <?=$line['days']?>: <?=$line['open']?> – <?=$line['close']?><br /> - <? endforeach; ?> - <? endif; ?> + <?php endif; ?> + <?php if ($info['branchno'] != 'zw02'): ?> + <?=$this->transEsc('Opening hours')?><br/> + <?php endif; ?> + <?php foreach ($info['openinghours'] as $line): ?> + <?=$line['days']?>: <?=$line['open']?> – <?=$line['close']?><br/> + <?php endforeach; ?> + <?php endif; ?> </div> </div> <div class="row"> - <? if (isset($info['note'])): ?> + <?php if (isset($info['note'])): ?> <div class="branch-note alert alert-info"> - <? if (is_array($info['note'])): ?> - <? foreach ($info['note'] as $notes): ?> + <?php if (is_array($info['note'])): ?> + <?php foreach ($info['note'] as $notes): ?> <?=$notes?> - <? endforeach; ?> - <? else: ?> + <?php endforeach; ?> + <?php else: ?> <?=$info['note']?> - <? endif; ?> + <?php endif; ?> </div> - <? endif; ?> + <?php endif; ?> </div> </td> </tr> diff --git a/themes/finc/templates/Helpers/openurl.phtml b/themes/finc/templates/Helpers/openurl.phtml index 5f9fb847f699ebd971e3db330415c9b4e8d52e8d..0fedae7aa319e5c596a8264bab58bc27296078d5 100644 --- a/themes/finc/templates/Helpers/openurl.phtml +++ b/themes/finc/templates/Helpers/openurl.phtml @@ -1,5 +1,5 @@ <!-- finc: helpers - openurl --> -<? +<?php echo $this->inlineScript(\Zend\View\Helper\HeadScript::FILE, 'openurl.js', 'SET'); $classes = ''; if ($this->openUrlEmbed) { @@ -15,16 +15,16 @@ } ?> -<span class="openUrlControls<? if ($this->openUrlEmbed): ?> openUrlEmbed<? if ($this->openUrlEmbedAutoLoad): ?> openUrlEmbedAutoLoad<? endif; ?><? endif; ?>"> - <? if (!$this->openUrlImageBasedSrc || $this->openUrlImageBasedMode == 'both'): ?> +<span class="openUrlControls<?php if ($this->openUrlEmbed): ?> openUrlEmbed<?php if ($this->openUrlEmbedAutoLoad): ?> openUrlEmbedAutoLoad<?php endif; ?><?php endif; ?>"> + <?php if (!$this->openUrlImageBasedSrc || $this->openUrlImageBasedMode == 'both'): ?> <a href="<?=$this->escapeHtmlAttr($this->resolverUrl)?>"<?=$class?> data-search-class-id="<?=$this->escapeHtmlAttr($this->searchClassId) ?>"> - <? /* put the openUrl here in a span (COinS almost) so we can retrieve it later */ ?> + <?php /* put the openUrl here in a span (COinS almost) so we can retrieve it later */ ?> <span title="<?=$this->escapeHtmlAttr($this->openUrl)?>" class="openUrl"></span> - <? /* Custom finc, in #5334 (support for multiple resolver drivers) - CK */ ?> + <?php /* Custom finc, in #5334 (support for multiple resolver drivers) - CK */ ?> <span title="<?=$this->escapeHtmlAttr($this->resolvertype)?>" class="resolvertype"></span> - <? /* Custom finc, in #5334 (support for multiple resolver drivers) - END */ ?> - <? if ($this->openUrlGraphic): ?> - <? + <?php /* Custom finc, in #5334 (support for multiple resolver drivers) - END */ ?> + <?php if ($this->openUrlGraphic): ?> + <?php $style = ''; if ($this->openUrlGraphicWidth) { $style .= 'width:' . $this->escapeHtmlAttr($this->openUrlGraphicWidth) . 'px;'; @@ -34,22 +34,22 @@ } ?> <img src="<?=$this->escapeHtmlAttr($this->openUrlGraphic)?>" alt="<?=$this->transEsc('Get full text')?>" style="<?=$style?>" /> - <? else: ?> + <?php else: ?> <?=$this->transEsc('Get full text')?> - <? endif; ?> + <?php endif; ?> </a> - <? endif; ?> + <?php endif; ?> - <? if ($this->openUrlImageBasedSrc): ?> - <? $ibOpenUrl = $this->openUrlImageBasedOverride ? $this->openUrlImageBasedOverride : $this->openUrl; ?> + <?php if ($this->openUrlImageBasedSrc): ?> + <?php $ibOpenUrl = $this->openUrlImageBasedOverride ? $this->openUrlImageBasedOverride : $this->openUrl; ?> <a href="<?=$this->escapeHtmlAttr($this->openUrlBase . '?' . $ibOpenUrl)?>"<?=$class_ib?>> <span title="<?=$this->escapeHtmlAttr($ibOpenUrl)?>" class="openUrl"></span> <img data-recordid="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" src="<?=$this->escapeHtmlAttr($this->openUrlImageBasedSrc)?>" alt="<?=$this->transEsc('Get full text')?>" /> </a> - <? endif; ?> + <?php endif; ?> </span> -<? if ($this->openUrlEmbed): ?> +<?php if ($this->openUrlEmbed): ?> <div class="resolver hidden"><?=$this->transEsc('Loading')?> ...</div> -<? endif; ?> +<?php endif; ?> <!-- finc: helpers - openurl - END --> diff --git a/themes/finc/templates/Recommend/CollectionSideFacets.phtml b/themes/finc/templates/Recommend/CollectionSideFacets.phtml index 50cacf72e2a5d55dd7348d214e7ee4961d8c582f..1bce266a5e1fc4c4351c72987b18c994b4b5ae5b 100644 --- a/themes/finc/templates/Recommend/CollectionSideFacets.phtml +++ b/themes/finc/templates/Recommend/CollectionSideFacets.phtml @@ -1,9 +1,9 @@ <!-- finc: recommend - collectionSideFacets --> -<? +<?php $this->overrideSideFacetCaption = 'In This Collection'; ?> -<? if ($this->recommend->keywordFilterEnabled()): ?> - <? +<?php if ($this->recommend->keywordFilterEnabled()): ?> + <?php $keywordFilter = $this->recommend->getKeywordFilter(); if (!empty($keywordFilter)) { $this->extraSideFacetFilters = [ @@ -18,7 +18,7 @@ ]; } ?> - <? ob_start() ?> + <?php ob_start() ?> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"> @@ -26,19 +26,20 @@ </h4> </div> <div class="panel-body"> - <form class="form-inline" method="get" name="keywordFilterForm" id="keywordFilterForm"> - <input id="keywordFilter_lookfor" type="text" name="lookfor" value="<?=$this->escapeHtmlAttr($keywordFilter)?>" class="form-control w-100" /> - <? foreach ($this->recommend->getResults()->getParams()->getFilterList(true) as $field => $filters): ?> - <? foreach ($filters as $filter): ?> + <form class="form-inline" role="form" method="get" name="keywordFilterForm" id="keywordFilterForm"> + <input id="keywordFilter_lookfor" type="text" name="lookfor" value="<?=$this->escapeHtmlAttr($keywordFilter)?>" class="form-control"/> + <?php foreach ($this->recommend->getResults()->getParams()->getFilterList(true) as $field => $filters): ?> + <?php foreach ($filters as $filter): ?> <input type="hidden" name="filter[]" value="<?=$this->escapeHtmlAttr($filter['field'])?>:"<?=$this->escapeHtmlAttr($filter['value'])?>"" /> - <? endforeach; ?> - <? endforeach; ?> + <?php endforeach; ?> + <?php endforeach; ?> <input class="btn btn-transparent" type="submit" name="submit" value="<?=$this->transEsc('Set')?>"/> </form> </div> </div> - <? $this->sideFacetExtraControls = ob_get_contents(); ?> - <? ob_end_clean(); ?> -<? endif; ?> + <?php $this->sideFacetExtraControls = ob_get_contents(); ?> + <?php ob_end_clean(); ?> +<?php endif; ?> +<?php $this->baseUriExtra = $this->recommend->getResults()->getParams()->getCollectionId(); ?> <?=$this->render('Recommend/SideFacets.phtml')?> <!-- finc: recommend - collectionSideFacets - END --> diff --git a/themes/finc/templates/Recommend/EbscoResults.phtml b/themes/finc/templates/Recommend/EbscoResults.phtml index fdff9d5961d7a40175b026377ebe1eb1e4d0119a..2801644566d2ab48ed2af231dea8c7941f3daf61 100644 --- a/themes/finc/templates/Recommend/EbscoResults.phtml +++ b/themes/finc/templates/Recommend/EbscoResults.phtml @@ -1,14 +1,14 @@ -<? /* finc: recommend - ebscoresults */ ?> -<? +<!-- finc: recommend - ebscoresults --> +<?php $data = $this->recommend->getResult(); if (is_array($data['results']) && count($data['results']) > 0): ?> - <? /* Design should follow structure of recommend - sidefacets - CK */ ?> + <?php /* Design should follow structure of recommend - sidefacets - CK */ ?> <div id="side-panel-ebsco" class="facet-group"> <div class="facet title" data-toggle="collapse" href="#side-collapse-ebsco"> <?= $this->transEsc('Ebsco::title_hits_databases') ?> </div> <div id="side-collapse-ebsco" class="collapse in"> - <? foreach ($data['results'] as $result): ?> + <?php foreach ($data['results'] as $result): ?> <div class="facet"> <span class="badge"> <?= $this->escapeHtml($result['hits']) ?> @@ -17,13 +17,13 @@ if (is_array($data['results']) && count($data['results']) > 0): ?> <?= $this->escapeHtml($this->truncate($this->transEsc('Ebsco::'.$result['database']), 90)) ?> </a> </div> - <? endforeach; ?> + <?php endforeach; ?> <a class="facet narrow-toggle" href="<?=$this->escapeHtmlAttr($data['hits_total_url'])?>" target="_blank" rel="nofollow"> <?=$this->transEsc('more')?> ... </a> </div> </div> -<? endif; ?> -<? /* finc: recommend - ebscoresults - END */ ?> +<?php endif; ?> +<!-- finc: recommend - ebscoresults - END --> diff --git a/themes/finc/templates/Recommend/SideFacets.phtml b/themes/finc/templates/Recommend/SideFacets.phtml index 133ee8db0ef7af9628fc1b9a2ad636deb4551a82..3b9a1c2cd0eb073d43241aebaa7a043ded86a9d3 100644 --- a/themes/finc/templates/Recommend/SideFacets.phtml +++ b/themes/finc/templates/Recommend/SideFacets.phtml @@ -1,17 +1,25 @@ <!-- finc: recommend - sidefacets --> -<? +<?php $this->headScript()->appendFile('facets.js'); // Save results/options to $this so they are available to sub-templates: $this->results = $results = $this->recommend->getResults(); -$this->options = $options = $this->searchOptions($this->searchClassId); + $this->options = $options = $results->getOptions(); + +$hierarchicalFacets = $this->recommend->getHierarchicalFacets(); +if ($hierarchicalFacets) { + // jstree.min.js used to be injected by hierarchical-facet.js, but with deferred + // processing it's called too late to append anything to the headers. + $this->headScript()->appendFile('vendor/jsTree/jstree.min.js'); +} ?> -<? if ($results->getResultTotal() > 0): ?> +<button class="close-offcanvas btn btn-link" data-toggle="offcanvas"><?=$this->transEsc('navigate_back') ?></button> +<?php if ($results->getResultTotal() > 0): ?> <h4><?=$this->transEsc(isset($this->overrideSideFacetCaption) ? $this->overrideSideFacetCaption : 'Narrow Search')?></h4> -<? endif; ?> -<? $checkboxFilters = $results->getParams()->getCheckboxFacets(); ?> -<? $checkboxesShown = false; ?> -<? if (count($checkboxFilters) > 0): +<?php endif; ?> +<?php $checkboxFilters = $results->getParams()->getCheckboxFacets(); ?> +<?php $checkboxesShown = false; ?> +<?php if (count($checkboxFilters) > 0): foreach ($checkboxFilters as $current) { if ($results->getResultTotal() > 0 || $current['selected'] || $current['alwaysVisible']) { $checkboxesShown = true; @@ -19,63 +27,47 @@ $this->options = $options = $this->searchOptions($this->searchClassId); } } ?> - <? if ($checkboxesShown):?> + <?php if ($checkboxesShown):?> <div class="checkboxFilter"> <?=$this->context($this)->renderInContext('Recommend/SideFacets/checkbox-filters.phtml', ['checkboxFilters' => $checkboxFilters, 'results' => $results]);?> </div> -<? endif; ?> -<? endif; ?> -<? $extraFilters = isset($this->extraSideFacetFilters) ? $this->extraSideFacetFilters : []; ?> -<? $collapsedFacets = $this->recommend->getCollapsedFacets() ?> -<? $filterList = array_merge($results->getParams()->getFilterList(true), $extraFilters); ?> -<? if (!empty($filterList)): ?> +<?php endif; ?> +<?php endif; ?> +<?php $extraFilters = isset($this->extraSideFacetFilters) ? $this->extraSideFacetFilters : []; ?> +<?php $collapsedFacets = $this->recommend->getCollapsedFacets() ?> +<?php $filterList = array_merge($results->getParams()->getFilterList(true), $extraFilters); ?> +<?php if (!empty($filterList)): ?> <?=$this->context($this)->renderInContext('Recommend/SideFacets/filter-list.phtml', [ 'collapsedFacets' => $collapsedFacets, 'extraFilters' => $extraFilters, 'filterList' => $filterList, ]);?> -<? endif; ?> +<?php endif; ?> <?=isset($this->sideFacetExtraControls) ? $this->sideFacetExtraControls : ''?> -<? /* finc-specific line: sidefacet()->displayAllowedFacetValues ..., #7624 - CK */ /* Original line was: *//* -<? $sideFacetSet = $this->recommend->getFacetSet(); $rangeFacets = $this->recommend->getAllRangeFacets(); ?> - */ ?> -<? $sideFacetSet = $this->sidefacet()->displayAllowedFacetValues($this->recommend->getFacetSet()); $rangeFacets = $this->recommend->getAllRangeFacets(); ?> -<? $hierarchicalFacets = $this->recommend->getHierarchicalFacets() ?> -<? $hierarchicalFacetSortOptions = $this->recommend->getHierarchicalFacetSortOptions() ?> -<? if (!empty($sideFacetSet) && $results->getResultTotal() > 0): ?> - <? foreach ($sideFacetSet as $title => $cluster): ?> +<?php +/* finc-specific line to show allowed facet values only: sidefacet()->displayAllowedFacetValues ..., #7624 - CK */ /* Original line is: +<?php $sideFacetSet = $this->recommend->getFacetSet(); ?> + */ +?> +<?php $sideFacetSet = $this->sideFacet()->displayAllowedFacetValues($this->recommend->getFacetSet()); ?> +<?php $hierarchicalFacets = $this->recommend->getHierarchicalFacets() ?> +<?php $hierarchicalFacetSortOptions = $this->recommend->getHierarchicalFacetSortOptions() ?> +<?php if (!empty($sideFacetSet) && $results->getResultTotal() > 0): ?> + <?php foreach ($sideFacetSet as $title => $cluster): ?> <div class="facet-group" id="side-panel-<?=$this->escapeHtmlAttr($title)?>"> - <? /* use 'a' instead of 'div' below! Fix this in all instance branches to avoid validation error 'href not allowed on div'; #9416, CK */ ?> - <a class="title<? if (in_array($title, $collapsedFacets)): ?> collapsed<? endif ?>" data-toggle="collapse" href="#side-collapse-<?=$this->escapeHtmlAttr($title)?>"> + <button class="title<?php if(in_array($title, $collapsedFacets)): ?> collapsed<?php endif ?>" data-toggle="collapse" href="#side-collapse-<?=$this->escapeHtmlAttr($title) ?>" > <?=$this->transEsc($cluster['label'])?> - </a> - <div id="side-collapse-<?=$this->escapeHtmlAttr($title)?>" class="collapse<? if (!in_array($title, $collapsedFacets)): ?> in<? endif ?>"> - <? if (isset($rangeFacets[$title])): ?> - <?=$this->context($this)->renderInContext('Recommend/SideFacets/range-slider.phtml', ['title' => $title, 'facet' => $rangeFacets[$title]]);?> - <? else: ?> - <? $contextVars = [ - 'allowExclude' => $this->recommend->excludeAllowed($title), - 'title' => $title, - 'sortOptions' => isset($hierarchicalFacetSortOptions[$title]) ? $hierarchicalFacetSortOptions[$title] : '', - 'collapsedFacets' => $collapsedFacets - ]; ?> - <? if (in_array($title, $hierarchicalFacets)): ?> - <?=$this->context($this)->renderInContext('Recommend/SideFacets/hierarchical-facet.phtml', $contextVars);?> - <noscript> - <? endif; ?> - <? $contextVars = [ - 'options' => $options, - 'allowExclude' => $this->recommend->excludeAllowed($title), - 'facets_before_more' => $this->recommend->getShowMoreSetting($title), - 'showMoreInLightbox' => $this->recommend->getShowInLightboxSetting($title) - ]; ?> - <?=$this->context($this)->renderInContext('Recommend/SideFacets/cluster-list.phtml', array_merge($contextVars, ['title' => $title, 'cluster' => $cluster]));?> - <? if (in_array($title, $hierarchicalFacets)): ?> - </noscript> - <? endif; ?> - <? endif; ?> + </button> + <div id="side-collapse-<?=$this->escapeHtmlAttr($title)?>" class="collapse<?php if (!in_array($title, $collapsedFacets)): ?> in<?php endif ?>"> + <?=$this->context($this)->renderInContext( + 'Recommend/SideFacets/facet.phtml', + [ + 'facet' => $title, + 'cluster' => $cluster, + 'collapsedFacets' => $collapsedFacets ] + ); ?> </div> </div> - <? endforeach; ?> -<? endif; ?> + <?php endforeach; ?> +<?php endif; ?> <!-- finc: recommend - sidefacets - END --> diff --git a/themes/finc/templates/RecordDriver/AbstractBase/export-bibtex.phtml b/themes/finc/templates/RecordDriver/AbstractBase/export-bibtex.phtml index f00d5b61c142a468e2daf0143f063a4288d2f32a..03029631f40cbfb4ac0ad3eb09b5a686ea53cb27 100644 --- a/themes/finc/templates/RecordDriver/AbstractBase/export-bibtex.phtml +++ b/themes/finc/templates/RecordDriver/AbstractBase/export-bibtex.phtml @@ -1,24 +1,24 @@ -<? +<?php // TODO: fold this logic into record driver methods at some point: $marc = $this->driver->tryMethod('getMarcRecord'); if (is_object($marc)) { - $marcPhdField = $marc->getField('502'); - $marcProceedingsField = $marc->getField('711'); + $marcPhdField = $marc->getField('502'); + $marcProceedingsField = $marc->getField('711'); } else { - $marcPhdField = $marcProceedingsField = false; + $marcPhdField = $marcProceedingsField = false; } $journalTitle = $this->driver->tryMethod('getContainerTitle'); $formats = $this->driver->tryMethod('getFormats'); if ($marcProceedingsField) { - $format = 'proceedings'; + $format = 'proceedings'; } else if ($marcPhdField) { - $format = 'phdthesis'; + $format = 'phdthesis'; } else if (!empty($journalTitle) || (is_array($formats) && in_array('Article', $formats))) { - $format = 'article'; + $format = 'article'; } else if (is_array($formats) && in_array('Journal', $formats)) { - $format = 'misc'; + $format = 'misc'; } else { - $format = 'book'; + $format = 'book'; } // Open format tag: @@ -32,15 +32,15 @@ $title = rtrim($this->driver->getTitle(), " /"); echo "title = {{$title}},\n"; if (!empty($journalTitle)) { - echo "journal = {{$journalTitle}},\n"; - $volume = $this->driver->tryMethod('getContainerVolume'); - if (!empty($volume)) { - echo "volume = {{$volume}},\n"; - } - $number = $this->driver->tryMethod('getContainerIssue'); - if (!empty($number)) { - echo "number = {{$number}},\n"; - }/* + echo "journal = {{$journalTitle}},\n"; + $volume = $this->driver->tryMethod('getContainerVolume'); + if (!empty($volume)) { + echo "volume = {{$volume}},\n"; + } + $number = $this->driver->tryMethod('getContainerIssue'); + if (!empty($number)) { + echo "number = {{$number}},\n"; + }/* $start = $this->driver->tryMethod('getContainerStartPage'); $end = $this->driver->tryMethod('getContainerEndPage'); if (!empty($start)) { @@ -52,152 +52,152 @@ if (!empty($journalTitle)) { echo "pages = {{$start}},\n"; } }*/ - $pages = $this->driver->tryMethod('getPages'); + $pages = $this->driver->tryMethod('getPages'); + if (!empty($pages)) { + // use page range if possible if (!empty($pages)) { - // use page range if possible - if (!empty($pages)) { - echo "pages = {{$pages}},\n"; - } + echo "pages = {{$pages}},\n"; } + } } $series = $this->driver->tryMethod('getSeries'); if (is_array($series)) { - foreach ($series as $current) { - echo "series = {" . (is_array($current) ? $current['name'] : $current) . "},\n"; - } + foreach ($series as $current) { + echo "series = {" . (is_array($current) ? $current['name'] : $current) . "},\n"; + } } $authors = []; $primaryAuthor = $this->driver->tryMethod('getPrimaryAuthor'); if (!empty($primaryAuthor)) { - $authors[] = $primaryAuthor; + $authors[] = $primaryAuthor; } $additionalAuthors = $this->driver->tryMethod('getAdditionalAuthors'); if (!empty($additionalAuthors)) { - $authors[] = $additionalAuthors; + $authors[] = $additionalAuthors; } if (!empty($authors)) { - $arr = []; - foreach ($authors as $author) { - if (is_array($author)) { - foreach ($author as $au) { - if (!in_array($au['name'], $arr)) { - $arr[] = $au['name']; - } - } - } else { - if (!in_array($author, $arr)) { - $arr[] = $author; - } + $arr = []; + foreach ($authors as $author) { + if (is_array($author)) { + foreach ($author as $au) { + if (!in_array($au['name'], $arr)) { + $arr[] = $au['name']; } + } + } else { + if (!in_array($author, $arr)) { + $arr[] = $author; + } } - $author = implode(' and ', $arr); - echo "author = {{$author}},\n"; + } + $author = implode(' and ', $arr); + echo "author = {{$author}},\n"; } $secondaryAuthors = $this->driver->tryMethod('getSecondaryAuthors'); if (is_array($secondaryAuthors)) { - foreach ($secondaryAuthors as $current) { - echo "editor = {{$current}},\n"; - } + foreach ($secondaryAuthors as $current) { + echo "editor = {{$current}},\n"; + } } $pubPlaces = $this->driver->tryMethod('getPlacesOfPublication'); $pubDates = $this->driver->tryMethod('getPublicationDates'); $pubNames = $this->driver->tryMethod('getPublishers'); if (is_array($pubPlaces) && is_array($pubDates) && is_array($pubNames)) { - $total = min(count($pubPlaces), count($pubDates), count($pubNames)); - // if we have pub dates but no other details, we still want to export the year: - if ($total == 0 && count($pubDates) > 0) { - $total = 1; + $total = min(count($pubPlaces), count($pubDates), count($pubNames)); + // if we have pub dates but no other details, we still want to export the year: + if ($total == 0 && count($pubDates) > 0) { + $total = 1; + } + for ($i = 0; $i < $total; $i++) { + if (isset($pubPlaces[$i])) { + echo "address = {" . rtrim(str_replace(array('[', ']'), '', $pubPlaces[$i]), ': ') . "},\n"; } - for ($i = 0; $i < $total; $i++) { - if (isset($pubPlaces[$i])) { - echo "address = {" . rtrim(str_replace(array('[', ']'), '', $pubPlaces[$i]), ': ') . "},\n"; - } - if (isset($pubNames[$i])) { - echo "publisher = {" . rtrim($pubNames[$i], ", ") . "},\n"; - } - /*$date = trim($pubDates[$i], '[]. '); - if (strlen($date) > 4) { - $date = $this->dateTime()->extractYear($date); - } - if ($date) { - echo "year = {{$date}},\n"; - }*/ + if (isset($pubNames[$i])) { + echo "publisher = {" . rtrim($pubNames[$i], ", ") . "},\n"; } + /*$date = trim($pubDates[$i], '[]. '); + if (strlen($date) > 4) { + $date = $this->dateTime()->extractYear($date); + } + if ($date) { + echo "year = {{$date}},\n"; + }*/ + } } $data = $this->driver->tryMethod('getPublishedIn'); if (isset($data['date'])) { - $date = $data['date']; - echo "year = {{$date}},\n"; + $date = $data['date']; + echo "year = {{$date}},\n"; } if (empty($data)) { - $date = $this->driver->tryMethod('getPublishDateSort'); - if (!empty($date)) { - echo "year = {{$date}},\n"; - } + $date = $this->driver->tryMethod('getPublishDateSort'); + if (!empty($date)) { + echo "year = {{$date}},\n"; + } } $edition = $this->driver->tryMethod('getEdition'); if (!empty($edition)) { - echo "edition = {{$edition}},\n"; + echo "edition = {{$edition}},\n"; } if ($marcPhdField && $subfield = $marcPhdField->getSubfield('a')) { - echo "school = {" . $subfield->getData() . "},\n"; + echo "school = {" . $subfield->getData() . "},\n"; } // Try to find a page count in the physical description: $physical = $this->driver->tryMethod('getPhysicalDescriptions'); if (is_array($physical)) { - foreach ($physical as $current) { - if (preg_match('/([0-9]+)\s*p/', $current, $matches)) { - echo "pages = {{$matches[1]}},\n"; - break; - } + foreach ($physical as $current) { + if (preg_match('/([0-9]+)\s*p/', $current, $matches)) { + echo "pages = {{$matches[1]}},\n"; + break; } + } } $isbns = $this->driver->tryMethod('getISBNs'); if (is_array($isbns)) { - foreach ($isbns as $isbn) { - echo "isbn = {{$isbn}},\n"; - } + foreach ($isbns as $isbn) { + echo "isbn = {{$isbn}},\n"; + } } $issns = $this->driver->tryMethod('getISSNs'); if (is_array($issns)) { - foreach ($issns as $issn) { - echo "issn = {{$issn}},\n"; - } + foreach ($issns as $issn) { + echo "issn = {{$issn}},\n"; + } } $languages = $this->driver->tryMethod('getLanguages'); if (is_array($languages)) { - foreach ($languages as $language) { - echo "language = {{$language}},\n"; - } + foreach ($languages as $language) { + echo "language = {{$language}},\n"; + } } $notes = $this->driver->tryMethod('getGeneralNotes'); if (is_array($notes)) { - foreach ($notes as $note) { - echo "note = {{$note}},\n"; - } + foreach ($notes as $note) { + echo "note = {{$note}},\n"; + } } foreach ($this->record($this->driver)->getUrlList() as $doi) { - echo "url = {{$doi}},\n"; + echo "url = {{$doi}},\n"; } $baseUrl = $this->export()->getMainConfig()->Site->url; $url = $baseUrl . $this->recordLink()->getUrl($this->driver->getUniqueId()); if (!empty($url)) { - echo "url = {{$url}}\n"; + echo "url = {{$url}}\n"; } // Record separator: diff --git a/themes/finc/templates/RecordDriver/AbstractBase/export-endnote.phtml b/themes/finc/templates/RecordDriver/AbstractBase/export-endnote.phtml index f0f927eb9de6a617e02385a2ab98c112cb14d9ea..9a3c7f380e0202b5effe35a1819bfeaf92c44b2e 100644 --- a/themes/finc/templates/RecordDriver/AbstractBase/export-endnote.phtml +++ b/themes/finc/templates/RecordDriver/AbstractBase/export-endnote.phtml @@ -1,15 +1,15 @@ -<? +<?php $filter = new Zend\Filter\Word\CamelCaseToSeparator(); // A driver-specific template may pass in format overrides; check for these before going to the driver itself: $formats = isset($this->overrideFormats) ? $this->overrideFormats : $this->driver->tryMethod('getFormats'); if (is_array($formats) && !empty($formats)) { - foreach ($formats as $format) { - $format = $filter->filter($format); - echo "%0 $format\n"; - } + foreach ($formats as $format) { + $format = $filter->filter($format); + echo "%0 $format\n"; + } } else { - // Assume book if no format found (otherwise data may be considered invalid): - echo "%0 Book\n"; + // Assume book if no format found (otherwise data may be considered invalid): + echo "%0 Book\n"; } /*$author = $this->driver->tryMethod('getPrimaryAuthor'); if (!empty($author)) { @@ -28,116 +28,116 @@ if (!empty($authors)) { $authors = []; $primaryAuthor = $this->driver->tryMethod('getPrimaryAuthor'); if (!empty($primaryAuthor)) { - $authors[] = $primaryAuthor; + $authors[] = $primaryAuthor; } $additionalAuthors = $this->driver->tryMethod('getAdditionalAuthors'); if (!empty($additionalAuthors)) { - $authors[] = $additionalAuthors; + $authors[] = $additionalAuthors; } if (!empty($authors)) { - $arr = []; - foreach ($authors as $author) { - if (is_array($author)) { - foreach ($author as $au) { - if (!in_array($au['name'], $arr)) { - $arr[] = $au['name']; - } - } - } else { - if (!in_array($author, $arr)) { - $arr[] = $author; - } + $arr = []; + foreach ($authors as $author) { + if (is_array($author)) { + foreach ($author as $au) { + if (!in_array($au['name'], $arr)) { + $arr[] = $au['name']; } + } + } else { + if (!in_array($author, $arr)) { + $arr[] = $author; + } } - $author = implode(' and ', $arr); - echo "%A {$author}\n"; + } + $author = implode(' and ', $arr); + echo "%A {$author}\n"; } $secondaryAuthors = $this->driver->tryMethod('getSecondaryAuthors'); if (is_array($secondaryAuthors)) { - foreach ($secondaryAuthors as $current) { - echo "%E $current\n"; - } + foreach ($secondaryAuthors as $current) { + echo "%E $current\n"; + } } $pubPlaces = $this->driver->tryMethod('getPlacesOfPublication'); $pubDates = $this->driver->tryMethod('getPublicationDates'); $pubNames = $this->driver->tryMethod('getPublishers'); if (is_array($pubPlaces) && is_array($pubDates) && is_array($pubNames)) { - $total = min(count($pubPlaces), count($pubDates), count($pubNames)); - // if we have pub dates but no other details, we still want to export the year: - if ($total == 0 && ( + $total = min(count($pubPlaces), count($pubDates), count($pubNames)); + // if we have pub dates but no other details, we still want to export the year: + if ($total == 0 && ( (count($pubDates) > 0) || (count($pubNames) > 0) || (count($pubPlaces) > 0) - )) { - $total = 1; + )) { + $total = 1; + } + for ($i = 0; $i < $total; $i++) { + if (isset($pubNames[$i])) { + echo "%I " . rtrim($pubNames[$i], ", ") . "\n"; } - for ($i = 0; $i < $total; $i++) { - if (isset($pubNames[$i])) { - echo "%I " . rtrim($pubNames[$i], ", ") . "\n"; - } - if (isset($pubDates[$i])) { - $date = trim($pubDates[$i], '[]. '); - if (strlen($date) > 4) { - $date = $this->dateTime()->extractYear($date); - } - if ($date) { - echo "%D $date\n"; - } - } - if (isset($pubPlaces[$i])) { - echo "%C " . rtrim(str_replace(array('[', ']'), '', $pubPlaces[$i]), ': '). "\n"; - } + if (isset($pubDates[$i])) { + $date = trim($pubDates[$i], '[]. '); + if (strlen($date) > 4) { + $date = $this->dateTime()->extractYear($date); + } + if ($date) { + echo "%D $date\n"; + } + } + if (isset($pubPlaces[$i])) { + echo "%C " . rtrim(str_replace(array('[', ']'), '', $pubPlaces[$i]), ': ') . "\n"; } + } } // echo "%C ?\n"; $data = $this->driver->tryMethod('getPublishedIn'); if (isset($data['date'])) { - $date = $data['date']; - echo "%D {$date}\n"; + $date = $data['date']; + echo "%D {$date}\n"; } if (empty($data)) { - $date = $this->driver->tryMethod('getPublishDateSort'); - if (!empty($date)) { - echo "%D {$date}}\n"; - } + $date = $this->driver->tryMethod('getPublishDateSort'); + if (!empty($date)) { + echo "%D {$date}\n"; + } } $languages = $this->driver->tryMethod('getLanguages'); if (is_array($languages)) { - foreach ($languages as $lang) { - echo "%G $lang\n"; - } + foreach ($languages as $lang) { + echo "%G $lang\n"; + } } $series = $this->driver->tryMethod('getSeries'); if (is_array($series)) { - foreach ($series as $current) { - echo '%B ' . (is_array($current) ? $current['name'] : $current) . "\n"; - } + foreach ($series as $current) { + echo '%B ' . (is_array($current) ? $current['name'] : $current) . "\n"; + } } $isbns = $this->driver->tryMethod('getISBNs'); if (is_array($isbns)) { - foreach ($isbns as $isbn) { - echo "%@ $isbn\n"; - } + foreach ($isbns as $isbn) { + echo "%@ $isbn\n"; + } } $issns = $this->driver->tryMethod('getISSNs'); if (is_array($issns)) { - foreach ($issns as $issn) { - echo "%@ $issn\n"; - } + foreach ($issns as $issn) { + echo "%@ $issn\n"; + } } $library = $this->export()->getMainConfig()->Site->title; if (!empty($library)) { - echo "%~ {$library}\n"; + echo "%~ {$library}\n"; } $title = rtrim($this->driver->getTitle(), " /"); @@ -145,62 +145,62 @@ echo "%T $title\n"; $volume = $this->driver->tryMethod('getVolume'); if (!empty($volume)) { - $volume = str_replace(',', '', $volume); - echo "%V $volume\n"; + $volume = str_replace(',', '', $volume); + echo "%V $volume\n"; } $journalTitle = $this->driver->tryMethod('getContainerTitle'); if (!empty($journalTitle)) { - echo "%J $journalTitle\n"; - $volume = $this->driver->tryMethod('getContainerVolume'); - if (!empty($volume)) { - echo "%V $volume\n"; - } - $number = $this->driver->tryMethod('getContainerIssue'); - if (!empty($number)) { - echo "%N $number\n"; - } - /*$page = $this->driver->tryMethod('getContainerStartPage'); - if (!empty($page)) { - $end = $this->driver->tryMethod('getContainerEndPage'); - if (!empty($end) && $end != $page) { - $page .= '-' . $end; - } - echo "%P $page\n"; - }*/ - $pages = $this->driver->tryMethod('getPages'); + echo "%J $journalTitle\n"; + $volume = $this->driver->tryMethod('getContainerVolume'); + if (!empty($volume)) { + echo "%V $volume\n"; + } + $number = $this->driver->tryMethod('getContainerIssue'); + if (!empty($number)) { + echo "%N $number\n"; + } + /*$page = $this->driver->tryMethod('getContainerStartPage'); + if (!empty($page)) { + $end = $this->driver->tryMethod('getContainerEndPage'); + if (!empty($end) && $end != $page) { + $page .= '-' . $end; + } + echo "%P $page\n"; + }*/ + $pages = $this->driver->tryMethod('getPages'); + if (!empty($pages)) { + // use page range if possible if (!empty($pages)) { - // use page range if possible - if (!empty($pages)) { - echo "%P {$pages}\n"; - } + echo "%P {$pages}\n"; } + } } foreach ($this->record($this->driver)->getUrlList() as $doi) { - echo "%U $doi\n"; + echo "%U $doi\n"; } $edition = $this->driver->tryMethod('getEdition'); if (!empty($edition)) { - echo "%7 $edition\n"; + echo "%7 $edition\n"; } $summary = $this->driver->tryMethod('getSummary'); if (!empty($summary)) { - echo "%X {$summary[0]}\n"; + echo "%X {$summary[0]}\n"; } $baseUrl = $this->export()->getMainConfig()->Site->url; $url = $baseUrl . $this->recordLink()->getUrl($this->driver->getUniqueId()); if (!empty($url)) { - echo "%Z {$url}\n"; + echo "%Z {$url}\n"; } $baseUrl = $this->export()->getMainConfig()->Site->url; $url = $baseUrl . $this->recordLink()->getUrl($this->driver->getUniqueId()); if (!empty($url)) { - echo "%U {$url}\n"; + echo "%U {$url}\n"; } // Record separator: diff --git a/themes/finc/templates/RecordDriver/AbstractBase/export-ris.phtml b/themes/finc/templates/RecordDriver/AbstractBase/export-ris.phtml index 58da759de075e735cf589e4374b946d8e4f3c85e..06440fddf74f9a4120b10a429bb4437227ef44db 100644 --- a/themes/finc/templates/RecordDriver/AbstractBase/export-ris.phtml +++ b/themes/finc/templates/RecordDriver/AbstractBase/export-ris.phtml @@ -1,24 +1,24 @@ -<? +<?php // TODO: fold this logic into record driver methods at some point: $marc = $this->driver->tryMethod('getMarcRecord'); if (is_object($marc)) { - $marcPhdField = $marc->getField('502'); - $marcProceedingsField = $marc->getField('711'); + $marcPhdField = $marc->getField('502'); + $marcProceedingsField = $marc->getField('711'); } else { - $marcPhdField = $marcProceedingsField = false; + $marcPhdField = $marcProceedingsField = false; } $journalTitle = $this->driver->tryMethod('getContainerTitle'); $formats = $this->driver->tryMethod('getFormats'); if ($marcProceedingsField) { - $format = 'CONF'; + $format = 'CONF'; } else if ($marcPhdField) { - $format = 'THES'; + $format = 'THES'; } else if (!empty($journalTitle) || (is_array($formats) && in_array('Article', $formats))) { - $format = 'JOUR'; + $format = 'JOUR'; } else if (is_array($formats) && in_array('Journal', $formats)) { - $format = 'JFULL'; + $format = 'JFULL'; } else { - $format = 'BOOK'; + $format = 'BOOK'; } // Type @@ -26,53 +26,53 @@ echo 'TY - ' . $format . "\r\n"; $title = rtrim($this->driver->getTitle(), " /"); if (!empty($title)) { - echo 'TI - ' . "$title\r\n"; + echo 'TI - ' . "$title\r\n"; } if (!empty($journalTitle)) { - if (empty($title)) { - echo 'TI - ' . "$journalTitle\r\n"; - } else { - echo 'T2 - ' . "$journalTitle\r\n"; - } - $volume = $this->driver->tryMethod('getContainerVolume'); - if (!empty($volume)) { - echo 'VL - ' . "$volume\r\n"; - } - $number = $this->driver->tryMethod('getContainerIssue'); - if (!empty($number)) { - echo 'IS - ' . "$number\r\n"; - } - $start = $this->driver->tryMethod('getContainerStartPage'); - $end = $this->driver->tryMethod('getContainerEndPage'); - /*if (!empty($start)) { - // use page range if possible - if (!empty($end)) { - echo 'EP - ' . "$end\r\n"; - } else { - // use only start page - echo 'SP - ' . "$start\r\n"; - } - }*/ - $pages = $this->driver->tryMethod('getPages'); - if (!empty($pages)) { - $data = explode('-', $pages); - // use page range if possible - if (isset($data[0]) && !empty($data[0])) { - echo 'SP - ' . trim($data[0]) . "\r\n"; - } - if (isset($data[1]) && !empty($data[1])) { - // use only start page - echo 'EP - ' . trim($data[1]) . "\r\n"; - } - } + if (empty($title)) { + echo 'TI - ' . "$journalTitle\r\n"; + } else { + echo 'T2 - ' . "$journalTitle\r\n"; + } + $volume = $this->driver->tryMethod('getContainerVolume'); + if (!empty($volume)) { + echo 'VL - ' . "$volume\r\n"; + } + $number = $this->driver->tryMethod('getContainerIssue'); + if (!empty($number)) { + echo 'IS - ' . "$number\r\n"; + } + $start = $this->driver->tryMethod('getContainerStartPage'); + $end = $this->driver->tryMethod('getContainerEndPage'); + /*if (!empty($start)) { + // use page range if possible + if (!empty($end)) { + echo 'EP - ' . "$end\r\n"; + } else { + // use only start page + echo 'SP - ' . "$start\r\n"; + } + }*/ + $pages = $this->driver->tryMethod('getPages'); + if (!empty($pages)) { + $data = explode('-', $pages); + // use page range if possible + if (isset($data[0]) && !empty($data[0])) { + echo 'SP - ' . trim($data[0]) . "\r\n"; + } + if (isset($data[1]) && !empty($data[1])) { + // use only start page + echo 'EP - ' . trim($data[1]) . "\r\n"; + } + } } $series = $this->driver->tryMethod('getSeries'); if (is_array($series)) { - foreach ($series as $current) { - echo 'T3 - ' . (is_array($current) ? $current['name'] : $current) . "\r\n"; - } + foreach ($series as $current) { + echo 'T3 - ' . (is_array($current) ? $current['name'] : $current) . "\r\n"; + } } /*$author = $this->driver->tryMethod('getPrimaryAuthor'); @@ -93,109 +93,111 @@ if (!empty($authors)) { $authors = []; $primaryAuthor = $this->driver->tryMethod('getPrimaryAuthor'); if (!empty($primaryAuthor)) { - $authors[] = $primaryAuthor; + $authors[] = $primaryAuthor; } $additionalAuthors = $this->driver->tryMethod('getAdditionalAuthors'); if (!empty($additionalAuthors)) { - $authors[] = $additionalAuthors; + $authors[] = $additionalAuthors; } if (!empty($authors)) { - $arr = []; - foreach ($authors as $author) { - if (is_array($author)) { - foreach ($author as $au) { - if (!in_array($au['name'], $arr)) { - $arr[] = $au['name']; - } - } - } else { - if (!in_array($author, $arr)) { - $arr[] = $author; - } + $arr = []; + foreach ($authors as $author) { + if (is_array($author)) { + foreach ($author as $au) { + if (!in_array($au['name'], $arr)) { + $arr[] = $au['name']; } + } + } else { + if (!in_array($author, $arr)) { + $arr[] = $author; + } } - $author = implode(' and ', $arr); - echo 'AU - ' . "{$author}\r\n"; + } + $author = implode(' and ', $arr); + echo 'AU - ' . "{$author}\r\n"; } $secondaryAuthors = $this->driver->tryMethod('getSecondaryAuthors'); if (is_array($secondaryAuthors)) { - foreach ($secondaryAuthors as $current) { - echo "editor = {{$current}},\n"; - } + foreach ($secondaryAuthors as $current) { + echo "editor = {{$current}},\n"; + } } $secondaryAuthors = $this->driver->tryMethod('getSecondaryAuthors'); if (is_array($secondaryAuthors)) { - foreach ($secondaryAuthors as $current) { - echo 'A2 - ' . "$current\r\n"; - } + foreach ($secondaryAuthors as $current) { + echo 'A2 - ' . "$current\r\n"; + } } $pubPlaces = $this->driver->tryMethod('getPlacesOfPublication'); $pubDates = $this->driver->tryMethod('getPublicationDates'); $pubNames = $this->driver->tryMethod('getPublishers'); if (is_array($pubPlaces) && is_array($pubDates) && is_array($pubNames)) { - $total = min(count($pubPlaces), count($pubDates), count($pubNames)); - // if we have pub dates but no other details, we still want to export the year: - if ($total == 0 && count($pubDates) > 0) { - $total = 1; + $total = min(count($pubPlaces), count($pubDates), count($pubNames)); + // if we have pub dates but no other details, we still want to export the year: + if ($total == 0 && count($pubDates) > 0) { + $total = 1; + } + for ($i = 0; $i < $total; $i++) { + if (isset($pubPlaces[$i])) { + echo "CY - " . rtrim(str_replace(array('[', ']'), '', $pubPlaces[$i]), ': ') . "\r\n"; } - for ($i = 0; $i < $total; $i++) { - if (isset($pubPlaces[$i])) { - echo "CY - " . rtrim(str_replace(array('[', ']'), '', $pubPlaces[$i]), ': '). "\r\n"; - } - if (isset($pubNames[$i])) { - echo "PB - " . rtrim($pubNames[$i], ", ") . "\r\n"; - } - $date = trim($pubDates[$i], '[]. '); - if (strlen($date) > 4) { - $date = $this->dateTime()->extractYear($date); - } - if ($date) { - echo 'PY - ' . "$date\r\n"; - } + if (isset($pubNames[$i])) { + echo "PB - " . rtrim($pubNames[$i], ", ") . "\r\n"; } + $date = trim($pubDates[$i], '[]. '); + if (strlen($date) > 4) { + $date = $this->dateTime()->extractYear($date); + } + if ($date) { + echo 'PY - ' . "$date\r\n"; + } + } } $data = $this->driver->tryMethod('getPublishedIn'); if (isset($data['date'])) { - $date = $data['date']; - echo 'PY - ' . "$date\r\n"; + $date = $data['date']; + echo 'PY - ' . "$date\r\n"; } if (empty($data)) { - $date = $this->driver->tryMethod('getPublishDateSort'); - if (!empty($date)) { - echo 'PY - ' . "$date\r\n"; - } + $date = $this->driver->tryMethod('getPublishDateSort'); + if (!empty($date)) { + echo 'PY - ' . "$date\r\n"; + } } $languages = $this->driver->tryMethod('getLanguages'); if (is_array($languages)) { - foreach ($languages as $lang) { - echo 'LA - ' . "$lang\r\n"; - } + foreach ($languages as $lang) { + echo 'LA - ' . "$lang\r\n"; + } } -$genres = $this->driver->tryMethod('getGenres'); +$genres = $this->driver->tryMethod('getGenres'); if (is_array($genres)) { - foreach ($genres as $genre) { - echo 'M3 - ' . "$genre\r\n"; - } + foreach ($genres as $genre) { + echo 'M3 - ' . "$genre\r\n"; + } } -$topics = $this->driver->tryMethod('getTopics'); +$topics = $this->driver->tryMethod('getTopics'); $flatten = function (array $array) { - $return = []; - array_walk_recursive($array, function($a) use (&$return) { $return[] = $a; }); - return $return; - }; + $return = []; + array_walk_recursive($array, function ($a) use (&$return) { + $return[] = $a; + }); + return $return; +}; if (is_array($topics)) { - $topics = $flatten($topics); - foreach ($topics as $topic) { - echo 'KW - ' . "$topic\r\n"; - } + $topics = $flatten($topics); + foreach ($topics as $topic) { + echo 'KW - ' . "$topic\r\n"; + } } /*$start_page = $this->driver->tryMethod('getContainerStartPage'); @@ -205,38 +207,38 @@ if (!empty($start_page)) { $isbns = $this->driver->tryMethod('getISBNs'); if (is_array($isbns)) { - foreach ($isbns as $isbn) { - echo 'SN - ' . "$isbn\r\n"; - } + foreach ($isbns as $isbn) { + echo 'SN - ' . "$isbn\r\n"; + } } $issns = $this->driver->tryMethod('getISSNs'); if (is_array($issns)) { - foreach ($issns as $issn) { - echo 'SN - ' . "$issn\r\n"; - } + foreach ($issns as $issn) { + echo 'SN - ' . "$issn\r\n"; + } } $edition = $this->driver->tryMethod('getEdition'); if (!empty($edition)) { - echo 'ET - ' . "$edition\r\n"; + echo 'ET - ' . "$edition\r\n"; } $notes = $this->driver->tryMethod('getGeneralNotes'); if (is_array($notes)) { - foreach ($notes as $note) { - echo 'N1 - ' . "$note\r\n"; - } + foreach ($notes as $note) { + echo 'N1 - ' . "$note\r\n"; + } } foreach ($this->record($this->driver)->getUrlList() as $doi) { - echo 'UR - ' . "$doi\r\n"; + echo 'UR - ' . "$doi\r\n"; } $baseUrl = $this->export()->getMainConfig()->Site->url; $url = $baseUrl . $this->recordLink()->getUrl($this->driver->getUniqueId()); if (!empty($url)) { - echo 'UR - ' . "$url\r\n"; + echo 'UR - ' . "$url\r\n"; } // End of Record: diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/collection-info.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/collection-info.phtml new file mode 100644 index 0000000000000000000000000000000000000000..5af52c580f7141244543f1392c575993680f954b --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/collection-info.phtml @@ -0,0 +1,63 @@ +<!-- finc: recordDriver - DefaultRecord - collection-info --> +<?php $this->headScript()->appendFile('collection_record.js'); ?> +<div class="media"> + <?php $QRCode = $this->record($this->driver)->getQRCode("core"); + $coverDetails = $this->record($this->driver)->getCoverDetails('collection-info', 'medium', $this->record($this->driver)->getThumbnail('large')); + $cover = $coverDetails['html']; + $preview = $this->record($this->driver)->getPreviews(); ?> + <?php if ($QRCode || $cover || $preview): ?> + <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?>"> + <?php /* Display thumbnail if appropriate: */ ?> + <?php if ($cover): ?> + <?=$cover?> + <?php endif; ?> + + <?php /* Display qrcode if appropriate: */ ?> + <?php if ($QRCode): ?> + <span class="hidden-xs"> + <br/><img alt="<?=$this->transEsc('QR Code')?>" class="qrcode" src="<?=$this->escapeHtmlAttr($QRCode);?>"/> + </span> + <?php endif; ?> + + <?php if ($preview): ?><?=$preview?><?php endif; ?> + </div> + <?php endif; ?> + <div class="media-body"> + + <?php /* finc: we want to get rid of trailing special chars in the title and limit its length to 100 chars */ ?> + <h2><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle() . ' ' . $this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 100)))?></h2> + + <?php $summary = $this->driver->getSummary(); + $summary = $summary[0] ?? false; ?> + <?php if ($summary): ?> + <p><?=$this->escapeHtml($summary)?></p> + <?php endif; ?> + + <?php /* Display the lists that this record is saved to */ ?> + <div class="savedLists hidden alert alert-info" id="savedLists"> + <strong><?=$this->transEsc("Saved in")?>:</strong> + </div> + + <?php /* finc-specific snippet - Begin - CK */ + /* Do not set to 'hidden', make table below collapse in; adapt collection_record.js to keep accordion open - CK */ ?> + <a id="moreInfoToggle" href="#" class="accordion-toggler collapsed hidden" data-toggle="collapse" data-target="#collectionInfo" aria-expanded="true"> + <?=$this->transEsc('Description')?> + </a> + <?php /* Display Main Details */ ?> + <?php + $formatter = $this->recordDataFormatter(); + $fields = $formatter->getData($driver, $formatter->getDefaults('collection-info')); + ?> + <?php if (!empty($fields)): ?> + <?php /* finc: we use 'collapse in' to initially hide the content, CK */ ?> + <table id="collectionInfo" class="table table-striped collapse in"> + <caption class="sr-only"><?=$this->transEsc('Bibliographic Details')?></caption> + <?php foreach ($fields as $current): ?> + <tr><th><?=$this->transEsc($current['label'])?>:</th><td><?=$current['value']?></td></tr> + <?php endforeach; ?> + </table> + <?php endif; ?> + <?php /* End Main Details */ ?> + </div> +</div> +<!-- finc: recordDriver - DefaultRecord - collection-info - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/core.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/core.phtml new file mode 100644 index 0000000000000000000000000000000000000000..2e2cb843e9b726d15f3697186489e08395135865 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/core.phtml @@ -0,0 +1,85 @@ +<!-- finc: RecordDriver - DefaultRecord - core --> +<div class="media" vocab="http://schema.org/" resource="#record" typeof="<?=$this->driver->getSchemaOrgFormats()?> Product"> + <?php /* finc: use VF5.1 offcanvas toggler here as well if you have a custom sidebar - CK */ ?> + <?=$this->render('RecordDriver/DefaultRecord/offcanvas-toggler'); ?> + <?php + $QRCode = $this->record($this->driver)->getQRCode("core"); + $coverDetails = $this->record($this->driver)->getCoverDetails('core', 'medium', $this->record($this->driver)->getThumbnail('large')); + $cover = $coverDetails['html']; + $preview = $this->record($this->driver)->getPreviews(); + ?> + <?php if ($QRCode || $cover || $preview): ?> + <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"> + <?php /* Display thumbnail if appropriate: */ ?> + <?php if ($cover): ?> + <?=$cover?> + <?php /* BOF - finc-specific StyleBasedIcons */ ?> + <?php elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> + <?=$this->record($this->driver)->getFormatIcon()?> + <?php /* EOF - finc-specific StyleBasedIcons */ ?> + <?php endif; ?> + + <?php /* Display qrcode if appropriate: */ ?> + <?php if ($QRCode): ?> + <span class="hidden-xs"> + <br/><img alt="<?=$this->transEsc('QR Code')?>" class="qrcode" src="<?=$this->escapeHtmlAttr($QRCode);?>"/> + </span> + <?php endif; ?> + + <?php // if you have a preview tab but want to move or remove the preview link + // from this area of the record view, this can be split into + // getPreviewData() (should stay here) and + // getPreviewLink() (can go in your desired tab) ?> + <?php if ($preview): ?> + <div class="record-previews"> + <?=$preview?> + </div> + <?php endif; ?> + </div> + <?php endif; ?> + <div class="media-body"> + + <?php /* finc: We want to get rid of trailing special chars in the title and limit its length to 100 chars; + in finc: keep schema name tag here!! #13861 - CK + */ + ?> + <?php /* finc: add schema tags for title #13850 - VE */ ?> + <h3 property="name"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle() . ' ' . $this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 100)))?></h3> + + <?php $summary = $this->driver->getSummary(); + $summary = isset($summary[0]) ? $this->escapeHtml($summary[0]) : false; ?> + <?php if ($summary): ?> + <p><?=$this->truncate($summary, 300)?></p> + + <?php if (strlen($summary) > 300): ?> + <p class="hidden-print"><a href='<?=$this->recordLink()->getTabUrl($this->driver, 'Description')?>#tabnav'><?=$this->transEsc('Full description')?></a></p> + <?php endif; ?> + <?php endif; ?> + + <?php if ($this->userlist()->getMode() !== 'disabled'): ?> + <?php /* Display the lists that this record is saved to */ ?> + <div class="savedLists hidden alert alert-info"> + <strong><?=$this->transEsc("Saved in")?>:</strong> + </div> + <?php endif; ?> + + <?php /* Display Main Details */ ?> + <?php + $formatter = $this->recordDataFormatter(); + $coreFields = $formatter->getData($driver, $formatter->getDefaults('core')); + ?> + <?php if (!empty($coreFields)): ?> + <table class="table table-striped"> + <caption class="sr-only"><?=$this->transEsc('Bibliographic Details')?></caption> + <?php foreach ($coreFields as $current): ?> + <tr> + <th><?=$this->transEsc($current['label'])?>:</th> + <td><?=$current['value']?></td> + </tr> + <?php endforeach; ?> + </table> + <?php endif; ?> + <?php /* End Main Details */ ?> + </div> +</div> +<!-- finc: RecordDriver - DefaultRecord - core - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-additionals.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-additionals.phtml new file mode 100644 index 0000000000000000000000000000000000000000..8f4e33a84cd862ecaf2c748786236b2de10224e3 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-additionals.phtml @@ -0,0 +1,20 @@ +<!-- finc: RecordDriver - DefaultRecord - data-additionals --> +<?php if (!empty($data) && is_array($data)): ?> + <?php foreach ($data as $additional) : ?> + <?php if (isset($additional['identifier'])): ?> + <tr> + <th> + <?=$this->transEsc($additional['identifier'])?>: + </th> + <td> + <?php if (isset($additional['id'])): ?> + <a href="<?=$this->recordLink()->getUrl($additional['id'])?>"><?=$this->escapeHtml($additional['text'])?></a> + <?php else: ?> + <?=$this->escapeHtml($additional['text'])?> + <?php endif; ?> + </td> + </tr> + <?php endif; ?> + <?php endforeach; ?> +<?php endif; ?> +<!-- finc: RecordDriver - DefaultRecord - data-additionals - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-authors.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-authors.phtml new file mode 100644 index 0000000000000000000000000000000000000000..7330dda85d6df9363ac774cb7b8047301bc1cea9 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-authors.phtml @@ -0,0 +1,57 @@ +<!-- finc: RecordDriver - DefaultRecord - data-authors --> +<?php +$formatProperty = function ($datafield, $name, $label) { + if (count($datafield) == 0) { + return ''; + } + $that = $this; + $translate = function ($str) use ($that, $label) { + return $that->transEsc($label . $str); + }; + return '<span class="author-property-' . $name . '">(' . implode(', ', array_unique(array_map($translate, $datafield))) . ')</span>'; +}; +$formattedAuthors = []; +$types = [ + 'main' => 'author', + 'secondary' => 'contributor', + 'corporate' => 'creator', + 'corporate_secondary' => 'contributor' +]; +?> +<?php foreach ($types as $type => $schemaLabel): ?> + <?php if (!empty($data[$type])): ?> + <?php foreach ($data[$type] as $author => $roles): ?> + <?php ob_start(); ?> + <span class="author-data" property="<?=$this->escapeHtml($schemaLabel)?>" typeof="Person"> + <span property="name"> + <a href="<?=$this->record($this->driver)->getLink('author', $author)?>"> + <?=$this->escapeHtml($author)?> + </a> + </span> + <?php + // Display additional data using the appropriate translation prefix + // (for example, to render author roles correctly): + if (!empty($requiredDataFields)) { + foreach ($requiredDataFields as $field) { + $name = $field['name']; + $prefix = $field['prefix'] ?? ''; + // deprecated due to more flexible solution at core + // to-do: revision of indexing and finc specific treatment + // of roles in RecordDriver + if (count($roles) > 0 && $name == 'role') { + echo $formatProperty($roles, $name, $prefix); + } + } + } + ?> + </span> + <?php +// Strip whitespace before close tags to avoid spaces in front of commas: + $formattedAuthors[] = trim(preg_replace('/\s+<\//', '</', ob_get_contents())); + ob_end_clean(); + ?> + <?php endforeach; ?> + <?php endif; ?> +<?php endforeach; ?> +<?=implode(', ', $formattedAuthors)?> +<!-- finc: RecordDriver - DefaultRecord - data-authors - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-dissertationNote.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-dissertationNote.phtml new file mode 100644 index 0000000000000000000000000000000000000000..c23ae1ed9902f1cd95b97ef8ebcd35c8d348d7cb --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-dissertationNote.phtml @@ -0,0 +1,9 @@ +<!-- finc: RecordDriver - DefaultRecord - data-dissertationNote - END --> +<?php if (!empty($data)): ?> + <?php if (isset($data['g'])) { + $dissertationMisc = $data['g']; + unset($data['g']); + } ?> + <?=implode(', ', array_map([$this, 'escapeHtml'], $data));?><?php if (isset($dissertationMisc)): ?> (<?=$dissertationMisc?>)<?php endif; ?> +<?php endif; ?> +<!-- finc: RecordDriver - DefaultRecord - data-dissertationNote - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-escapeHtml.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-escapeHtml.phtml new file mode 100644 index 0000000000000000000000000000000000000000..2cf79df5dbd61162fe388d18b48e9eadfca53621 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-escapeHtml.phtml @@ -0,0 +1,8 @@ +<?php // Don't add START and END comments ?> +<?php if (!empty($data)): ?> + <?php if (is_array($data)): ?> + <?=implode('<br/>', array_map(array($this, 'escapeHtml'), $data))?> + <?php else: ?> + <?=$this->escapeHtml($data)?> + <?php endif; ?> +<?php endif; ?> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-escapeHtmlCommaSep.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-escapeHtmlCommaSep.phtml new file mode 100644 index 0000000000000000000000000000000000000000..f1c711c47a800f75d5094f5f1ad8a29b615e8bd3 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-escapeHtmlCommaSep.phtml @@ -0,0 +1,9 @@ +<!-- finc: RecordDriver - DefaultRecord - data-escapeHtmlCommaSep --> +<?php if (!empty($data)): ?> + <?php if (is_array($data)): ?> + <?=implode(', ', array_map(array($this, 'escapeHtml'), $data));?> + <?php else: ?> + <?=$this->escapeHtml($data)?> + <?php endif; ?> +<?php endif; ?> +<!-- finc: RecordDriver - DefaultRecord - data-escapeHtmlCommaSep - END --> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-hierarchyParentTitle.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-hierarchyParentTitle.phtml new file mode 100644 index 0000000000000000000000000000000000000000..fc59049c3a471ef7e8c71d4c15009f7c394c15b1 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-hierarchyParentTitle.phtml @@ -0,0 +1,13 @@ +<!-- finc: RecordDriver - DefaultRecord - data-hierarchyParentTitle --> +<?php if (!empty($data)): ?> + <?php $hierarchyParentId = $this->driver->tryMethod('getHierarchyParentID'); ?> + <?php foreach ($data as $key => $title): ?> + <?php if (isset($hierarchyParentId[$key])): ?> + <a href="<?=$this->recordLink()->getUrl($hierarchyParentId[$key]);?>"><?=$this->escapeHtml($title)?></a> + <?php else: ?> + <?=$this->escapeHtml($title)?> + <?php endif; ?> + <br/> + <?php endforeach; ?> +<?php endif; ?> +<!-- finc: RecordDriver - DefaultRecord - data-hierarchyParentTitle - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-isbn.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-isbn.phtml new file mode 100644 index 0000000000000000000000000000000000000000..6a4d145761e65041dddfbcf8133e645fe768715d --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-isbn.phtml @@ -0,0 +1,11 @@ +<!-- finc: RecordDriver - DefaultRecord - data-isbn --> +<?php if (!empty($data)): ?> + <?php if (is_array($data)): ?> + <span property="isbn"> + <?=implode('<br/>', array_map(array($this, 'escapeHtml'), $data))?> + </span> + <?php else: ?> + <?=$this->escapeHtml($data)?> + <?php endif; ?> +<?php endif; ?> +<!-- finc: RecordDriver - DefaultRecord - data-isbn - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-issn.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-issn.phtml new file mode 100644 index 0000000000000000000000000000000000000000..76987741ac8fbb876374f43a5dd91a4b59b842d3 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-issn.phtml @@ -0,0 +1,11 @@ +<!-- finc: RecordDriver - DefaultRecord - data-issn --> +<?php if (!empty($data)): ?> + <?php if (is_array($data)): ?> + <span property="issn"> + <?=implode('<br/>', array_map(array($this, 'escapeHtml'), $data))?> + </span> + <?php else: ?> + <?=$this->escapeHtml($data)?> + <?php endif; ?> +<?php endif; ?> +<!-- finc: RecordDriver - DefaultRecord - data-issn - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-link.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-link.phtml new file mode 100644 index 0000000000000000000000000000000000000000..b3773632048735674672c02218e68ed616e35ddf --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-link.phtml @@ -0,0 +1,7 @@ +<!-- finc: RecordDriver - DefaultRecord - data-link --> +<?php if (is_array($data)): ?> + <a href="<?=$data['url']?>"><?=$data['text']?></a> +<?php else: ?> + <a href="<?=$data?>"><?=$data?></a> +<?php endif; ?> +<!-- finc: RecordDriver - DefaultRecord - data-link - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-localSignature.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-localSignature.phtml new file mode 100644 index 0000000000000000000000000000000000000000..d5d29e0639d8c4178a76b337f9b70012d10b9cbc --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-localSignature.phtml @@ -0,0 +1,11 @@ +<!-- finc: RecordDriver - DefaultRecord - data-localSignature --> +<?php if (!empty($data)): ?> + <?php foreach ($data as $field): ?> + <?php if (!empty($field)): ?> + <?php foreach ($field as $subfield): ?> + <?=trim($this->escapeHtml($subfield))?> + <?php endforeach; ?> + <?php endif; ?> + <?php endforeach; ?> +<?php endif; ?> +<!-- finc: RecordDriver - DefaultRecord - data-localSignature - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-otherRelationshipEntry.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-otherRelationshipEntry.phtml new file mode 100644 index 0000000000000000000000000000000000000000..c3d92f9e1ff9fa6b324563f77b9e4ee395ac2fe3 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-otherRelationshipEntry.phtml @@ -0,0 +1,19 @@ +<!-- finc: RecordDriver - DefaultRecord - data-otherRelationshipEntry --> +<? if (!empty($data)): ?> + <? foreach ($data as $subject => $values): ?> + <tr> + <th><?=$this->transEsc($values[0]['subject'])?>: </th> + <td> + <? foreach ($values as $v): ?> + <? if (isset($v['id'])): ?> + <a href="<?=$this->recordLink()->getUrl($v['id'])?>"><?=$this->escapeHtml($v['text'])?></a> + <? else: ?> + <?=$this->escapeHtml($v['text'])?> + <? endif; ?> + <br/> + <? endforeach; ?> + </td> + </tr> + <? endforeach; ?> +<? endif; ?> +<!-- finc: RecordDriver - DefaultRecord - data-otherRelationshipEntry - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-publicationDetails.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-publicationDetails.phtml new file mode 100644 index 0000000000000000000000000000000000000000..fdb11ee471b3fea90446159405b2c3c26d5a4558 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-publicationDetails.phtml @@ -0,0 +1,30 @@ +<!-- finc: RecordDriver - DefaultRecord - data-publicationDetails --> +<?php if (!empty($data)): ?> + <div itemscope itemtype="http://schema.org/publisher"> + <?php foreach ($data as $field): ?> + <span property="publisher" typeof="Organization"> + <?php $pubPlace = $field->getPlace(); + if (!empty($pubPlace)): ?> + <span property="location" typeof="Place"> + <span property="name"><?=$this->escapeHtml($pubPlace)?></span> + </span> + <?php endif; ?> + <?php $pubName = $field->getName(); + if (!empty($pubName)): ?> + <span property="name"><?=$this->escapeHtml($pubName)?></span> + <?php endif; ?> + </span> + <span property="datePublished"> + <?php /* do not show solr publish date #13993 - GG */ ?> + <?php /*$pubDateSort = $this->driver->tryMethod('getPublishDateSort');*/ ?> + <?php $pubDate = $field->getDate(); + if (!empty($pubDate)): ?> + <?=$this->escapeHtml($pubDate)?> + <?php /*else: ?> + <?=$this->escapeHtml($pubDateSort)*/ ?> + <?php endif; ?> + </span><br/> + <?php endforeach; ?> + </div> +<?php endif ?> +<!-- finc: RecordDriver - DefaultRecord - data-publicationDetails - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-titleDetails.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-titleDetails.phtml new file mode 100644 index 0000000000000000000000000000000000000000..fd0c9ce8f43614a4e55f5ca7e2647e63ad7c006d --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-titleDetails.phtml @@ -0,0 +1,16 @@ +<!-- finc: RecordDriver - DefaultRecord - data-titleDetails --> +<?php if (!empty($data)): ?> + <?php $i = 0; + foreach ($data as $title): ?> + <?=($i > 0 ? '<br />' : '')?><?=$this->escapeHtml($title)?><?php $i++; ?> + <?php endforeach; ?> +<?php else: ?> + <?=$this->escapeHtml( + $this->driver->getShortTitle() . ' ' + . $this->driver->getSubtitle() . ' ' + . $this->driver->getTitleSection()) + . ($this->driver->getTitleStatement() ? ' / ' . $this->driver->getTitleStatement() : '')?> + <br/><?=($this->driver->tryMethod('getTitleOrig') && $this->driver->getTitleOrig() != '' ? $this->escapeHtml($this->driver->getTitleOrig()) : '') + ?> +<?php endif; ?> +<!-- finc: RecordDriver - DefaultRecord - data-titleDetails - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-titleUniform.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-titleUniform.phtml new file mode 100644 index 0000000000000000000000000000000000000000..8d6c539de0240749218b717fe7a95c8391f791ab --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-titleUniform.phtml @@ -0,0 +1,19 @@ +<!-- finc: RecordDriver - DefaultRecord - data-titleUniform --> +<?php if (!empty($data)): ?> + <tr> + <th> + <?=$this->driver->isRDA() + ? $this->transEsc('rda_original_title') + : $this->transEsc('non_rda_original_title')?>: + </th> + <td property="title"> + <?php if (is_array($data)): ?> + <a + href="<?=$this->record($this->driver)->getLink('title', $data['title'])?>"><?=$this->escapeHtml($data['title'])?></a><?php if (isset($data['lang'])): ?> ⟨<?=$this->escapeHtml($data['lang'])?>⟩<?php endif; ?> + <?php else: ?> + <a href="<?=$this->record($this->driver)->getLink('title', $data)?>"><?=$this->escapeHtml($data)?></a> + <?php endif; ?> + </td> + </tr> +<?php endif; ?> +<!-- finc: RecordDriver - DefaultRecord - data-titleUniform - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-transEsc.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-transEsc.phtml new file mode 100644 index 0000000000000000000000000000000000000000..efe6e050f56ae85d0e8df74a40c27e9d448c5fa1 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-transEsc.phtml @@ -0,0 +1,8 @@ +<?php // Don't add START and END comments ?> +<?php if (!empty($data)): ?> + <?php if (is_array($data)): ?> + <?=implode('<br/>', array_map(array($this, 'transEsc'), $data))?> + <?php else: ?> + <?=$this->transEsc($data)?> + <?php endif; ?> +<?php endif; ?> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-transEscCommaSep.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-transEscCommaSep.phtml new file mode 100644 index 0000000000000000000000000000000000000000..61fd836915c8f4d2070f3e0852caca91fdd9961c --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-transEscCommaSep.phtml @@ -0,0 +1,7 @@ +<?php if (!empty($data)): ?> + <?php if (is_array($data)): ?> + <?=implode(', ', array_map(array($this, 'transEsc'), $data));?> + <?php else: ?> + <?=$this->transEsc($data)?> + <?php endif; ?> +<?php endif; ?> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-transEscCommaSepLang.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-transEscCommaSepLang.phtml new file mode 100644 index 0000000000000000000000000000000000000000..6a7ad4457838b650205d78c9ac619bd2c3b6ed2c --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-transEscCommaSepLang.phtml @@ -0,0 +1,12 @@ +<!-- finc: RecordDriver - DefaultRecord - data-transEscCommaSepLang --> +<?php if (!empty($data)): ?> + <?php if (is_array($data)): ?> + <?php /* finc: add schema tags for language #13850 - VE */ ?> + <span property="inLanguage"> + <?=implode('</span>, <span property="inLanguage">', array_map(array($this, 'transEsc'), $data));?> + </span> + <?php else: ?> + <?=$this->transEsc($data)?> + <?php endif; ?> +<?php endif; ?> +<!-- finc: RecordDriver - DefaultRecord - data-transEscCommaSepLang - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/format-list.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/format-list.phtml new file mode 100644 index 0000000000000000000000000000000000000000..6ad5245ee5917c53d98f7e91df7b59607bc4716b --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/format-list.phtml @@ -0,0 +1,22 @@ +<?php $formats = $this->driver->getFormats(); +$translated_formats = []; +foreach ($formats as $format): ?> + <?php $translated_formats[] = $translated_format = $this->transEsc($format); ?> + <span class="format <?=$this->record($this->driver)->getFormatClass($format)?>"><?=$translated_format?></span> +<?php endforeach; ?> +<?php /* New genre string to display nxt to format in RESULT LIST and RECORD/Detail View, #11703, limit to SID 0 CK */ ?> +<?php /* Removes (uncommented) new genre string to display with k10plus index in RESULT LIST and RECORD/Detail View, #14912 FM */ ?> +<?php /* $sourceID = $this->driver->tryMethod('getSourceID'); ?> +<?php if ($sourceID == "0"): ?> + <?php $genres = $this->driver->tryMethod('getGenreFacet'); ?> + <?php if (!empty($genres)): ?> + <?php foreach ($genres as $genre): ?> + <?php $translated_genre = $this->transEsc($genre); + //deduplicate output + if (!in_array($translated_genre, $translated_formats)): + ?> + <span class="format"><?=$translated_genre?></span> + <?php endif; ?> + <? endforeach; ?> + <?php endif; ?> +<?php endif; */ ?> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/link-rvk.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/link-rvk.phtml similarity index 100% rename from themes/finc/templates/RecordDriver/SolrDefault/link-rvk.phtml rename to themes/finc/templates/RecordDriver/DefaultRecord/link-rvk.phtml diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/list-entry.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/list-entry.phtml new file mode 100644 index 0000000000000000000000000000000000000000..1be6a201320de332338b969cb3f10e60892fa7d6 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/list-entry.phtml @@ -0,0 +1,225 @@ +<!-- finc: RecordDriver - DefaultRecord - list-entry --> +<?php +// Set up some convenience variables: +$id = $this->driver->getUniqueId(); +$source = $this->driver->getSourceIdentifier(); +if (isset($this->list) && is_object($this->list)) { + $list_id = $this->list->id; + $user_id = $this->list->user_id; +} else { + $list_id = null; + $user_id = $this->user ? $this->user->id : null; +} +// finc: next line finc-specific; required to display public favorites lists, #12052, see also below - CK +$isEditable = $this->user && $this->user->id === $user_id; +// Thumbnail +$coverDetails = $this->record($this->driver)->getCoverDetails('list-entry', 'medium', $this->recordLink()->getUrl($this->driver)); +$cover = $coverDetails['html']; +$thumbnail = false; +$thumbnailAlignment = $this->record($this->driver)->getThumbnailAlignment('list'); +if ($cover): + ob_start(); ?> + <div class="media-<?=$thumbnailAlignment?> <?=$this->escapeHtmlAttr($coverDetails['size'])?>"> + <?=$cover?> + </div> + <?php $thumbnail = ob_get_contents(); ?> + <?php ob_end_clean(); ?> +<?php endif; ?> +<div class="result<?php if ($this->driver->supportsAjaxStatus()): ?> ajaxItem<?php endif ?>"> + <input type="hidden" value="<?=$this->escapeHtmlAttr($id)?>" class="hiddenId"/> + <input type="hidden" value="<?=$this->escapeHtmlAttr($source)?>" class="hiddenSource"/> + <?=$this->record($this->driver)->getCheckbox()?> + <div class="media"> + <?php if ($thumbnail && $thumbnailAlignment == 'left'): ?> + <?=$thumbnail?> + <?php endif; ?> + <div class="media-body"> + <div class="result-body"> + <div class="resultItemLine1"> + <?php $missing = $this->driver instanceof \VuFind\RecordDriver\Missing; ?> + <?php if (!$missing): ?><a href="<?=$this->recordLink()->getUrl($this->driver)?>" class="getFull" data-view="<?=$this->params->getOptions()->getListViewOption()?>"><?php endif; ?> + <span class="title"><?=$this->record($this->driver)->getTitleHtml()?></span> + <?php if (!$missing): ?></a><?php endif; ?> + </div> + + <div class="resultItemLine2"> + <?php if ($this->driver->isCollection()): ?> + <?=implode('<br>', array_map(array($this, 'escapeHtml'), $this->driver->getSummary()));?> + <?php else: ?> + <?php $summAuthors = $this->driver->getPrimaryAuthors(); + if (!empty($summAuthors)): ?> + <?=$this->transEsc('by')?> + <?php $authorCount = count($summAuthors); + foreach ($summAuthors as $i => $summAuthor): ?> + <a href="<?=$this->record($this->driver)->getLink('author', $summAuthor)?>"><?=$this->escapeHtml($summAuthor)?></a><?=($i + 1 < $authorCount ? ';' : '')?> + <?php endforeach; ?> + <?php endif; ?> + + <?php $journalTitle = $this->driver->getContainerTitle(); + $summDate = $this->driver->getPublicationDates(); ?> + <?php if (!empty($journalTitle)): ?> + <?=!empty($summAuthor) ? '<br/>' : ''?> + <?=/* TODO: handle highlighting more elegantly here */ + $this->transEsc('Published in') . ' <a href="' . $this->record($this->driver)->getLink('journaltitle', str_replace(array('{{{{START_HILITE}}}}', '{{{{END_HILITE}}}}'), '', $journalTitle)) . '">' . $this->highlight($journalTitle) . '</a>';?> + <?=!empty($summDate) ? ' (' . $this->escapeHtml($summDate[0]) . ')' : ''?> + <?php elseif (!empty($summDate)): ?> + <?=!empty($summAuthor) ? '<br/>' : ''?> + <?=$this->transEsc('Published') . ' ' . $this->escapeHtml($summDate[0])?> + <?php endif; ?> + <?php $summInCollection = $this->driver->getContainingCollections(); + if (false && !empty($summInCollection)): ?> + <?php foreach ($summInCollection as $collId => $collText): ?> + <div> + <b><?=$this->transEsc("in_collection_label")?></b> + <a class="collectionLinkText" href="<?=$this->url('collection', array('id' => $collId))?>?recordID=<?=urlencode($this->driver->getUniqueID())?>"> + <?=$this->escapeHtml($collText)?> + </a> + </div> + <?php endforeach; ?> + <?php endif; ?> + <?php endif; ?> + </div> + + <div class="last"> + <?php if (!$this->driver->isCollection()) { + if ($snippet = $this->driver->getHighlightedSnippet()) { + if (!empty($snippet['caption'])) { + echo '<strong>' . $this->transEsc($snippet['caption']) . ':</strong> '; + } + if (!empty($snippet['snippet'])) { + echo '<span class="quotestart">“</span>...' . $this->highlight($snippet['snippet']) . '...<span class="quoteend">”</span><br/>'; + } + } + } ?> + + <?php $listTags = ($this->usertags()->getMode() !== 'disabled') ? $this->driver->getTags( + null === $list_id ? true : $list_id, // get tags for all lists if no single list is selected + $user_id, 'tag' + ) : array(); + ?> + <?php if (count($listTags) > 0): ?> + <strong><?=$this->transEsc('Your Tags')?>:</strong> + <?php foreach ($listTags as $tag): ?> + <a href="<?=$this->currentPath() . $results->getUrlQuery()->addFacet('tags', $tag->tag)?>"><?=$this->escapeHtml($tag->tag)?></a> + <?php endforeach; ?> + <br/> + <?php endif; ?> + <?php $listNotes = $this->driver->getListNotes($list_id, $user_id); ?> + <?php if (count($listNotes) > 0): ?> + <strong><?=$this->transEsc('Notes')?>:</strong> + <?php if (count($listNotes) > 1): ?><br/><?php endif; ?> + <?php foreach ($listNotes as $note): ?> + <?=$this->escapeHtml($note)?><br/> + <?php endforeach; ?> + <?php endif; ?> + + <?php if (count($this->lists) > 0): ?> + <strong><?=$this->transEsc('Saved in')?>:</strong> + <?php $i = 0; + foreach ($this->lists as $current): ?> + <a href="<?=$this->url('userList', array('id' => $current->id))?>"><?=$this->escapeHtml($current->title)?></a><?php if ($i++ < count($this->lists) - 1): ?>,<?php endif; ?> + <?php endforeach; ?> + <br/> + <?php endif; ?> + + <div class="callnumAndLocation ajax-availability hidden"> + <?php if ($this->driver->supportsAjaxStatus()): ?> + <strong class="hideIfDetailed"><?=$this->transEsc('Call Number')?>:</strong> + <span class="callnumber ajax-availability hidden"> + <?=$this->transEsc('Loading')?>...<br/> + </span> + <strong><?=$this->transEsc('Located')?>:</strong> + <span class="location ajax-availability hidden"> + <?=$this->transEsc('Loading')?>... + </span> + <div class="locationDetails"></div> + <?php else: ?> + <?php $summCallNo = $this->driver->getCallNumber(); + if (!empty($summCallNo)): ?> + <strong><?=$this->transEsc('Call Number')?>:</strong> <?=$this->escapeHtml($summCallNo)?> + <?php endif; ?> + <?php endif; ?> + </div> + + <?php /* We need to find out if we're supposed to display an OpenURL link ($openUrlActive), + but even if we don't plan to display the link, we still want to get the $openUrl + value for use in generating a COinS (Z3988) tag -- see bottom of file. + */ + $openUrl = $this->openUrl($this->driver, 'results'); + $openUrlActive = $openUrl->isActive(); + $doi = $this->doi($this->driver, 'results'); + $doiActive = $doi->isActive(); + // Account for replace_other_urls setting + $urls = $this->record($this->driver)->getLinkDetails($openUrlActive); + + if ($openUrlActive || $doiActive || !empty($urls)): + ?> + <?php if ($openUrlActive): ?> + <br/> + <?=$openUrl->renderTemplate()?> + <?php endif; ?> + + <?php if ($doiActive): ?> + <br/> + <?=$doi->renderTemplate()?> + <?php endif; ?> + + <?php if (!is_array($urls)) { + $urls = []; + } + if (!$this->driver->isCollection()): + foreach ($urls as $current): ?> + <a href="<?=$this->escapeHtmlAttr($this->proxyUrl($current['url']))?>" class="fulltext" target="new"><i class="fa fa-external-link" + aria-hidden="true"></i> <?=($current['url'] == $current['desc']) ? $this->transEsc('Get full text') : $this->escapeHtml($current['desc'])?> + </a> + <?php endforeach; ?> + <?php endif; ?> + <?php endif; ?> + <br/> + + <?=$this->record($this->driver)->getFormatList()?> + + <?php if (!$openUrlActive && empty($urls) && $this->driver->supportsAjaxStatus()): ?> + <span class="status ajax-availability hidden"><?=$this->transEsc('Loading')?>...</span> + <br/><br/> + <?php endif; ?> + <?=$this->record($this->driver)->getPreviews()?> + </div> + </div> + + <div class="result-links hidden-print"> + <?php /* finc: next line finc-specific; required to display public favorites lists, #12052, see also above - CK */ ?> + <?php if ($isEditable): ?> + <i class="fa fa-fw fa-edit" aria-hidden="true"></i> <a + href="<?=$this->url('myresearch-edit')?>?id=<?=urlencode($id)?>&source=<?=urlencode($source)?><?php if (null !== $list_id): ?>&list_id=<?=urlencode($list_id)?><?php endif; ?>" + class="edit tool"><?=$this->transEsc('Edit')?></a><br/> + <?php /* Use a different delete URL if we're removing from a specific list or the overall favorites: */ + $deleteUrl = null === $list_id + ? $this->url('myresearch-favorites') + : $this->url('userList', ['id' => $list_id]); + $deleteUrlGet = $deleteUrl . '?delete=' . urlencode($id) . '&source=' . urlencode($source); + + $dLabel = 'delete-label-' . preg_replace('[\W]', '-', $id); + ?> + <div class="dropdown"> + <i class="fa fa-fw fa-trash-o" aria-hidden="true"></i> <a class="dropdown-toggle" id="<?=$dLabel?>" role="button" data-toggle="dropdown" href="<?=$deleteUrlGet?>"> + <?=$this->transEsc('Delete')?> + </a> + <ul class="dropdown-menu" role="menu" aria-labelledby="<?=$dLabel?>"> + <li><a onClick="$.post('<?=$deleteUrl?>', {'delete':'<?=$this->escapeJs($id)?>','source':'<?=$this->escapeJs($source)?>','confirm':true},function(){location.reload(true)})" + title="<?=$this->transEsc('confirm_delete_brief')?>"><?=$this->transEsc('confirm_dialog_yes')?></a></li> + <li><a><?=$this->transEsc('confirm_dialog_no')?></a></li> + </ul> + </div> + + <?=$this->driver->supportsCoinsOpenUrl() ? '<span class="Z3988" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenUrl()) . '"></span>' : ''?> + <?php endif; ?> + </div> + </div> + + <?php if ($thumbnail && $thumbnailAlignment == 'right'): ?> + <?=$thumbnail?> + <?php endif; ?> + </div> +</div> +<!-- finc: RecordDriver - DefaultRecord - list-entry - END --> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/offcanvas-toggler.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/offcanvas-toggler.phtml new file mode 100644 index 0000000000000000000000000000000000000000..a56f446a03445e70a2a4572f0a9a84b3169e4278 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/offcanvas-toggler.phtml @@ -0,0 +1,7 @@ +<!-- finc: RecordDriver - DefaultRecord - offcanvas-toogler --> +<?php ?> +<span class="offcanvas-toogler"> + <button class="search-filter-toggle btn btn-primary visible-xs" href="#search-sidebar" data-toggle="offcanvas" title="<?=$this->transEsc('sidebar_expand')?>"> + <?=$this->transEsc('offcanvas-toggler-record-view')?> + </button> +</span> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/record-icon-class.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/record-icon-class.phtml new file mode 100644 index 0000000000000000000000000000000000000000..122de489bb7bf3cfc3f78a65a069969c14450dfd --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/record-icon-class.phtml @@ -0,0 +1,23 @@ +<?php +$normalizedValue = preg_replace('/[^a-z0-9]/', '', strtolower($this->value)); + +// Convert normalizedValue to styles +// finc: same list of states for icons like in de_15 #13704 - VE +switch ($normalizedValue) { + case 'marcfincpda': + echo 'fa-home passive'; + break; + case 'object': + echo 'fa-home object'; + break; + case 'localholdings': + echo 'fa-home'; + break; + case 'electronicresources': + echo 'fa-globe'; + break; + default: + echo 'fa-book'; + break; +} +?> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/record-icon-sprite-class.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/record-icon-sprite-class.phtml new file mode 100644 index 0000000000000000000000000000000000000000..118bd36bdfb8b84448a4f98e89813fa6bb9594ab --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/record-icon-sprite-class.phtml @@ -0,0 +1,176 @@ +<?php +$normalizedValue = preg_replace('/[^a-z0-9]/', '', strtolower($this->value)); +// Convert normalizedValue to styles +switch ($normalizedValue) { + + //block book + case 'book': + case 'articles': + echo 'book'; + break; + //block general audio + case 'audio': + case 'musicrecording': + case 'record': + case 'soundrecordingmedium': + case 'electronicsoundrecordingmedium': + case 'soundrecording': + echo 'audio'; + break; + //block tape audio + case 'audiotape': + case 'cassette': + case 'soundcassette': + echo 'audiotape'; + break; + //block braille + case 'braille': + echo 'braille'; + break; + //block digital audio + case 'cd': + case 'dvdaudio': + case 'sounddisc': + echo 'cd'; + break; + //block digital video + case 'dvd': + case 'blueraydisc': + case 'dvdvideo': + case 'videodisc': + echo 'dvd'; + break; + //block ebook + case 'ebook': + echo 'ebook'; + break; + //block digital non-book + case 'electronicnewspaper': + case 'newspaperarticle': + case 'newspaper': + case 'textresource': + echo 'newspaper'; + break; + //block manuscripts + case 'manuscript': + case 'nachlass': + echo 'manuscript'; + break; + //block articles + case 'article': + case 'articlearticle': + case 'electronic': + case 'electronicarticle': + case 'electronicresourcedatacarrier': + case 'electronicresourceremoteaccess': + echo 'electronic'; + break; + //block globe + case 'globe': + echo 'globe'; + break; + //block kit + case 'kit': + echo 'kit'; + break; + //block journal + case 'journal': + case 'journalnewspaper': + case 'serial': + echo 'journal'; + break; + //block ejournal + case 'electronicjournal': + case 'electronicserial': + echo 'electronicjournal'; + break; + //block map + case 'map': + case 'atlas': + echo 'map'; + break; + //block microfilm + case 'microfilm': + case 'microfiche': + case 'microform': + echo 'microfilm'; + break; + //block musical score + case 'musicalscore': + case 'notatedmusic': + case 'electronicmusicalscore': + echo 'musicalscore'; + break; + //block images + case 'photo': + case 'artprint': + case 'collage': + case 'drawing': + case 'flashcard': + case 'painting': + case 'photonegative': + case 'placard': + case 'print': + case 'sensorimage': + case 'transparency': + echo 'image'; + break; + //block physical object + case 'physicalobject': + echo 'physicalobject'; + break; + //block othe rimages + case 'sensorimage': + case 'chart': + echo 'chart'; + break; + //block sets + case 'sets': + echo 'sets'; + break; + //block slide + case 'slide': + echo 'slide'; + break; + //block software + case 'software': + case 'cdrom': + case 'chipcartridge': + case 'disccartridge': + case 'dvdrom': + case 'floppydisk': + case 'tapecartridge': + case 'tapecassette': + case 'tapereel': + echo 'software'; + break; + //block thesis + case 'thesis': + case 'electronicthesis': + echo 'thesis'; + break; + + //block unknown + case 'unknown': + echo 'unknown'; + break; + //block analog video + case 'vhs': + case 'video': + case 'videotape': + case 'videocartridge': + case 'videocassette': + echo 'video'; + break; + //block film + case 'audiovisualmedia': + case 'filmstrip': + case 'motionpicture': + case 'videoreel': + echo 'film'; + break; + //default + default: + echo 'unknown'; + break; +} \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/record-icon-sprite.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/record-icon-sprite.phtml new file mode 100644 index 0000000000000000000000000000000000000000..279b1a67b82f98758a2450897594c432a7d017d8 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/record-icon-sprite.phtml @@ -0,0 +1,11 @@ +<?php +$formats = []; +foreach ($this->driver->getFormats() as $format) { + $formats[] = $this->record($this->driver)->getRecordIconClass( + $format, 'record-icon-sprite-class' + ); +} +$formats = array_unique($formats); +asort($formats); +?> +<span class="sprite-media-icon <?=array_pop($formats)?>"></span> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrDefault/record-icon.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/record-icon.phtml similarity index 99% rename from themes/finc/templates/RecordDriver/SolrDefault/record-icon.phtml rename to themes/finc/templates/RecordDriver/DefaultRecord/record-icon.phtml index b6152471e658380b8fa4232dca315c18d665cc40..dd76b4d0b0cbc947e146f4253368536161ca525e 100644 --- a/themes/finc/templates/RecordDriver/SolrDefault/record-icon.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/record-icon.phtml @@ -1,4 +1,4 @@ -<? +<?php /* finc: template is identical with de_15 #13704 - VE */ /*$formats = []; diff --git a/themes/finc/templates/RecordDriver/SolrDefault/result-list.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/result-list.phtml similarity index 53% rename from themes/finc/templates/RecordDriver/SolrDefault/result-list.phtml rename to themes/finc/templates/RecordDriver/DefaultRecord/result-list.phtml index 8182d828c95fda565347ea6f5ff9cf96b3f0afee..eee160743c41d6208d14a8a62ce7440bd7b72e18 100644 --- a/themes/finc/templates/RecordDriver/SolrDefault/result-list.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/result-list.phtml @@ -1,6 +1,6 @@ -<!-- finc: recordDriver - solrDefault - result-list --> -<? /* finc: compare solrAi - result-list with this one during upgrades! - CK */ ?> -<? +<!-- finc: recordDriver - DefaultRecord - result-list --> +<?php +/* finc: compare SolrAI/result-list with this one during upgrades! - CK */ $coverDetails = $this->record($this->driver)->getCoverDetails('result-list', 'medium', $this->recordLink()->getUrl($this->driver)); $cover = $coverDetails['html']; $thumbnail = false; @@ -10,25 +10,25 @@ if ($cover): <div class="media-<?=$thumbnailAlignment?> <?=$this->escapeHtmlAttr($coverDetails['size'])?>"> <?=$cover?> </div> - <? $thumbnail = ob_get_contents(); ?> - <? ob_end_clean(); ?> - <? /* Show finc style-based icons; */ ?> -<? elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> - <? ob_start(); ?> + <?php $thumbnail = ob_get_contents(); ?> + <?php ob_end_clean(); ?> + <?php /* Show finc style-based icons; */ ?> +<?php elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> + <?php ob_start(); ?> <div class="media-<?=$thumbnailAlignment?> record-icon"> <?=$this->record($this->driver)->getRecordIcon()?> </div> - <? $thumbnail = ob_get_contents(); ?> - <? ob_end_clean(); ?> - <? /* Show finc style-based icons - END */ ?> -<? endif; ?> + <?php $thumbnail = ob_get_contents(); ?> + <?php ob_end_clean(); ?> + <?php /* Show finc style-based icons - END */ ?> +<?php endif; ?> <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueID())?>" class="hiddenId"/> <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?>" class="hiddenSource"/> <div class="media"> - <? if ($thumbnail && $thumbnailAlignment == 'left'): ?> + <?php if ($thumbnail && $thumbnailAlignment == 'left'): ?> <?=$thumbnail?> - <? endif ?> + <?php endif ?> <div class="media-body"> <div class="result-body"> <div> @@ -38,88 +38,87 @@ if ($cover): </div> <div> - <? if ($this->driver->isCollection()): ?> - <?=implode('<br>', array_map(array($this, 'escapeHtml'), $this->driver->getSummary()));?> - <? else: ?> - <? $summAuthors = $this->driver->getPrimaryAuthorsWithHighlighting(); + <?php if ($this->driver->isCollection()): ?> + <?=implode('<br>', array_map([$this, 'escapeHtml'], $this->driver->getSummary())); ?> + <?php else: ?> + <?php $summAuthors = $this->driver->getPrimaryAuthorsWithHighlighting(); if (!empty($summAuthors)): ?> <?=$this->transEsc('by')?> - <? $authorCount = count($summAuthors); + <?php $authorCount = count($summAuthors); foreach ($summAuthors as $i => $summAuthor): ?> - <a href="<?=$this->record($this->driver)->getLink('author', $this->highlight($summAuthor, null, true, false))?>" - class="author"><?=$this->highlight($summAuthor)?></a><?=$i + 1 < $authorCount ? ',' : ''?> - <? endforeach; ?> - <? endif; ?> - <? /* finc-specific from here, #8639, #7345 - CK */ ?> - <? /* finc-specific: nxt line #8639 - CK */ ?> - <? $journalTitle = $this->driver->getContainerTitle(); + <a href="<?=$this->record($this->driver)->getLink('author', $this->highlight($summAuthor, null, true, false))?>" class="author"><?=$this->highlight($summAuthor)?></a><?=$i + 1 < $authorCount ? ',' : ''?> + <?php endforeach; ?> + <?php endif; ?> + <?php + /* finc-specific from here, #8639, #7345 - CK */ + /* finc-specific: nxt line #8639 - CK */ ?> + <?php $journalTitle = $this->driver->getContainerTitle(); $summDate = $this->driver->getPublishDateSort(); ?> - <? if (!empty($journalTitle)): ?> + <?php if (!empty($journalTitle)): ?> <?=!empty($summAuthor) ? '<br />' : ''?> <?=$this->transEsc('Published in')?> - <? $containerSource = $this->driver->getSourceIdentifier(); ?> - <? $containerID = $this->driver->getContainerRecordID(); ?> - <? /* TODO: handle highlighting more elegantly here: */ ?> - <a - href="<?=($containerID ? $this->recordLink()->getUrl("$containerSource|$containerID") : $this->record($this->driver)->getLink('journaltitle', str_replace(array('{{{{START_HILITE}}}}', '{{{{END_HILITE}}}}'), '', $journalTitle)))?>"><?=$this->highlight($journalTitle)?></a> - <? /* finc-specific: nxt line #8639 - CK */ ?> + <?php $containerSource = $this->driver->getSourceIdentifier(); ?> + <?php $containerID = $this->driver->getContainerRecordID(); ?> + <?php /* TODO: handle highlighting more elegantly here: */ ?> + <a href="<?=($containerID ? $this->recordLink()->getUrl("$containerSource|$containerID") : $this->record($this->driver)->getLink('journaltitle', str_replace(['{{{{START_HILITE}}}}', '{{{{END_HILITE}}}}'], '', $journalTitle)))?>"><?=$this->highlight($journalTitle) ?></a> + <?php /* finc-specific: nxt line #8639 - CK */ ?> <?=!empty($summDate) ? ' (' . $this->escapeHtml($summDate) . ')' : ''?> - <? elseif (!empty($summDate)): ?> + <?php elseif (!empty($summDate)): ?> <?=!empty($summAuthor) ? '<br />' : ''?> - <? /* finc-specific: nxt line #8639 - CK */ ?> + <?php /* finc-specific: nxt line #8639 - CK */ ?> <?=$this->transEsc('Published') . ' ' . $this->escapeHtml($summDate)?> - <? endif; ?> - <? $summInCollection = $this->driver->getContainingCollections(); + <?php endif; ?> + <?php $summInCollection = $this->driver->getContainingCollections(); if (!empty($summInCollection)): ?> - <? foreach ($summInCollection as $collId => $collText): ?> + <?php foreach ($summInCollection as $collId => $collText): ?> <div> <strong><?=$this->transEsc("in_collection_label")?></strong> - <a class="collectionLinkText" href="<?=$this->url('collection', array('id' => $collId))?>?recordID=<?=urlencode($this->driver->getUniqueID())?>"> + <a class="collectionLinkText" href="<?=$this->url('collection', ['id' => $collId])?>?recordID=<?=urlencode($this->driver->getUniqueID())?>"> <?=$this->escapeHtml($collText)?> </a> </div> - <? endforeach; ?> - <? endif; ?> - <? endif; ?> + <?php endforeach; ?> + <?php endif; ?> + <?php endif; ?> </div> - <? if (!$this->driver->isCollection()): ?> - <? if ($snippet = $this->driver->getHighlightedSnippet()): ?> - <? if (!empty($snippet['caption'])): ?> + <?php if (!$this->driver->isCollection()): ?> + <?php if ($snippet = $this->driver->getHighlightedSnippet()): ?> + <?php if (!empty($snippet['caption'])): ?> <strong><?=$this->transEsc($snippet['caption'])?>:</strong> - <? endif; ?> - <? if (!empty($snippet['snippet'])): ?> + <?php endif; ?> + <?php if (!empty($snippet['snippet'])): ?> <span class="quotestart">“</span>...<?=$this->highlight($snippet['snippet'])?>...<span class="quoteend">”</span><br/> - <? endif; ?> - <? endif; ?> - <? endif; ?> + <?php endif; ?> + <?php endif; ?> + <?php endif; ?> - <? - /* Display information on duplicate records if available */ + <?php +/* Display information on duplicate records if available */ if ($dedupData = $this->driver->getDedupData()): ?> <div class="dedupInformation"> - <? - $i = 0; + <?php +$i = 0; foreach ($dedupData as $source => $current) { if (++$i == 1) { - ?><span class="currentSource"><a href="<?=$this->recordLink()->getUrl($this->driver)?>"><?=$this->transEsc("source_$source", array(), $source)?></a></span><? + ?><span class="currentSource"><a href="<?=$this->recordLink()->getUrl($this->driver)?>"><?=$this->transEsc("source_$source", [], $source)?></a></span><?php } else { if ($i == 2) { - ?> <span class="otherSources">(<?=$this->transEsc('Other Sources')?>: <? + ?> <span class="otherSources">(<?=$this->transEsc('Other Sources')?>: <?php } else { - ?>, <? + ?>, <?php } - ?><a href="<?=$this->recordLink()->getUrl($current['id'])?>"><?=$this->transEsc("source_$source", array(), $source)?></a><? + ?><a href="<?=$this->recordLink()->getUrl($current['id'])?>"><?=$this->transEsc("source_$source", [], $source)?></a><?php } } if ($i > 1) { - ?>)</span><? + ?>)</span><?php } ?> </div> - <? endif; ?> + <?php endif; ?> <div class="callnumAndLocation ajax-availability hidden"> - <? if ($this->driver->supportsAjaxStatus()): ?> + <?php if ($this->driver->supportsAjaxStatus()): ?> <strong class="hideIfDetailed"><?=$this->transEsc('Call Number')?>:</strong> <span class="callnumber ajax-availability hidden"> <?=$this->transEsc('Loading')?> ...<br/> @@ -129,29 +128,35 @@ if ($cover): <?=$this->transEsc('Loading')?> ... </span> <div class="locationDetails"></div> - <? else: ?> - <? $summCallNo = $this->driver->getCallNumber(); + <?php else: ?> + <?php $summCallNo = $this->driver->getCallNumber(); if (!empty($summCallNo)): ?> <strong><?=$this->transEsc('Call Number')?>:</strong> <?=$this->escapeHtml($summCallNo)?> - <? endif; ?> - <? endif; ?> + <?php endif; ?> + <?php endif; ?> </div> - <? /* We need to find out if we're supposed to display an OpenURL link ($openUrlActive), + <?php /* We need to find out if we're supposed to display an OpenURL link ($openUrlActive), but even if we don't plan to display the link, we still want to get the $openUrl value for use in generating a COinS (Z3988) tag -- see bottom of file. */ $openUrl = $this->openUrl($this->driver, 'results'); $openUrlActive = $openUrl->isActive(); + $doi = $this->doi($this->driver, 'results'); + $doiActive = $doi->isActive(); // Account for replace_other_urls setting $urls = $this->record($this->driver)->getLinkDetails($openUrlActive); - if ($openUrlActive || !empty($urls)): ?> - <? if ($openUrlActive): ?> + if ($openUrlActive || $doiActive || !empty($urls)): ?> + <?php if ($openUrlActive): ?> <br/> <?=$openUrl->renderTemplate()?> - <? endif; ?> - <? if (!is_array($urls)) $urls = array(); + <?php endif; ?> + <?php if ($doiActive): ?> + <br/> + <?=$doi->renderTemplate()?> + <?php endif; ?> + <?php if (!is_array($urls)) $urls = []; if (!$this->driver->isCollection()): foreach ($urls as $current): ?> <a href="<?=$this->escapeHtmlAttr($this->proxyUrl($current['url']))?>" class="fulltext" target="new"> @@ -159,19 +164,19 @@ if ($cover): <?=($current['url'] == $current['desc']) ? $this->transEsc('Get full text') : $this->escapeHtml($current['desc'])?> </a> <br/> - <? endforeach; ?> - <? endif; ?> - <? endif; ?> + <?php endforeach; ?> + <?php endif; ?> + <?php endif; ?> <div class="result-formats"> <?=$this->record($this->driver)->getFormatList()?> - <? /* nxt line finc-specific: #5737 removed '(!$openUrlActive && empty($urls) &&' - CK */ ?> - <? if ($this->driver->supportsAjaxStatus()): ?> + <?php /* nxt line finc-specific: #5737 removed '(!$openUrlActive && empty($urls) &&' - CK */ ?> + <?php if ($this->driver->supportsAjaxStatus()): ?> <span class="status ajax-availability hidden"> <span class="label label-default"><?=$this->transEsc('Loading')?> ...</span> </span> - <? endif; ?> + <?php endif; ?> </div> <div class="result-previews"> @@ -179,11 +184,11 @@ if ($cover): </div> </div> <div class="result-links hidden-print"> - <? /* Display qrcode if appropriate: */ ?> - <? if ($QRCode = $this->record($this->driver)->getQRCode("results")): ?> - <? - // Add JS Variables for QrCode - $this->jsTranslations()->addStrings(array('qrcode_hide' => 'qrcode_hide', 'qrcode_show' => 'qrcode_show')); + <?php /* Display qrcode if appropriate: */ ?> + <?php if ($QRCode = $this->record($this->driver)->getQRCode("results")): ?> + <?php +// Add JS Variables for QrCode + $this->jsTranslations()->addStrings(['qrcode_hide' => 'qrcode_hide', 'qrcode_show' => 'qrcode_show']); ?> <span class="hidden-xs"> <i class="fa fa-fw fa-qrcode" aria-hidden="true"></i> <a href="<?=$this->escapeHtmlAttr($QRCode);?>" class="qrcodeLink"><?=$this->transEsc('qrcode_show')?></a> @@ -194,49 +199,46 @@ if ($cover): </div> <br/> </span> - <? endif; ?> + <?php endif; ?> - <? if ($this->cart()->isActiveInSearch() && $this->params->getOptions()->supportsCart() && $this->cart()->isActive()): ?> + <?php if ($this->cart()->isActiveInSearch() && $this->params->getOptions()->supportsCart() && $this->cart()->isActive()): ?> <?=$this->render('record/cart-buttons.phtml', ['id' => $this->driver->getUniqueId(), 'source' => $this->driver->getSourceIdentifier()]);?><br/> - <? endif; ?> + <?php endif; ?> - <? if ($this->userlist()->getMode() !== 'disabled'): ?> - <? if ($this->permission()->allowDisplay('feature.Favorites')): ?> - <? /* Add to favorites; finc: keep Icon inside link - CK */ ?> - <a href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>" data-lightbox class="save-record result-link-label" data-id="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" - title="<?=$this->transEsc('Add to favorites')?>"> + <?php if ($this->userlist()->getMode() !== 'disabled'): ?> + <?php if ($this->permission()->allowDisplay('feature.Favorites')): ?> + <?php /* Add to favorites; finc: keep Icon inside link - CK */ ?> + <a href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>" data-lightbox class="save-record result-link-label" data-id="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" title="<?=$this->transEsc('Add to favorites')?>"> <i class="fa fa-fw fa-star" aria-hidden="true"></i> <span class="hidden-xs hidden-sm"><?=$this->transEsc('Add to favorites')?></span> </a><br/> - <? elseif ($block = $this->permission()->getAlternateContent('feature.Favorites')): ?> + <?php elseif ($block = $this->permission()->getAlternateContent('feature.Favorites')): ?> <?=$block?> - <? endif; ?> - <? /* Saved lists */ ?> + <?php endif; ?> + <?php /* Saved lists */ ?> <div class="savedLists alert alert-info hidden"> <strong><?=$this->transEsc("Saved in")?>:</strong> </div> - <? endif; ?> + <?php endif; ?> - <? /* Hierarchy tree link; finc: keep Icon inside link - CK */ ?> - <? $trees = $this->driver->tryMethod('getHierarchyTrees'); + <?php /* Hierarchy tree link; finc: keep Icon inside link - CK */ ?> + <?php $trees = $this->driver->tryMethod('getHierarchyTrees'); if (!empty($trees)): ?> - <? foreach ($trees as $hierarchyID => $hierarchyTitle): ?> + <?php foreach ($trees as $hierarchyID => $hierarchyTitle): ?> <div class="hierarchyTreeLink"> <input type="hidden" value="<?=$this->escapeHtmlAttr($hierarchyID)?>" class="hiddenHierarchyId"/> - <a class="hierarchyTreeLinkText result-link-label" data-lightbox href="<?=$this->recordLink()->getTabUrl($this->driver, 'HierarchyTree')?>?hierarchy=<?=urlencode($hierarchyID)?>#tabnav" - title="<?=$this->transEsc('hierarchy_tree')?>" data-lightbox-href="<?=$this->recordLink()->getTabUrl($this->driver, 'AjaxTab')?>?hierarchy=<?=urlencode($hierarchyID)?>" - data-lightbox-post="tab=hierarchytree"> + <a class="hierarchyTreeLinkText result-link-label" data-lightbox href="<?=$this->recordLink()->getTabUrl($this->driver, 'HierarchyTree')?>?hierarchy=<?=urlencode($hierarchyID)?>#tabnav" title="<?=$this->transEsc('hierarchy_tree')?>" data-lightbox-href="<?=$this->recordLink()->getTabUrl($this->driver, 'AjaxTab')?>?hierarchy=<?=urlencode($hierarchyID)?>" data-lightbox-post="tab=hierarchytree"> <i class="result-link-icon fa fa-fw fa-sitemap" aria-hidden="true"></i> - <span><?=$this->transEsc('hierarchy_view_context')?></span><? if (count($trees) > 1): ?>: <?=$this->escapeHtml($hierarchyTitle)?><? endif; ?> + <span><?=$this->transEsc('hierarchy_view_context')?></span><?php if (count($trees) > 1): ?>: <?=$this->escapeHtml($hierarchyTitle)?><?php endif; ?> </a> </div> - <? endforeach; ?> - <? endif; ?> + <?php endforeach; ?> + <?php endif; ?> <?=$this->driver->supportsCoinsOpenUrl() ? '<span class="Z3988" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenUrl()) . '"></span>' : ''?> </div> </div> - <? if ($thumbnail && $thumbnailAlignment == 'right'): ?> + <?php if ($thumbnail && $thumbnailAlignment == 'right'): ?> <?=$thumbnail?> - <? endif ?> + <?php endif ?> </div> -<!-- finc: recordDriver - solrDefault - result-list - END --> +<!-- finc: recordDriver - DefaultRecord - result-list - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/toolbar.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/toolbar.phtml new file mode 100644 index 0000000000000000000000000000000000000000..7b3bf640bf5ac2430f54b08641421735044a958a --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/toolbar.phtml @@ -0,0 +1,69 @@ +<!-- finc: recordDriver - DefaultRecord - toolbar --> +<?php +$addThis = $this->addThis(); +if (!empty($addThis)) { + $this->headScript()->appendFile('https://s7.addthis.com/js/250/addthis_widget.js?pub=' . urlencode($addThis)); +} + +// Set up some variables for convenience: +$cart = $this->cart(); +$cartId = $this->driver->getSourceIdentifier() . '|' . $this->driver->getUniqueId(); +?> + +<?php /* finc: we use nav-stacked for display in sidebar, CK */ ?> +<ul class="record-nav nav nav-pills nav-stacked hidden-print"> + <?php /* finc: we use the sr-only description, CK */ ?> + <li class="sr-only"><?=$this->transEsc('Toolbar')?></li> + <?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 /* finc: we don't use sms, CK */ + /* + <?php if ($this->accountCapabilities()->getSmsSetting() !== 'disabled'): ?> + <li><a class="sms-record" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'SMS')?>" rel="nofollow"><i class="fa fa-mobile" aria-hidden="true"></i> <?=$this->transEsc('Text this')?></a></li> + <?php endif; ?> + */ ?> + <li> + <a class="mail-record" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'Email')?>" rel="nofollow"><i class="fa fa-envelope" aria-hidden="true"></i> <?=$this->transEsc('Email this')?></a> + </li> + + <?php $exportFormats = $this->export()->getFormatsForRecord($this->driver); ?> + <?php if (count($exportFormats) > 0): ?> + <li class="dropdown"> + <a class="export-toggle dropdown-toggle" data-toggle="dropdown" href="<?=$this->recordLink()->getActionUrl($this->driver, 'Export')?>" rel="nofollow"><i class="fa fa-list-alt" aria-hidden="true"></i> <?=$this->transEsc('Export Record')?> + </a> + <ul class="dropdown-menu" role="menu"> + <?php foreach ($exportFormats as $exportFormat): ?> + <li> + <a <?php if ($this->export()->needsRedirect($exportFormat)): ?>target="<?=$this->escapeHtmlAttr($exportFormat)?>Main" + <?php endif; ?>href="<?=$this->recordLink()->getActionUrl($this->driver, 'Export')?>?style=<?=$this->escapeHtmlAttr($exportFormat)?>" + rel="nofollow"><?=$this->transEsc('Export to')?><?=$this->transEsc($this->export()->getLabelForFormat($exportFormat))?></a> + </li> + <?php endforeach; ?> + </ul> + </li> + <?php endif; ?> + + <?php if ($this->userlist()->getMode() !== 'disabled'): ?> + <?php /* finc: we use title=... in link below, CK */ ?> + <li> + <?php if ($this->permission()->allowDisplay('feature.Favorites')): ?> + <a class="save-record" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>" title="<?=$this->transEsc('Add to favorites')?>" rel="nofollow"><i class="fa fa-star" aria-hidden="true"></i> <?=$this->transEsc('Add to favorites')?> + </a> + <?php elseif ($block = $this->permission()->getAlternateContent('feature.Favorites')): ?> + <?=$block?> + <?php endif; ?> + </li> + <?php endif; ?> + <?php if (!empty($addThis)): ?> + <li> + <a class="addThis addthis_button" href="https://www.addthis.com/bookmark.php?v=250&pub=<?=urlencode($addThis)?>"><i class="fa fa-bookmark" aria-hidden="true"></i> <?=$this->transEsc('Bookmark')?></a> + </li> + <?php endif; ?> + <li class="bookbag-menu"> + <?=$this->render('record/cart-buttons.phtml', ['id' => $this->driver->getUniqueId(), 'source' => $this->driver->getSourceIdentifier()]);?> + </li> +</ul> +<!-- finc: recordDriver - DefaultRecord - toolbar - END --> diff --git a/themes/finc/templates/RecordDriver/SolrAI/core.phtml b/themes/finc/templates/RecordDriver/SolrAI/core.phtml index 2828594c460282cc9771ead438aff4f2c1e0fa40..e545a6a49cf8716793663f70db97decd77fb5132 100644 --- a/themes/finc/templates/RecordDriver/SolrAI/core.phtml +++ b/themes/finc/templates/RecordDriver/SolrAI/core.phtml @@ -1,85 +1,86 @@ -<!-- finc: recordDriver - solrAI - CORE --> -<? /* Created in 4826, based on SolrDefault - core, compare with SolrDefault - core during updates! */ ?> +<!-- finc: recordDriver - SolrAI - core --> +<?php /* Created in 4826, based on DefaultRecord/core, compare with DefaultRecord/core during updates! */ ?> <div class="media" vocab="http://schema.org/" resource="#record" typeof="<?=$this->driver->getSchemaOrgFormats()?> Product"> - <? + <?php /* finc: use VF5.1 offcanvas toggler here as well if you have a custom sidebar - CK */ ?> + <?=$this->render('RecordDriver/DefaultRecord/offcanvas-toggler'); ?> + <?php $QRCode = $this->record($this->driver)->getQRCode("core"); $coverDetails = $this->record($this->driver)->getCoverDetails('core', 'medium', $this->record($this->driver)->getThumbnail('large')); $cover = $coverDetails['html']; $preview = $this->record($this->driver)->getPreviews(); ?> - <? if ($QRCode || $cover || $preview): ?> + <?php if ($QRCode || $cover || $preview): ?> <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"> - <? /* Display thumbnail if appropriate: */ ?> - <? if($cover): ?> + <?php /* Display thumbnail if appropriate: */ ?> + <?php if($cover): ?> <?=$cover?> - <? /* BOF - finc-specific StyleBasedIcons */ ?> - <? elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> + <?php /* BOF - finc-specific StyleBasedIcons */ ?> + <?php elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> <?=$this->record($this->driver)->getFormatIcon()?> - <? /* EOF - finc-specific StyleBasedIcons */ ?> - <? endif; ?> + <?php /* EOF - finc-specific StyleBasedIcons */ ?> + <?php endif; ?> - <? /* Display qrcode if appropriate: */ ?> - <? if($QRCode): ?> + <?php /* Display qrcode if appropriate: */ ?> + <?php if($QRCode): ?> <span class="hidden-xs"> <br/><img alt="<?=$this->transEsc('QR Code')?>" class="qrcode" src="<?=$this->escapeHtmlAttr($QRCode);?>"/> </span> - <? endif; ?> + <?php endif; ?> - <? // if you have a preview tab but want to move or remove the preview link + <?php // if you have a preview tab but want to move or remove the preview link // from this area of the record view, this can be split into // getPreviewData() (should stay here) and // getPreviewLink() (can go in your desired tab) ?> - <? if ($preview): ?> + <?php if ($preview): ?> <div class="record-previews"> <?=$preview?> </div> - <? endif; ?> + <?php endif; ?> </div> - <? endif; ?> + <?php endif; ?> <div class="media-body"> - <? /* finc: We want to get rid of trailing special chars in the title and limit its length to 100 chars; + <?php /* finc: We want to get rid of trailing special chars in the title and limit its length to 100 chars; remove schema name tag here but keep in description, CK */ ?> - <? /* finc: add schema tags for title #13850 - VE */ ?> + <?php /* finc: add schema tags for title #13850 - VE */ ?> <h3 property="name"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle() . ' ' . $this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 100)))?></h3> - <? $summary = $this->driver->getSummary(); $summary = isset($summary[0]) ? $this->escapeHtml($summary[0]) : false; ?> - <? if ($summary): ?> + <?php $summary = $this->driver->getSummary(); $summary = isset($summary[0]) ? $this->escapeHtml($summary[0]) : false; ?> + <?php if ($summary): ?> <p><?=$this->truncate($summary, 300)?></p> - <? if(strlen($summary) > 300): ?> - <p><a href='<?=$this->recordLink()->getTabUrl($this->driver, 'Description')?>#tabnav'><?=$this->transEsc('Full description')?></a></p> - <? endif; ?> - <? endif; ?> + <?php if(strlen($summary) > 300): ?> + <p class="hidden-print"><a href='<?=$this->recordLink()->getTabUrl($this->driver, 'Description')?>#tabnav'><?=$this->transEsc('Full description')?></a></p> + <?php endif; ?> + <?php endif; ?> - <? if ($this->userlist()->getMode() !== 'disabled'): ?> - <? /* Display the lists that this record is saved to */ ?> + <?php if ($this->userlist()->getMode() !== 'disabled'): ?> + <?php /* Display the lists that this record is saved to */ ?> <div class="savedLists hidden alert alert-info"> <strong><?=$this->transEsc("Saved in")?>:</strong> - </div> - <? endif; ?> + </div> + <?php endif; ?> - <?/* Display Main Details */?> - <? + <?php /* Display Main Details */?> + <?php $formatter = $this->recordDataFormatter(); $coreFields = $formatter->getData($driver, $formatter->getDefaults('core-ai')); ?> - <? if (!empty($coreFields)): ?> + <?php if (!empty($coreFields)): ?> <table class="table table-striped"> - <? /* Table summary not supported in html 5, finc-specific solution, CK */ ?> <caption class="sr-only"><?=$this->transEsc('Bibliographic Details')?></caption> - <? foreach ($coreFields as $key => $current): ?> - <? if ($key == null): ?> + <?php foreach ($coreFields as $current): ?> + <?php if ($current['label'] == null): ?> <?=$current['value']?> - <? else: ?> - <tr><th><?=$this->transEsc($key)?>:</th><td><?=$current['value']?></td></tr> - <? endif; ?> - <? endforeach; ?> + <?php else: ?> + <tr><th><?=$this->transEsc($current['label'])?>:</th><td><?=$current['value']?></td></tr> + <?php endif; ?> + <?php endforeach; ?> </table> - <? endif; ?> - <?/* End Main Details */?> + <?php endif; ?> + <?php /* End Main Details */?> </div> </div> <!-- recordDriver - solrAI - CORE - END --> diff --git a/themes/finc/templates/RecordDriver/SolrAI/data-containerTitle.phtml b/themes/finc/templates/RecordDriver/SolrAI/data-containerTitle.phtml index 3bb6c33903eac85a0b4a112f4bf292d14b084ffb..f271e5a385495cb2d1c8592155256cb7ae5171b2 100644 --- a/themes/finc/templates/RecordDriver/SolrAI/data-containerTitle.phtml +++ b/themes/finc/templates/RecordDriver/SolrAI/data-containerTitle.phtml @@ -1,30 +1,28 @@ -<!-- finc: RecordDriver - SolrAi - data-containerTitle --> -<? if (!(empty($data))): ?> - <? - $containerSource = $this->driver->tryMethod('getSourceIdentifier'); - $containerID = $this->driver->tryMethod('getContainerRecordID'); +<!-- finc: RecordDriver - SolrAI - data-containerTitle --> +<?php if (!(empty($data))): ?> + <?php + $containerSource = $this->driver->tryMethod('getSourceIdentifier'); + $containerID = $this->driver->tryMethod('getContainerRecordID'); - // finc specific journalLink generation - $issns = $this->driver->tryMethod('getISSNs'); - $journalLink = ''; + // finc specific journalLink generation + $issns = $this->driver->tryMethod('getISSNs'); + $journalLink = ''; - // try container id as link - VuFind native behaviour - if ($containerID) { - $journalLink = $this->recordLink()->getUrl("$containerSource|$containerID"); - } - // try to link via issn - finc adapted behaviour - elseif (!empty($issns)) { - $journalLink = $this->record($this->driver)->getLink('isn', $issns); - } - // default take the journal title as link - VuFind native behaviur - else { - $journalLink = $this->record($this->driver)->getLink('journaltitle', $data); - } - ?> - <a href="<?=$journalLink?>"><?=$this->escapeHtml($data)?></a> - <? $ref = $this->driver->tryMethod('getContainerReference'); ?> - <? if (!empty($ref)): ?> - <?= $this->escapeHtml($ref) ?> - <? endif; ?> -<? endif; ?> -<!-- finc: RecordDriver - SolrAi - data-containerTitle - END --> \ No newline at end of file + // try container id as link - VuFind native behaviour + if ($containerID) { + $journalLink = $this->recordLink()->getUrl("$containerSource|$containerID"); + } // try to link via issn - finc adapted behaviour + elseif (!empty($issns)) { + $journalLink = $this->record($this->driver)->getLink('isn', $issns); + } // default take the journal title as link - VuFind native behaviur + else { + $journalLink = $this->record($this->driver)->getLink('journaltitle', $data); + } + ?> + <a href="<?=$journalLink?>"><?=$this->escapeHtml($data)?></a> + <?php $ref = $this->driver->tryMethod('getContainerReference'); ?> + <?php if (!empty($ref)): ?> + <?=$this->escapeHtml($ref)?> + <?php endif; ?> +<?php endif; ?> +<!-- finc: RecordDriver - SolrAi - data-containerTitle - END --> diff --git a/themes/finc/templates/RecordDriver/SolrAI/data-jTitle.phtml b/themes/finc/templates/RecordDriver/SolrAI/data-jTitle.phtml index f11fe9a36717fc89b40b229d63eb1b5821a5cffd..3d22ec4d5be98a477657be64e84d2a39267f2184 100644 --- a/themes/finc/templates/RecordDriver/SolrAI/data-jTitle.phtml +++ b/themes/finc/templates/RecordDriver/SolrAI/data-jTitle.phtml @@ -1,35 +1,35 @@ -<!-- finc: RecordDriver - SolrAi - data-jTitle --> -<? $jtitle = []; ?> -<? if (!(empty($data))): ?> -<? $issns = $this->driver->tryMethod('getISSNs'); ?> - <? ob_start(); ?> - <? if (!empty($issns)): ?> - <a href="<?=$this->record($this->driver)->getLink('isn', $issns)?>"> - <?=$this->escapeHtml($data)?> - </a> - <? else: ?> - <?=$this->escapeHtml($data)?> - <? endif; ?> - <? - $jtitle[] = trim(preg_replace('/\s+<\//', '</', ob_get_contents())); - ob_end_clean(); - ?> -<? endif; ?> -<? - // please note: direction of iteration will be displayed - $methods = ['getVolume', 'getPublishDateSort', 'getIssues', 'getPages']; - foreach ($methods as $method) { - if (!(empty($retval = $this->driver->tryMethod($method)))) { - $jtitle[] = ($method == 'getPages') - ? $this->transEsc('p.') .' '. $this->escapeHtml($retval) - : $this->escapeHtml($retval); - } - } +<!-- finc: RecordDriver - SolrAI - data-jTitle --> +<?php $jtitle = []; ?> +<?php if (!(empty($data))): ?> + <?php $issns = $this->driver->tryMethod('getISSNs'); ?> + <?php ob_start(); ?> + <?php if (!empty($issns)): ?> + <a href="<?=$this->record($this->driver)->getLink('isn', $issns)?>"> + <?=$this->escapeHtml($data)?> + </a> + <?php else: ?> + <?=$this->escapeHtml($data)?> + <?php endif; ?> + <?php + $jtitle[] = trim(preg_replace('/\s+<\//', '</', ob_get_contents())); + ob_end_clean(); + ?> +<?php endif; ?> +<?php +// please note: direction of iteration will be displayed +$methods = ['getVolume', 'getPublishDateSort', 'getIssues', 'getPages']; +foreach ($methods as $method) { + if (!(empty($retval = $this->driver->tryMethod($method)))) { + $jtitle[] = ($method == 'getPages') + ? $this->transEsc('p.') . ' ' . $this->escapeHtml($retval) + : $this->escapeHtml($retval); + } +} ?> -<? /* finc: add schema tags for parent publication #13850 - VE */ ?> +<?php /* finc: add schema tags for parent publication #13850 - VE */ ?> <span property="isPartOf" typeof="Periodical" resource="#periodical"> <span property="name"> <?=implode(', ', $jtitle)?> </span> </span> -<!-- finc: RecordDriver - SolrAi - data-jTitle - END --> \ No newline at end of file +<!-- finc: RecordDriver - SolrAi - data-jTitle - END --> diff --git a/themes/finc/templates/RecordDriver/SolrAI/link-isn.phtml b/themes/finc/templates/RecordDriver/SolrAI/link-isn.phtml index 9bf46207e3b2169520908194d7c32f9341041c8f..77bed61f58f3b6a7a2cfc3113ec6a2fbb194be64 100644 --- a/themes/finc/templates/RecordDriver/SolrAI/link-isn.phtml +++ b/themes/finc/templates/RecordDriver/SolrAI/link-isn.phtml @@ -1,14 +1,14 @@ -<? - /* use advanced search if we have multiple issns */ - if (is_array($this->lookfor) && count($this->lookfor) > 1) { - $query = '?join=AND&bool0[]=OR'; - foreach ($this->lookfor as $issn) { - $query .= '&lookfor0[]=' . urlencode($issn) . '&type0[]=ISN'; - } - } elseif (count($this->lookfor) == 1) { - $query = '?lookfor=%22' . urlencode($this->lookfor[0]) . '%22&type=ISN'; - } else { - $query = '?lookfor=%22' . urlencode($this->lookfor) . '%22&type=ISN'; +<?php +/* use advanced search if we have multiple issns */ +if (is_array($this->lookfor) && count($this->lookfor) > 1) { + $query = '?join=AND&bool0[]=OR'; + foreach ($this->lookfor as $issn) { + $query .= '&lookfor0[]=' . urlencode($issn) . '&type0[]=ISN'; } +} elseif (count($this->lookfor) == 1) { + $query = '?lookfor=%22' . urlencode($this->lookfor[0]) . '%22&type=ISN'; +} else { + $query = '?lookfor=%22' . urlencode($this->lookfor) . '%22&type=ISN'; +} ?> <?=$this->url('search-results') . $query?> diff --git a/themes/finc/templates/RecordDriver/SolrAI/result-list.phtml b/themes/finc/templates/RecordDriver/SolrAI/result-list.phtml index 284352c9705174d63f7904fa98009ab38422b962..29d6247448ab5853ccc82ef11c49f8e271a2a680 100644 --- a/themes/finc/templates/RecordDriver/SolrAI/result-list.phtml +++ b/themes/finc/templates/RecordDriver/SolrAI/result-list.phtml @@ -1,6 +1,5 @@ -<!-- finc: recordDriver - solrAI - result-list --> -<? /* compare with solrDefault - result-list during upgrades! - CK */ ?> -<? +<!-- finc: recordDriver - SolrAI - result-list --> +<?php /* compare with DefaultRecord/result-list during upgrades! - CK */ $coverDetails = $this->record($this->driver)->getCoverDetails('result-list', 'medium', $this->recordLink()->getUrl($this->driver)); $cover = $coverDetails['html']; $thumbnail = false; @@ -10,198 +9,204 @@ if ($cover): <div class="media-<?=$thumbnailAlignment?> <?=$this->escapeHtmlAttr($coverDetails['size'])?>"> <?=$cover?> </div> - <? $thumbnail = ob_get_contents(); ?> - <? ob_end_clean(); ?> - <? /* Show finc style-based icons; */ ?> -<? elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> - <? ob_start(); ?> + <?php $thumbnail = ob_get_contents(); ?> + <?php ob_end_clean(); ?> + <?php /* Show finc style-based icons; */ ?> +<?php elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> + <?php ob_start(); ?> <div class="media-<?=$thumbnailAlignment?> record-icon"> <?=$this->record($this->driver)->getRecordIcon()?> </div> - <? $thumbnail = ob_get_contents(); ?> - <? ob_end_clean(); ?> - <? /* Show finc style-based icons - END */ ?> -<? endif; ?> + <?php $thumbnail = ob_get_contents(); ?> + <?php ob_end_clean(); ?> + <?php /* Show finc style-based icons - END */ ?> +<?php endif; ?> <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueID())?>" class="hiddenId"/> <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?>" class="hiddenSource"/> <div class="media"> - <? if ($thumbnail && $thumbnailAlignment == 'left'): ?> + <?php if ($thumbnail && $thumbnailAlignment == 'left'): ?> <?=$thumbnail?> - <? endif ?> + <?php endif ?> <div class="media-body"> <div class="result-body"> - <div> - <a href="<?=$this->recordLink()->getUrl($this->driver)?>" class="title getFull" data-view="<?=$this->params->getOptions()->getListViewOption()?>"> - <?=$this->record($this->driver)->getTitleHtml()?> - </a> - </div> - <div> - <? if ($this->driver->isCollection()): ?> - <?=implode('<br>', array_map(array($this, 'escapeHtml'), $this->driver->getSummary()));?> - <? else: ?> - <? $summAuthors = $this->driver->getPrimaryAuthorsWithHighlighting(); - if (!empty($summAuthors)): ?> - <?=$this->transEsc('by')?> - <? $authorCount = count($summAuthors); - foreach ($summAuthors as $i => $summAuthor): ?> - <a href="<?=$this->record($this->driver)->getLink('author', $this->highlight($summAuthor, null, true, false))?>" class="author"><?=$this->highlight($summAuthor)?></a><?=$i + 1 < $authorCount ? ',' : ''?> - <? endforeach; ?> - <? endif; ?> - <? /* finc-specific from here - 04.16 - CK */ ?> - <? $journalTitle = $this->driver->getContainerTitle(); - $summDate = $this->driver->getPublishDateSort(); ?> - <? if (!empty($journalTitle)): ?> - <?=!empty($summAuthor) ? '<br />' : ''?> - <?=$this->transEsc('Published in')?> - <? $containerSource = $this->driver->getSourceIdentifier(); - $containerID = $this->driver->getContainerRecordID(); - // finc-specific journalLink generation - $journalLink = ''; - $issns = $this->driver->getISSNs(); + <div> + <a href="<?=$this->recordLink()->getUrl($this->driver)?>" class="title getFull" data-view="<?=$this->params->getOptions()->getListViewOption()?>"> + <?=$this->record($this->driver)->getTitleHtml()?> + </a> + </div> + <div> + <?php if ($this->driver->isCollection()): ?> + <?=implode('<br>', array_map([$this, 'escapeHtml'], $this->driver->getSummary())); ?> + <?php else: ?> + <?php $summAuthors = $this->driver->getPrimaryAuthorsWithHighlighting(); + if (!empty($summAuthors)): ?> + <?=$this->transEsc('by')?> + <?php $authorCount = count($summAuthors); + foreach ($summAuthors as $i => $summAuthor): ?> + <a href="<?=$this->record($this->driver)->getLink('author', $this->highlight($summAuthor, null, true, false))?>" class="author"><?=$this->highlight($summAuthor)?></a><?=$i + 1 < $authorCount ? ',' : ''?> + <?php endforeach; ?> + <?php endif; ?> + <?php /* finc-specific from here - 04.16 - CK */ ?> + <?php $journalTitle = $this->driver->getContainerTitle(); + $summDate = $this->driver->getPublishDateSort(); ?> + <?php if (!empty($journalTitle)): ?> + <?=!empty($summAuthor) ? '<br />' : ''?> + <?=$this->transEsc('Published in')?> + <?php $containerSource = $this->driver->getSourceIdentifier(); + $containerID = $this->driver->getContainerRecordID(); + // finc-specific journalLink generation + $journalLink = ''; + $issns = $this->driver->getISSNs(); - // first try to link to container id (VuFind stock-behaviour) - if ($containerID) { - $journalLink = $this->recordLink()->getUrl("$containerSource|$containerID"); - } // second try to search issn (finc specific) - elseif (!empty($issns)) { - $journalLink = $this->record($this->driver)->getLink('isn', $issns); - } // third search for journal title (VuFind stock-behaviour) - else { - $journalLink = $this->record($this->driver)->getLink('journaltitle', str_replace(array('{{{{START_HILITE}}}}', '{{{{END_HILITE}}}}'), '', $journalTitle)); - } - ?> - <? /* TODO: handle highlighting more elegantly here: */ ?> - <a href="<?=$journalLink?>"><?=$this->highlight($journalTitle)?></a> - <? /* finc-specific -END - 04.16 - CK */ ?> - <?=!empty($summDate) ? ' (' . $this->escapeHtml($summDate) . ')' : ''?> - <? elseif (!empty($summDate)): ?> - <?=!empty($summAuthor) ? '<br />' : ''?> - <? /* finc-specific: nxt line #8639 - CK */ ?> - <?=$this->transEsc('Published') . ' ' . $this->escapeHtml($summDate)?> - <? endif; ?> - <? $summInCollection = $this->driver->getContainingCollections(); - if (!empty($summInCollection)): ?> - <? foreach ($summInCollection as $collId => $collText): ?> - <div> - <strong><?=$this->transEsc("in_collection_label")?></strong> - <a class="collectionLinkText" href="<?=$this->url('collection', array('id' => $collId))?>?recordID=<?=urlencode($this->driver->getUniqueID())?>"> - <?=$this->escapeHtml($collText)?> - </a> - </div> - <? endforeach; ?> - <? endif; ?> - <? endif; ?> - </div> + // first try to link to container id (VuFind stock-behaviour) + if ($containerID) { + $journalLink = $this->recordLink()->getUrl("$containerSource|$containerID"); + } // second try to search issn (finc specific) + elseif (!empty($issns)) { + $journalLink = $this->record($this->driver)->getLink('isn', $issns); + } // third search for journal title (VuFind stock-behaviour) + else { + $journalLink = $this->record($this->driver)->getLink('journaltitle', str_replace(array('{{{{START_HILITE}}}}', '{{{{END_HILITE}}}}'), '', $journalTitle)); + } + ?> + <?php /* TODO: handle highlighting more elegantly here: */ ?> + <a href="<?=$journalLink?>"><?=$this->highlight($journalTitle)?></a> + <?php /* finc-specific -END - 04.16 - CK */ ?> + <?=!empty($summDate) ? ' (' . $this->escapeHtml($summDate) . ')' : ''?> + <?php elseif (!empty($summDate)): ?> + <?=!empty($summAuthor) ? '<br />' : ''?> + <?php /* finc-specific: nxt line #8639 - CK */ ?> + <?=$this->transEsc('Published') . ' ' . $this->escapeHtml($summDate)?> + <?php endif; ?> + <?php $summInCollection = $this->driver->getContainingCollections(); + if (!empty($summInCollection)): ?> + <?php foreach ($summInCollection as $collId => $collText): ?> + <div> + <strong><?=$this->transEsc("in_collection_label")?></strong> + <a class="collectionLinkText" href="<?=$this->url('collection', ['id' => $collId])?>?recordID=<?=urlencode($this->driver->getUniqueID())?>"> + <?=$this->escapeHtml($collText)?> + </a> + </div> + <?php endforeach; ?> + <?php endif; ?> + <?php endif; ?> + </div> - <? if (!$this->driver->isCollection()): ?> - <? if ($snippet = $this->driver->getHighlightedSnippet()): ?> - <? if (!empty($snippet['caption'])): ?> - <strong><?=$this->transEsc($snippet['caption'])?>:</strong> '; - <? endif; ?> - <? if (!empty($snippet['snippet'])): ?> - <span class="quotestart">“</span>...<?=$this->highlight($snippet['snippet'])?>...<span class="quoteend">”</span><br/> - <? endif; ?> - <? endif; ?> - <? endif; ?> + <?php if (!$this->driver->isCollection()): ?> + <?php if ($snippet = $this->driver->getHighlightedSnippet()): ?> + <?php if (!empty($snippet['caption'])): ?> + <strong><?=$this->transEsc($snippet['caption'])?>:</strong> '; + <?php endif; ?> + <?php if (!empty($snippet['snippet'])): ?> + <span class="quotestart">“</span>...<?=$this->highlight($snippet['snippet'])?>...<span class="quoteend">”</span><br/> + <?php endif; ?> + <?php endif; ?> + <?php endif; ?> - <? - /* Display information on duplicate records if available */ - if ($dedupData = $this->driver->getDedupData()): ?> - <div class="dedupInformation"> - <? - $i = 0; - foreach ($dedupData as $source => $current) { - if (++$i == 1) { - ?><span class="currentSource"><a href="<?=$this->recordLink()->getUrl($this->driver)?>"><?=$this->transEsc("source_$source", array(), $source)?></a></span><? + <?php + /* Display information on duplicate records if available */ + if ($dedupData = $this->driver->getDedupData()): ?> + <div class="dedupInformation"> + <?php + $i = 0; + foreach ($dedupData as $source => $current) { + if (++$i == 1) { + ?><span class="currentSource"><a href="<?=$this->recordLink()->getUrl($this->driver)?>"><?=$this->transEsc("source_$source", [], $source)?></a></span><?php + } else { + if ($i == 2) { + ?> <span class="otherSources">(<?=$this->transEsc('Other Sources')?>: <?php } else { - if ($i == 2) { - ?> <span class="otherSources">(<?=$this->transEsc('Other Sources')?>: <? - } else { - ?>, <? - } - ?><a href="<?=$this->recordLink()->getUrl($current['id'])?>"><?=$this->transEsc("source_$source", array(), $source)?></a><? - } - } - if ($i > 1) { - ?>)</span><? - } ?> - </div> - <? endif; ?> + ?>, <?php + } + ?><a href="<?=$this->recordLink()->getUrl($current['id'])?>"><?=$this->transEsc("source_$source", [], $source)?></a><?php + } + } + if ($i > 1) { + ?>)</span><?php + } ?> + </div> + <?php endif; ?> - <div class="callnumAndLocation ajax-availability hidden"> - <? if ($this->driver->supportsAjaxStatus()): ?> - <strong class="hideIfDetailed"><?=$this->transEsc('Call Number')?>:</strong> - <span class="callnumber ajax-availability hidden"> + <div class="callnumAndLocation ajax-availability hidden"> + <?php if ($this->driver->supportsAjaxStatus()): ?> + <strong class="hideIfDetailed"><?=$this->transEsc('Call Number')?>:</strong> + <span class="callnumber ajax-availability hidden"> <?=$this->transEsc('Loading')?> ...<br/> </span> - <strong><?=$this->transEsc('Located')?>:</strong> - <span class="location ajax-availability hidden"> + <strong><?=$this->transEsc('Located')?>:</strong> + <span class="location ajax-availability hidden"> <?=$this->transEsc('Loading')?> ... </span> - <div class="locationDetails"></div> - <? else: ?> - <? $summCallNo = $this->driver->getCallNumber(); - if (!empty($summCallNo)): ?> - <strong><?=$this->transEsc('Call Number')?>:</strong> <?=$this->escapeHtml($summCallNo)?> - <? endif; ?> - <? endif; ?> - </div> + <div class="locationDetails"></div> + <?php else: ?> + <?php $summCallNo = $this->driver->getCallNumber(); + if (!empty($summCallNo)): ?> + <strong><?=$this->transEsc('Call Number')?>:</strong> <?=$this->escapeHtml($summCallNo)?> + <?php endif; ?> + <?php endif; ?> + </div> - <? /* We need to find out if we're supposed to display an OpenURL link ($openUrlActive), + <?php /* We need to find out if we're supposed to display an OpenURL link ($openUrlActive), but even if we don't plan to display the link, we still want to get the $openUrl value for use in generating a COinS (Z3988) tag -- see bottom of file. */ - $openUrl = $this->openUrl($this->driver, 'results'); - $openUrlActive = $openUrl->isActive(); - // Account for replace_other_urls setting - $urls = $this->record($this->driver)->getLinkDetails($openUrlActive); + $openUrl = $this->openUrl($this->driver, 'results'); + $openUrlActive = $openUrl->isActive(); + $doi = $this->doi($this->driver, 'results'); + $doiActive = $doi->isActive(); + // Account for replace_other_urls setting + $urls = $this->record($this->driver)->getLinkDetails($openUrlActive); - if ($openUrlActive || !empty($urls)): ?> - <? if ($openUrlActive): ?> + if ($openUrlActive || $doiActive || !empty($urls)): ?> + <?php if ($openUrlActive): ?> + <br/> + <?=$openUrl->renderTemplate()?> + <?php endif; ?> + <?php if ($doiActive): ?> + <br/> + <?=$doi->renderTemplate()?> + <?php endif; ?> + <?php if (!is_array($urls)) $urls = []; + if (!$this->driver->isCollection()): + foreach ($urls as $current): ?> + <a href="<?=$this->escapeHtmlAttr($this->proxyUrl($current['url']))?>" class="fulltext" target="new"> + <i class="fa fa-external-link" aria-hidden="true"></i> + <?=($current['url'] == $current['desc']) ? $this->transEsc('Get full text') : $this->escapeHtml($current['desc'])?> + </a> <br/> - <?=$openUrl->renderTemplate()?> - <? endif; ?> - <? if (!is_array($urls)) $urls = array(); - if (!$this->driver->isCollection()): - foreach ($urls as $current): ?> - <a href="<?=$this->escapeHtmlAttr($this->proxyUrl($current['url']))?>" class="fulltext" target="new"> - <i class="fa fa-external-link" aria-hidden="true"></i> - <?=($current['url'] == $current['desc']) ? $this->transEsc('Get full text') : $this->escapeHtml($current['desc'])?> - </a> - <br/> - <? endforeach; ?> - <? endif; ?> - <? endif; ?> + <?php endforeach; ?> + <?php endif; ?> + <?php endif; ?> <div class="result-formats"> <?=$this->record($this->driver)->getFormatList()?> - <? /* WISO Label - finc-specific - CK */ ?> - <? $sourceID = $this->driver->getSourceID(); ?> + <?php /* WISO Label - finc-specific - CK */ ?> + <?php $sourceID = $this->driver->getSourceID(); ?> <span class="branding label SID<?=($sourceID)?>" title="<?=$this->transEsc("SID$sourceID")?>"></span> - <? /* WISO Label - END */ ?> + <?php /* WISO Label - END */ ?> - <? /* nxt line finc-specific: #5737 removed '(!$openUrlActive && empty($urls) &&' - CK */ ?> - <? if ($this->driver->supportsAjaxStatus()): ?> + <?php /* nxt line finc-specific: #5737 removed '(!$openUrlActive && empty($urls) &&' - CK */ ?> + <?php if ($this->driver->supportsAjaxStatus()): ?> <span class="status ajax-availability hidden"> <span class="label label-default"><?=$this->transEsc('Loading')?> ...</span> </span> - <? endif; ?> + <?php endif; ?> </div> <div class="result-previews"> <?=$this->record($this->driver)->getPreviews()?> </div> </div> - <div class="result-links hidden-print"> - <? /* Display qrcode if appropriate: */ ?> - <? if ($QRCode = $this->record($this->driver)->getQRCode("results")): ?> - <? - // Add JS Variables for QrCode - $this->jsTranslations()->addStrings(array('qrcode_hide' => 'qrcode_hide', 'qrcode_show' => 'qrcode_show')); - ?> - <span class="hidden-xs"> + <div class="result-links hidden-print"> + <?php /* Display qrcode if appropriate: */ ?> + <?php if ($QRCode = $this->record($this->driver)->getQRCode("results")): ?> + <?php +// Add JS Variables for QrCode + $this->jsTranslations()->addStrings(['qrcode_hide' => 'qrcode_hide', 'qrcode_show' => 'qrcode_show']); + ?> + <span class="hidden-xs"> <i class="fa fa-fw fa-qrcode" aria-hidden="true"></i> <a href="<?=$this->escapeHtmlAttr($QRCode);?>" class="qrcodeLink"><?=$this->transEsc('qrcode_show')?></a> <div class="qrcode hidden"> <script type="text/template" class="qrCodeImgTag"> @@ -210,45 +215,46 @@ if ($cover): </div> <br/> </span> - <? endif; ?> + <?php endif; ?> - <? if ($this->cart()->isActiveInSearch() && $this->params->getOptions()->supportsCart() && $this->cart()->isActive()): ?> - <?=$this->render('record/cart-buttons.phtml', ['id' => $this->driver->getUniqueId(), 'source' => $this->driver->getSourceIdentifier()]); ?><br/> - <? endif; ?> + <?php if ($this->cart()->isActiveInSearch() && $this->params->getOptions()->supportsCart() && $this->cart()->isActive()): ?> + <?=$this->render('record/cart-buttons.phtml', ['id' => $this->driver->getUniqueId(), 'source' => $this->driver->getSourceIdentifier()]);?><br/> + <?php endif; ?> - <? if ($this->userlist()->getMode() !== 'disabled'): ?> - <?/* if ($this->permission()->allowDisplay('feature.Favorites')): */?> - <? /* Add to favorites; finc: keep Icon inside link - CK */ ?> - <a href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>" data-lightbox class="save-record result-link-label" data-id="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" title="<?=$this->transEsc('Add to favorites')?>"> - <i class="result-link-icon fa fa-fw fa-star" aria-hidden="true"></i> <?=$this->transEsc('Add to favorites')?> - </a><br/> - <? elseif ($block = $this->permission()->getAlternateContent('feature.Favorites')): ?> - <?=$block?> - <? endif; ?> - <? /* Saved lists */ ?> - <div class="savedLists alert alert-info hidden"> - <strong><?=$this->transEsc("Saved in")?>:</strong> - </div> - <? /* endif; */?> + <?php if ($this->userlist()->getMode() !== 'disabled'): ?> + <?php /* if ($this->permission()->allowDisplay('feature.Favorites')): */ ?> + <?php /* Add to favorites; finc: keep Icon inside link - CK */ ?> + <a href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>" data-lightbox class="save-record result-link-label" data-id="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" + title="<?=$this->transEsc('Add to favorites')?>"> + <i class="result-link-icon fa fa-fw fa-star" aria-hidden="true"></i> <?=$this->transEsc('Add to favorites')?> + </a><br/> + <?php elseif ($block = $this->permission()->getAlternateContent('feature.Favorites')): ?> + <?=$block?> + <?php endif; ?> + <?php /* Saved lists */ ?> + <div class="savedLists alert alert-info hidden"> + <strong><?=$this->transEsc("Saved in")?>:</strong> + </div> + <?php /* endif; */ ?> - <? /* Hierarchy tree link; finc: keep Icon inside link - CK */ ?> - <? $trees = $this->driver->tryMethod('getHierarchyTrees'); - if (!empty($trees)): ?> - <? foreach ($trees as $hierarchyID => $hierarchyTitle): ?> - <div class="hierarchyTreeLink"> - <input type="hidden" value="<?=$this->escapeHtmlAttr($hierarchyID)?>" class="hiddenHierarchyId"/> - <a class="hierarchyTreeLinkText result-link-label" data-lightbox href="<?=$this->recordLink()->getTabUrl($this->driver, 'HierarchyTree')?>?hierarchy=<?=urlencode($hierarchyID)?>#tabnav" title="<?=$this->transEsc('hierarchy_tree')?>" data-lightbox-href="<?=$this->recordLink()->getTabUrl($this->driver, 'AjaxTab')?>?hierarchy=<?=urlencode($hierarchyID)?>" data-lightbox-post="tab=hierarchytree"> - <i class="result-link-icon fa fa-fw fa-sitemap" aria-hidden="true"></i> <span class="hidden-xs hidden-sm"><?=$this->transEsc('hierarchy_view_context')?></span><? if (count($trees) > 1): ?>: <?=$this->escapeHtml($hierarchyTitle)?><? endif; ?> - </a> - </div> - <? endforeach; ?> - <? endif; ?> + <?php /* Hierarchy tree link; finc: keep Icon inside link - CK */ ?> + <?php $trees = $this->driver->tryMethod('getHierarchyTrees'); + if (!empty($trees)): ?> + <?php foreach ($trees as $hierarchyID => $hierarchyTitle): ?> + <div class="hierarchyTreeLink"> + <input type="hidden" value="<?=$this->escapeHtmlAttr($hierarchyID)?>" class="hiddenHierarchyId"/> + <a class="hierarchyTreeLinkText result-link-label" data-lightbox href="<?=$this->recordLink()->getTabUrl($this->driver, 'HierarchyTree')?>?hierarchy=<?=urlencode($hierarchyID)?>#tabnav" title="<?=$this->transEsc('hierarchy_tree')?>" data-lightbox-href="<?=$this->recordLink()->getTabUrl($this->driver, 'AjaxTab')?>?hierarchy=<?=urlencode($hierarchyID)?>" data-lightbox-post="tab=hierarchytree"> + <i class="result-link-icon fa fa-fw fa-sitemap" aria-hidden="true"></i> <span class="hidden-xs hidden-sm"><?=$this->transEsc('hierarchy_view_context')?></span><?php if (count($trees) > 1): ?>: <?=$this->escapeHtml($hierarchyTitle)?><?php endif; ?> + </a> + </div> + <?php endforeach; ?> + <?php endif; ?> - <?=$this->driver->supportsCoinsOpenUrl() ? '<span class="Z3988" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenUrl()) . '"></span>' : ''?> - </div> + <?=$this->driver->supportsCoinsOpenUrl() ? '<span class="Z3988" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenUrl()) . '"></span>' : ''?> </div> - <? if ($thumbnail && $thumbnailAlignment == 'right'): ?> + </div> + <?php if ($thumbnail && $thumbnailAlignment == 'right'): ?> <?=$thumbnail?> - <? endif ?> + <?php endif ?> </div> -<!-- finc: recordDriver - solrAI - result-list - END --> +<!-- finc: recordDriver - SolrAI - result-list - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/collection-info.phtml b/themes/finc/templates/RecordDriver/SolrDefault/collection-info.phtml deleted file mode 100644 index ac949052fe5dbdfc14eedf4d47677a84b18c204d..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/collection-info.phtml +++ /dev/null @@ -1,67 +0,0 @@ -<!-- finc: recordDriver - solrDefault - collection-info --> -<? $this->headScript()->appendFile('collection_record.js'); ?> -<div class="media"> - <? $QRCode = $this->record($this->driver)->getQRCode("core"); - $coverDetails = $this->record($this->driver)->getCoverDetails('collection-info', 'medium', $this->record($this->driver)->getThumbnail('large')); - $cover = $coverDetails['html']; - $preview = $this->record($this->driver)->getPreviews(); ?> - <? if ($QRCode || $cover || $preview): ?> - <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?>"> - <? /* Display thumbnail if appropriate: */ ?> - <? if($cover): ?> - <?=$cover?> - <? endif; ?> - - <? /* Display qrcode if appropriate: */ ?> - <? if($QRCode): ?> - <span class="hidden-xs"> - <br/><img alt="<?=$this->transEsc('QR Code')?>" class="qrcode" src="<?=$this->escapeHtmlAttr($QRCode);?>"/> - </span> - <? endif; ?> - - <? if ($preview): ?><?=$preview?><? endif; ?> - </div> - <? endif; ?> - <div class="media-body"> - - <? /* finc: we want to get rid of trailing special chars in the title and limit its length to 100 chars */ ?> - <h2><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle() . ' ' . $this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 100)))?></h2> - - <? $summary = $this->driver->getSummary(); $summary = isset($summary[0]) ? $summary[0] : false; ?> - <? if ($summary): ?> - <p><?=$this->escapeHtml($summary)?></p> - <? endif; ?> - - <? /* Display the lists that this record is saved to */ ?> - <div class="savedLists hidden alert alert-info" id="savedLists"> - <strong><?=$this->transEsc("Saved in")?>:</strong> - </div> - - <? /* finc-specific snippet - Begin - CK */ ?> - <? /* Do not set to 'hidden', make table below collapse in; adapt collection_record.js to keep accordion open - CK */ ?> - <a id="moreInfoToggle" href="#" class="accordion-toggler collapsed hidden" data-toggle="collapse" data-target="#collectionInfo" aria-expanded="true"> - <?=$this->transEsc('Description')?> - </a> - <?/* Display Main Details */?> - <? - $formatter = $this->recordDataFormatter(); - $fields = $formatter->getData($driver, $formatter->getDefaults('collection-info')); - ?> - <? if (!empty($fields)): ?> - <?/* finc: we use 'collapse in' to initially hide the content, CK */?> - <table id="collectionInfo" class="table table-striped collapse in"> - <? /* Table summary not supported in html 5, finc-specific solution, CK */ ?> - <caption class="sr-only"><?=$this->transEsc('Bibliographic Details')?></caption> - <? foreach ($fields as $key => $current): ?> - <? if ($key == null): ?> - <?=$current['value']?> - <? else: ?> - <tr><th><?=$this->transEsc($key)?>:</th><td><?=$current['value']?></td></tr> - <? endif; ?> - <? endforeach; ?> - </table> - <? endif; ?> - <?/* End Main Details */?> - </div> -</div> -<!-- finc: recordDriver - solrDefault - collection-info - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/collection-record.phtml b/themes/finc/templates/RecordDriver/SolrDefault/collection-record.phtml deleted file mode 100644 index e15e4cd91790919e4088b1aaca4008f6fdc3ec1f..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/collection-record.phtml +++ /dev/null @@ -1,24 +0,0 @@ -<!-- finc: recordDriver - solrDefault - collection-record --> -<h2> - <?=$this->escapeHtml($this->driver->getShortTitle() . ' ' . $this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection())?> -</h2> -<a href="<?=$this->recordLink()->getUrl($this->driver)?>"><?=$this->transEsc('View Full ' . ($this->driver->isCollection() ? 'Collection' : 'Record'))?></a> - -<? -$formatter = $this->recordDataFormatter(); -$fields = $formatter->getData($driver, $formatter->getDefaults('collection-record')); -?> -<? if (!empty($fields)): ?> -<table class="table table-striped"> - <? /* Table summary not supported in html 5, finc-specific solution, CK */ ?> - <caption class="sr-only"><?=$this->transEsc('Bibliographic Details')?></caption> - <? foreach ($fields as $key => $current): ?> - <? if ($key == null): ?> - <?=$current['value']?> - <? else: ?> - <tr><th><?=$this->transEsc($key)?>:</th><td><?=$current['value']?></td></tr> - <? endif; ?> - <? endforeach; ?> -</table> -<? endif; ?> -<!-- finc: recordDriver - solrDefault - collection-record - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/core.phtml b/themes/finc/templates/RecordDriver/SolrDefault/core.phtml deleted file mode 100644 index 48462c26c31e8798eb152a81a40f36227533cac8..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/core.phtml +++ /dev/null @@ -1,80 +0,0 @@ -<!-- finc: RecordDriver - solrDefault - core --> -<div class="media" vocab="http://schema.org/" resource="#record" typeof="<?=$this->driver->getSchemaOrgFormats()?> Product"> - <? - $QRCode = $this->record($this->driver)->getQRCode("core"); - $coverDetails = $this->record($this->driver)->getCoverDetails('core', 'medium', $this->record($this->driver)->getThumbnail('large')); - $cover = $coverDetails['html']; - $preview = $this->record($this->driver)->getPreviews(); - ?> - <? if ($QRCode || $cover || $preview): ?> - <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"> - <? /* Display thumbnail if appropriate: */ ?> - <? if($cover): ?> - <?=$cover?> - <? /* BOF - finc-specific StyleBasedIcons */ ?> - <? elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> - <?=$this->record($this->driver)->getFormatIcon()?> - <? /* EOF - finc-specific StyleBasedIcons */ ?> - <? endif; ?> - - <? /* Display qrcode if appropriate: */ ?> - <? if($QRCode): ?> - <span class="hidden-xs"> - <br/><img alt="<?=$this->transEsc('QR Code')?>" class="qrcode" src="<?=$this->escapeHtmlAttr($QRCode);?>"/> - </span> - <? endif; ?> - - <? // if you have a preview tab but want to move or remove the preview link - // from this area of the record view, this can be split into - // getPreviewData() (should stay here) and - // getPreviewLink() (can go in your desired tab) ?> - <? if ($preview): ?> - <div class="record-previews"> - <?=$preview?> - </div> - <? endif; ?> - </div> - <? endif; ?> - <div class="media-body"> - - <? /* finc: We want to get rid of trailing special chars in the title and limit its length to 100 chars - remove schema name tag here but keept in description, CK - */ - ?> - <? /* finc: add schema tags for title #13850 - VE */ ?> - <h3 property="name"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle() . ' ' . $this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 100)))?></h3> - - <? $summary = $this->driver->getSummary(); $summary = isset($summary[0]) ? $this->escapeHtml($summary[0]) : false; ?> - <? if ($summary): ?> - <p><?=$this->truncate($summary, 300)?></p> - - <? if(strlen($summary) > 300): ?> - <p><a href='<?=$this->recordLink()->getTabUrl($this->driver, 'Description')?>#tabnav'><?=$this->transEsc('Full description')?></a></p> - <? endif; ?> - <? endif; ?> - - <? if ($this->userlist()->getMode() !== 'disabled'): ?> - <? /* Display the lists that this record is saved to */ ?> - <div class="savedLists hidden alert alert-info"> - <strong><?=$this->transEsc("Saved in")?>:</strong> - </div> - <? endif; ?> - - <?/* Display Main Details */?> - <? - $formatter = $this->recordDataFormatter(); - $coreFields = $formatter->getData($driver, $formatter->getDefaults('core')); - ?> - <? if (!empty($coreFields)): ?> - <table class="table table-striped"> - <? /* Table summary not supported in html 5, finc-specific solution, CK */ ?> - <caption class="sr-only"><?=$this->transEsc('Bibliographic Details')?></caption> - <? foreach ($coreFields as $key => $current): ?> - <tr><th><?=$this->transEsc($key)?>:</th><td><?=$current['value']?></td></tr> - <? endforeach; ?> - </table> - <? endif; ?> - <?/* End Main Details */?> - </div> -</div> -<!-- finc: RecordDriver - solrDefault - core - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-additionals.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-additionals.phtml deleted file mode 100644 index 1e9a782ea13583e9be935c8b2cb3dc47a8628e07..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-additionals.phtml +++ /dev/null @@ -1,20 +0,0 @@ -<!-- finc: RecordDriver - solrDefault - data-additionals --> -<? if (!empty($data) && is_array($data)): ?> - <? foreach($data as $additional) :?> - <? if (isset($additional['identifier'])): ?> - <tr> - <th> - <?=$this->transEsc($additional['identifier'])?>: - </th> - <td> - <? if(isset($additional['id'])): ?> - <a href="<?=$this->recordLink()->getUrl($additional['id'])?>"><?=$this->escapeHtml($additional['text'])?></a> - <? else: ?> - <?=$this->escapeHtml($additional['text'])?> - <? endif; ?> - </td> - </tr> - <? endif; ?> - <? endforeach; ?> -<? endif; ?> -<!-- finc: RecordDriver - solrDefault - data-additionals - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-authors.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-authors.phtml deleted file mode 100644 index 31cad9b7eaa5e00ad87de2501f81a1fa630f7576..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-authors.phtml +++ /dev/null @@ -1,57 +0,0 @@ -<!-- finc: RecordDriver - solrDefault - data-authors --> -<? -$formatProperty = function ($datafield, $name, $label) { -if (count($datafield) == 0) { -return ''; -} -$that = $this; -$translate = function ($str) use ($that, $label) { -return $that->transEsc($label . $str); -}; -return '<span class="author-property-' . $name . '">(' . implode(', ', array_unique(array_map($translate, $datafield))) . ')</span>'; -}; -$formattedAuthors = []; -$types = [ - 'main' => 'author', - 'secondary' => 'contributor', - 'corporate' => 'creator', - 'corporate_secondary' => 'contributor' -]; -?> -<? foreach ($types as $type => $schemaLabel): ?> - <? if (!empty($data[$type])): ?> - <? foreach ($data[$type] as $author => $roles): ?> - <? ob_start(); ?> - <span class="author-data" property="<?=$this->escapeHtml($schemaLabel)?>" typeof="Person"> - <span property="name"> - <a href="<?=$this->record($this->driver)->getLink('author', $author)?>"> - <?=$this->escapeHtml($author)?> - </a> - </span> - <? - // Display additional data using the appropriate translation prefix - // (for example, to render author roles correctly): - if (!empty($requiredDataFields)) { - foreach ($requiredDataFields as $field) { - $name = $field['name']; - $prefix = isset($field['prefix']) ? $field['prefix'] : ''; - // deprecated due to more flexible solution at core - // to-do: revision of indexing and finc specific treatment - // of roles in RecordDriver - if (count($roles) > 0 && $name == 'role') { - echo $formatProperty($roles, $name, $prefix); - } - } - } - ?> - </span> - <? - // Strip whitespace before close tags to avoid spaces in front of commas: - $formattedAuthors[] = trim(preg_replace('/\s+<\//', '</', ob_get_contents())); - ob_end_clean(); - ?> - <? endforeach; ?> - <? endif; ?> -<? endforeach; ?> -<?=implode(', ', $formattedAuthors)?> -<!-- finc: RecordDriver - solrDefault - data-authors - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-dissertationNote.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-dissertationNote.phtml deleted file mode 100644 index 36fb26b93a4e6abb67305980e8c58727617deb6a..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-dissertationNote.phtml +++ /dev/null @@ -1,7 +0,0 @@ -<? if (!empty($data)): ?> - <? if (isset($data['g'])) { - $dissertationMisc = $data['g']; - unset($data['g']); - } ?> - <?=implode(', ', array_map([$this, 'escapeHtml'], $data)); ?><? if (isset($dissertationMisc)): ?> (<?=$dissertationMisc?>)<? endif;?> -<? endif; ?> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-escapeHtml.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-escapeHtml.phtml deleted file mode 100644 index a92016aee7c71419e36da3aa492d3e9a1c94177b..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-escapeHtml.phtml +++ /dev/null @@ -1,8 +0,0 @@ -<? // Don't add START and END comments ?> -<?if (!empty($data)): ?> - <? if (is_array($data)): ?> - <?= implode('<br/>', array_map(array($this, 'escapeHtml'), $data)) ?> - <? else: ?> - <?= $this->escapeHtml($data) ?> - <? endif; ?> -<? endif; ?> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-escapeHtmlCommaSep.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-escapeHtmlCommaSep.phtml deleted file mode 100644 index 5015acbff85c15eebc2f578b7ca77ae4c0c28a3b..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-escapeHtmlCommaSep.phtml +++ /dev/null @@ -1,9 +0,0 @@ -<!-- finc: RecordDriver - solrDefault - data-escapeHtmlCommaSep --> -<? if (!empty($data)): ?> - <? if (is_array($data)): ?> - <?=implode(', ', array_map(array($this, 'escapeHtml'), $data)); ?> - <? else: ?> - <?= $this->escapeHtml($data) ?> - <? endif; ?> -<? endif; ?> -<!-- finc: RecordDriver - solrDefault - data-escapeHtmlCommaSep - END --> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-hierarchyParentTitle.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-hierarchyParentTitle.phtml deleted file mode 100644 index d4da82d34b8ff8eb2d47f23987ae46224ba0395a..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-hierarchyParentTitle.phtml +++ /dev/null @@ -1,13 +0,0 @@ -<!-- finc: RecordDriver - solrDefault - data-hierarchyParentTitle --> -<? if (!empty($data)): ?> - <? $hierarchyParentId = $this->driver->tryMethod('getHierarchyParentID'); ?> - <? foreach ($data as $key => $title): ?> - <? if(isset($hierarchyParentId[$key])): ?> - <a href="<?=$this->recordLink()->getUrl($hierarchyParentId[$key]); ?>"><?=$this->escapeHtml($title)?></a> - <? else: ?> - <?=$this->escapeHtml($title)?> - <? endif; ?> - <br/> - <? endforeach; ?> -<? endif; ?> -<!-- finc: RecordDriver - solrDefault - data-hierarchyParentTitle - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-isbn.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-isbn.phtml deleted file mode 100644 index ea31c702f8fa2433a122d82d56ad7dbab05914c7..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-isbn.phtml +++ /dev/null @@ -1,11 +0,0 @@ -<!-- finc: RecordDriver - SolrDefault - data-isbn --> -<? if (!empty($data)): ?> -<? if (is_array($data)): ?> - <span property="isbn"> - <?=implode('<br/>', array_map(array($this, 'escapeHtml'), $data))?> - </span> -<? else: ?> -<?=$this->escapeHtml($data)?> -<? endif; ?> -<? endif; ?> -<!-- finc: RecordDriver - SolrDefault - data-isbn - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-issn.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-issn.phtml deleted file mode 100644 index 9c83fd7b91e51f936f89a0f608e3a10ac880b231..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-issn.phtml +++ /dev/null @@ -1,11 +0,0 @@ -<!-- finc: RecordDriver - SolrDefault - data-issn --> -<? if (!empty($data)): ?> -<? if (is_array($data)): ?> - <span property="issn"> - <?=implode('<br/>', array_map(array($this, 'escapeHtml'), $data))?> - </span> -<? else: ?> -<?=$this->escapeHtml($data)?> -<? endif; ?> -<? endif; ?> -<!-- finc: RecordDriver - SolrDefault - data-issn - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-localSignature.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-localSignature.phtml deleted file mode 100644 index aecdb6d3c11bc3ef11908a62ac9dc43b30bf1950..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-localSignature.phtml +++ /dev/null @@ -1,11 +0,0 @@ -<!-- finc: RecordDriver - solrDefault - data-localSignature --> -<? if (!empty($data)): ?> - <? foreach ($data as $field): ?> - <? if (!empty($field)): ?> - <? foreach ($field as $subfield): ?> - <?=trim($this->escapeHtml($subfield))?> - <? endforeach; ?> - <? endif; ?> - <? endforeach; ?> -<? endif; ?> -<!-- finc: RecordDriver - solrDefault - data-localSignature - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-otherRelationshipEntry.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-otherRelationshipEntry.phtml deleted file mode 100644 index d9a9c6f7714e1f6c69fb91b0229746af23fe1985..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-otherRelationshipEntry.phtml +++ /dev/null @@ -1,19 +0,0 @@ -<!-- finc: RecordDriver - solrDefault - data-otherRelationshipEntry --> -<? if (!empty($data)): ?> - <? foreach ($data as $subject => $values): ?> - <tr> - <th><?=$this->transEsc($subject)?>: </th> - <td> - <? foreach ($values as $value): ?> - <? if (!empty($value['link']) && $recordLink = $this->RecordLink()->getRecordLink($value['link'], 'record_id')): ?> - <a href="<?=$recordLink?>"><?=$this->escapeHtml($value['text'])?></a> - <? else: ?> - <?=$this->escapeHtml($value['text'])?> - <? endif; ?> - <br/> - <? endforeach; ?> - </td> - </tr> - <? endforeach; ?> -<? endif; ?> -<!-- finc: RecordDriver - solrDefault - data-otherRelationshipEntry - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-publicationDetails.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-publicationDetails.phtml index 6943a188bdd8d99daa61fd418ac41f499589bfb2..df299e1e5b96aa27cc2651a9838e82a4a2dc5f4d 100644 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-publicationDetails.phtml +++ b/themes/finc/templates/RecordDriver/SolrDefault/data-publicationDetails.phtml @@ -1,27 +1,32 @@ <!-- finc: RecordDriver - solrDefault - data-publicationDetails --> <? if (!empty($data)): ?> -<div itemscope itemtype="http://schema.org/publisher"> - <? foreach ($data as $field): ?> - <span property="publisher" typeof="Organization"> - <? $pubPlace = $field->getPlace(); if (!empty($pubPlace)): ?> - <span property="location" typeof="Place"> - <span property="name"><?=$this->escapeHtml($pubPlace)?></span> - </span> - <? endif; ?> - <? $pubName = $field->getName(); if (!empty($pubName)): ?> - <span property="name"><?=$this->escapeHtml($pubName)?></span> - <? endif; ?> - </span> - <span property="datePublished"> - <? /* do not show solr publish date #13993 - GG */ ?> - <? /*$pubDateSort = $this->driver->tryMethod('getPublishDateSort');*/ ?> - <? $pubDate = $field->getDate(); if (!empty($pubDate)): ?> - <?=$this->escapeHtml($pubDate)?> - <? /*else: ?> - <?=$this->escapeHtml($pubDateSort)*/?></span> - <? endif; ?> - </span><br/> - <? endforeach; ?> -</div> + <div itemscope itemtype="http://schema.org/publisher"> + <? if (is_array($data) && !empty($data[0]) && $data[0] instanceof \VuFind\RecordDriver\Response\PublicationDetails): ?> + <? foreach ($data as $field): ?> + <span property="publisher" typeof="Organization"> + <? $pubPlace = $field->getPlace(); if (!empty($pubPlace)): ?> + <span property="location" typeof="Place"> + <span property="name"><?=$this->escapeHtml($pubPlace)?></span> + </span> + <? endif; ?> + <? $pubName = $field->getName(); if (!empty($pubName)): ?> + <span property="name"><?=$this->escapeHtml($pubName)?></span> + <? endif; ?> + </span> + <span property="datePublished"> + + <? $pubDate = $field->getDate(); if (!empty($pubDate)): ?> + <?=$this->escapeHtml($pubDate)?> + <? endif; ?> + </span> + <? endforeach; ?> + <? else: ?> + <? if (is_array($data)): ?> + <?= implode('<br/>', array_map(array($this, 'escapeHtml'), $data)) ?> + <? else: ?> + <?= $this->escapeHtml($data) ?> + <? endif; ?> + <? endif ?> + </div> <? endif ?> <!-- finc: RecordDriver - solrDefault - data-publicationDetails - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-titleDetails.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-titleDetails.phtml deleted file mode 100644 index fc6b44e32028396be96662c9529079bff87adae0..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-titleDetails.phtml +++ /dev/null @@ -1,14 +0,0 @@ -<!-- finc: RecordDriver - solrDefault - data-titleDetails --> -<? if (!empty($data)): ?> - <? $i = 0; foreach ($data as $title): ?> - <?=($i > 0 ? '<br />':'')?><?=$this->escapeHtml($title)?><? $i++ ;?> - <? endforeach; ?> -<? else: ?> - <?=$this->escapeHtml( - $this->driver->getShortTitle() . ' ' - . $this->driver->getSubtitle() . ' ' - . $this->driver->getTitleSection()) - . ($this->driver->getTitleStatement() ? ' / ' . $this->driver->getTitleStatement() : '')?><br /><?=($this->driver->tryMethod('getTitleOrig') && $this->driver->getTitleOrig() != '' ? $this->escapeHtml($this->driver->getTitleOrig()) : '') - ?> -<? endif; ?> -<!-- finc: RecordDriver - solrDefault - data-titleDetails - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-titleUniform.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-titleUniform.phtml deleted file mode 100644 index 24d30005581c88024d0cc7a39a4471bd36005e22..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-titleUniform.phtml +++ /dev/null @@ -1,18 +0,0 @@ -<!-- finc: RecordDriver - solrDefault - data-titleUniform --> -<? if (!empty($data)): ?> - <tr> - <th> - <?=$this->driver->isRDA() - ? $this->transEsc('rda_original_title') - : $this->transEsc('non_rda_original_title')?>: - </th> - <td property="title"> - <?if (is_array($data)): ?> - <a href="<?=$this->record($this->driver)->getLink('title', $data['title'])?>"><?=$this->escapeHtml($data['title'])?></a><? if (isset($data['lang'])): ?> ⟨<?=$this->escapeHtml($data['lang'])?>⟩<? endif;?> - <? else: ?> - <a href="<?=$this->record($this->driver)->getLink('title', $data)?>"><?=$this->escapeHtml($data)?></a> - <? endif; ?> - </td> - </tr> -<? endif; ?> -<!-- finc: RecordDriver - solrDefault - data-titleUniform - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-transEsc.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-transEsc.phtml deleted file mode 100644 index e0a5c810ff41c3f28729c09cbfef268301b3fe29..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-transEsc.phtml +++ /dev/null @@ -1,8 +0,0 @@ -<? // Don't add START and END comments ?> -<?if (!empty($data)): ?> - <? if(is_array($data)): ?> - <?= implode('<br/>', array_map(array($this, 'transEsc'), $data)) ?> - <? else: ?> - <?=$this->transEsc($data)?> - <? endif; ?> -<? endif; ?> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-transEscCommaSep.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-transEscCommaSep.phtml deleted file mode 100644 index 4e9dd72fe3e55b0268f899157a2029951783ad54..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-transEscCommaSep.phtml +++ /dev/null @@ -1,7 +0,0 @@ -<?if (!empty($data)): ?> - <? if(is_array($data)): ?> - <?=implode(', ', array_map(array($this, 'transEsc'), $data)); ?> - <? else: ?> - <?= $this->transEsc($data) ?> - <? endif; ?> -<? endif; ?> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-transEscCommaSepLang.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-transEscCommaSepLang.phtml deleted file mode 100644 index ce46d2e8a4622ac10b090048ef33d59bb688a68a..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-transEscCommaSepLang.phtml +++ /dev/null @@ -1,12 +0,0 @@ -<!-- finc: RecordDriver - solrDefault - data-transEscCommaSepLang --> -<?if (!empty($data)): ?> - <? if(is_array($data)): ?> - <? /* finc: add schema tags for language #13850 - VE */ ?> - <span property="inLanguage"> - <?=implode('</span>, <span property="inLanguage">', array_map(array($this, 'transEsc'), $data)); ?> - </span> - <? else: ?> - <?= $this->transEsc($data) ?> - <? endif; ?> -<? endif; ?> -<!-- finc: RecordDriver - solrDefault - data-transEscCommaSepLang - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/format-list.phtml b/themes/finc/templates/RecordDriver/SolrDefault/format-list.phtml deleted file mode 100644 index e4f3febe1c12461dafe246162b566cf22ee4c65c..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/format-list.phtml +++ /dev/null @@ -1,21 +0,0 @@ -<? $formats = $this->driver->getFormats(); - $translated_formats = []; - foreach ($formats as $format): ?> - <? $translated_formats[] = $translated_format = $this->transEsc($format); ?> - <span class="format <?=$this->record($this->driver)->getFormatClass($format) ?>"><?=$translated_format ?></span> -<? endforeach; ?> -<? /* New genre string to display nxt to format in RESULT LIST and RECORD/Detail View, #11703, limit to SID 0 CK */ ?> -<? $sourceID = $this->driver->tryMethod('getSourceID'); ?> -<? if ($sourceID == "0"): ?> -<? $genres = $this->driver->tryMethod('getGenreFacet');?> -<? if (!empty($genres)): ?> - <? foreach($genres as $genre): ?> - <? $translated_genre = $this->transEsc($genre); - //deduplicate output - if (!in_array($translated_genre,$translated_formats)): - ?> - <span class="format"><?=$translated_genre?></span> - <? endif; ?> - <?endforeach;?> -<?endif;?> -<? endif; ?> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrDefault/list-entry.phtml b/themes/finc/templates/RecordDriver/SolrDefault/list-entry.phtml deleted file mode 100644 index a0a9d82f06ca58c66d78326b7637929a920a1355..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/list-entry.phtml +++ /dev/null @@ -1,204 +0,0 @@ -<!-- finc: RecordDriver - SolrDefault - mylist --> -<? - // Set up some convenience variables: - $id = $this->driver->getUniqueId(); - $source = $this->driver->getSourceIdentifier(); - if (isset($this->list) && is_object($this->list)) { - $list_id = $this->list->id; - $user_id = $this->list->user_id; - } else { - $list_id = null; - $user_id = $this->user ? $this->user->id : null; - } - // finc: next line finc-specific; required to display public favorites lists, #12052, see also below - CK - $isEditable = $this->user && $this->user->id === $user_id; - // Thumbnail - $coverDetails = $this->record($this->driver)->getCoverDetails('list-entry', 'medium', $this->recordLink()->getUrl($this->driver)); - $cover = $coverDetails['html']; - $thumbnail = false; - $thumbnailAlignment = $this->record($this->driver)->getThumbnailAlignment('list'); - if ($cover): - ob_start(); ?> - <div class="media-<?=$thumbnailAlignment ?> <?=$this->escapeHtmlAttr($coverDetails['size'])?>"> - <?=$cover ?> - </div> - <? $thumbnail = ob_get_contents(); ?> - <? ob_end_clean(); ?> -<? endif; ?> -<div class="result<? if($this->driver->supportsAjaxStatus()): ?> ajaxItem<? endif ?>"> - <input type="hidden" value="<?=$this->escapeHtmlAttr($id) ?>" class="hiddenId"/> - <input type="hidden" value="<?=$this->escapeHtmlAttr($source) ?>" class="hiddenSource"/> - <?=$this->record($this->driver)->getCheckbox()?> - <div class="media"> - <? if ($thumbnail && $thumbnailAlignment == 'left'): ?> - <?=$thumbnail ?> - <? endif; ?> - <div class="media-body"> - <div class="result-body"> - <div class="resultItemLine1"> - <? $missing = $this->driver instanceof \VuFind\RecordDriver\Missing; ?> - <? if (!$missing): ?><a href="<?=$this->recordLink()->getUrl($this->driver)?>" class="getFull" data-view="<?=$this->params->getOptions()->getListViewOption() ?>"><? endif; ?> - <span class="title"><?=$this->record($this->driver)->getTitleHtml()?></span> - <? if (!$missing): ?></a><? endif; ?> - </div> - - <div class="resultItemLine2"> - <? if($this->driver->isCollection()): ?> - <?=implode('<br>', array_map(array($this, 'escapeHtml'), $this->driver->getSummary())); ?> - <? else: ?> - <? $summAuthors = $this->driver->getPrimaryAuthors(); if (!empty($summAuthors)): ?> - <?=$this->transEsc('by')?> - <? $authorCount = count($summAuthors); foreach ($summAuthors as $i => $summAuthor): ?> - <a href="<?=$this->record($this->driver)->getLink('author', $summAuthor)?>"><?=$this->escapeHtml($summAuthor)?></a><?=($i + 1 < $authorCount ? ';' : '') ?> - <? endforeach; ?> - <? endif; ?> - - <? $journalTitle = $this->driver->getContainerTitle(); $summDate = $this->driver->getPublicationDates(); ?> - <? if (!empty($journalTitle)): ?> - <?=!empty($summAuthor) ? '<br/>' : ''?> - <?=/* TODO: handle highlighting more elegantly here */ $this->transEsc('Published in') . ' <a href="' . $this->record($this->driver)->getLink('journaltitle', str_replace(array('{{{{START_HILITE}}}}', '{{{{END_HILITE}}}}'), '', $journalTitle)) . '">' . $this->highlight($journalTitle) . '</a>';?> - <?=!empty($summDate) ? ' (' . $this->escapeHtml($summDate[0]) . ')' : ''?> - <? elseif (!empty($summDate)): ?> - <?=!empty($summAuthor) ? '<br/>' : ''?> - <?=$this->transEsc('Published') . ' ' . $this->escapeHtml($summDate[0])?> - <? endif; ?> - <? $summInCollection = $this->driver->getContainingCollections(); if (false && !empty($summInCollection)): ?> - <? foreach ($summInCollection as $collId => $collText): ?> - <div> - <b><?=$this->transEsc("in_collection_label")?></b> - <a class="collectionLinkText" href="<?=$this->url('collection', array('id' => $collId))?>?recordID=<?=urlencode($this->driver->getUniqueID())?>"> - <?=$this->escapeHtml($collText)?> - </a> - </div> - <? endforeach; ?> - <? endif; ?> - <? endif; ?> - </div> - - <div class="last"> - <? if(!$this->driver->isCollection()) { - if ($snippet = $this->driver->getHighlightedSnippet()) { - if (!empty($snippet['caption'])) { - echo '<strong>' . $this->transEsc($snippet['caption']) . ':</strong> '; - } - if (!empty($snippet['snippet'])) { - echo '<span class="quotestart">“</span>...' . $this->highlight($snippet['snippet']) . '...<span class="quoteend">”</span><br/>'; - } - } - } ?> - - <? $listTags = ($this->usertags()->getMode() !== 'disabled') ? $this->driver->getTags( - null === $list_id ? true : $list_id, // get tags for all lists if no single list is selected - $user_id, 'tag' - ) : array(); - ?> - <? if (count($listTags) > 0): ?> - <strong><?=$this->transEsc('Your Tags')?>:</strong> - <? foreach ($listTags as $tag): ?> - <a href="<?=$this->currentPath() . $results->getUrlQuery()->addFacet('tags', $tag->tag)?>"><?=$this->escapeHtml($tag->tag)?></a> - <? endforeach; ?> - <br/> - <? endif; ?> - <? $listNotes = $this->driver->getListNotes($list_id, $user_id); ?> - <? if (count($listNotes) > 0): ?> - <strong><?=$this->transEsc('Notes')?>:</strong> - <? if (count($listNotes) > 1): ?><br/><? endif; ?> - <? foreach ($listNotes as $note): ?> - <?=$this->escapeHtml($note)?><br/> - <? endforeach; ?> - <? endif; ?> - - <? if (count($this->lists) > 0): ?> - <strong><?=$this->transEsc('Saved in')?>:</strong> - <? $i=0;foreach($this->lists as $current): ?> - <a href="<?=$this->url('userList', array('id' => $current->id))?>"><?=$this->escapeHtml($current->title)?></a><? if($i++ < count($this->lists)-1): ?>,<? endif; ?> - <? endforeach; ?> - <br/> - <? endif; ?> - - <div class="callnumAndLocation ajax-availability hidden"> - <? if ($this->driver->supportsAjaxStatus()): ?> - <strong class="hideIfDetailed"><?=$this->transEsc('Call Number')?>:</strong> - <span class="callnumber ajax-availability hidden"> - <?=$this->transEsc('Loading')?>...<br/> - </span> - <strong><?=$this->transEsc('Located')?>:</strong> - <span class="location ajax-availability hidden"> - <?=$this->transEsc('Loading')?>... - </span> - <div class="locationDetails"></div> - <? else: ?> - <? $summCallNo = $this->driver->getCallNumber(); if (!empty($summCallNo)): ?> - <strong><?=$this->transEsc('Call Number')?>:</strong> <?=$this->escapeHtml($summCallNo)?> - <? endif; ?> - <? endif; ?> - </div> - - <? /* We need to find out if we're supposed to display an OpenURL link ($openUrlActive), - but even if we don't plan to display the link, we still want to get the $openUrl - value for use in generating a COinS (Z3988) tag -- see bottom of file. - */ - $openUrl = $this->openUrl($this->driver, 'results'); - $openUrlActive = $openUrl->isActive(); - // Account for replace_other_urls setting - $urls = $this->record($this->driver)->getLinkDetails($openUrlActive); - - if ($openUrlActive || !empty($urls)): - ?> - <? if ($openUrlActive): ?> - <br/> - <?=$openUrl->renderTemplate()?> - <? endif;?> - - <? if (!is_array($urls)) { $urls = array(); } - if(!$this->driver->isCollection()): - foreach ($urls as $current): ?> - <a href="<?=$this->escapeHtmlAttr($this->proxyUrl($current['url']))?>" class="fulltext" target="new"><i class="fa fa-external-link" aria-hidden="true"></i> <?=($current['url'] == $current['desc']) ? $this->transEsc('Get full text') : $this->escapeHtml($current['desc'])?></a> - <? endforeach; ?> - <? endif; ?> - <? endif; ?> - <br/> - - <?=$this->record($this->driver)->getFormatList() ?> - - <? if (!$openUrlActive && empty($urls) && $this->driver->supportsAjaxStatus()): ?> - <span class="status ajax-availability hidden"><?=$this->transEsc('Loading')?>...</span> - <br/><br/> - <? endif; ?> - <?=$this->record($this->driver)->getPreviews()?> - </div> - </div> - - <div class="result-links hidden-print"> - <? /* finc: next line finc-specific; required to display public favorites lists, #12052, see also above - CK */ ?> - <? if ($isEditable): ?> - <i class="fa fa-fw fa-edit" aria-hidden="true"></i> <a href="<?=$this->url('myresearch-edit')?>?id=<?=urlencode($id)?>&source=<?=urlencode($source)?><? if (!is_null($list_id)):?>&list_id=<?=urlencode($list_id)?><? endif; ?>" class="edit tool"><?=$this->transEsc('Edit')?></a><br/> - <? /* Use a different delete URL if we're removing from a specific list or the overall favorites: */ - $deleteUrl = null === $list_id - ? $this->url('myresearch-favorites') - : $this->url('userList', array('id' => $list_id)); - $deleteUrlGet = $deleteUrl . '?delete=' . urlencode($id) . '&source=' . urlencode($source); - - $dLabel = 'delete-label-' . preg_replace('[\W]','-',$id); - ?> - <div class="dropdown"> - <i class="fa fa-fw fa-trash-o" aria-hidden="true"></i> <a class="dropdown-toggle" id="<?=$dLabel ?>" role="button" data-toggle="dropdown" href="<?=$deleteUrlGet ?>"> - <?=$this->transEsc('Delete') ?> - </a> - <ul class="dropdown-menu" role="menu" aria-labelledby="<?=$dLabel ?>"> - <li><a onClick="$.post('<?=$deleteUrl?>', {'delete':'<?=$this->escapeJs($id) ?>','source':'<?=$this->escapeJs($source) ?>','confirm':true},function(){location.reload(true)})" title="<?=$this->transEsc('confirm_delete_brief')?>"><?=$this->transEsc('confirm_dialog_yes')?></a></li> - <li><a><?=$this->transEsc('confirm_dialog_no')?></a></li> - </ul> - </div> - - <?=$this->driver->supportsCoinsOpenUrl()?'<span class="Z3988" title="'.$this->escapeHtmlAttr($this->driver->getCoinsOpenUrl()).'"></span>':''?> - <? endif; ?> - </div> - </div> - - <? if ($thumbnail && $thumbnailAlignment == 'right'): ?> - <?=$thumbnail ?> - <? endif; ?> - </div> -</div> -<!-- finc: RecordDriver - SolrDefault - mylist - END --> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrDefault/record-icon-class.phtml b/themes/finc/templates/RecordDriver/SolrDefault/record-icon-class.phtml deleted file mode 100644 index da29dd33594a563f87e436951b89301ec996e68b..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/record-icon-class.phtml +++ /dev/null @@ -1,23 +0,0 @@ -<? -$normalizedValue = preg_replace('/[^a-z0-9]/', '', strtolower($this->value)); - -// Convert normalizedValue to styles -// finc: same list of states for icons like in de_15 #13704 - VE -switch ($normalizedValue) { - case 'marcfincpda': - echo 'fa-home passive'; - break; - case 'object': - echo 'fa-home object'; - break; - case 'localholdings': - echo 'fa-home'; - break; - case 'electronicresources': - echo 'fa-globe'; - break; - default: - echo 'fa-book'; - break; -} -?> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/record-icon-sprite-class.phtml b/themes/finc/templates/RecordDriver/SolrDefault/record-icon-sprite-class.phtml deleted file mode 100644 index c6ddbd281c929a9613d51bd9a39b64409a194587..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/record-icon-sprite-class.phtml +++ /dev/null @@ -1,176 +0,0 @@ -<? -$normalizedValue = preg_replace('/[^a-z0-9]/', '', strtolower($this->value)); -// Convert normalizedValue to styles -switch ($normalizedValue) { - - //block book - case 'book': - case 'articles': - echo 'book'; - break; - //block general audio - case 'audio': - case 'musicrecording': - case 'record': - case 'soundrecordingmedium': - case 'electronicsoundrecordingmedium': - case 'soundrecording': - echo 'audio'; - break; - //block tape audio - case 'audiotape': - case 'cassette': - case 'soundcassette': - echo 'audiotape'; - break; - //block braille - case 'braille': - echo 'braille'; - break; - //block digital audio - case 'cd': - case 'dvdaudio': - case 'sounddisc': - echo 'cd'; - break; - //block digital video - case 'dvd': - case 'blueraydisc': - case 'dvdvideo': - case 'videodisc': - echo 'dvd'; - break; - //block ebook - case 'ebook': - echo 'ebook'; - break; - //block digital non-book - case 'electronicnewspaper': - case 'newspaperarticle': - case 'newspaper': - case 'textresource': - echo 'newspaper'; - break; - //block manuscripts - case 'manuscript': - case 'nachlass': - echo 'manuscript'; - break; - //block articles - case 'article': - case 'articlearticle': - case 'electronic': - case 'electronicarticle': - case 'electronicresourcedatacarrier': - case 'electronicresourceremoteaccess': - echo 'electronic'; - break; - //block globe - case 'globe': - echo 'globe'; - break; - //block kit - case 'kit': - echo 'kit'; - break; - //block journal - case 'journal': - case 'journalnewspaper': - case 'serial': - echo 'journal'; - break; - //block ejournal - case 'electronicjournal': - case 'electronicserial': - echo 'electronicjournal'; - break; - //block map - case 'map': - case 'atlas': - echo 'map'; - break; - //block microfilm - case 'microfilm': - case 'microfiche': - case 'microform': - echo 'microfilm'; - break; - //block musical score - case 'musicalscore': - case 'notatedmusic': - case 'electronicmusicalscore': - echo 'musicalscore'; - break; - //block images - case 'photo': - case 'artprint': - case 'collage': - case 'drawing': - case 'flashcard': - case 'painting': - case 'photonegative': - case 'placard': - case 'print': - case 'sensorimage': - case 'transparency': - echo 'image'; - break; - //block physical object - case 'physicalobject': - echo 'physicalobject'; - break; - //block othe rimages - case 'sensorimage': - case 'chart': - echo 'chart'; - break; - //block sets - case 'sets': - echo 'sets'; - break; - //block slide - case 'slide': - echo 'slide'; - break; - //block software - case 'software': - case 'cdrom': - case 'chipcartridge': - case 'disccartridge': - case 'dvdrom': - case 'floppydisk': - case 'tapecartridge': - case 'tapecassette': - case 'tapereel': - echo 'software'; - break; - //block thesis - case 'thesis': - case 'electronicthesis': - echo 'thesis'; - break; - - //block unknown - case 'unknown': - echo 'unknown'; - break; - //block analog video - case 'vhs': - case 'video': - case 'videotape': - case 'videocartridge': - case 'videocassette': - echo 'video'; - break; - //block film - case 'audiovisualmedia': - case 'filmstrip': - case 'motionpicture': - case 'videoreel': - echo 'film'; - break; - //default - default: - echo 'unknown'; - break; -} \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrDefault/record-icon-sprite.phtml b/themes/finc/templates/RecordDriver/SolrDefault/record-icon-sprite.phtml deleted file mode 100644 index d50cbfc5586e22b2c1f5d3f0d613235bcf0254c5..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/record-icon-sprite.phtml +++ /dev/null @@ -1,11 +0,0 @@ -<? -$formats = []; -foreach ($this->driver->getFormats() as $format) { - $formats[] = $this->record($this->driver)->getRecordIconClass( - $format, 'record-icon-sprite-class' - ); -} -$formats = array_unique($formats); -asort($formats); -?> -<span class="sprite-media-icon <?= array_pop($formats) ?>"></span> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrDefault/toolbar.phtml b/themes/finc/templates/RecordDriver/SolrDefault/toolbar.phtml deleted file mode 100644 index 2b7c8f1383429432f4e52feafe485d62c3f84ce2..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/toolbar.phtml +++ /dev/null @@ -1,69 +0,0 @@ -<!-- finc: recordDriver - solrDefault - toolbar --> -<? - $addThis = $this->addThis(); - if (!empty($addThis)) { - $this->headScript()->appendFile('https://s7.addthis.com/js/250/addthis_widget.js?pub=' . urlencode($addThis)); - } - -// Set up some variables for convenience: -$cart = $this->cart(); -$cartId = $this->driver->getSourceIdentifier() . '|' . $this->driver->getUniqueId(); -?> - -<? /* finc: we use nav-stacked to display in sidebar, CK */ ?> -<ul class="record-nav nav nav-pills nav-stacked hidden-print"> - <? /* finc: we use the sr-only description, CK */ ?> - <li class="sr-only"><?=$this->transEsc('Toolbar')?></li> - <? 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> - <? endif; ?> - <? /* finc: we don't use sms, CK */ ?> - <? /* - <? if ($this->accountCapabilities()->getSmsSetting() !== 'disabled'): ?> - <li><a class="sms-record" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'SMS')?>" rel="nofollow"><i class="fa fa-mobile" aria-hidden="true"></i> <?=$this->transEsc('Text this')?></a></li> - <? endif; ?> - */ ?> - <li> - <a class="mail-record" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'Email')?>" rel="nofollow"><i class="fa fa-envelope" aria-hidden="true"></i> <?=$this->transEsc('Email this')?></a> - </li> - - <? $exportFormats = $this->export()->getFormatsForRecord($this->driver); ?> - <? if (count($exportFormats) > 0): ?> - <li class="dropdown"> - <a class="export-toggle dropdown-toggle" data-toggle="dropdown" href="<?=$this->recordLink()->getActionUrl($this->driver, 'Export')?>" rel="nofollow"><i class="fa fa-list-alt" aria-hidden="true"></i> <?=$this->transEsc('Export Record')?> - </a> - <ul class="dropdown-menu" role="menu"> - <? foreach ($exportFormats as $exportFormat): ?> - <li> - <a <? if ($this->export()->needsRedirect($exportFormat)): ?>target="<?=$this->escapeHtmlAttr($exportFormat)?>Main" - <? endif; ?>href="<?=$this->recordLink()->getActionUrl($this->driver, 'Export')?>?style=<?=$this->escapeHtmlAttr($exportFormat)?>" - rel="nofollow"><?=$this->transEsc('Export to')?><?=$this->transEsc($this->export()->getLabelForFormat($exportFormat))?></a> - </li> - <? endforeach; ?> - </ul> - </li> - <? endif; ?> - - <? if ($this->userlist()->getMode() !== 'disabled'): ?> - <? /* finc: we use title, CK */ ?> - <li> - <?if ($this->permission()->allowDisplay('feature.Favorites')): ?> - <a class="save-record" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>" title="<?=$this->transEsc('Add to favorites')?>" rel="nofollow"><i class="fa fa-star" aria-hidden="true"></i> <?=$this->transEsc('Add to favorites')?> - </a> - <? elseif ($block = $this->permission()->getAlternateContent('feature.Favorites')): ?> - <?=$block?> - <? endif; ?> - </li> - <? endif; ?> - <? if (!empty($addThis)): ?> - <li> - <a class="addThis addthis_button" href="https://www.addthis.com/bookmark.php?v=250&pub=<?=urlencode($addThis)?>"><i class="fa fa-bookmark" aria-hidden="true"></i> <?=$this->transEsc('Bookmark')?></a> - </li> - <? endif; ?> - <li class="bookbag-menu"> - <?=$this->render('record/cart-buttons.phtml', ['id' => $this->driver->getUniqueId(), 'source' => $this->driver->getSourceIdentifier()]); ?> - </li> -</ul> -<!-- finc: recordDriver - solrDefault - toolbar - END --> diff --git a/themes/finc/templates/RecordDriver/SolrLido/core.phtml b/themes/finc/templates/RecordDriver/SolrLido/core.phtml index 269dddf05df0e95a397177630f59a376ac082b19..35ccb759c817bfc1ee636dc9fe9ed62b1c40488e 100644 --- a/themes/finc/templates/RecordDriver/SolrLido/core.phtml +++ b/themes/finc/templates/RecordDriver/SolrLido/core.phtml @@ -1,13 +1,17 @@ <!-- finc: RecordDriver - solrLido - core --> -<? /* keep schema tagging here in finc - CK, #13861 */ ?> +<?php +/* based on DefaultRecord/core, compare with DefaultRecord/core during updates! +// keep schema tagging here in finc - CK, #13861 */ ?> <div class="media" vocab="http://schema.org/" resource="#record" typeof="<?=$this->driver->getSchemaOrgFormats()?> Product"> - <? - if ($loggedin = $this->auth()->isLoggedIn()) { - $user_id = $loggedin->id; - $loggedin = true; - } else { - $user_id = false; - } + <?php /* finc: use VF5.1 offcanvas toggler here as well if you have a custom sidebar - CK */ ?> + <?=$this->render('RecordDriver/DefaultRecord/offcanvas-toggler'); ?> + <?php + if ($loggedin = $this->auth()->isLoggedIn()) { + $user_id = $loggedin->id; + $loggedin = true; + } else { + $user_id = false; + } $formatRoles = function ($roles) { if (count($roles) == 0) { return ''; @@ -19,84 +23,87 @@ return ' (' . implode(', ', array_unique(array_map($translate, $roles))) . ')'; }; ?> - <? - $QRCode = $this->record($this->driver)->getQRCode("core"); - $coverDetails = $this->record($this->driver)->getCoverDetails('core', 'medium', $this->record($this->driver)->getThumbnail('large')); - $cover = $coverDetails['html']; - $preview = $this->record($this->driver)->getPreviews(); + <?php + $QRCode = $this->record($this->driver)->getQRCode("core"); + $coverDetails = $this->record($this->driver)->getCoverDetails('core', 'medium', $this->record($this->driver)->getThumbnail('large')); + $cover = $coverDetails['html']; + $preview = $this->record($this->driver)->getPreviews(); ?> - <? if ($QRCode || $cover || $preview): ?> - <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"> - <? /* Display thumbnail if appropriate: */ ?> - <? if($cover): ?> - <?=$cover?> - <? /* BOF - finc-specific StyleBasedIcons */ ?> - <? elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> + <?php if ($QRCode || $cover || $preview): ?> + <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"> + <?php /* Display thumbnail if appropriate: */ ?> + <?php if ($cover): ?> + <?=$cover?> + <?php /* BOF - finc-specific StyleBasedIcons */ ?> + <?php elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> <?=$this->record($this->driver)->getFormatIcon()?> - <? /* EOF - finc-specific StyleBasedIcons */ ?> - <? endif; ?> + <?php /* EOF - finc-specific StyleBasedIcons */ ?> + <?php endif; ?> - <? /* Display qrcode if appropriate: */ ?> - <? if($QRCode): ?> - <span class="hidden-xs"> + <?php /* Display qrcode if appropriate: */ ?> + <?php if ($QRCode): ?> + <span class="hidden-xs"> <br/><img alt="<?=$this->transEsc('QR Code')?>" class="qrcode" src="<?=$this->escapeHtmlAttr($QRCode);?>"/> </span> - <? endif; ?> + <?php endif; ?> - <? // if you have a preview tab but want to move or remove the preview link - // from this area of the record view, this can be split into - // getPreviewData() (should stay here) and - // getPreviewLink() (can go in your desired tab) ?> - <? if ($preview): ?> + <?php // if you have a preview tab but want to move or remove the preview link + // from this area of the record view, this can be split into + // getPreviewData() (should stay here) and + // getPreviewLink() (can go in your desired tab) ?> + <?php if ($preview): ?> <div class="record-previews"> <?=$preview?> </div> - <? endif; ?> + <?php endif; ?> </div> - <? endif; ?> + <?php endif; ?> <div class="media-body"> - <? /* finc: We want to get rid of trailing special chars in the title and limit its length to 100 chars + <?php /* finc: We want to get rid of trailing special chars in the title and limit its length to 100 chars; in finc: keep schema name tag here!! #13861 CK */ ?> <h3 property="name"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle() . ' ' . $this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 100)))?></h3> - <? $summary = $this->driver->getSummary(); $summary = isset($summary[0]) ? $this->escapeHtml($summary[0]) : false; ?> - <? if ($summary): ?> + <?php $summary = $this->driver->getSummary(); + $summary = isset($summary[0]) ? $this->escapeHtml($summary[0]) : false; ?> + <?php if ($summary): ?> <p><?=$this->truncate($summary, 300)?></p> - <? if(strlen($summary) > 300): ?> - <p><a href='<?=$this->recordLink()->getTabUrl($this->driver, 'Description')?>#tabnav'><?=$this->transEsc('Full description')?></a></p> - <? endif; ?> - <? endif; ?> + <?php if (strlen($summary) > 300): ?> + <p class="hidden-print"><a href='<?=$this->recordLink()->getTabUrl($this->driver, 'Description')?>#tabnav'><?=$this->transEsc('Full description')?></a></p> + <?php endif; ?> + <?php endif; ?> - <? if ($this->userlist()->getMode() !== 'disabled'): ?> - <? /* Display the lists that this record is saved to */ ?> + <?php if ($this->userlist()->getMode() !== 'disabled'): ?> + <?php /* Display the lists that this record is saved to */ ?> <div class="savedLists hidden alert alert-info"> <strong><?=$this->transEsc("Saved in")?>:</strong> </div> - <? endif; ?> + <?php endif; ?> - <?/* Display Main Details */?> - <? - $formatter = $this->recordDataFormatter(); - $coreFields = $formatter->getData($driver, $formatter->getDefaults('core-lido')); + <?php /* Display Main Details */ ?> + <?php + $formatter = $this->recordDataFormatter(); + $coreFields = $formatter->getData($driver, $formatter->getDefaults('core-lido')); ?> - <? if (!empty($coreFields)): ?> + <?php if (!empty($coreFields)): ?> <table class="table table-striped"> - <? /* Table summary not supported in html 5, finc-specific solution, CK */ ?> <caption class="sr-only"><?=$this->transEsc('Bibliographic Details')?></caption> - <? foreach ($coreFields as $key => $current): ?> - <? if ($key == null): ?> - <?=$current['value']?> - <? else: ?> - <tr><th><?=$this->transEsc($key)?>:</th><td><?=$current['value']?></td></tr> - <? endif; ?> - <? endforeach; ?> + <?php foreach ($coreFields as $current): ?> + <?php if ($current['label'] == null): ?> + <?=$current['value']?> + <?php else: ?> + <tr> + <th><?=$this->transEsc($current['label'])?>:</th> + <td><?=$current['value']?></td> + </tr> + <?php endif; ?> + <?php endforeach; ?> </table> - <? endif; ?> - <?/* End Main Details */?> + <?php endif; ?> + <?php /* End Main Details */ ?> </div> </div> <!-- finc: RecordDriver - solrLido - core - END --> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrLido/data-accessNote.phtml b/themes/finc/templates/RecordDriver/SolrLido/data-accessNote.phtml index 6f7af7a7dfb7b58fc88cd5c4360a492616bea31a..74a93069618fdbb558a78b57652ae2e8f868a15e 100644 --- a/themes/finc/templates/RecordDriver/SolrLido/data-accessNote.phtml +++ b/themes/finc/templates/RecordDriver/SolrLido/data-accessNote.phtml @@ -1,4 +1,4 @@ -<? foreach ($data as $field): ?> - <? if (!empty($field['uri'])): ?><a href="<?= $this->escapeHtmlAttr($field['uri']) ?>"><?= $this->escapeHtml($field['term']) ?><? endif; ?><? if (!empty($field['uri'])): ?></a><? endif; ?> - <br/> -<? endforeach; ?> \ No newline at end of file +<?php foreach ($data as $field): ?> + <?php if (!empty($field['uri'])): ?><a href="<?=$this->escapeHtmlAttr($field['uri'])?>"><?=$this->escapeHtml($field['term'])?><?php endif; ?><?php if (!empty($field['uri'])): ?></a><?php endif; ?> + <br/> +<?php endforeach; ?> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrLido/data-authors.phtml b/themes/finc/templates/RecordDriver/SolrLido/data-authors.phtml index 0adb2a0e98e622339e7de48309e728781ce64ba1..8aec1d27c043d5db4879fbe9e5e17cac929b3ae7 100644 --- a/themes/finc/templates/RecordDriver/SolrLido/data-authors.phtml +++ b/themes/finc/templates/RecordDriver/SolrLido/data-authors.phtml @@ -1,47 +1,47 @@ -<? +<?php $formatProperty = function ($datafield, $name, $label) { - if (count($datafield) == 0) { - return ''; - } - $that = $this; - $translate = function ($str) use ($that, $label) { - return $that->transEsc($label . $str); - }; - return '<span class="author-property-' . $name . '">(' . implode(', ', array_unique(array_map($translate, $datafield))) . ')</span>'; + if (count($datafield) == 0) { + return ''; + } + $that = $this; + $translate = function ($str) use ($that, $label) { + return $that->transEsc($label . $str); + }; + return '<span class="author-property-' . $name . '">(' . implode(', ', array_unique(array_map($translate, $datafield))) . ')</span>'; }; $formattedAuthors = []; ?> -<? if (!empty($data[$type])): ?> - <? foreach ($data[$type] as $author => $roles): ?> - <? ob_start(); ?> - <span class="author-data" property="<?=$this->escapeHtml($schemaLabel)?>" typeof="Person"> +<?php if (!empty($data[$type])): ?> + <?php foreach ($data[$type] as $author => $roles): ?> + <?php ob_start(); ?> + <span class="author-data" property="<?=$this->escapeHtml($schemaLabel)?>" typeof="Person"> <span property="name"> - <a href="<?=$this->record($this->driver)->getLink('author', $author)?>"> - <?=$this->escapeHtml($author)?> - </a> + <a href="<?=$this->record($this->driver)->getLink('author', $author)?>"> + <?=$this->escapeHtml($author)?> + </a> </span> - <? - // Display additional data using the appropriate translation prefix - // (for example, to render author roles correctly): - if (!empty($requiredDataFields)) { - foreach ($requiredDataFields as $field) { - $name = $field['name']; - $prefix = isset($field['prefix']) ? $field['prefix'] : ''; - // deprecated due to more flexible solution at core - // to-do: revision of indexing and finc specific treatment - // of roles in RecordDriver - if (count($roles) > 0 && $name == 'role') { - echo $formatProperty($roles, $name, $prefix); - } - } + <?php + // Display additional data using the appropriate translation prefix + // (for example, to render author roles correctly): + if (!empty($requiredDataFields)) { + foreach ($requiredDataFields as $field) { + $name = $field['name']; + $prefix = isset($field['prefix']) ? $field['prefix'] : ''; + // deprecated due to more flexible solution at core + // to-do: revision of indexing and finc specific treatment + // of roles in RecordDriver + if (count($roles) > 0 && $name == 'role') { + echo $formatProperty($roles, $name, $prefix); } - ?> + } + } + ?> </span> - <? - // Strip whitespace before close tags to avoid spaces in front of commas: - $formattedAuthors[] = trim(preg_replace('/\s+<\//', '</', ob_get_contents())); - ob_end_clean(); - ?> - <? endforeach; ?> -<? endif; ?> + <?php + // Strip whitespace before close tags to avoid spaces in front of commas: + $formattedAuthors[] = trim(preg_replace('/\s+<\//', '</', ob_get_contents())); + ob_end_clean(); + ?> + <?php endforeach; ?> +<?php endif; ?> <?=implode(', ', $formattedAuthors)?> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrLido/data-events.phtml b/themes/finc/templates/RecordDriver/SolrLido/data-events.phtml index c11f1fcafbf98b5c83efd22a4d4dd4a2e13219d1..8030e6f371c7e39bc1798efa91466c96d07d19bb 100644 --- a/themes/finc/templates/RecordDriver/SolrLido/data-events.phtml +++ b/themes/finc/templates/RecordDriver/SolrLido/data-events.phtml @@ -1,42 +1,42 @@ -<? $publicationIsSet = false; ?> -<? if (count($event = $this->driver->getEvents()) > 0): ?> - <? foreach ($event as $eventType => $events): ?> - <tr class="recordEvents"> - <th> - <? if ($eventType == 'production'): ?> - <?= $this->transEsc('expression creation') ?>: - <? elseif ($eventType == 'publication'): ?> - <?= $this->transEsc('Time of origin') ?>: - <? $publicationIsSet = true; ?> - <? else: ?> - <?= $this->transEsc($eventType) ?>: - <? endif; ?> - </th> - <td> - <div class="truncate-field"> - <? foreach ($events as $event): ?> - <? if ($event != $events[0]): ?><br/><? endif; ?> - <? if (!empty($event['name'])): ?><?= $this->escapeHtml($event['name']) ?><br/><? endif; ?> - <? if (!empty($event['actors'])): ?> - <? foreach ($event['actors'] as $actor): ?> - <?= $this->escapeHtml($actor['name']) ?><? if (!empty($actor['role'])): ?> (<?= $this->escapeHtml($actor['role']) ?>)<? endif; ?> - <? endforeach; ?> - <br/> - <? endif; ?> - <? if (!empty($event['date'])): ?> - <?= $this->escapeHtml($event['date']) ?><br/> - <? else: ?> - <?= $this->transEsc('undated') ?><br/> - <? endif; ?> - <? if (!empty($event['method'])): ?><?= $this->escapeHtml($event['method']) ?><br/><? endif; ?> - <? if (!empty($event['materials'])): ?><?= implode('<br/>', array_map(array($this, 'escapeHtml'), $event['materials'])) ?><br/><? endif; ?> - <? if (!empty($event['places'])): ?><?= implode('<br/>', array_map(array($this, 'escapeHtml'), $event['places'])) ?><br/><? endif; ?> - <? if (!empty($event['culture'])): ?><?= $this->escapeHtml($event['culture']) ?><br/><? endif; ?> +<?php $publicationIsSet = false; ?> +<?php if (count($event = $this->driver->getEvents()) > 0): ?> + <?php foreach ($event as $eventType => $events): ?> + <tr class="recordEvents"> + <th> + <?php if ($eventType == 'production'): ?> + <?=$this->transEsc('expression creation')?>: + <?php elseif ($eventType == 'publication'): ?> + <?=$this->transEsc('Time of origin')?>: + <?php $publicationIsSet = true; ?> + <?php else: ?> + <?=$this->transEsc($eventType)?>: + <?php endif; ?> + </th> + <td> + <div class="truncate-field"> + <?php foreach ($events as $event): ?> + <?php if ($event != $events[0]): ?><br/><?php endif; ?> + <?php if (!empty($event['name'])): ?><?=$this->escapeHtml($event['name'])?><br/><?php endif; ?> + <?php if (!empty($event['actors'])): ?> + <?php foreach ($event['actors'] as $actor): ?> + <?=$this->escapeHtml($actor['name'])?><?php if (!empty($actor['role'])): ?> (<?=$this->escapeHtml($actor['role'])?>)<?php endif; ?> + <?php endforeach; ?> + <br/> + <?php endif; ?> + <?php if (!empty($event['date'])): ?> + <?=$this->escapeHtml($event['date'])?><br/> + <?php else: ?> + <?=$this->transEsc('undated')?><br/> + <?php endif; ?> + <?php if (!empty($event['method'])): ?><?=$this->escapeHtml($event['method'])?><br/><?php endif; ?> + <?php if (!empty($event['materials'])): ?><?=implode('<br/>', array_map(array($this, 'escapeHtml'), $event['materials']))?><br/><?php endif; ?> + <?php if (!empty($event['places'])): ?><?=implode('<br/>', array_map(array($this, 'escapeHtml'), $event['places']))?><br/><?php endif; ?> + <?php if (!empty($event['culture'])): ?><?=$this->escapeHtml($event['culture'])?><br/><?php endif; ?> - <? if (!empty($event['description'])): ?><?= $this->escapeHtml($event['description']) ?><br/><? endif; ?> - <? endforeach; ?> - </div> - </td> - </tr> - <? endforeach; ?> -<? endif; ?> + <?php if (!empty($event['description'])): ?><?=$this->escapeHtml($event['description'])?><br/><?php endif; ?> + <?php endforeach; ?> + </div> + </td> + </tr> + <?php endforeach; ?> +<?php endif; ?> diff --git a/themes/finc/templates/RecordDriver/SolrLido/data-institutions.phtml b/themes/finc/templates/RecordDriver/SolrLido/data-institutions.phtml index f2c1b0cd57c3816ba0ec83d94f45e73d4e3693b0..ce6e0b6fe437e795969775ee9d8a283e53b7eaeb 100644 --- a/themes/finc/templates/RecordDriver/SolrLido/data-institutions.phtml +++ b/themes/finc/templates/RecordDriver/SolrLido/data-institutions.phtml @@ -1,3 +1,3 @@ -<? foreach ($data as $index => $institution): ?> - <?= ($index > 0 ? '<br/>' : '') ?><?= $this->transEsc("source_$institution", array(), $this->translate($institution)) ?> -<? endforeach; ?> \ No newline at end of file +<?php foreach ($data as $index => $institution): ?> + <?=($index > 0 ? '<br/>' : '')?><?=$this->transEsc("source_$institution", array(), $this->translate($institution))?> +<?php endforeach; ?> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrMarc/core.phtml b/themes/finc/templates/RecordDriver/SolrMarc/core.phtml index bbb181fc9bb795c37b2525caf062436059d6d643..c3fec0f6a70c645ce6de01d1e870b98882bc683c 100644 --- a/themes/finc/templates/RecordDriver/SolrMarc/core.phtml +++ b/themes/finc/templates/RecordDriver/SolrMarc/core.phtml @@ -1,84 +1,89 @@ <!-- finc: RecordDriver - solrMarc - core --> +<?php /* based on DefaultRecord/core, compare with DefaultRecord/core during updates! */ ?> <div class="media" vocab="http://schema.org/" resource="#record" typeof="<?=$this->driver->getSchemaOrgFormats()?> Product"> - <? + <?php /* finc: use VF5.1 offcanvas toggler here as well if you have a custom sidebar - CK */ ?> + <?=$this->render('RecordDriver/DefaultRecord/offcanvas-toggler'); ?> + <?php $QRCode = $this->record($this->driver)->getQRCode("core"); $coverDetails = $this->record($this->driver)->getCoverDetails('core', 'medium', $this->record($this->driver)->getThumbnail('large')); $cover = $coverDetails['html']; $preview = $this->record($this->driver)->getPreviews(); ?> - <? if ($QRCode || $cover || $preview): ?> + <?php if ($QRCode || $cover || $preview): ?> <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"> - <? /* Display thumbnail if appropriate: */ ?> - <? if($cover): ?> + <?php /* Display thumbnail if appropriate: */ ?> + <?php if($cover): ?> <?=$cover?> - <? /* BOF - finc-specific StyleBasedIcons */ ?> - <? elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> + <?php /* BOF - finc-specific StyleBasedIcons */ ?> + <?php elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> <?=$this->record($this->driver)->getFormatIcon()?> - <? /* EOF - finc-specific StyleBasedIcons */ ?> - <? endif; ?> + <?php /* EOF - finc-specific StyleBasedIcons */ ?> + <?php endif; ?> - <? /* Display qrcode if appropriate: */ ?> - <? if($QRCode): ?> + <?php /* Display qrcode if appropriate: */ ?> + <?php if($QRCode): ?> <span class="hidden-xs"> <br/><img alt="<?=$this->transEsc('QR Code')?>" class="qrcode" src="<?=$this->escapeHtmlAttr($QRCode);?>"/> </span> - <? endif; ?> + <?php endif; ?> - <? // if you have a preview tab but want to move or remove the preview link + <?php // if you have a preview tab but want to move or remove the preview link // from this area of the record view, this can be split into // getPreviewData() (should stay here) and // getPreviewLink() (can go in your desired tab) ?> - <? if ($preview): ?> + <?php if ($preview): ?> <div class="record-previews"> <?=$preview?> </div> - <? endif; ?> + <?php endif; ?> </div> - <? endif; ?> + <?php endif; ?> <div class="media-body"> - <? /* finc: We want to get rid of trailing special chars in the title and limit its length to 100 chars - remove schema name tag here but keept in description, CK + <?php /* finc: We want to get rid of trailing special chars in the title and limit its length to 100 chars; + in finc: keep schema name tag here!! #13861 - CK */ ?> - <? /* finc: add schema tags for title #13850 - VE */ ?> + <?php /* finc: add schema tags for title #13850 - VE */ ?> <h3 property="name"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle() . ' ' . $this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 100)))?></h3> - <? $summary = $this->driver->getSummary(); $summary = isset($summary[0]) ? $this->escapeHtml($summary[0]) : false; ?> - <? if ($summary): ?> + <?php $summary = $this->driver->getSummary(); $summary = isset($summary[0]) ? $this->escapeHtml($summary[0]) : false; ?> + <?php if ($summary): ?> <p><?=$this->truncate($summary, 300)?></p> - <? if(strlen($summary) > 300): ?> - <p><a href='<?=$this->recordLink()->getTabUrl($this->driver, 'Description')?>#tabnav'><?=$this->transEsc('Full description')?></a></p> - <? endif; ?> - <? endif; ?> + <?php if(strlen($summary) > 300): ?> + <p class="hidden-print"><a href='<?=$this->recordLink()->getTabUrl($this->driver, 'Description')?>#tabnav'><?=$this->transEsc('Full description')?></a></p> + <?php endif; ?> + <?php endif; ?> - <? if ($this->userlist()->getMode() !== 'disabled'): ?> - <? /* Display the lists that this record is saved to */ ?> + <?php if ($this->userlist()->getMode() !== 'disabled'): ?> + <?php /* Display the lists that this record is saved to */ ?> <div class="savedLists hidden alert alert-info"> <strong><?=$this->transEsc("Saved in")?>:</strong> </div> - <? endif; ?> + <?php endif; ?> - <?/* Display Main Details */?> - <? + <?php /* Display Main Details */?> + <?php $formatter = $this->recordDataFormatter(); $coreFields = $formatter->getData($driver, $formatter->getDefaults('core-marc')); ?> - <? if (!empty($coreFields)): ?> + <?php if (!empty($coreFields)): ?> <table class="table table-striped"> - <? /* Table summary not supported in html 5, finc-specific solution, CK */ ?> <caption class="sr-only"><?=$this->transEsc('Bibliographic Details')?></caption> - <? foreach ($coreFields as $key => $current): ?> - <? if ($key == null): ?> + <?php foreach ($coreFields as $current): ?> + <?php if ($current['label'] == null): ?> <?=$current['value']?> - <? else: ?> - <tr><th><?=$this->transEsc($key)?>:</th><td><?=$current['value']?></td></tr> - <? endif; ?> - <? endforeach; ?> + <?php else: ?> + <tr> + <th><?=$this->transEsc($current['label'])?>:</th> + <td><?=$current['value']?></td> + </tr> + <?php endif; ?> + <?php endforeach; ?> </table> - <? endif; ?> - <?/* End Main Details */?> + <?php endif; ?> + <?php /* End Main Details */?> </div> </div> <!-- finc: RecordDriver - solrMarc - core - END --> diff --git a/themes/finc/templates/RecordDriver/SolrMarc/data-indexOfGermanPrints.phtml b/themes/finc/templates/RecordDriver/SolrMarc/data-indexOfGermanPrints.phtml index b12529e11094ccbd4db551e7bc4320341bde3dee..0d95440bb9ce40e0ab94c862b4e02fdba73470a7 100644 --- a/themes/finc/templates/RecordDriver/SolrMarc/data-indexOfGermanPrints.phtml +++ b/themes/finc/templates/RecordDriver/SolrMarc/data-indexOfGermanPrints.phtml @@ -1,8 +1,8 @@ <!-- finc: RecordDriver - solrMarc data-indexOfGermanPrints --> -<? /* Originally introduced in #9557 - CK */ ?> -<? if (!empty($data)): ?> - <span property="germanPrintsIndexNumber"> - <?=$this->escapeHtml($data[0])?> - </span> -<? endif; ?> +<?php /* Originally introduced in #9557 - CK */ ?> +<?php if (!empty($data)): ?> + <span property="germanPrintsIndexNumber"> + <?=$this->escapeHtml($data[0])?> + </span> +<?php endif; ?> <!-- finc: RecordDriver - solrMarc data-indexOfGermanPrints - END --> diff --git a/themes/finc/templates/RecordDriver/SolrMarc/data-linkViaFincId.phtml b/themes/finc/templates/RecordDriver/SolrMarc/data-linkViaFincId.phtml index 64de315b4d81ead48e0585857fec8ea5b5354e36..cc59b8b824bd2b2c64c240855ea3249ecb5797a1 100644 --- a/themes/finc/templates/RecordDriver/SolrMarc/data-linkViaFincId.phtml +++ b/themes/finc/templates/RecordDriver/SolrMarc/data-linkViaFincId.phtml @@ -1,18 +1,18 @@ <!-- finc: RecordDriver - solrMarc - data-linkviafincid --> -<? if (!empty($data)): ?> -<? foreach($data as $field): ?> - <? if (isset($field['id']) || isset($field['text'])): - $url = isset($field['id']) - ? $this->url('record').$field['id'] - : $this->record($this->driver)->getLink('title', $field['text']); - ?> - <? if (isset($field['pretext']) && !empty($field['pretext'])): ?> - <?=$this->escapeHtml($field['pretext'])?>: - <? endif; ?> - <a href="<?=$url?>"><?=$this->escapeHtml($field['text'])?></a><br/> - <? else: ?> - <a href="<?=$this->record($this->driver)->getLink('title', $field)?>"><?=$this->escapeHtml($field)?></a><br/> - <? endif; ?> -<? endforeach; ?> -<? endif; ?> +<?php if (!empty($data)): ?> + <?php foreach ($data as $field): ?> + <?php if (isset($field['id']) || isset($field['text'])): + $url = isset($field['id']) + ? $this->url('record') . $field['id'] + : $this->record($this->driver)->getLink('title', $field['text']); + ?> + <?php if (isset($field['pretext']) && !empty($field['pretext'])): ?> + <?=$this->escapeHtml($field['pretext'])?>: + <?php endif; ?> + <a href="<?=$url?>"><?=$this->escapeHtml($field['text'])?></a><br/> + <?php else: ?> + <a href="<?=$this->record($this->driver)->getLink('title', $field)?>"><?=$this->escapeHtml($field)?></a><br/> + <?php endif; ?> + <?php endforeach; ?> +<?php endif; ?> <!-- finc: RecordDriver - solrMarc - data-linkviafincid - END --> diff --git a/themes/finc/templates/RecordDriver/SolrMarc/data-localSubjects.phtml b/themes/finc/templates/RecordDriver/SolrMarc/data-localSubjects.phtml index 9844fee84e8f9bbdca9a354254547eb40fa0283c..ee4a6c64f0af9f3224c9128666bf87f12ef74f93 100644 --- a/themes/finc/templates/RecordDriver/SolrMarc/data-localSubjects.phtml +++ b/themes/finc/templates/RecordDriver/SolrMarc/data-localSubjects.phtml @@ -1,10 +1,11 @@ <!-- finc: RecordDriver - solrMarc - data-localSubjects --> -<? if (!(empty($data))): ?> -<? $i = 0; foreach ($data as $subject): ?> - <?= ($i++ == 0) ? '' : ', '; ?> +<?php if (!(empty($data))): ?> + <?php $i = 0; + foreach ($data as $subject): ?> + <?=($i++ == 0) ? '' : ', ';?> <a title="<?=$this->escapeHtmlAttr($subject)?>" href="<?=$this->record($this->driver)->getLink('subject', $subject)?>" rel="nofollow"> - <?=trim($this->escapeHtml($subject))?> + <?=trim($this->escapeHtml($subject))?> </a> -<? endforeach; ?> -<? endif; ?> + <?php endforeach; ?> +<?php endif; ?> <!-- finc: RecordDriver - solrMarc - data-localSubjects - END --> diff --git a/themes/finc/templates/RecordTab/acquisitionpda.phtml b/themes/finc/templates/RecordTab/acquisitionpda.phtml index 681897d19423052716f52e750d5caf7f468ac846..91296ba15fa006a007013d4545a6cbfcb675aa6f 100644 --- a/themes/finc/templates/RecordTab/acquisitionpda.phtml +++ b/themes/finc/templates/RecordTab/acquisitionpda.phtml @@ -1,25 +1,25 @@ <!-- finc - recordtab - acquistionpda --> -<? +<?php // Set page title. $this->headTitle( - $this->translate('PDA::Acquisition') . ': ' . - $this->driver->getBreadcrumb() + $this->translate('PDA::Acquisition') . ': ' . + $this->driver->getBreadcrumb() ); - // Get some variables - $id = $this->driver->getUniqueId(); - // $controllerClass = 'controller:' . $this->record($this->driver)->getController(); - $controllerClass = 'controller:SolrMarcFincPDA'; +// Get some variables +$id = $this->driver->getUniqueId(); +// $controllerClass = 'controller:' . $this->record($this->driver)->getController(); +$controllerClass = 'controller:SolrMarcFincPDA'; ?> - <h2><?= $this->transEsc('PDA::Acquisition') ?></h2> - <p><?= $this->transEsc('PDA::pda_initial_text') ?></p> - <p class="alert alert-info"><?= $this->transEsc('PDA::pda_restriction_text') ?></p> - <div class="btn-group"> - <? /* Leave title in here - it is used for the tooltip! - CK */ ?> - <a class="btn btn-primary" data-toggle="tooltip" title="<?= $this->transEsc('PDA::pda_open_new_window')?>" href="<?= $this->interlibraryloan()->getSwbLink($this->driver) ?>" target="_blank"> - <?= $this->transEsc('PDA::pda_tab_interlibrary_button') ?> - </a> - <a class="btn btn-primary pda-button <?= $controllerClass ?>" data-lightbox href="<?= $this->url('record-pda', array('id' => $id)) ?>" rel="nofollow"> - <?= $this->transEsc('PDA::pda_tab_order_button') ?> - </a> - </div> +<h2><?=$this->transEsc('PDA::Acquisition')?></h2> +<p><?=$this->transEsc('PDA::pda_initial_text')?></p> +<p class="alert alert-info"><?=$this->transEsc('PDA::pda_restriction_text')?></p> +<div class="btn-group"> + <?php /* Leave title in here - it is used for the tooltip! - CK */ ?> + <a class="btn btn-primary" data-toggle="tooltip" title="<?=$this->transEsc('PDA::pda_open_new_window')?>" href="<?=$this->interlibraryloan()->getSwbLink($this->driver)?>" target="_blank"> + <?=$this->transEsc('PDA::pda_tab_interlibrary_button')?> + </a> + <a class="btn btn-primary pda-button <?=$controllerClass?>" data-lightbox href="<?=$this->url('record-pda', array('id' => $id))?>" rel="nofollow"> + <?=$this->transEsc('PDA::pda_tab_order_button')?> + </a> +</div> <!-- finc - recordtab - acquistionpda - END --> diff --git a/themes/finc/templates/RecordTab/description.phtml b/themes/finc/templates/RecordTab/description.phtml index 9b5e646b2b293ff0310fc0eb22e94fe3494da6f1..d8f9f722d31ab463f7d099e3da67908b952f6957 100644 --- a/themes/finc/templates/RecordTab/description.phtml +++ b/themes/finc/templates/RecordTab/description.phtml @@ -1,29 +1,22 @@ <!-- finc: recordtab - description --> -<? +<?php // Set page title. $this->headTitle($this->translate('Description') . ': ' . $this->driver->getBreadcrumb()); $formatter = $this->recordDataFormatter(); $mainFields = $formatter->getData($driver, $formatter->getDefaults('description')); ?> -<? /* finc: remove schema tag here but keep in core,*/ ?> +<?php /* finc: remove schema tag here but keep in core,*/ ?> <table class="table table-striped"> - <? /* finc: table summary not supported in html 5, finc-specific solution, CK */ + <?php /* Table gets filled via recordDriver/.../data-... templates as referenced in RecordDataFormatterFactory */ ?> <caption class="sr-only"><?=$this->transEsc('Description')?></caption> - <? if (!empty($mainFields)): ?> - <? foreach ($mainFields as $key => $current): ?> - <? if ($key == null): ?> - <?=$current['value']?> - <? else: ?> - <tr> - <th><?=$this->transEsc($key)?>:</th> - <td><?=$current['value']?></td> - </tr> - <? endif; ?> - <? endforeach; ?> - <? else: ?> + <?php if (!empty($mainFields)): ?> + <?php foreach ($mainFields as $current): ?> + <tr><th><?=$this->transEsc($current['label'])?>:</th><td><?=$current['value']?></td></tr> + <?php endforeach; ?> + <?php else: ?> <tr><td><?=$this->transEsc('no_description')?></td></tr> - <? endif; ?> + <?php endif; ?> </table> <!-- finc: recordtab - description - END --> diff --git a/themes/finc/templates/RecordTab/descriptionlido.phtml b/themes/finc/templates/RecordTab/descriptionlido.phtml index d0a90d804add9bdad13ecffd5e192753a8c33c44..c6dd3bdeb2dea1f4d901dccd55563a61b47b2116 100644 --- a/themes/finc/templates/RecordTab/descriptionlido.phtml +++ b/themes/finc/templates/RecordTab/descriptionlido.phtml @@ -1,24 +1,23 @@ <!-- finc: recordtab - descriptionlido --> -<? +<?php // Set page title. $this->headTitle($this->translate('Description') . ': ' . $this->driver->getBreadcrumb()); $formatter = $this->recordDataFormatter(); $mainFields = $formatter->getData($driver, $formatter->getDefaults('description-lido')); ?> -<? /* - This next table originally in table "Display Main Details" in solrDefault - core templates, compare with core and with description.phtml! CK +<?php /* + This next table originally in table "Display Main Details" in DefaultRecord/core templates, compare with core and with description.phtml! CK /* finc: remove schema tag here but keep in core,*/ ?> <table class="table table-striped"> - <? /* Table summary not supported in html 5, finc-specific solution, CK */ ?> <caption class="sr-only"><?= $this->transEsc('Description') ?></caption> - <? if (!empty($mainFields)): ?> - <? foreach ($mainFields as $key => $current): ?> - <tr><th><?=$this->transEsc($key)?>:</th><td><?=$current['value']?></td></tr> - <? endforeach; ?> - <? else: ?> + <?php if (!empty($mainFields)): ?> + <?php foreach ($mainFields as $current): ?> + <tr><th><?=$this->transEsc($current['label'])?>:</th><td><?=$current['value']?></td></tr> + <?php endforeach; ?> + <?php else: ?> <tr><td><?=$this->transEsc('no_description')?></td></tr> - <? endif; ?> + <?php endif; ?> </table> <!-- finc: recordtab - descriptionlido - END --> \ No newline at end of file diff --git a/themes/finc/templates/RecordTab/hierarchytree.phtml b/themes/finc/templates/RecordTab/hierarchytree.phtml index 5550db12e45a5887e1b34c468bdced4232bd5fab..92eed2720a749b8b8060a87e46c6edf7f182837a 100644 --- a/themes/finc/templates/RecordTab/hierarchytree.phtml +++ b/themes/finc/templates/RecordTab/hierarchytree.phtml @@ -1,5 +1,5 @@ -<? /* finc: record-tab - hierarchytree */ ?> -<? +<!-- finc: record-tab - hierarchytree --> +<?php // Set page title. $this->headTitle($this->translate('hierarchy_tree') . ': ' . $this->driver->getBreadcrumb()); $hierarchyTreeList = $this->tab->getTreeList(); @@ -10,37 +10,38 @@ "var hierarchySettings = {\n" . " lightboxMode: " . ($this->layout()->getTemplate() == 'layout/lightbox' ? 'true' : 'false') . ",\n" . " fullHierarchy: " . ($this->tab->isFullHierarchyVisible() ? 'true' : 'false') . "\n" - . "};\n", + . "};\n" + . "VuFind.addTranslations({\n" + . " 'showTree': '" . $this->transEsc('hierarchy_show_tree') . "',\n" + . " 'hideTree': '" . $this->transEsc('hierarchy_hide_tree') . "'}\n" + . ");\n", 'SET' ); - $this->jsTranslations()->addStrings( - ['showTree' => 'hierarchy_show_tree', 'hideTree' => 'hierarchy_hide_tree'] - ); $this->inlineScript(\Zend\View\Helper\HeadScript::FILE, 'vendor/jsTree/jstree.min.js'); $this->inlineScript(\Zend\View\Helper\HeadScript::FILE, 'hierarchyTree.js'); echo $this->inlineScript(); ?> -<? if (count($hierarchyTreeList) > 1): ?> +<?php if (count($hierarchyTreeList) > 1): ?> <div id="treeSelector"> <strong><?=$this->transEsc('hierarchyTreeSelect')?></strong><br> - <? foreach ($hierarchyTreeList as $hierarchy => $hierarchyTitle): ?> - <? if($activeTree == $hierarchy): ?> + <?php foreach ($hierarchyTreeList as $hierarchy => $hierarchyTitle): ?> + <?php if($activeTree == $hierarchy): ?> <span class="item"> <i class="fa fa-sitemap text-muted" aria-hidden="true"></i> <?=$this->escapeHtml($hierarchyTitle)?> </span> - <? else: ?> + <?php else: ?> <span class="item"> <i class="fa fa-sitemap" aria-hidden="true"></i> <a href="<?=$this->recordLink()->getTabUrl($this->driver, 'HierarchyTree')?>?hierarchy=<?=urlencode($hierarchy)?>"><?=$this->escapeHtml($hierarchyTitle)?></a> </span> - <? endif; ?> - <? endforeach; ?> + <?php endif; ?> + <?php endforeach; ?> </div> -<? endif; ?> -<? if ($activeTree): ?> +<?php endif; ?> +<?php if ($activeTree): ?> <div id="hierarchyTreeHolder"> - <? if ($this->tab->searchActive()): ?> + <?php if ($this->tab->searchActive()): ?> <div id="treeSearch" class="form-inline hidden"> <input type="text" id="treeSearchText" class="form-control search-query" value=""> <select class="form-control" id="treeSearchType" name="type"> @@ -52,20 +53,24 @@ </div> <div id="treeSearchNoResults" class="alert alert-danger hidden"><?=$this->translate('nohit_heading')?></div> <div id="treeSearchLimitReached" class="alert alert-danger hidden"><?=$this->translate('tree_search_limit_reached_html', ['%%url%%' => $this->url('search-results'), '%%limit%%' => $this->tab->getSearchLimit()])?></div> - <? endif; ?> + <?php endif; ?> <div id="hierarchyLoading" class="hide"><i class="fa fa-spinner fa-spin" aria-hidden="true"></i> <?=$this->transEsc("Loading")?>...</div> <div id="hierarchyTree" class="hierarchy-tree"> <input type="hidden" value="<?=$this->escapeHtml($this->driver->getUniqueId())?>" class="hiddenRecordId" /> <input type="hidden" value="<?=$this->escapeHtml($activeTree)?>" class="hiddenHierarchyId" /> <input type="hidden" value="<?=isset($this->treeContext) ? $this->treeContext : 'Record'?>" class="hiddenContext" /> - <? if ($this->layout()->getTemplate() != 'layout/lightbox'): ?> + <?php if ($this->layout()->getTemplate() != 'layout/lightbox'): ?> <noscript> + <?php if ($this->config()->nonJavascriptSupportEnabled()): ?> <ul class="fa-ul"> <?=$this->tab->renderTree($this->url('home'))?> </ul> + <?php else: ?> + <?=$this->transEsc('Please enable JavaScript.')?> + <?php endif; ?> </noscript> - <? endif; ?> + <?php endif; ?> </div> </div> -<? endif; ?> -<? /* finc: record-tab - hierarchytree - END */ ?> +<?php endif; ?> +<!-- finc: record-tab - hierarchytree - END --> diff --git a/themes/finc/templates/RecordTab/holdingsils.phtml b/themes/finc/templates/RecordTab/holdingsils.phtml index 9b230296b34be99aafef2a0fc2884cfa16d5a496..f596f0d2f1a9fbeb916a0f04dc7d98ae434b485f 100644 --- a/themes/finc/templates/RecordTab/holdingsils.phtml +++ b/themes/finc/templates/RecordTab/holdingsils.phtml @@ -1,10 +1,12 @@ <!-- finc: recordTab - holdingsils --> -<? +<?php // Set up convenience variables: $account = $this->auth()->getManager(); $user = $account->isLoggedIn(); $openUrl = $this->openUrl($this->driver, 'holdings'); $openUrlActive = $openUrl->isActive(); + $doi = $this->doi($this->driver, 'holdings'); + $doiActive = $doi->isActive(); // Account for replace_other_urls setting $urls = $this->record($this->driver)->getLinkDetails($openUrlActive); // finc-specific: externalCatalogueLink @@ -27,231 +29,167 @@ $this->headTitle($this->translate('Holdings') . ': ' . $this->driver->getBreadcrumb()); ?> -<? /* finc-specific: nxt line - #7841@56988450 - CK */ ?> -<? $holdingsEmpty = true; ?> +<?php /* finc-specific: nxt line - #7841@56988450 - CK */ ?> +<?php $holdingsEmpty = true; ?> -<?=$this->context($this)->renderInContext('librarycards/selectcard.phtml', ['user' => $this->auth()->isLoggedIn()]); ?> +<?=$this->context($this)->renderInContext('librarycards/selectcard.phtml', ['user' => $this->auth()->isLoggedIn()]);?> -<? if (!empty($holdings['blocks'])):?> +<?php if (!empty($holdings['blocks'])): ?> <div id="account-block-msg" class="alert alert-danger"> - <?=$this->transEsc('account_block_options_missing', ['%%details%%' => implode('; ', $holdings['blocks'])]) ?> + <?=$this->transEsc('account_block_options_missing', ['%%details%%' => implode('; ', $holdings['blocks'])])?> </div> -<? endif; ?> +<?php endif; ?> <?=($offlineMode == "ils-offline") ? $this->render('Helpers/ils-offline.phtml', ['offlineModeMsg' => 'ils_offline_holdings_message']) : ''?> -<? if (($this->ils()->getHoldsMode() == 'driver' && !empty($holdings['holdings'])) || $this->ils()->getTitleHoldsMode() == 'driver'): ?> - <? if ($account->loginEnabled() && $offlineMode != 'ils-offline'): ?> - <? if (!$user): ?> +<?php if (($this->ils()->getHoldsMode() == 'driver' && !empty($holdings['holdings'])) || $this->ils()->getTitleHoldsMode() == 'driver'): ?> + <?php if ($account->loginEnabled() && $offlineMode != 'ils-offline'): ?> + <?php if (!$user): ?> <div class="alert alert-info"> <a href="<?=$this->recordLink()->getTabUrl($this->driver, 'Holdings')?>?login=true&catalogLogin=true" data-lightbox><?=$this->transEsc("hold_login")?></a> </div> - <? elseif (!$user->cat_username): ?> + <?php elseif (!$user->cat_username): ?> <div class="alert alert-info"> <?=$this->translate("hold_profile_html", ['%%url%%' => $this->recordLink()->getTabUrl($this->driver, 'Holdings') . '?catalogLogin=true'])?> </div> - <? endif; ?> - <? endif; ?> -<? endif; ?> -<? $holdingTitleHold = $this->driver->tryMethod('getRealTimeTitleHold'); + <?php endif; ?> + <?php endif; ?> +<?php endif; ?> +<?php $holdingTitleHold = $this->driver->tryMethod('getRealTimeTitleHold'); if (!empty($holdingTitleHold)): ?> <a class="placehold" data-lightbox title="<?=$this->transEsc('request_place_text')?>" href="<?=$this->recordLink()->getRequestUrl($holdingTitleHold)?>"><i class="fa fa-flag" aria-hidden="true"></i> <?=$this->transEsc('title_hold_place')?> </a> -<? endif; ?> +<?php endif; ?> -<? /* finc: add 'Online Access' in holdings-tab #13770 - VE */ ?> -<? if (!empty($urls) || $openUrlActive): ?> +<?php /* finc: add 'Online Access' in holdings-tab #13770 - VE */ ?> +<?php if (!empty($urls) || $openUrlActive || $doiActive): ?> <h3><?=$this->transEsc("Internet")?></h3> - <? if (!empty($urls)): ?> - <? foreach ($urls as $current): ?> + <?php if (!empty($urls)): ?> + <?php foreach ($urls as $current): ?> <a href="<?=$this->escapeHtmlAttr($this->proxyUrl($current['url']))?>"><?=$this->escapeHtml($current['desc'])?></a><br/> - <? endforeach; ?> - <? endif; ?> - <? /* finc-specific snippet - #9274 - replaces if ($openUrlActive): - CK */ ?> - <? if ($openUrlActive): ?> - <? if (empty($urls)): ?> - <? $fallbackUrls = $this->driver->tryMethod('getURLs'); + <?php endforeach; ?> + <?php endif; ?> + <?php /* finc-specific snippet - #9274 - replaces if ($openUrlActive): ... - CK */ ?> + <?php if ($openUrlActive): ?> + <?php if (empty($urls)): ?> + <?php $fallbackUrls = $this->driver->tryMethod('getURLs'); if (!empty($fallbackUrls)): ?> <span id="urlsHideable" style="display: none"> - <? foreach ($fallbackUrls as $current): ?> + <?php foreach ($fallbackUrls as $current): ?> <a href="<?=$this->escapeHtmlAttr($this->proxyUrl($current['url']))?>" target="_blank"><?=$this->escapeHtml($current['desc'])?></a><br/> - <? endforeach; ?> + <?php endforeach; ?> </span> - <? endif; ?> - <? endif; ?> + <?php endif; ?> + <?php endif; ?> <?=$openUrl->renderTemplate()?> - <? endif; ?> - <? /* finc-specific snippet - #9274 - END */ ?> -<? endif; ?> + <?php if ($doiActive): ?><?=$doi->renderTemplate()?><?php endif; ?> + <?php endif; ?> + <?php /* finc-specific snippet - #9274 - END */ ?> +<?php endif; ?> -<? foreach ($holdings['holdings'] as $holding): ?> - <? /* nxt line = finc-specific - #7841@56988450 - CK */ ?> - <? $holdingsEmpty = false; ?> - <? /* this next line produces an empty h3 heading in some cases - should be solved more elegantly - Fixme - CK*/ ?> +<?php foreach ($holdings['holdings'] ?? [] as $holding): ?> + <?php /* nxt line = finc-specific - #7841@56988450 - CK */ ?> + <?php $holdingsEmpty = false; ?> + <?php /* this next line produces an empty h3 heading in some cases - should be solved more elegantly - Fixme - CK */ ?> <h3> - <? $locationText = $this->transEsc('location_' . $holding['location'], [], $holding['location']); ?> - <? if (isset($holding['locationhref']) && $holding['locationhref']): ?> + <?php $locationText = $this->transEsc('location_' . $holding['location'], [], $holding['location']); ?> + <?php if (isset($holding['locationhref']) && $holding['locationhref']): ?> <a href="<?=$holding['locationhref']?>" target="_blank"><?=$locationText?></a> - <? else: ?> + <?php else: ?> <?=$locationText?> - <? endif; ?> + <?php endif; ?> </h3> - <? /* finc: this next section produces an empty table in some cases - the table borders collapse, producing a thick line - should be solved more elegantly - Fixme - CK*/ ?> - <? /* nxt line = finc-specific - branch info - CK */ ?> - <? if (isset($holding['locationid'])): ?> + <?php /* nxt line = finc-specific - branch info - CK */ ?> + <?php if (isset($holding['locationid'])): ?> <?=$this->branchInfo($this->driver)->getBranchInfo($holding['locationid']);?> - <? endif; ?> + <?php endif; ?> + <?php /* finc: this next section produces an empty table in some cases - the table borders collapse, producing a thick line - should be solved more elegantly - Fixme - CK*/ ?> <table class="table table-striped"> - <? /* Table summary not supported in html 5, finc-specific solution, CK */ ?> - <caption class="sr-only"><?=$this->transEsc('holdings_details_from', ['%%location%%' => $this->transEsc($holding['location'])]) ?></caption> - <? /* finc: change order and structure of table #13606 - VE */ ?> - <? foreach ($holding['items'] as $row): ?> - <? - // AJAX Check record? - $check = isset($row['check']) && $row['check']; - $checkStorageRetrievalRequest = isset($row['checkStorageRetrievalRequest']) && $row['checkStorageRetrievalRequest']; - $checkILLRequest = isset($row['checkILLRequest']) && $row['checkILLRequest']; - + <caption class="sr-only"><?=$this->transEsc('holdings_details_from', ['%%location%%' => $this->transEsc($holding['location'])])?></caption> + <?php /* finc: change order and structure of table #13606 - VE */ ?> + <?php foreach ($holding['items'] as $row): ?> + <?php // finc: nxt line - emailholds #6096 - CK - $checkEmailHold = (isset($row['checkEmailHold']) && $row['checkEmailHold']); + $checkEmailHold = (isset($holding['checkEmailHold']) && $holding['checkEmailHold']); + try { + echo $this->context($this)->renderInContext( + 'RecordTab/holdingsils/' . $this->tab->getTemplate() . '.phtml', + ['holding' => $row] + ); + } catch (Exception $e) { + echo $this->context($this)->renderInContext( + 'RecordTab/holdingsils/standard.phtml', + ['holding' => $row] + ); + } ?> - <? if (isset($row['barcode']) && $row['barcode'] != ""): ?> - <tr vocab="http://schema.org/" typeof="Offer"> - <? /* finc: remove transEsc("Copy") with number #13606 - VE */ ?> - <td class="availability-column"> - <? if ($row['reserve'] == "Y"): ?> - <link property="availability" href="http://schema.org/InStoreOnly"/> - <?=$this->transEsc("On Reserve - Ask at Circulation Desk")?><br/> - <? endif; ?> - <? if (isset($row['use_unknown_message']) && $row['use_unknown_message']): ?> - <span class="text-muted"><?=$this->transEsc("status_unknown_message")?></span> - <? else: ?> - </td> - <td> - <? if ($row['availability']): ?> - <? /* Begin Available Items (Holds) */ ?> - <span class="text-success"><?=$this->transEsc("Available")?> - <link property="availability" href="http://schema.org/InStock"/></span> - <? if (isset($row['link']) && $row['link']): ?> - <? /* finc: add class .hidden-print + add title, CK */ ?> - <a class="<?=$check ? 'checkRequest ' : ''?>placehold hidden-print" <? if (!empty($row['linkLightbox'])): ?>data-lightbox <? endif; ?>href="<?=$this->recordLink()->getRequestUrl($row['link'])?>" title="<?=$this->transEsc($check ? "Check Hold" : "Place a Hold")?>"><i class="fa fa-flag" aria-hidden="true"></i> <?=$this->transEsc($check ? "Check Hold" : "Place a Hold")?></a> - <? endif; ?> - <? if (isset($row['storageRetrievalRequestLink']) && $row['storageRetrievalRequestLink']): ?> - <a class="<?=$checkStorageRetrievalRequest ? 'checkStorageRetrievalRequest ' : ''?> placeStorageRetrievalRequest" data-lightbox href="<?=$this->recordLink()->getRequestUrl($row['storageRetrievalRequestLink'])?>"><i class="fa fa-flag" aria-hidden="true"></i> <?=$this->transEsc($checkStorageRetrievalRequest ? "storage_retrieval_request_check_text" : "storage_retrieval_request_place_text")?></a> - <? endif; ?> - <? /* finc-specific additional insert - #6096 - CK */ ?> - <? if (isset($row['emailHoldLink']) && $row['emailHoldLink']): ?> - <a class="<?=$checkEmailHold ? 'checkEmailHold ' : ''?>placeEmailHold " data-lightbox href="<?=$this->recordLink()->getRequestUrl($row['emailHoldLink'])?>" title="<?=$this->transEsc($checkEmailHold ? "EmailHold::email_hold_check_text" : "EmailHold::email_hold_place_text")?>"><i class="fa fa-flag"></i> <?=$this->transEsc($checkEmailHold ? "EmailHold::email_hold_check_text" : "EmailHold::email_hold_place_text")?></a> - <? endif; ?> - <? /* finc-specific insert - #6096 - END */ ?> - <? else: ?> - <? /* Begin Unavailable Items (Recalls) */ ?> - <? /* finc: use empty row status and transEsc 'Unavailable', CK */ ?> - <span class="text-danger"><?=empty($row['status']) ? $this->transEsc("Unavailable") : $this->transEsc($row['status'])?> - <link property="availability" href="http://schema.org/OutOfStock"/></span> - <? if (isset($row['returnDate']) && $row['returnDate']): ?>– <span><?=$this->escapeHtml($row['returnDate'])?></span><? endif; ?> - <? if (isset($row['duedate']) && $row['duedate']): ?> - <? /* finc: keep nbsp + ndash or due date text will bump into alert, CK */ ?> - – <span><?=$this->transEsc("Due")?>: <?=$this->escapeHtml($row['duedate'])?></span> - <? endif; ?> - <? if (isset($row['requests_placed']) && $row['requests_placed'] > 0): ?> - <span><?=$this->transEsc("Requests")?>: <?=$this->escapeHtml($row['requests_placed'])?></span> - <? endif; ?> - <? if (isset($row['link']) && $row['link']): ?> - <a class="<?=$check ? 'checkRequest' : ''?> placehold" <? if (!empty($row['linkLightbox'])): ?>data-lightbox <? endif; ?>href="<?=$this->recordLink()->getRequestUrl($row['link'])?>"><i class="fa fa-flag" aria-hidden="true"></i> <?=$this->transEsc($check ? "Check Recall" : "Recall This")?></a> - <? endif; ?> - <? endif; ?> - <? /* finc: use && empty row item notes - CK */ ?> - <? if (isset($row['item_notes']) && !empty($row['item_notes'])): ?> - <div class="item-notes"> - <strong><?=$this->transEsc("Item Notes")?>:</strong> - <ul> - <? foreach ($row['item_notes'] as $item_note): ?> - <li><?=$this->escapeHtml($item_note)?></li> - <? endforeach; ?> - </ul> - </div> - <? endif; ?> - <? endif; ?> - <? /* Embed item structured data: library, barcode, call number */ ?> - <? if ($row['location']): ?> - <meta property="offeredBy" content="<?=$this->escapeHtmlAttr($row['location'])?>"/> - <? endif; ?> - <? if ($row['barcode']): ?> - <meta property="serialNumber" content="<?=$this->escapeHtmlAttr($row['barcode'])?>"/> - <? endif; ?> - <? if ($row['callnumber']): ?> - <meta property="sku" content="<?=$this->escapeHtmlAttr($row['callnumber'])?>"/> - <? endif; ?> - <? /* Declare that the item is to be borrowed, not for sale */ ?> - <link property="itemOffered" href="#record"/> - <!-- finc: price tags can be anywhere but seem to be required for product --> - <meta property="price" content="0"> - <meta property="priceCurrency" content="€"> - </td> - - <? /* finc: change separate <tr>-element to <td> with including <span> #13606 - VE */ ?> - <td> - <? $callNos = $this->tab->getUniqueCallNumbers($holding['items']); - if (!empty($callNos)): ?> - <span> - <? /* finc: no links back to alphabrows here - CK */ ?> - <? foreach ($callNos as $callNo): ?> - <?=$this->transEsc("Call Number")?>: <?=$this->escapeHtml($callNo)?><br/> - <? endforeach; ?> - </span> - <? endif; ?> - <? if (isset($holding['textfields'])): foreach ($holding['textfields'] as $textFieldName => $textFields): ?> - <span> - <? foreach ($textFields as $current): ?> - <?=$textFieldName == 'summary' ? $this->transEsc("Volume Holdings") : $this->transEsc(ucfirst($textFieldName))?>: <?=$this->escapeHtml($current)?><br/> - <? endforeach; ?> - </span> - <? endforeach; endif; ?> - </td> - </tr> - <? endif; ?> - <? endforeach; ?> - - <? if (!empty($holding['purchase_history'])): ?> + <?php endforeach; ?> + <? /* finc: we use call numbers in the table after "Notes" + We don't use the links to alphabrowse - CK */ ?> + <?php $callNos = $this->tab->getUniqueCallNumbers($holding['items']); if (!empty($callNos)): ?> + <tr> + <th> + <?=$this->transEsc("Call Number")?>: + </th> + <td> + <?php foreach ($callNos as $callNo): ?> + <?=$this->escapeHtml($callNo)?> + <br /> + <?php endforeach; ?> + </td> + </tr> + <?php endif; ?> + <?php if (isset($holding['textfields'])): foreach ($holding['textfields'] as $textFieldName => $textFields): ?> + <tr> + <?php // Translation for summary is a special case for backwards-compatibility ?> + <th><?=$textFieldName == 'summary' ? $this->transEsc("Volume Holdings") : $this->transEsc(ucfirst($textFieldName))?>:</th> + <td> + <?php foreach ($textFields as $current): ?> + <?=$this->escapeHtml($current)?><br/> + <?php endforeach; ?> + </td> + </tr> + <?php endforeach; endif; ?> + <? /* finc: we use call numbers after "Notes" - END */ ?> + <?php if (!empty($holding['purchase_history'])): ?> <tr> <th><?=$this->transEsc("Most Recent Received Issues")?>:</th> <td> - <? foreach ($holding['purchase_history'] as $current): ?> + <?php foreach ($holding['purchase_history'] as $current): ?> <?=$this->escapeHtml($current['issue'])?><br/> - <? endforeach; ?> + <?php endforeach; ?> </td> </tr> - <? endif; ?> + <?php endif; ?> </table> -<? endforeach; ?> +<?php endforeach; ?> -<? /* finc-specific: nxt 3 lines - #7841@56988450 - CK */ ?> -<? if ($holdingsEmpty && $this->driver->tryMethod('getLocalOrderInformation') == 'e'): ?> - <h3><?=$this->transEsc("This item has already been ordered and will be available shortly")?></h3> -<? endif; ?> +<?php /* finc-specific: nxt 3 lines - #7841@56988450 - CK */ ?> +<?php if ($holdingsEmpty && $this->driver->tryMethod('getLocalOrderInformation') == 'e'): ?> + <h3><?=$this->transEsc("title_ordered_by_library")?></h3> +<?php endif; ?> -<? /* finc-specific - external access - #9245 - CK */ ?> -<? if (!empty($extUrls)): ?> +<?php /* finc-specific - external access - #9245 - CK */ ?> +<?php if (!empty($extUrls)): ?> <h3><?=$this->transEsc("external_access")?></h3> - <? if (!empty($extUrls)): ?> - <? foreach ($extUrls as $current): ?> + <?php if (!empty($extUrls)): ?> + <?php foreach ($extUrls as $current): ?> <a href="<?=$this->escapeHtmlAttr($this->proxyUrl($current['url']))?>"><?=$this->escapeHtml($this->transEsc($current['desc']))?></a> <br/> - <? endforeach; ?> - <? endif; ?> -<? endif; ?> -<? /* finc-specific - external access - END */ ?> + <?php endforeach; ?> + <?php endif; ?> +<?php endif; ?> +<?php /* finc-specific - external access - END */ ?> -<? $history = $this->driver->getRealTimeHistory(); ?> -<? if (is_array($history) && !empty($history)): ?> +<?php $history = $this->driver->getRealTimeHistory(); ?> +<?php if (is_array($history) && !empty($history)): ?> <h3><?=$this->transEsc("Most Recent Received Issues")?></h3> <table class="table table-striped"> - <? foreach ($history as $row): ?> + <?php foreach ($history as $row): ?> <tr> <td><?=$this->escapeHtml($row['issue'])?></td> </tr> - <? endforeach; ?> + <?php endforeach; ?> </table> -<? endif; ?> +<?php endif; ?> <!-- finc: recordTab - holdingsils - END --> diff --git a/themes/finc/templates/RecordTab/holdingsils/standard.phtml b/themes/finc/templates/RecordTab/holdingsils/standard.phtml new file mode 100644 index 0000000000000000000000000000000000000000..91e177f3400c5d609f63ce87aa6bd6ef0104a9f8 --- /dev/null +++ b/themes/finc/templates/RecordTab/holdingsils/standard.phtml @@ -0,0 +1,110 @@ +<!-- finc - recordtab - holdingsils - standard --> +<?php /* This is a new file introduced in VF5 -- it originated from the old holdingsils file, for history, check there, CK */ ?> +<?php if (strlen($holding['barcode'] ?? '') > 0): ?> +<?php + $check = $holding['check'] ?? false; + $checkStorageRetrievalRequest = $holding['checkStorageRetrievalRequest'] ?? false; + $checkILLRequest = $holding['checkILLRequest'] ?? false; + // finc: nxt line - emailholds #6096 - CK + $checkEmailHold = (isset($holding['checkEmailHold']) && $holding['checkEmailHold']); +?> +<tr vocab="http://schema.org/" typeof="Offer"> + <?php /* finc: remove transEsc("Copy") and number from TH, #13606 - VE */ /* + <th class="copy-number"><?=$this->transEsc("Copy")?> <?=$this->escapeHtml($holding['number'])?> + <?php if ($holding['enumchron'] ?? false): ?> + <span class="enumchron">(<?=$this->escapeHtml($holding['enumchron'])?>)</span> + <?php endif; ?> + </th> + */ ?> + <td class="availability-column"> + <?php if ($holding['reserve'] == "Y"): ?> + <link property="availability" href="http://schema.org/InStoreOnly"/> + <?=$this->transEsc("On Reserve - Ask at Circulation Desk")?><br/> + <?php endif; ?> + <?php if ($holding['use_unknown_message'] ?? false): ?> + <span class="text-muted"><?=$this->transEsc("status_unknown_message")?></span> + <?php else: ?> + <?php if ($holding['availability'] ?? false): ?> + <?php /* Begin Available Items (Holds) */ ?> + <span class="text-success"><?=$this->transEsc("Available")?> + <link property="availability" href="http://schema.org/InStock"/> + </span> + <?php if ($holding['link'] ?? false): ?> + <?php /* finc: add class .hidden-print + add title, CK */ ?> + <a class="<?=$check ? 'checkRequest ' : ''?>placehold hidden-print" <?php if (!empty($holding['linkLightbox'])): ?>data-lightbox <?php endif; ?>href="<?=$this->recordLink()->getRequestUrl($holding['link'])?>" title="<?=$this->transEsc($check ? "Check Hold" : "Place a Hold")?>"><i class="fa fa-flag" aria-hidden="true"></i> <?=$this->transEsc($check ? "Check Hold" : "Place a Hold")?> + </a> + <?php endif; ?> + <?php if ($holding['storageRetrievalRequestLink'] ?? false): ?> + <a class="<?=$checkStorageRetrievalRequest ? 'checkStorageRetrievalRequest ' : ''?> placeStorageRetrievalRequest" data-lightbox href="<?=$this->recordLink()->getRequestUrl($holding['storageRetrievalRequestLink'])?>"><i class="fa fa-flag" aria-hidden="true"></i> <?=$this->transEsc($checkStorageRetrievalRequest ? "storage_retrieval_request_check_text" : "storage_retrieval_request_place_text")?> + </a> + <?php endif; ?> + <?php if ($holding['ILLRequestLink'] ?? false): ?> + <a class="<?=$checkILLRequest ? 'checkILLRequest ' : ''?>placeILLRequest" data-lightbox href="<?=$this->recordLink()->getRequestUrl($holding['ILLRequestLink'])?>"><i class="fa fa-flag" aria-hidden="true"></i> <?=$this->transEsc($checkILLRequest ? "ill_request_check_text" : "ill_request_place_text")?> + </a> + <?php endif; ?> + <?php /* finc-specific additional insert, newspaper orders via mail - #6096 - CK */ ?> + <?php if (isset($holding['emailHoldLink']) && $holding['emailHoldLink']): ?> + <a class="<?=$checkEmailHold ? 'checkEmailHold ' : ''?>placeEmailHold " data-lightbox href="<?=$this->recordLink()->getRequestUrl($holding['emailHoldLink'])?>" title="<?=$this->transEsc($checkEmailHold ? "EmailHold::email_hold_check_text" : "EmailHold::email_hold_place_text")?>"><i class="fa fa-flag"></i> <?=$this->transEsc($checkEmailHold ? "EmailHold::email_hold_check_text" : "EmailHold::email_hold_place_text")?></a> + <?php endif; ?> + <? /* finc-specific insert - #6096 - END */ ?> + <?php else: ?> + <?php /* Begin Unavailable Items (Recalls) */ ?> + <?php /* finc: use empty status and transEsc 'Unavailable', CK */ ?> + <span class="text-danger"><?=empty($holding['status']) ? $this->transEsc("Unavailable") : $this->transEsc($holding['status'])?> <link property="availability" href="http://schema.org/OutOfStock"/> + </span> + <?php if ($holding['returnDate'] ?? false): ?>– <span><?=$this->escapeHtml($holding['returnDate'])?></span><?php endif; ?> + <?php if ($holding['duedate'] ?? false): ?> + <?php /* finc: keep nbsp + ndash or due date text will bump into alert, CK */ ?> + – <span><?=$this->transEsc("Due")?>: <?=$this->escapeHtml($holding['duedate'])?></span> + <?php endif; ?> + <?php if (($holding['requests_placed'] ?? 0) > 0): ?> + <span><?=$this->transEsc("Requests")?>: <?=$this->escapeHtml($holding['requests_placed'])?></span> + <?php endif; ?> + <?php if ($holding['link'] ?? false): ?> + <a class="<?=$check ? 'checkRequest' : ''?> placehold" <?php if (!empty($holding['linkLightbox'])): ?>data-lightbox + <?php endif; ?>href="<?=$this->recordLink()->getRequestUrl($holding['link'])?>"><i class="fa fa-flag" + aria-hidden="true"></i> <?=$this->transEsc($check ? "Check Recall" : "Recall This")?></a> + <?php endif; ?> + <?=$this->relais()->renderButtonIfActive($this->driver ?? null)?> + <?php endif; ?> + </td> + <td class="notes"> + <?php if (isset($holding['item_notes'])): ?> + <div class="item-notes"> + <strong><?=$this->transEsc("Item Notes")?>:</strong> + <ul> + <?php foreach ($holding['item_notes'] as $item_note): ?> + <li><?=$this->escapeHtml($item_note)?></li> + <?php endforeach; ?> + </ul> + </div> + <?php endif; ?> + <?php endif; ?> + <?php /* Embed item structured data: library, barcode, call number */ ?> + <?php if ($holding['location'] ?? false): ?> + <meta property="offeredBy" content="<?=$this->escapeHtmlAttr($holding['location'])?>"/> + <?php endif; ?> + <?php if ($holding['barcode'] ?? false): ?> + <meta property="serialNumber" content="<?=$this->escapeHtmlAttr($holding['barcode'])?>"/> + <?php endif; ?> + <?php if ($holding['callnumber'] ?? false): ?> + <meta property="sku" content="<?=$this->escapeHtmlAttr($holding['callnumber'])?>"/> + <?php endif; ?> + <?php /* Declare that the item is to be borrowed, not for sale */ ?> + <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut"/> + <link property="itemOffered" href="#record"/> + <?php /* finc: price tags can be anywhere but seem to be required for product */ ?> + <meta property="price" content="0"> + <meta property="priceCurrency" content="€"> + + <?php if (isset($holding['textfields'])): foreach ($holding['textfields'] as $textFieldName => $textFields): ?> + <span> + <?php foreach ($textFields as $current): ?> + <?=$textFieldName == 'summary' ? $this->transEsc("Volume Holdings") : $this->transEsc(ucfirst($textFieldName))?>: <?=$this->escapeHtml($current)?><br/> + <?php endforeach; ?> + </span> + <?php endforeach; endif; ?> + </td> +</tr> +<?php endif; ?> +<!-- finc - recordtab - holdingsils - standard - END --> diff --git a/themes/finc/templates/RecordTab/serviceebl.phtml b/themes/finc/templates/RecordTab/serviceebl.phtml index d5a7df56b07f935182aa18dfb91d65b3a7953696..edb3e1171bcbc3daeae2214b6fe827fb5b0105e2 100644 --- a/themes/finc/templates/RecordTab/serviceebl.phtml +++ b/themes/finc/templates/RecordTab/serviceebl.phtml @@ -1,4 +1,4 @@ -<? +<?php // Set page title. $this->headTitle($this->translate('EBL') . ': ' . $this->driver->getBreadcrumb()); @@ -6,7 +6,7 @@ $this->headTitle($this->translate('EBL') . ': ' . $this->driver->getBreadcrumb() $link = $this->tab->getLinkEBL(); ?> - <h4>EBL</h4> -<? foreach ($link as $href): ?> - <a href="<?= $href['url'] ?>"><?= $href['desc'] ?></a> -<? endforeach; ?> +<h4>EBL</h4> +<?php foreach ($link as $href): ?> + <a href="<?=$href['url']?>"><?=$href['desc']?></a> +<?php endforeach; ?> diff --git a/themes/finc/templates/RecordTab/staffviewai.phtml b/themes/finc/templates/RecordTab/staffviewai.phtml index f68602a9b94b50c361e23bcf76dd0af0eb70dec1..ed6fb81a856bebf4df1646634a51927bcbfb9aa4 100644 --- a/themes/finc/templates/RecordTab/staffviewai.phtml +++ b/themes/finc/templates/RecordTab/staffviewai.phtml @@ -1,19 +1,45 @@ -<!-- finc: recordtab - staffviewarray --> -<? +<!-- finc: recordtab - staffviewai --> +<?php // Set page title. $this->headTitle($this->translate('Staff View') . ': ' . $this->driver->getBreadcrumb()); ?> <table class="citation table table-striped"> - <? foreach ($this->driver->getAIRecord() as $field => $values): ?> + <?php foreach ($this->driver->getAIRecord() as $field => $values): ?> <tr> <th><?=$this->escapeHtml($field)?></th> <td> - <? if (!is_array($values)) { $values = array($values); } ?> - <? foreach ($values as $value): ?> - <?=$this->escapeHtml(is_array($value) ? print_r($value, true) : $value)?><br /> - <? endforeach; ?> + <?php if (!is_array($values)) { + $values = array($values); + } ?> + <?php foreach ($values as $value): ?> + <?=$this->escapeHtml(is_array($value) ? print_r($value, true) : $value)?><br/> + <?php endforeach; ?> </td> </tr> - <? endforeach; ?> + <?php endforeach; ?> + <?php /* the following introduced in 9934*/ ?> + <?php if ($openURL = $this->driver->getOpenUrl()): ?> + <tr> + <th><?=$this->escapeHtml('openURL')?></th> + <td> + <?=$this->escapeHtml($openURL)?><br/> + </td> + </tr> + <?php endif; ?> + <?php $fields = $this->driver->getRawData(); + if (!empty($fields)): ?> + <tr> + <th><?=$this->translate('SOLR')?></th> + <td></td> + </tr> + <?php ksort($fields); + foreach ($fields as $key => $values): ?> + <?php if ($key === 'fullrecord') continue; ?> + <tr> + <th><?=$this->escapeHtml($key)?></th> + <td><?=$this->escapeHtml(is_array($values) ? implode(', ', $values) : $values)?></td> + </tr> + <?php endforeach ?> + <?php endif; ?> </table> -<!-- finc: recordtab - staffviewarray - END --> +<!-- finc: recordtab - staffviewai - END --> diff --git a/themes/finc/templates/RecordTab/staffviewmarc.phtml b/themes/finc/templates/RecordTab/staffviewmarc.phtml new file mode 100644 index 0000000000000000000000000000000000000000..81a43575747ce1735c9fa4effa6df2023a71bd08 --- /dev/null +++ b/themes/finc/templates/RecordTab/staffviewmarc.phtml @@ -0,0 +1,30 @@ +<!-- finc: recordtab - staffviewmarc --> +<?php +// Set page title. +$this->headTitle($this->translate('Staff View') . ': ' . $this->driver->getBreadcrumb()); +?> +<?=\VuFind\XSLT\Processor::process('record-marc.xsl', $this->driver->getXML('marc21'))?> +<?php /* the following introduced in 9934*/ ?> +<?php if ($openURL = $this->driver->getOpenUrl()): ?> + <tr> + <th><?=$this->escapeHtml('openURL')?></th> + <td> + <?=$this->escapeHtml($openURL)?><br/> + </td> + </tr> +<?php endif; ?> +<?php $fields = $this->driver->getRawData(); +if (!empty($fields)): ?> + <table class="citation table table-striped"> + <caption><?=$this->translate('SOLR')?></caption> + <?php ksort($fields); + foreach ($fields as $key => $values): ?> + <?php if ($key === 'fullrecord') continue; ?> + <tr> + <th><?=$this->escapeHtml($key)?></th> + <td><?=$this->escapeHtml(is_array($values) ? implode(', ', $values) : $values)?></td> + </tr> + <?php endforeach ?> + </table> +<?php endif; ?> +<!-- finc: recordtab - staffviewmarc - END --> diff --git a/themes/finc/templates/RecordTab/topics.phtml b/themes/finc/templates/RecordTab/topics.phtml index a483e1e9caf3279e11b30636eea121066b22b9cd..d2792298ec0e604b1c1aa76c288ab5cbf9527bbe 100644 --- a/themes/finc/templates/RecordTab/topics.phtml +++ b/themes/finc/templates/RecordTab/topics.phtml @@ -1,67 +1,66 @@ <!-- finc: recordtab - topics --> -<? +<?php // Set page title. $this->headTitle($this->translate('Topics') . ': ' . $this->driver->getBreadcrumb()); ?> <table class="table table-striped"> - <? /* Table summary not supported in html 5, finc-specific solution, CK */ ?> <caption class="sr-only"> <?=$this->transEsc('Topics')?> </caption> -<? if ($rvk = $this->driver->tryMethod('getRvkWithMetadata')): ?> - <? $contentDisplayed = true; ?> +<?php if ($rvk = $this->driver->tryMethod('getRvkWithMetadata')): ?> + <?php $contentDisplayed = true; ?> <tr> <th><?=$this->transEsc('RVK')?>:</th> <td> - <? $i = 0; foreach ($rvk as $item): ?> + <?php $i = 0; foreach ($rvk as $item): ?> <?=($i>0?"<br />":"") //no linebreak after last item ?> <?=$item['rvk']?> - <? if (isset($item['level']) || isset($item['name'])): ?> - <? + <?php if (isset($item['level']) || isset($item['name'])): ?> + <?php $tooltip_content = "<ul class='no-bullet'>" . (isset($item['name']) ? "<li><strong>" . $item['name'] . "</strong></li>" : ""); if (isset($item['level']) && count($item['level'])) { - foreach ($item['level'] as $level) { - $tooltip_content .= "<li>" . $level . "</li>"; - } + foreach ($item['level'] as $level) { + $tooltip_content .= "<li>" . $level . "</li>"; + } } $tooltip_content .= "</ul>"; ?> - <? endif; ?> + <?php endif; ?> <span <?=(isset($tooltip_content) ? 'data-toggle="tooltip" data-html="true" title="' . $tooltip_content . '"' : "")?>> <a href="<?=$this->record($this->driver)->getLink('rvk', $item['rvk'])?>"> <i class="fa fa-search" aria-hidden="true"></i> <?=$this->transEsc('Find Similar Items');?></a> </span> - <? $i++; ?> - <? endforeach; ?> + <?php $i++; ?> + <?php endforeach; ?> </td> </tr> -<? endif; ?> +<?php endif; ?> -<? $topics = $this->driver->getTopics(); if (!empty($topics) && is_array($topics)): ?> - <? $contentDisplayed = true; ?> +<?php $topics = $this->driver->getTopics(); if (!empty($topics) && is_array($topics)): ?> + <?php $contentDisplayed = true; ?> <tr> <th><?=$this->transEsc('Subjects')?>: </th> <td> - <? foreach ($topics as $field): ?> + <?php foreach ($topics as $field): ?> <div class="subject-line" property="keywords"> - <? $subject = ''; ?> - <? if(count($field) == 1 && !isset($field['subject'])) $field = explode('--', $field[0]); ?> - <? if(isset($field['subject'])): // extended topics ?> - <? $field = $field['subject']; ?> - <? endif; ?> - <? $i = 0; foreach ($field as $subfield): ?> + <?php $subject = ''; ?> + <?php if(count($field) == 1 && !isset($field['subject'])) $field = explode('--', $field[0]); ?> + <?php if(isset($field['subject'])): // extended topics ?> + <?php $field = $field['subject']; ?> + <?php endif; ?> + <?php $i = 0; foreach ($field as $subfield): ?> <?=($i++ == 0) ? '' : ' > '?> - <? $subject = trim($subject . ' ' . $subfield); ?> + <?php $subject = trim($subject . ' ' . $subfield); ?> <a title="<?=$this->escapeHtmlAttr($subject)?>" href="<?=$this->record($this->driver)->getLink('subject', $subject)?>" rel="nofollow"><?=trim($this->escapeHtml($subfield))?></a> - <? endforeach; ?> + <?php endforeach; ?> </div> - <? endforeach; ?> + <?php endforeach; ?> </td> </tr> -<? endif; ?> +<?php endif; ?> -<? if (!isset($contentDisplayed) || !$contentDisplayed): // Avoid errors if there were no rows above ?> +<?php if (!isset($contentDisplayed) || !$contentDisplayed): // Avoid errors if there were no rows above ?> <tr><td><?=$this->transEsc('Topics unavailable')?></td></tr> -<? endif; ?> +<?php endif; ?> </table> <!-- finc: recordtab - topics - END --> diff --git a/themes/finc/templates/ajax/resolverLinks.phtml b/themes/finc/templates/ajax/resolverLinks.phtml index 8c82f05cd26c4763d70d97d954902c4462cffff8..9b46024cabfd134f762343dc09fb45b715ec86fe 100644 --- a/themes/finc/templates/ajax/resolverLinks.phtml +++ b/themes/finc/templates/ajax/resolverLinks.phtml @@ -1,78 +1,78 @@ <!-- finc: ajax - resolverlinks --> <div> - <? /* finc-specific change #8447 - CK */ ?> - <? $noResolverContent = true; ?> - <? if (!empty($this->electronic)): ?> - <? $noResolverContent = false; ?> - <? /* finc-specific change #8447 - END */ ?> + <?php /* finc-specific change #8447 - CK */ ?> + <?php $noResolverContent = true; ?> + <?php if (!empty($this->electronic)): ?> + <?php $noResolverContent = false; ?> + <?php /* finc-specific change #8447 - END */ ?> <div class="openurls"> - <? /* + <?php /* <strong><?=$this->transEsc('Electronic')?></strong> */ ?> <ul> - <? foreach ($this->electronic as $link): ?> + <?php foreach ($this->electronic as $link): ?> <li> - <? if (!empty($link['href'])): ?> - <? /* finc-specific change #7986 - CK - traffic light */ ?> - <div <? if(!empty($link['access'])): ?> data-toggle="tooltip" title="<?=$this->transEsc('resolver_link_access_'.$link['access'])?>" class="traffic-light access-<?=$link['access']?>"<? endif;?>> + <?php if (!empty($link['href'])): ?> + <?php /* finc-specific change #7986 - CK - traffic light */ ?> + <div <?php if(!empty($link['access'])): ?> data-toggle="tooltip" title="<?=$this->transEsc('resolver_link_access_'.$link['access'])?>" class="traffic-light access-<?=$link['access']?>"<?php endif;?>> <span class="first"></span> <span class="second"></span> <span class="last"></span> </div> - <? /* finc-specific change #7986 - END */ ?> + <?php /* finc-specific change #7986 - END */ ?> <a href="<?=$this->escapeHtmlAttr($link['href'])?>" title="<?=isset($link['service_type'])?$this->escapeHtmlAttr($link['service_type']):''?>"<?=!empty($link['access'])?' class="access-'.$link['access'].'"':''?>><?=isset($link['title'])?$this->escapeHtml($link['title']):''?></a> <br /> - <? /* finc-specific change #5334 - CK */ ?> + <?php /* finc-specific change #5334 - CK */ ?> <small><?=isset($link['coverage'])?$this->escapeHtml($link['coverage']):''?><?=isset($link['coverageHref'])?' <a href="'.$link['coverageHref'].'" target="_blank">'.$this->translate('Readme').'</a>':''?></small> - <? /* finc-specific change #5334 - END */ ?> - <? else: ?> + <?php /* finc-specific change #5334 - END */ ?> + <?php else: ?> <?=isset($link['title'])?$this->escapeHtml($link['title']):''?> <?=isset($link['coverage'])?$this->escapeHtml($link['coverage']):''?> - <? endif; ?> + <?php endif; ?> </li> - <? endforeach; ?> + <?php endforeach; ?> </ul> </div> - <? endif; ?> - <? /* finc-specific change - commented out in #7643 - hide info on print issues - CK */ ?> - <? /* - <? if (!empty($this->print)): ?> - <? $noResolverContent = false; ?> + <?php endif; ?> + <?php /* finc-specific change - commented out in #7643 - hide info on print issues - CK */ ?> + <?php /* + <?php if (!empty($this->print)): ?> + <?php $noResolverContent = false; ?> <div class="openurls"> <strong><?=$this->transEsc('Holdings')?></strong> <ul> - <? foreach ($this->print as $link): ?> + <?php foreach ($this->print as $link): ?> <li> - <? if (!empty($link['href'])): ?> + <?php if (!empty($link['href'])): ?> <a href="<?=$this->escapeHtmlAttr($link['href'])?>" title="<?=isset($link['service_type'])?$this->escapeHtmlAttr($link['service_type']):''?>"<?=!empty($link['access'])?' class="access-'.$link['access'].'"':''?>><?=isset($link['title'])?$this->escapeHtml($link['title']):''?></a> <?=isset($link['coverage'])?$this->escapeHtml($link['coverage']):''?> - <? else: ?> + <?php else: ?> <?=isset($link['title'])?$this->escapeHtml($link['title']):''?> <?=isset($link['coverage'])?$this->escapeHtml($link['coverage']):''?> - <? endif; ?> + <?php endif; ?> </li> - <? endforeach; ?> + <?php endforeach; ?> </ul> </div> - <? endif; ?> + <?php endif; ?> <div class="openurls"> - <? if (!empty($this->moreOptionsLink)): ?><strong><a href="<?=$this->escapeHtmlAttr($this->moreOptionsLink)?>"><?=$this->transEsc('More options')?></a></strong><?endif; ?> - <? if (!empty($this->services)): ?> + <?php if (!empty($this->moreOptionsLink)): ?><strong><a href="<?=$this->escapeHtmlAttr($this->moreOptionsLink)?>"><?=$this->transEsc('More options')?></a></strong><?php endif; ?> + <?php if (!empty($this->services)): ?> <ul> - <? foreach ($this->services as $link): ?> - <? if (!empty($link['href'])): ?> + <?php foreach ($this->services as $link): ?> + <?php if (!empty($link['href'])): ?> <li> <a href="<?=$this->escapeHtmlAttr($link['href'])?>" title="<?=isset($link['service_type'])?$this->escapeHtmlAttr($link['service_type']):''?>"<?=!empty($link['access'])?' class="access-'.$link['access'].'"':''?>><?=isset($link['title'])?$this->escapeHtml($link['title']):''?></a> </li> - <? endif; ?> - <? endforeach; ?> + <?php endif; ?> + <?php endforeach; ?> </ul> - <? endif; ?> + <?php endif; ?> </div> */ ?> - <? /* finc-specific change - commented out in #7643 - END */ ?> + <?php /* finc-specific change - commented out in #7643 - END */ ?> - <? /* finc-specific change #9274 - CK */ ?> - <? if ($noResolverContent): // no content to show, so tell the user ?> + <?php /* finc-specific change #9274 - CK */ ?> + <?php if ($noResolverContent): // no content to show, so tell the user ?> <span id="noResolverContentMessage" class="hidden"><?=$this->resolver . ': ' . $this->translate('no_resolver_links')?></span> <script>if ($('#urlsHideable').length) { $('#urlsHideable').show(); } else { $('#noResolverContentMessage').show(); }</script> - <? endif; ?> - <? /* finc-specific change #9274 - END */ ?> + <?php endif; ?> + <?php /* finc-specific change #9274 - END */ ?> </div> <!-- finc: ajax - resolverlinks - END --> diff --git a/themes/finc/templates/ajax/status-unavailable-services.phtml b/themes/finc/templates/ajax/status-unavailable-services.phtml index 065abbf1e1ae5fe2e3da1eb147a7772b3387fc1d..cf6c13247f4a15f5cb6213d061368f94f1dc4c02 100644 --- a/themes/finc/templates/ajax/status-unavailable-services.phtml +++ b/themes/finc/templates/ajax/status-unavailable-services.phtml @@ -1,13 +1,13 @@ <!-- finc: ajax - status-unavailable-services --> -<? +<?php // defaultServiceStatusMessage for multiple status and as fallback for missing translations $defaultServiceStatusMessage = 'HoldingStatus::services_available_html'; // generate serviceStatusMessage $serviceStatusMessage = - count($services) == 1 - ? $this->transEsc('HoldingStatus::service_available_' . $services[0], [], $defaultServiceStatusMessage) - : $defaultServiceStatusMessage ; + count($services) == 1 + ? $this->transEsc('HoldingStatus::service_available_' . $services[0], [], $defaultServiceStatusMessage) + : $defaultServiceStatusMessage; // build the translated serviceList for usage in defaultServiceStatusMessage $that = $this; @@ -19,8 +19,7 @@ $serviceList = implode('', array_map($translator, $services)); ?> <span class="label label-danger services-<?=implode('-', $services)?>"> <?=$serviceStatusMessage === $defaultServiceStatusMessage - ? $this->translate($serviceStatusMessage, ['%%list%%' => $serviceList]) - : '<span class="service_' . $services[0] . '">' . $serviceStatusMessage . '</span>' ?> + ? $this->translate($serviceStatusMessage, ['%%list%%' => $serviceList]) + : '<span class="service_' . $services[0] . '">' . $serviceStatusMessage . '</span>'?> </span> <!-- finc: ajax - status-unavailable-services - END --> - diff --git a/themes/finc/templates/amsl/sources-list.phtml b/themes/finc/templates/amsl/sources-list.phtml index 088665028ffce9c10c67656ab8667dd3134b978f..86a14df32c045634634cbf45add7826d2d1586d2 100644 --- a/themes/finc/templates/amsl/sources-list.phtml +++ b/themes/finc/templates/amsl/sources-list.phtml @@ -1,5 +1,5 @@ <!-- finc: amsl/sources-list - home --> -<? +<?php // Set up page title: $this->headTitle($this->translate('List of available Sources')); @@ -11,48 +11,48 @@ $this->layout()->breadcrumbs .= '</li> <li class="active">' . $this->transEsc('L <?=$this->flashmessages()?> -<? if (isset($this->sources)): ?> -<p><?=$this->transEsc('sources_explanatory_line');?></p> -<form> - <div class="form-group"> - <label for="sources-filter"><?=$this->transEsc('Filter list')?></label> - <input type="text" id="sources-filter" class="form-control" placeholder="<?=$this->transEsc('Please enter filter term')?>"> +<?php if (isset($this->sources)): ?> + <p><?=$this->transEsc('sources_explanatory_line');?></p> + <form> + <div class="form-group"> + <label for="sources-filter"><?=$this->transEsc('Filter list')?></label> + <input type="text" id="sources-filter" class="form-control" placeholder="<?=$this->transEsc('Please enter filter term')?>"> + </div> + </form> + + <p> + <button data-toggle="collapse" class="btn btn-default collapse-all-toggler" href="javascript:void(0)"><?=$this->transEsc('Expand all')?></button> + </p> + + <ul id="sources-list"> + <?php foreach ($this->sources as $label => $source): ?> + <?php if (!empty($source)): ?> + <li> + <a data-toggle="collapse" class="collapse-toggler" href="javascript:void(0)"> + <?=$label?> + <i class="fa fa-chevron-down" aria-hidden="true"></i> + <span class="sr-only"><?=$this->transEsc('Expand')?></span> + </a> + <ul class="panel-collapse collapse" aria-expanded="false"> + <?php foreach ($source as $sub_label => $collection): ?> + <li><?=$sub_label?></li> + <?php endforeach; ?> + </ul> + </li> + <?php endif; ?> + <?php endforeach; ?> + </ul> + + <div class="panel panel-primary"> + <div class="panel-body"><?=$this->transEsc('support_by_dfg');?> + <a href='http://www.dfg.de' target='_blank'> + <img src='<?=$this->imageLink('dfg_logo_text.png')?>' alt='Deutsche Forschungsgemeinschaft, DFG'> + </a> + </div> </div> -</form> - -<p> - <button data-toggle="collapse" class="btn btn-default collapse-all-toggler" href="javascript:void(0)"><?=$this->transEsc('Expand all')?></button> -</p> - -<ul id="sources-list"> - <? foreach ($this->sources as $label => $source): ?> - <? if (!empty($source)): ?> - <li> - <a data-toggle="collapse" class="collapse-toggler" href="javascript:void(0)"> - <?=$label?> - <i class="fa fa-chevron-down" aria-hidden="true"></i> - <span class="sr-only"><?=$this->transEsc('Expand')?></span> - </a> - <ul class="panel-collapse collapse" aria-expanded="false"> - <? foreach ($source as $sub_label => $collection): ?> - <li><?=$sub_label?></li> - <? endforeach; ?> - </ul> - </li> - <? endif; ?> - <? endforeach; ?> -</ul> - -<div class="panel panel-primary"> - <div class="panel-body"><?=$this->transEsc('support_by_dfg'); ?> - <a href='http://www.dfg.de' target='_blank'> - <img src='<?=$this->imageLink('dfg_logo_text.png')?>' alt='Deutsche Forschungsgemeinschaft, DFG'> - </a> - </div> -</div> -<? endif; ?> +<?php endif; ?> -<? /* run collapse togglers + introduce a case-insensitive filter that is capable of filtering multiple filtering terms */ - echo $this->inlineScript(\Zend\View\Helper\HeadScript::FILE, 'sources-display.js', 'SET'); +<?php /* run collapse togglers + introduce a case-insensitive filter that is capable of filtering multiple filtering terms */ +echo $this->inlineScript(\Zend\View\Helper\HeadScript::FILE, 'sources-display.js', 'SET'); ?> <!-- finc: amsl/sources-list - home - END --> diff --git a/themes/finc/templates/cart/cart.phtml b/themes/finc/templates/cart/cart.phtml index 89d8847254b36cd25890b495d75edb0a672e196e..2382df0601bdc2615db958f948be96b90e5f2ae6 100644 --- a/themes/finc/templates/cart/cart.phtml +++ b/themes/finc/templates/cart/cart.phtml @@ -1,5 +1,5 @@ <!-- finc: cart - cart --> -<? +<?php // Set page title. $this->headTitle($this->translate('Book Bag')); @@ -8,10 +8,10 @@ ?> <h2><?=$this->transEsc('Book Bag') ?></h2> <?=$this->flashmessages()?> -<? /* finc: use .cart class to style content below */ ?> +<?php /* finc: use .cart class to style content below */ ?> <form class="form-inline cart" action="<?=$this->url('cart-processor')?>" method="post" name="cartForm" data-lightbox-onsubmit="cartFormHandler"> <input type="hidden" id="dropdown_value"/> - <? if (!$this->cart()->isEmpty()): ?> + <?php if (!$this->cart()->isEmpty()): ?> <div class="cart-controls clearfix"> <div class="checkbox pull-left flip w-100"> <label> @@ -19,24 +19,24 @@ <?=$this->transEsc('select_page')?> </label> </div> - <? if ($this->userlist()->getMode() !== 'disabled'): ?> + <?php if ($this->userlist()->getMode() !== 'disabled'): ?> <button type="submit" class="btn btn-transparent" name="saveCart" title="<?=$this->transEsc('bookbag_save')?>" value="1"> <i class="fa fa-save" aria-hidden="true"></i> <?=$this->transEsc('Save')?> </button> - <? endif; ?> + <?php endif; ?> <button type="submit" class="btn btn-transparent" name="email" title="<?=$this->transEsc('bookbag_email')?>" value="1"> <i class="fa fa-envelope-o" aria-hidden="true"></i> <?=$this->transEsc('Email')?> </button> - <? $exportOptions = $this->export()->getActiveFormats('bulk'); if (count($exportOptions) > 0): ?> + <?php $exportOptions = $this->export()->getActiveFormats('bulk'); if (count($exportOptions) > 0): ?> <button type="submit" class="btn btn-transparent" name="export" title="<?=$this->transEsc('bookbag_export')?>" value="1"> <i class="fa fa-list-alt" aria-hidden="true"></i> <?=$this->transEsc('Export')?> </button> - <? endif; ?> + <?php endif; ?> <button type="submit" class="btn btn-transparent dropdown-toggle" name="print" title="<?=$this->transEsc('print_selected')?>" value="1"> - <i class="fa fa-print" aria-hidden="true"></i> + <i class="fa fa-printer" aria-hidden="true"></i> <?=$this->transEsc('Print')?> </button> <div class="btn-group" id="cartDelete"> @@ -60,11 +60,11 @@ </ul> </div> </div> - <? endif; ?> + <?php endif; ?> <?=$this->render('cart/contents.phtml')?> </form> -<? +<?php $script = <<<JS function submitFormWithButton(link, name) { $('#dropdown_value').attr('name', name).val(1); diff --git a/themes/finc/templates/cart/contents.phtml b/themes/finc/templates/cart/contents.phtml index 8087e8d57773599838e1a758c6492408933aefc2..2ececda64d0cd0f05fe5eecaf9328bb71a357bbf 100644 --- a/themes/finc/templates/cart/contents.phtml +++ b/themes/finc/templates/cart/contents.phtml @@ -1,28 +1,29 @@ -<? $records = $this->cart()->getRecordDetails(); +<?php $records = $this->cart()->getRecordDetails(); if (!empty($records)): ?> <hr/> <ul class="list-unstyled"> - <? foreach ($records as $i => $record): ?> + <?php foreach ($records as $i => $record): ?> <li> <div class="checkbox"> + <label> <?=$this->record($record)->getCheckbox('cart')?> - <a title="<?=$this->transEsc('View Record')?>" href="<?=$this->recordLink()->getUrl($record)?>" data-lightbox-ignore> - <? - // Collect citation data: + <a title="<?=$this->transEsc('View Record')?>" href="<?=$this->recordLink()->getUrl($record)?>" data-lightbox-ignore><?=$this->escapeHtml($record->getBreadcrumb())?> + <?php + // finc-specific: Collect citation data: $helper = $this->citation($record); $recordtype = $record->getRecordType(); ?> - <? if ($recordtype == 'ai'): ?> + <?php if ($recordtype == 'ai'): ?> <?=$helper->getCitation('APAAI')?> - <? else: ?> + <?php else: ?> <?=$helper->getCitation('APA')?> - <? endif; ?> + <?php endif; ?> </a> - + </label> </div> </li> - <? endforeach; ?> + <?php endforeach; ?> </ul> -<? else: ?> +<?php else: ?> <p class="alert alert-info"><?=$this->transEsc('bookbag_is_empty')?>.</p> -<? endif; ?> \ No newline at end of file +<?php endif; ?> \ No newline at end of file diff --git a/themes/finc/templates/collection/view.phtml b/themes/finc/templates/collection/view.phtml index 1cc948abcd590993346a6389498c4a1f49a64142..9bf735648959ae619108283cb44eabf60e0703e5 100644 --- a/themes/finc/templates/collection/view.phtml +++ b/themes/finc/templates/collection/view.phtml @@ -1,5 +1,5 @@ <!-- finc: collection - view --> -<? +<?php // Set up standard record scripts: $this->headScript()->appendFile("record.js"); $this->headScript()->appendFile("check_save_statuses.js"); @@ -25,65 +25,65 @@ $this->layout()->breadcrumbs .= '<li><a href="' . $this->url('collections-home') . '<li class="active">' . $this->recordLink()->getBreadcrumb($this->driver) . '</li>'; ?> -<? if (isset($this->scrollData) && ($this->scrollData['previousRecord'] || $this->scrollData['nextRecord'])): ?> - <? /* Pager is identical to pager in record - view! - CK */ ?> +<?php if (isset($this->scrollData) && ($this->scrollData['previousRecord'] || $this->scrollData['nextRecord'])): ?> + <?php /* Pager is identical to pager in record - view! - CK */ ?> <ul class="pager hidden-print"> - <? if ($this->scrollData['previousRecord']): ?> - <? if ($this->scrollData['firstRecord']): ?> + <?php if ($this->scrollData['previousRecord']): ?> + <?php if ($this->scrollData['firstRecord']): ?> <li class="left"> <a href="<?=$this->recordLink()->getUrl($this->scrollData['firstRecord'])?>" title="<?=$this->transEsc('First Search Result')?>" rel="nofollow">« <?=$this->transEsc('First')?></a> </li> - <? endif; ?> + <?php endif; ?> <li class="left"> <a href="<?=$this->recordLink()->getUrl($this->scrollData['previousRecord'])?>" title="<?=$this->transEsc('Previous Search Result')?>" rel="nofollow">« <?=$this->transEsc('Prev')?></a> </li> - <? else: ?> - <? if ($this->scrollData['firstRecord']): ?> + <?php else: ?> + <?php if ($this->scrollData['firstRecord']): ?> <li class="disabled left"><a href="#">« <?=$this->transEsc('First')?></a></li> - <? endif; ?> + <?php endif; ?> <li class="disabled left"><a href="#">« <?=$this->transEsc('Prev')?></a></li> - <? endif; ?> - <? /* finc-specific: li + hidden-xs, and li right below CK */ ?> + <?php endif; ?> + <?php /* finc-specific: li + hidden-xs, and li right below CK */ ?> <li class="hidden-xs"> <?=$this->transEsc('of_num_results', [ '%%position%%' => $this->localizedNumber($this->scrollData['currentPosition']), '%%total%%' => $this->localizedNumber($this->scrollData['resultTotal']) ]) ?> </li> - <? if ($this->scrollData['nextRecord']): ?> + <?php if ($this->scrollData['nextRecord']): ?> <li class="right"> <a href="<?=$this->recordLink()->getUrl($this->scrollData['nextRecord'])?>" title="<?=$this->transEsc('Next Search Result')?>" rel="nofollow"><?=$this->transEsc('Next')?> »</a> </li> - <? if ($this->scrollData['lastRecord']): ?> + <?php if ($this->scrollData['lastRecord']): ?> <li class="right"> <a href="<?=$this->recordLink()->getUrl($this->scrollData['lastRecord'])?>" title="<?=$this->transEsc('Last Search Result')?>" rel="nofollow"><?=$this->transEsc('Last')?> »</a> </li> - <? endif; ?> - <? else: ?> + <?php endif; ?> + <?php else: ?> <li class="disabled right"><a href="#"><?=$this->transEsc('Next')?> »</a></li> - <? if ($this->scrollData['lastRecord']): ?> + <?php if ($this->scrollData['lastRecord']): ?> <li class="disabled right"><a href="#"><?=$this->transEsc('Last')?> »</a></li> - <? endif; ?> - <? endif; ?> + <?php endif; ?> + <?php endif; ?> </ul> -<? endif; ?> +<?php endif; ?> -<? /* DON'T pull the toolbar in here but below, finc-specific, CK */ ?> +<?php /* DON'T pull the toolbar in here but below, finc-specific, CK */ ?> <div class="record"> - <div<? if (!$tree): /* in tree mode, do not constrain width with a class */ ?> class="<?=$this->layoutClass('mainbody') ?>"<? endif; ?>> + <div<?php if (!$tree): /* in tree mode, do not constrain width with a class */ ?> class="<?=$this->layoutClass('mainbody') ?>"<?php endif; ?>> <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" class="hiddenId" id="record_id"/> <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?>" class="hiddenSource"/> <?=$this->flashmessages()?> <?=$this->record($this->driver)->getCollectionMetadata()?> - <? if (count($this->tabs) > 0): ?> + <?php if (count($this->tabs) > 0): ?> <a name="tabnav"></a> <div class="record-tabs"> <ul class="nav nav-tabs"> - <? foreach ($this->tabs as $tab => $obj): ?> - <? // add current tab to breadcrumbs if applicable: + <?php foreach ($this->tabs as $tab => $obj): ?> + <?php // add current tab to breadcrumbs if applicable: $desc = $obj->getDescription(); $tab_classes = []; if (0 === strcasecmp($this->activeTab, $tab)) { @@ -102,35 +102,35 @@ $this->layout()->breadcrumbs .= '<li><a href="' . $this->url('collections-home') } ?> <li<?=count($tab_classes) > 0 ? ' class="' . implode(' ', $tab_classes) . '"' : ''?>> - <a class="<?=strtolower($tab)?>" href="<?=$this->recordLink()->getTabUrl($this->driver, $tab)?>#tabnav"<? if ($obj->supportsAjax() && in_array($tab, $this->backgroundTabs)): ?> data-background<? endif ?>><?=$this->transEsc($desc)?></a> + <a class="<?=strtolower($tab)?>" href="<?=$this->recordLink()->getTabUrl($this->driver, $tab)?>#tabnav"<?php if ($obj->supportsAjax() && in_array($tab, $this->backgroundTabs)): ?> data-background<?php endif ?>><?=$this->transEsc($desc)?></a> </li> - <? endforeach; ?> + <?php endforeach; ?> </ul> <div class="tab-content collectionDetails<?=$tree ? 'Tree' : ''?>"> - <? if (!$this->loadInitialTabWithAjax || !isset($activeTabObj) || !$activeTabObj->supportsAjax()): ?> + <?php if (!$this->loadInitialTabWithAjax || !isset($activeTabObj) || !$activeTabObj->supportsAjax()): ?> <div class="tab-pane active <?=$this->activeTab?>-tab"> <?=isset($activeTabObj) ? $this->record($this->driver)->getTab($activeTabObj) : ''?> </div> - <? endif; ?> + <?php endif; ?> </div> </div> - <? endif; ?> + <?php endif; ?> <?=$this->driver->supportsCoinsOpenURL() ? '<span class="Z3988" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenURL()) . '"></span>' : ''?> </div> - <? if (isset($activeTabObj) && is_callable([$activeTabObj, 'getSideRecommendations'])): ?> + <?php if (isset($activeTabObj) && is_callable([$activeTabObj, 'getSideRecommendations'])): ?> <div class="<?=$this->layoutClass('sidebar')?>"> - <? /* Get the toolbar here, finc-specific, CK */ ?> + <?php /* pull the toolbar here, finc-specific, CK */ ?> <?=$this->record($this->driver)->getToolbar()?> - <? foreach ($activeTabObj->getSideRecommendations() as $current): ?> + <?php foreach ($activeTabObj->getSideRecommendations() as $current): ?> <?=$this->recommend($current)?> - <? endforeach; ?> + <?php endforeach; ?> </div> - <? endif; ?> + <?php endif; ?> </div> <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, '$(document).ready(recordDocReady);', 'SET');?> diff --git a/themes/finc/templates/documentdeliveryservice/form.phtml b/themes/finc/templates/documentdeliveryservice/form.phtml index b22ad14920c8f358b77331db824e8ca16d0c8f37..a1f975f2ddbe87694de02945ef708ee61d13e249 100644 --- a/themes/finc/templates/documentdeliveryservice/form.phtml +++ b/themes/finc/templates/documentdeliveryservice/form.phtml @@ -1,222 +1,221 @@ <!-- finc - documentdeliveryservice - form --> +<div class="<?=$this->layoutClass('mainbody')?>"> + <h2><?=$this->transEsc('DDS::dds_form_headline')?></h2> + <?=$this->flashmessages()?> + <form method="post" action="<?=$this->url('dds-email')?>" name="docdelisForm"> + <?php if ($this->department): ?> + <input type="hidden" name="subito[hdepartment]" value="<?=$this->department?>"/> + <?php endif; ?> + <legend><?=$this->transEsc("DDS::dds_form_delivery_data")?>:</legend> + <!-- name --> + <div class="form-group"> + <label for="sname" class="control-label"><?=$this->transEsc("Name")?>:*</label> + <?php if (isset($this->error->username)): ?> + <div class="error-field"> + <?=$this->error->username;?> + </div> + <?php endif; ?> - <div class="<?=$this->layoutClass('mainbody')?>"> - <h2><?=$this->transEsc('DDS::dds_form_headline')?></h2> - <?=$this->flashmessages()?> - <form method="post" action="<?=$this->url('dds-email')?>" name="docdelisForm"> - <? if ($this->department): ?> - <input type="hidden" name="subito[hdepartment]" value="<?=$this->department?>"/> - <? endif; ?> - <legend><?=$this->transEsc("DDS::dds_form_delivery_data")?>:</legend> - <!-- name --> - <div class="form-group"> - <label for="sname" class="control-label"><?=$this->transEsc("Name")?>:*</label> - <? if (isset($this->error->username)): ?> - <div class="error-field"> - <?=$this->error->username;?> - </div> - <? endif; ?> - - <input type="text" id="sname" name="subito[username]" class="form-control" <?=(!empty($this->username) ? 'value="' . $this->username . '"' : '')?>/> + <input type="text" id="sname" name="subito[username]" class="form-control" <?=(!empty($this->username) ? 'value="' . $this->username . '"' : '')?>/> + </div> + <!-- phone --> + <div class="form-group"> + <label class="inline control-label" for="sphone"><?=$this->transEsc("DDS::form_field_phone")?>:</label> + <?php if (isset($this->error->phone)): ?> + <div class="error-field"> + <?=$this->error->phone;?> </div> - <!-- phone --> - <div class="form-group"> - <label class="inline control-label" for="sphone"><?=$this->transEsc("DDS::form_field_phone")?>:</label> - <? if (isset($this->error->phone)): ?> - <div class="error-field"> - <?=$this->error->phone;?> - </div> - <? endif; ?> - <input type="text" id="sphone" name="subito[phone]" class="form-control" <?=(!empty($this->phone) ? 'value="' . $this->phone . '"' : '')?>/> - </div> - <!-- email --> - <div class="form-group"> - <label class="inline control-label" for="semail"><?=$this->transEsc("DDS::form_field_email")?>:*</label> - <? if (isset($this->error->email)): ?> - <div class="error-field"> - <?=$this->error->email;?> - </div> - <? endif; ?> - <input type="text" id="semail" name="subito[email]" class="form-control" <?=(!empty($this->email) ? 'value="' . $this->email . '"' : '')?>/> - </div> - <!-- user id --> - <div class="form-group"> - <label class="inline control-label" for="suserid"><?=$this->transEsc("DDS::form_field_library_id")?>:*</label> - <? if (isset($this->error->userid)): ?> - <div class="error-field"> - <?=$this->error->userid;?> - </div> - <? endif; ?> - <input type="text" id="suserid" name="subito[userid]" class="form-control" <?=(!empty($this->userid) ? 'value="' . $this->userid . '"' : '')?>/> + <?php endif; ?> + <input type="text" id="sphone" name="subito[phone]" class="form-control" <?=(!empty($this->phone) ? 'value="' . $this->phone . '"' : '')?>/> + </div> + <!-- email --> + <div class="form-group"> + <label class="inline control-label" for="semail"><?=$this->transEsc("DDS::form_field_email")?>:*</label> + <?php if (isset($this->error->email)): ?> + <div class="error-field"> + <?=$this->error->email;?> </div> - <!-- division --> - <div class="form-group"> - <label class="inline control-label" for="sdivision"><?=$this->transEsc("DDS::form_field_division")?>:*</label> - <? if (isset($this->error->division)): ?> - <div class="error-field"> - <?=$this->error->division;?> - </div> - <? endif; ?> - <select id="sdivision" name="subito[division]" size="1" class="form-control"/> - <option value=""></option> - <? foreach ($this->divisions as $cat => $division): ?> - <option value="<?=$cat?>" <?=($this->division == $cat) ? 'selected="selected"' : ''?>><?=$division?></option> - <? endforeach; ?> - </select> + <?php endif; ?> + <input type="text" id="semail" name="subito[email]" class="form-control" <?=(!empty($this->email) ? 'value="' . $this->email . '"' : '')?>/> + </div> + <!-- user id --> + <div class="form-group"> + <label class="inline control-label" for="suserid"><?=$this->transEsc("DDS::form_field_library_id")?>:*</label> + <?php if (isset($this->error->userid)): ?> + <div class="error-field"> + <?=$this->error->userid;?> </div> - <!-- department --> - <div class="form-group input-sdepartment"> - <label class="inline control-label" for="sdepartment"><?=$this->transEsc("DDS::form_field_department")?>:*</label> - <? if (isset($this->error->department)): ?> - <div class="error-field"> - <?=$this->error->department;?> - </div> - <? endif; ?> - <select id="sdepartment" name="subito[department]" size="1" class="form-control"/> - <option value=""></option> - </select> + <?php endif; ?> + <input type="text" id="suserid" name="subito[userid]" class="form-control" <?=(!empty($this->userid) ? 'value="' . $this->userid . '"' : '')?>/> + </div> + <!-- division --> + <div class="form-group"> + <label class="inline control-label" for="sdivision"><?=$this->transEsc("DDS::form_field_division")?>:*</label> + <?php if (isset($this->error->division)): ?> + <div class="error-field"> + <?=$this->error->division;?> </div> - <!-- department medicine --> - <div class="form-group input-department"> - <label class="inline control-label" for="smdepartment"><?=$this->transEsc("DDS::form_field_department")?>:*</label> - <input type="text" id="smdepartment" name="subito[inputdepartment]" class="form-control" <?=(!empty($this->inputdepartment) ? 'value="' . $this->inputdepartment . '"' : '')?>/> + <?php endif; ?> + <select id="sdivision" name="subito[division]" size="1" class="form-control"/> + <option value=""></option> + <?php foreach ($this->divisions as $cat => $division): ?> + <option value="<?=$cat?>" <?=($this->division == $cat) ? 'selected="selected"' : ''?>><?=$division?></option> + <?php endforeach; ?> + </select> + </div> + <!-- department --> + <div class="form-group input-sdepartment"> + <label class="inline control-label" for="sdepartment"><?=$this->transEsc("DDS::form_field_department")?>:*</label> + <?php if (isset($this->error->department)): ?> + <div class="error-field"> + <?=$this->error->department;?> </div> + <?php endif; ?> + <select id="sdepartment" name="subito[department]" size="1" class="form-control"/> + <option value=""></option> + </select> + </div> + <!-- department medicine --> + <div class="form-group input-department"> + <label class="inline control-label" for="smdepartment"><?=$this->transEsc("DDS::form_field_department")?>:*</label> + <input type="text" id="smdepartment" name="subito[inputdepartment]" class="form-control" <?=(!empty($this->inputdepartment) ? 'value="' . $this->inputdepartment . '"' : '')?>/> + </div> - <legend><?=$this->transEsc("DDS::dds_form_details_ordered_title")?>:</legend> - <!-- author --> - <div class="form-group"> - <label class="inline control-label" for="sauthor"><?=$this->transEsc("DDS::form_field_author")?>:*</label> - <? if (isset($this->error->author)): ?> - <div class="error-field"> - <?=$this->error->author;?> - </div> - <? endif; ?> - <input type="text" id="sauthor" name="subito[author]" class="form-control" <?=(!empty($this->author) ? 'value="' . $this->author . '"' : '')?>/> + <legend><?=$this->transEsc("DDS::dds_form_details_ordered_title")?>:</legend> + <!-- author --> + <div class="form-group"> + <label class="inline control-label" for="sauthor"><?=$this->transEsc("DDS::form_field_author")?>:*</label> + <?php if (isset($this->error->author)): ?> + <div class="error-field"> + <?=$this->error->author;?> </div> - <!-- title of issue --> - <div class="form-group"> - <label class="inline control-label" for="sarticle"><?=$this->transEsc("DDS::form_field_title")?>:</label> - <? if (isset($this->error->article)): ?> - <div class="error-field"> - <?=$this->error->article;?> - </div> - <? endif; ?> - <input type="text" id="sarticle" name="subito[article]" class="form-control" <?=(!empty($this->article) ? 'value="' . $this->article . '"' : '')?>/> + <?php endif; ?> + <input type="text" id="sauthor" name="subito[author]" class="form-control" <?=(!empty($this->author) ? 'value="' . $this->author . '"' : '')?>/> + </div> + <!-- title of issue --> + <div class="form-group"> + <label class="inline control-label" for="sarticle"><?=$this->transEsc("DDS::form_field_title")?>:</label> + <?php if (isset($this->error->article)): ?> + <div class="error-field"> + <?=$this->error->article;?> </div> - <!-- title of journal --> - <div class="form-group"> - <label class="inline control-label" for="sjournal"><?=$this->transEsc("DDS::form_field_journal")?>:*</label> - <? if (isset($this->error->journal)): ?> - <div class="error-field"> - <?=$this->error->journal;?> - </div> - <? endif; ?> - <input type="text" id="sjournal" name="subito[journal]" class="form-control" <?=(!empty($this->journal) ? 'value="' . $this->journal . '"' : '')?>/> + <?php endif; ?> + <input type="text" id="sarticle" name="subito[article]" class="form-control" <?=(!empty($this->article) ? 'value="' . $this->article . '"' : '')?>/> + </div> + <!-- title of journal --> + <div class="form-group"> + <label class="inline control-label" for="sjournal"><?=$this->transEsc("DDS::form_field_journal")?>:*</label> + <?php if (isset($this->error->journal)): ?> + <div class="error-field"> + <?=$this->error->journal;?> </div> - <!-- issn --> - <div class="form-group"> - <label class="inline control-label" for="sjournal"><?=$this->transEsc("ISSN")?>:</label> - <? if (isset($this->error->issn)): ?> - <div class="error-field"> - <?=$this->error->issn;?> - </div> - <? endif; ?> - <input type="text" id="sissn" name="subito[issn]" class="form-control" <?=(!empty($this->issn) ? 'value="' . $this->issn . '"' : '')?>/> + <?php endif; ?> + <input type="text" id="sjournal" name="subito[journal]" class="form-control" <?=(!empty($this->journal) ? 'value="' . $this->journal . '"' : '')?>/> + </div> + <!-- issn --> + <div class="form-group"> + <label class="inline control-label" for="sjournal"><?=$this->transEsc("ISSN")?>:</label> + <?php if (isset($this->error->issn)): ?> + <div class="error-field"> + <?=$this->error->issn;?> </div> - <!-- publish date --> - <div class="form-group"> - <label class="inline control-label" for="spublishdate"><?=$this->transEsc("DDS::form_field_publishing_date")?>:*</label> - <? if (isset($this->error->publishdate)): ?> - <div class="error-field"> - <?=$this->error->publishdate;?> - </div> - <? endif; ?> - <input type="text" id="spublishdate" name="subito[publishdate]" class="form-control" <?=(!empty($this->publishdate) ? 'value="' . $this->publishdate . '"' : '')?>/> + <?php endif; ?> + <input type="text" id="sissn" name="subito[issn]" class="form-control" <?=(!empty($this->issn) ? 'value="' . $this->issn . '"' : '')?>/> + </div> + <!-- publish date --> + <div class="form-group"> + <label class="inline control-label" for="spublishdate"><?=$this->transEsc("DDS::form_field_publishing_date")?>:*</label> + <?php if (isset($this->error->publishdate)): ?> + <div class="error-field"> + <?=$this->error->publishdate;?> </div> - <!-- journal number --> - <div class="form-group"> - <label class="inline control-label" for="snumber"><?=$this->transEsc("DDS::form_field_volume")?>:*</label> - <? if (isset($this->error->number)): ?> - <div class="error-field"> - <?=$this->error->number;?> - </div> - <? endif; ?> - <input type="text" id="snumber" name="subito[number]" class="form-control" <?=(!empty($this->number) ? 'value="' . $this->number . '"' : '')?>/> + <?php endif; ?> + <input type="text" id="spublishdate" name="subito[publishdate]" class="form-control" <?=(!empty($this->publishdate) ? 'value="' . $this->publishdate . '"' : '')?>/> + </div> + <!-- journal number --> + <div class="form-group"> + <label class="inline control-label" for="snumber"><?=$this->transEsc("DDS::form_field_volume")?>:*</label> + <?php if (isset($this->error->number)): ?> + <div class="error-field"> + <?=$this->error->number;?> </div> - <!-- pages --> - <div class="form-group"> - <label class="inline control-label" for="spages"><?=$this->transEsc("DDS::form_field_pages")?>:*</label> - <? if (isset($this->error->pages)): ?> - <div class="error-field"> - <?=$this->error->pages;?> - </div> - <? endif; ?> - <input type="text" id="spages" name="subito[pages]" class="form-control" <?=(!empty($this->pages) ? 'value="' . $this->pages . '"' : '')?>/> + <?php endif; ?> + <input type="text" id="snumber" name="subito[number]" class="form-control" <?=(!empty($this->number) ? 'value="' . $this->number . '"' : '')?>/> + </div> + <!-- pages --> + <div class="form-group"> + <label class="inline control-label" for="spages"><?=$this->transEsc("DDS::form_field_pages")?>:*</label> + <?php if (isset($this->error->pages)): ?> + <div class="error-field"> + <?=$this->error->pages;?> </div> - <!-- remarks --> - <div class="form-group"> - <label class="inline control-label" for="sremarks"><?=$this->transEsc("DDS::form_fields_remarks")?>:</label> - <? if (isset($this->error->remarks)): ?> - <div class="error-field"> - <?=$this->error->remarks;?> - </div> - <? endif; ?> - <textarea id="sremarks" name="subito[remarks]" class="form-control"><?=(!empty($this->remarks) ? $this->remarks : '')?></textarea> + <?php endif; ?> + <input type="text" id="spages" name="subito[pages]" class="form-control" <?=(!empty($this->pages) ? 'value="' . $this->pages . '"' : '')?>/> + </div> + <!-- remarks --> + <div class="form-group"> + <label class="inline control-label" for="sremarks"><?=$this->transEsc("DDS::form_fields_remarks")?>:</label> + <?php if (isset($this->error->remarks)): ?> + <div class="error-field"> + <?=$this->error->remarks;?> </div> + <?php endif; ?> + <textarea id="sremarks" name="subito[remarks]" class="form-control"><?=(!empty($this->remarks) ? $this->remarks : '')?></textarea> + </div> <input role="button" type="submit" class="btn btn-primary" value="<?=$this->transEsc("DDS::form_button_submit")?>"/> - </form> + </form> <div class="subito-pg margin-t"> - <?=$this->transEsc("DDS::dds_text_questions")?> - <a href="mailto:info@ub.uni-leipzig.de?subject=<?=$this->transEsc("Dokumentenlieferdienst")?>">info@ub.uni-leipzig.de</a> - </div> + <?=$this->transEsc("DDS::dds_text_questions")?> + <a href="mailto:info@ub.uni-leipzig.de?subject=<?=$this->transEsc("Dokumentenlieferdienst")?>">info@ub.uni-leipzig.de</a> + </div> - <div class="input-department subito-pg"> - <div><?=$this->transEsc("Bei eventuellen Rückfragen wenden Sie sich bitte an die Abteilung Fernleihe der Medizin")?>:</div> - <div><?=$this->transEsc("Phone")?>: +49 (0)341 - 97 14014</div> - <div><?=$this->transEsc("Email")?>: <a href="mailto:zbmed.fernleihe@medizin.uni-leipzig.de?subject=<?=$this->transEsc("Dokumentenlieferdienst")?>">zbmed.fernleihe@medizin.uni-leipzig.de</a> - </div> - </div> - <div class="subito-pg"> - <p class="required"> - * <?=$this->transEsc("DDS::dds_text_mandatory_fields")?></p> + <div class="input-department subito-pg"> + <div><?=$this->transEsc("Bei eventuellen Rückfragen wenden Sie sich bitte an die Abteilung Fernleihe der Medizin")?>:</div> + <div><?=$this->transEsc("Phone")?>: +49 (0)341 - 97 14014</div> + <div><?=$this->transEsc("Email")?>: <a href="mailto:zbmed.fernleihe@medizin.uni-leipzig.de?subject=<?=$this->transEsc("Dokumentenlieferdienst")?>">zbmed.fernleihe@medizin.uni-leipzig.de</a> </div> </div> + <div class="subito-pg"> + <p class="required"> + * <?=$this->transEsc("DDS::dds_text_mandatory_fields")?></p> + </div> +</div> -<? +<?php $this->inlineScript()->captureStart(); echo <<<JS $(document).ready(function(){ - // if department already selected and post request failed then - // rebuild select menu - if ( $('input:hidden[name="subito\\[hdepartment\\]"]').val() != 'undefined') { - department.addDepartmentSelect( - $('input[name="subito\\[hdepartment\\]"]').val(), - $('select[name="subito\\[division\\]"]').val() - ); - } - $('select[name="subito\\[division\\]"]').change(function() { - department.init($(this).val()); - }); - $('.form-group input').focus(function() { - $(this).parent().prev('.error-field').hide(200); - }); - $('.form-group select').focus(function() { - $(this).parent().prev('.error-field').hide(200); - }); - /*if ( $('#loginOptions a.login').length ) { - var loginUrl = { - followup: true, - followupModule: 'Subito', - followupAction: 'Subito' - }; - $('#loginOptions a.login').attr('href', function ( index, value ) { - return value + '?' + $.param( loginUrl ); - }); - // console.log($('#loginOptions a.login').attr('href')); - }*/ + // if department already selected and post request failed then + // rebuild select menu + if ( $('input:hidden[name="subito\\[hdepartment\\]"]').val() != 'undefined') { + department.addDepartmentSelect( + $('input[name="subito\\[hdepartment\\]"]').val(), + $('select[name="subito\\[division\\]"]').val() + ); + } + $('select[name="subito\\[division\\]"]').change(function() { + department.init($(this).val()); + }); + $('.form-group input').focus(function() { + $(this).parent().prev('.error-field').hide(200); }); + $('.form-group select').focus(function() { + $(this).parent().prev('.error-field').hide(200); + }); + /*if ( $('#loginOptions a.login').length ) { + var loginUrl = { + followup: true, + followupModule: 'Subito', + followupAction: 'Subito' + }; + $('#loginOptions a.login').attr('href', function ( index, value ) { + return value + '?' + $.param( loginUrl ); + }); + // console.log($('#loginOptions a.login').attr('href')); + }*/ + }); /** * Show & hide of subito form elements regarding select menu status. * Add options for department select menu @@ -226,74 +225,74 @@ echo <<<JS **/ var department = { - init: function ( divisionid ) { - addOptions = false; - var elements = []; - if ( divisionid == '15') { - elements = { - "department":"show", - "costcentre":"show", - "sdepartment":"hide" - } - } else if (divisionid == '') { - elements = { - "department":"hide", - "costcentre":"hide", - "sdepartment":"hide" - } - } else { - elements = { - "department":"hide", - "costcentre":"hide", - "sdepartment":"show" - } - var addOptions = true; - } - department.showHideElements(elements); - if (addOptions == true) { - department.addDepartmentOptions( divisionid ); + init: function ( divisionid ) { + addOptions = false; + var elements = []; + if ( divisionid == '15') { + elements = { + "department":"show", + "costcentre":"show", + "sdepartment":"hide" + } + } else if (divisionid == '') { + elements = { + "department":"hide", + "costcentre":"hide", + "sdepartment":"hide" + } + } else { + elements = { + "department":"hide", + "costcentre":"hide", + "sdepartment":"show" } + var addOptions = true; + } + department.showHideElements(elements); + if (addOptions == true) { + department.addDepartmentOptions( divisionid ); + } }, addDepartmentOptions: function ( divisionid ) { - $('select[name="subito\\[department\\]"]').empty(); - var departments = $this->departments; - department.addOptionElement('',''); - $.each(departments[divisionid], function (index, value) { - department.addOptionElement(value,index); - }); + $('select[name="subito\\[department\\]"]').empty(); + var departments = $this->departments; + department.addOptionElement('',''); + $.each(departments[divisionid], function (index, value) { + department.addOptionElement(value,index); + }); }, addDepartmentSelect: function (departmentid, divisionid) { - department.init ( divisionid ); - department.addSelectElement ( departmentid ); + department.init ( divisionid ); + department.addSelectElement ( departmentid ); }, addOptionElement: function ( text, value ) { - jQuery('<option/>', { - text: department.htmlEntitiesDecode(text), - value: value - }).appendTo('select[name="subito\\[department\\]"]'); + jQuery('<option/>', { + text: department.htmlEntitiesDecode(text), + value: value + }).appendTo('select[name="subito\\[department\\]"]'); }, addSelectElement: function ( departmentid ) { - $('select[name="subito\\[department\\]"] option').filter(function () { - //console.log($(this).val() + ' == ' + departmentid); - return $(this).val() == departmentid; - }).prop('selected', true); + $('select[name="subito\\[department\\]"] option').filter(function () { + //console.log($(this).val() + ' == ' + departmentid); + return $(this).val() == departmentid; + }).prop('selected', true); }, htmlEntitiesDecode: function ( value ) { - if (value) { - return jQuery('<div/>').html(value).text(); - } - return value; + if (value) { + return jQuery('<div/>').html(value).text(); + } + return value; }, showHideElements: function ( elements ) { - $.each(elements, function (index, value) { - if (value == 'show') { - $('.input-' + index).show(200); - } - if (value == 'hide') { - $('.input-' + index).hide(200); - } - }); - } + $.each(elements, function (index, value) { + if (value == 'show') { + $('.input-' + index).show(200); + } + if (value == 'hide') { + $('.input-' + index).hide(200); + } + }); + } } JS; $this->inlineScript()->captureEnd(); diff --git a/themes/finc/templates/documentdeliveryservice/home.phtml b/themes/finc/templates/documentdeliveryservice/home.phtml index 92b84315790241f535cbb47cc51ed3d7a8d837c6..bf92244c324628580b2de650cfcbc63263264e5a 100644 --- a/themes/finc/templates/documentdeliveryservice/home.phtml +++ b/themes/finc/templates/documentdeliveryservice/home.phtml @@ -1,4 +1,4 @@ -<? +<?php // Set up page title: $this->headTitle($this->translate('Delivery service for documents')); diff --git a/themes/finc/templates/footer.phtml b/themes/finc/templates/footer.phtml index 029e561e92ee56b68b4f1d77bfefac4276eb8a57..510e299722e1ed2d092515a79b5617cf8f493840 100644 --- a/themes/finc/templates/footer.phtml +++ b/themes/finc/templates/footer.phtml @@ -17,7 +17,7 @@ <li><a href="<?=$this->url('channels-home')?>"><?=$this->transEsc('channel_explore')?></a></li> <li><a href="<?=$this->url('search-reserves')?>"><?=$this->transEsc('Course Reserves')?></a></li> <li><a href="<?=$this->url('search-newitem')?>"><?=$this->transEsc('New Items')?></a></li> - <? /* Custom finc - CK */ ?> + <?php /* finc-specific - CK */ ?> <li><a href="<?=$this->url('myresearch-acquisition')?>"><?=$this->transEsc('Suggestions for acquisition')?></a></li> </ul> </div> @@ -31,7 +31,7 @@ </div> </div> - <? /* finc branding footer */ ?> + <?php /* finc branding footer */ ?> <hr> <div class="footer-container powered-by"> <div class="footer-column"> diff --git a/themes/finc/templates/header.phtml b/themes/finc/templates/header.phtml index e7553bf02fb721e5e9cc91082d60d100265bc3bf..0fe1e26791a4053f41f65d4dece610b0ab45b1ba 100644 --- a/themes/finc/templates/header.phtml +++ b/themes/finc/templates/header.phtml @@ -1,15 +1,15 @@ <!-- finc: header --> -<? $account = $this->auth()->getManager(); ?> -<? /* This navbar is the sticky element in the header - CK; you can use 'affix' as an alternative to 'navbar-fixed-top' like so: +<?php $account = $this->auth()->getManager(); ?> +<?php /* This navbar is the sticky element in the header - CK; you can use 'affix' as an alternative to 'navbar-fixed-top' like so: <div data-spy="affix" data-offset-top="1" class="navbar"> Do not use 'navbar-fixed-top' and 'affix' at the same time. When using 'affix', set the variables for '$navbar-height', '$navbar-height-xs' and '$navbar-height-sm' in _customVariables.scss to '=0' or set the paddings-top under 'body' in compiled.scss to '=0' */ ?> <div class="banner container navbar navbar-fixed-top"> - <? /* This element only holds the mobile toggler and the navbar-brand/library name - CK */ ?> + <?php /* This element only holds the mobile toggler and the navbar-brand/library name - CK */ ?> <div class="navbar-header"> - <? /* mobile navigation toggler - CK */ ?> + <?php /* mobile navigation toggler - CK */ ?> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#header-collapse"> <span class="sr-only">Toggle navigation</span> <i class="fa fa-bars" aria-hidden="true"></i> @@ -17,30 +17,30 @@ <h1> <a class="navbar-brand lang-<?=$this->layout()->userLang?>" href="<?=$this->url('home')?>"> - <? /* Custom finc header - CK*/ ?> + <?php /* Custom finc header - CK*/ ?> <span class="hidden-sm hidden-md hidden-lg"><?=$this->transEsc("LibraryName")?></span> <img src="<?=$this->imageLink('headerlogo.png')?>" class="hidden-xs" alt="Logo <?=$this->transEsc("LibraryName")?>" title="<?=$this->transEsc("LibraryName")?>"> - <? /* Custom finc header - END */ ?> + <?php /* Custom finc header - END */ ?> </a> </h1> </div> <div class="flex-container"> - <? if (!isset($this->layout()->renderingError)): ?> + <?php if (!isset($this->layout()->renderingError)): ?> <div class="collapse navbar-collapse right" id="header-collapse"> - <? /* finc: right-hand navbar section - see flex-container in SCSS: + <?php /* finc: right-hand navbar section - see flex-container in SCSS: we need this order on XS: navbar-right searchbox but reverse it on anything but mobile */ ?> <nav> <ul class="nav navbar-nav navbar-right flip"> - <? if ($this->feedback()->tabEnabled()): ?> + <?php if ($this->feedback()->tabEnabled()): ?> <li> <a id="feedbackLink" data-lightbox class="btn" href="<?=$this->url('feedback-home')?>"> <i class="fa fa-envelope" aria-hidden="true"></i> <span class="hidden-sm"><?=$this->transEsc("Feedback")?></span> </a> </li> - <? endif; ?> - <? $cart = $this->cart(); + <?php endif; ?> + <?php $cart = $this->cart(); if ($cart->isActive()): ?> <li id="cartSummary"> <a id="cartItems" class="btn" data-lightbox title="<?=$this->transEsc('View Book Bag')?>" href="<?=$this->url('cart-home')?>"> @@ -48,38 +48,45 @@ <span class="hidden-sm full<?=!$cart->isFull() ? ' hidden' : ''?>">(<?=$this->transEsc('bookbag_full')?>)</span> </a> </li> - <? endif; ?> - <? if (is_object($account) && $account->loginEnabled()): // hide login/logout if unavailable ?> - <li class="logoutOptions<? if (!$account->isLoggedIn()): ?> hidden<? endif ?>"> - <a class="btn" href="<?=$this->url('myresearch-home', array(), array('query' => array('redirect' => 0)))?>"> - <i class="fa fa-home" aria-hidden="true"></i> + <?php endif; ?> + <?php if (is_object($account) && $account->loginEnabled()): // hide login/logout if unavailable ?> + <li class="logoutOptions<?php if($account->dropdownEnabled()): ?> with-dropdown<?php endif ?><?php if(!$account->isLoggedIn()): ?> hidden<?php endif ?>"> + <a class="btn" href="<?=$this->url('myresearch-home', [], ['query' => ['redirect' => 0]])?>"> + <i id="account-icon" class="fa fa-home" aria-hidden="true"></i> <span class="hidden-sm"><?=$this->transEsc("Your Account")?></span> </a> </li> - - <li class="logoutOptions<? if (!$account->isLoggedIn()): ?> hidden<? endif ?>"> + <?php if($account->dropdownEnabled()): ?> + <li id="login-dropdown" class="dropdown<?php if(!$account->isLoggedIn()): ?> hidden<?php endif ?>"> + <a href="#" data-toggle="dropdown"><i class="fa fa-caret-down"></i></a> + <div class="dropdown-menu"> + <?=$this->render('myresearch/menu'); ?> + </div> + </li> + <?php endif; ?> + <li class="logoutOptions<?php if (!$account->isLoggedIn()): ?> hidden<?php endif ?>"> <a href="<?=$this->url('myresearch-logout')?>" class="logout btn" title="<?=$this->transEsc("Log Out")?>"> <i class="fa fa-sign-out" aria-hidden="true"></i> <span class="hidden-sm"><?=$this->transEsc("Log Out")?></span> </a> </li> - <li id="loginOptions"<? if ($account->isLoggedIn()): ?> class="hidden"<? endif ?>> - <? if ($account->getSessionInitiator($this->serverUrl($this->url('myresearch-home')))): ?> + <li id="loginOptions"<?php if ($account->isLoggedIn()): ?> class="hidden"<?php endif ?>> + <?php if ($account->getSessionInitiator($this->serverUrl($this->url('myresearch-home')))): ?> <a class="btn" href="<?=$this->url('myresearch-userlogin')?>"> <i class="fa fa-sign-in" aria-hidden="true"></i> <span class="hidden-sm"><?=$this->transEsc("Institutional Login")?></span> </a> - <? else: ?> + <?php else: ?> <a class="btn" href="<?=$this->url('myresearch-userlogin')?>" data-lightbox> <i class="fa fa-sign-in" aria-hidden="true"></i> <span class="hidden-sm"><?=$this->transEsc("Login")?></span> </a> - <? endif; ?> + <?php endif; ?> </li> - <? endif; ?> + <?php endif; ?> - <? if (isset($this->layout()->themeOptions) && count($this->layout()->themeOptions) > 1): ?> + <?php if (isset($this->layout()->themeOptions) && count($this->layout()->themeOptions) > 1): ?> <li class="theme dropdown"> <form method="post" name="themeForm" id="themeForm"> <input type="hidden" name="ui"/> @@ -87,16 +94,16 @@ <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?=$this->transEsc("Theme")?> <strong class="caret"></strong></a> <ul class="dropdown-menu"> - <? foreach ($this->layout()->themeOptions as $current): ?> + <?php foreach ($this->layout()->themeOptions as $current): ?> <li<?=$current['selected'] ? ' class="active"' : ''?>> <a href="#" onClick="document.themeForm.ui.value='<?=$this->escapeHtmlAttr($current['name'])?>';document.themeForm.submit()"><?=$this->transEsc($current['desc'])?></a> </li> - <? endforeach; ?> + <?php endforeach; ?> </ul> </li> - <? endif; ?> + <?php endif; ?> - <? if (isset($this->layout()->allLangs) && count($this->layout()->allLangs) > 1): ?> + <?php if (isset($this->layout()->allLangs) && count($this->layout()->allLangs) > 1): ?> <li class="language dropdown"> <form method="post" name="langForm" id="langForm"> <input type="hidden" name="mylang"/> @@ -105,29 +112,29 @@ <?=$this->transEsc("Language")?> <strong class="caret"></strong> </a> <ul id="langmenu" class="dropdown-menu"> - <? foreach ($this->layout()->allLangs as $langCode => $langName): ?> + <?php foreach ($this->layout()->allLangs as $langCode => $langName): ?> <li<?=$this->layout()->userLang == $langCode ? ' class="active"' : ''?>> <a class="btn" href="#" onClick="document.langForm.mylang.value='<?=$langCode?>';document.langForm.submit()"><?=$this->displayLanguageOption($langName)?></a> </li> - <? endforeach; ?> + <?php endforeach; ?> </ul> </li> - <? endif; ?> + <?php endif; ?> </ul> </nav> </div> - <? endif; ?> - <? /* finc searchbox: we use searchbox here so it becomes part of the sticky header, + <?php endif; ?> + <?php /* finc searchbox: we use searchbox here so it becomes part of the sticky header, we need to place this after the navbar-right for anything but mobile - see flex-container in SCSS:*/ ?> - <? if ($this->layout()->searchbox !== false): ?> + <?php if ($this->layout()->searchbox !== false): ?> <div class="search container left"> <nav class="nav searchbox hidden-print"> <?=$this->layout()->searchbox?> </nav> </div> - <? endif; ?> - <? /* finc searchbox - END */ ?> + <?php endif; ?> + <?php /* finc searchbox - END */ ?> </div> </div> -<? /* If you want to use searchbox in a separate row, insert it here as in bootstrap theme - CK */ ?> +<?php /* If you want to use searchbox in a separate row, insert it here as in bootstrap theme - CK */ ?> <!-- finc: header - END --> diff --git a/themes/finc/templates/layout/layout.phtml b/themes/finc/templates/layout/layout.phtml index c6049cff8a89d68a114fc6160dd763609360ea7e..b57ca8214570a9b4487a682fc05945b8343dbc8a 100644 --- a/themes/finc/templates/layout/layout.phtml +++ b/themes/finc/templates/layout/layout.phtml @@ -1,15 +1,15 @@ <?=$this->doctype('HTML5')?> -<html lang="<?=$this->layout()->userLang?>"> +<html lang="<?=$this->layout()->userLang?>"<?php if ($this->layout()->rtl): ?> dir="rtl"<?php endif; ?>> <head> - <? $this->headThemeResources() ?> - <? /* remove meta because of W3C Validator error - CK */ + <?php $this->headThemeResources(); ?> + <?php /* remove meta because of W3C Validator error - CK */ /* <meta charset="utf-8"> */ ?> <meta http-equiv="X-UA-Compatible" content="IE=edge"/> <meta name="viewport" content="width=device-width,initial-scale=1.0"/> <?=$this->headMeta()?> <?=$this->headTitle()?> - <? + <?php // Set up OpenSearch link: $this->headLink( [ @@ -21,12 +21,12 @@ ); ?> <!-- RTL styling --> - <? if ($this->layout()->rtl) { + <?php if ($this->layout()->rtl) { $this->headLink()->appendStylesheet('vendor/bootstrap-rtl.min.css'); } ?> <?=$this->headLink()?> <?=$this->headStyle()?> - <? + <?php if (!isset($this->renderingError)) { // Add translation strings // PDA (BELOW) is a custom finc string - CK @@ -41,6 +41,7 @@ 'collection_empty' => 'collection_empty', 'error_occurred' => 'An error has occurred', 'go_to_list' => 'go_to_list', + 'hold_available' => 'hold_available', 'libphonenumber_invalid' => 'libphonenumber_invalid', 'libphonenumber_invalidcountry' => 'libphonenumber_invalidcountry', 'libphonenumber_invalidregion' => 'libphonenumber_invalidregion', @@ -51,7 +52,7 @@ 'loading' => 'Loading', 'more' => 'more', 'number_thousands_separator' => [ - 'number_thousands_separator', null, ',' + 'number_thousands_separator', null, ',' ], 'sms_success' => 'sms_success' ] @@ -100,7 +101,7 @@ ] ); } - $this->headScript()->appendScript( + $this->headScript()->prependScript( 'var userIsLoggedIn = ' . ($this->auth()->isLoggedIn() ? 'true' : 'false') . ';' ); } @@ -111,8 +112,24 @@ . $this->keepAlive()); $this->headScript()->appendFile("keep_alive.js"); } - ?> - <? + + // If account ajax is active, load script and add language strings + $account = $this->auth()->getManager(); + if ($account->ajaxEnabled()) { + $this->headScript()->appendFile("account_ajax.js"); + $this->jsTranslations()->addStrings( + [ + 'account_has_alerts' => 'account_has_alerts', + 'Checked Out Items' => 'Checked Out Items', + 'ill_request_available' => 'ill_request_available', + 'renew_item_due_tooltip' => 'renew_item_due_tooltip', + 'renew_item_overdue_tooltip' => 'renew_item_overdue_tooltip', + 'request_in_transit' => 'request_in_transit', + 'storage_retrieval_request_available' => 'storage_retrieval_request_available' + ] + ); + } + $root = rtrim($this->url('home'), '/'); $translations = $this->jsTranslations()->getJSON(); $dsb = DEFAULT_SEARCH_BACKEND; @@ -125,8 +142,8 @@ JS; ?> <?=$this->headScript()?> </head> -<body class="template-dir-<?=$this->templateDir?> template-name-<?=$this->templateName?> <?=$this->layoutClass('offcanvas-row')?><? if ($this->layout()->rtl): ?> rtl<? endif; ?>"> -<? // Set up the search box -- there are three possible cases: +<body class="template-dir-<?=$this->templateDir?> template-name-<?=$this->templateName?> <?=$this->layoutClass('offcanvas-row')?><?php if ($this->layout()->rtl): ?> rtl<?php endif; ?>"> +<?php // Set up the search box -- there are three possible cases: // 1. No search box was set; we should default to the normal box // 2. It was set to false; we should display nothing // 3. It is set to a custom string; we should display the provided version @@ -136,41 +153,41 @@ if (!isset($this->layout()->searchbox)) { $this->layout()->searchbox = $this->render('search/searchbox.phtml'); } ?> -<? if (isset($this->layout()->srmessage)): // message for benefit of screen-reader users ?> - <span class="sr-only"><?=$this->layout()->srmessage?></span> -<? endif; ?> +<?php if (isset($this->layout()->srmessage)): // message for benefit of screen-reader users ?> + <span class="sr-only" role="heading" aria-level="1"><?=$this->layout()->srmessage?></span> +<?php endif; ?> <a class="sr-only" href="#searchslots"><?=$this->transEsc('Skip to search')?></a> <a class="sr-only" href="#content"><?=$this->transEsc('Skip to content')?></a> -<? /* Start header here, not above, custom finc, CK */ ?> +<?php /* Start header here, not above, custom finc, CK */ ?> <header class="hidden-print"> <?=$this->render('header.phtml')?> </header> <nav class="breadcrumbs"> - <? /* finc: Don't use .container here or the breadcrumbs will get a left+right padding - CK */ ?> - <? if ((!isset($this->layout()->showBreadcrumbs) || $this->layout()->showBreadcrumbs == true) + <?php /* finc: DON'T use .container here or the breadcrumbs will get a left+right padding - CK */ ?> + <?php if ((!isset($this->layout()->showBreadcrumbs) || $this->layout()->showBreadcrumbs == true) && !empty($this->layout()->breadcrumbs) && $this->layout()->breadcrumbs !== false ): ?> <ul class="breadcrumb large-centered hidden-xs hidden-print"> - <? if (is_array($this->layout()->breadcrumbs)): ?> - <? if (count($this->layout()->breadcrumbs) > 1): ?> + <?php if (is_array($this->layout()->breadcrumbs)): ?> + <?php if (count($this->layout()->breadcrumbs) > 1): ?> <?=$this->render('breadcrumbs/multi.phtml', [ 'parents' => $this->layout()->breadcrumbs, 'title' => $this->layout()->title, 'from' => $this->layout()->from ])?> - <? else: ?> + <?php else: ?> <?=$this->render('breadcrumbs/default.phtml', [ 'parents' => $this->layout()->breadcrumbs, 'title' => $this->layout()->title ])?> - <? endif; ?> - <? else: ?> + <?php endif; ?> + <?php else: ?> <?=$this->layout()->breadcrumbs?> - <? endif; ?> + <?php endif; ?> </ul> - <? endif; ?> + <?php endif; ?> </nav> <div role="main" class="main"> <div id="content" class="container"> @@ -182,7 +199,7 @@ if (!isset($this->layout()->searchbox)) { <!-- MODAL IN CASE WE NEED ONE --> -<? /* remove aria-hidden attr via JS, move X button to logical pos. in structure + make accessible via tab */ ?> +<?php /* move X button to logical pos. in structure + make accessible via tab - CK */ ?> <div id="modal" class="modal fade hidden-print" tabindex="-1" role="dialog" aria-modal="true" aria-labelledby="modalTitle" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> @@ -194,19 +211,13 @@ if (!isset($this->layout()->searchbox)) { </div> </div> </div> - -<div class="offcanvas-toggle" data-toggle="offcanvas" tabindex="0"> - <i class="fa" title="<?=$this->transEsc('sidebar_expand')?>"></i> - <span class="sr-only"><?=$this->transEsc('sidebar_expand')?></span> -</div> - <div class="offcanvas-overlay" data-toggle="offcanvas"></div> <?=$this->googleanalytics()?> <?=$this->piwik()?> -<? if ($this->recaptcha()->active()): ?> +<?php if ($this->recaptcha()->active()): ?> <?=$this->inlineScript(\Zend\View\Helper\HeadScript::FILE, "https://www.google.com/recaptcha/api.js?onload=recaptchaOnLoad&render=explicit&hl=" . $this->layout()->userLang, 'SET')?> -<? endif; ?> -<? /* Enable Tooltips, finc-specific, CK */ ?> +<?php endif; ?> +<?php /* Enable Tooltips, finc-specific, CK */ ?> <script type="text/javascript"> $(document).ready(function () { $("body").tooltip({selector: '[data-toggle=tooltip]'}); diff --git a/themes/finc/templates/librarycards/home.phtml b/themes/finc/templates/librarycards/home.phtml index 7e91e653ec6593d1f230297a8986120847ab933a..2222c350f3208df6d2a77cc98fefc88ee86bb355 100644 --- a/themes/finc/templates/librarycards/home.phtml +++ b/themes/finc/templates/librarycards/home.phtml @@ -1,5 +1,5 @@ <!-- find: librarycards - home --> -<? +<?php // Set up page title: $this->headTitle($this->translate('Library Cards')); @@ -11,32 +11,31 @@ <?=$this->flashmessages()?> <h2><?=$this->transEsc('Library Cards')?></h2> - <? if ($this->libraryCards->count() == 0): ?> + <?php if ($this->libraryCards->count() == 0): ?> <div><?=$this->transEsc('You do not have any library cards')?></div> - <? else: ?> + <?php else: ?> <table class="table table-striped"> - <? /* Table summary not supported in html5, custom-finc solution, CK */?> <caption class="sr-only"> <?=$this->transEsc('Library Cards')?> </caption> <tr> <th><?=$this->transEsc('Library Card Name')?></th> - <? if ($this->multipleTargets): ?> + <?php if ($this->multipleTargets): ?> <th><?=$this->transEsc('login_target')?></th> - <? endif; ?> + <?php endif; ?> <th><?=$this->transEsc('Username')?></th> <th> </th> </tr> - <? foreach ($this->libraryCards as $record): ?> + <?php foreach ($this->libraryCards as $record): ?> <tr> <td><?=$this->escapeHtml($record['card_name'])?></td> - <? $username = $record['cat_username']; if ($this->multipleTargets): ?> - <? $target = ''; ?> - <? if (strstr($username, '.')): ?> - <? list($target, $username) = explode('.', $username, 2); ?> - <? endif; ?> + <?php $username = $record['cat_username']; if ($this->multipleTargets): ?> + <?php $target = ''; ?> + <?php if (strstr($username, '.')): ?> + <?php list($target, $username) = explode('.', $username, 2); ?> + <?php endif; ?> <td><?=$target ? $this->transEsc("source_$target", null, $target) : ' ' ?></td> - <? endif; ?> + <?php endif; ?> <td><?=$this->escapeHtml($username)?></td> <td> <div class="btn-group"> @@ -51,9 +50,9 @@ </div> </td> </tr> - <? endforeach; ?> + <?php endforeach; ?> </table> - <? endif; ?> + <?php endif; ?> <div class="btn-group"> <a href="<?=$this->url('editLibraryCard') ?>NEW" class="btn btn-link"><i class="fa fa-edit" aria-hidden="true"></i> <?=$this->transEsc('Add a Library Card')?></a> diff --git a/themes/finc/templates/myresearch/acquisition.phtml b/themes/finc/templates/myresearch/acquisition.phtml index 397ad8a0f7c8b886e32972774885b8ffcac89f75..4df9804f49bc335983f09aa2bef790c3546b288c 100644 --- a/themes/finc/templates/myresearch/acquisition.phtml +++ b/themes/finc/templates/myresearch/acquisition.phtml @@ -1,5 +1,5 @@ <!-- finc: myresearch - acquisition --> -<? +<?php // Set up page title: $this->headTitle($this->translate('PDA::pda_form_title')); @@ -11,25 +11,24 @@ $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . <h2><?=$this->transEsc('PDA::pda_form_subtitle')?></h2> <?=$this->flashmessages()?> <form method="post" action="" name="acquisitionForm"> - <h6><?=$this->transEsc('PDA::pda_form_suggestions_limit')?></h6> + <h3><?=$this->transEsc('PDA::pda_form_suggestions_limit')?></h3> <div class="form-group"> <label class="control-label" for="subject"><?=$this->transEsc('PDA::pda_form_field_of_study_label')?><span class="required">*</span></label> <select name="field_of_study" class="form-control" id="subject"> - <option value="-1"><?=$this->transEsc('PDA::pda_form_field_of_study_text')?></option> - <? if (isset($fieldOfStudyList) && is_array($fieldOfStudyList)): ?> - <? foreach ($fieldOfStudyList as $fieldOfStudy): ?> - <option - value="<?=$fieldOfStudy?>" <? if (isset($acquisitionFieldOfStudy) && ($acquisitionFieldOfStudy != '-1') && ($acquisitionFieldOfStudy == $fieldOfStudy)): ?> selected="selected"<? endif; ?>><?=$this->transEsc('PDA::fos_' . $fieldOfStudy)?></option> - <? endforeach; ?> - <? endif; ?> - </select> - </div> + <option value="-1"><?=$this->transEsc('PDA::pda_form_field_of_study_text')?></option> + <?php if (isset($fieldOfStudyList) && is_array($fieldOfStudyList)): ?> + <?php foreach ($fieldOfStudyList as $fieldOfStudy): ?> + <option value="<?=$fieldOfStudy?>" <?php if (isset($acquisitionFieldOfStudy) && ($acquisitionFieldOfStudy != '-1') && ($acquisitionFieldOfStudy == $fieldOfStudy)): ?> selected="selected"<?php endif; ?>><?=$this->transEsc('PDA::fos_' . $fieldOfStudy)?></option> + <?php endforeach; ?> + <?php endif; ?> + </select> + </div> <div class="form-group"> <label class="control-label" for="acquistion_reasons"><?=$this->transEsc('PDA::pda_form_statement_label')?><span class="required">*</span></label> <textarea id="acquisition_reasons" type="text" cols="50" rows="5" name="reasons" class="form-control"><?=(isset($acquisitionStatement) && !empty($acquisitionStatement)) ? $acquisitionStatement : ''?></textarea> - </div> + </div> <div class="form-group"> <label class="control-label" for="acquistion_proposal"><?=$this->transEsc('PDA::pda_form_proposal_label')?><span class="required">*</span></label> @@ -37,12 +36,12 @@ $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . </div> <div class="form-group"> - <input class="btn btn-primary" type="submit" name="submit" value="<?=$this->transEsc('Submit')?>"/> - </div> + <input class="btn btn-primary" type="submit" name="submit" value="<?=$this->transEsc('Submit')?>"/> + </div> <div class="form-group"> - <?=$this->transEsc('PDA::note_mandatory_fields')?> - </div> + <?=$this->transEsc('PDA::note_mandatory_fields')?> + </div> </form> </div> <div class="<?=$this->layoutClass('sidebar')?>"> diff --git a/themes/finc/templates/myresearch/bulk-action-buttons.phtml b/themes/finc/templates/myresearch/bulk-action-buttons.phtml index 4a93b70dac51f20089f3c3e9fc40ae54113ee380..2fbc71203667d4549ef23e775b7f9cd8fcf04794 100644 --- a/themes/finc/templates/myresearch/bulk-action-buttons.phtml +++ b/themes/finc/templates/myresearch/bulk-action-buttons.phtml @@ -1,29 +1,29 @@ <!-- finc: myresearch - bulkactionbuttons --> -<? if (isset($list)): ?> +<?php if (isset($list)): ?> <input type="hidden" name="listID" value="<?=$this->escapeHtmlAttr($list->id)?>"/> <input type="hidden" name="listName" value="<?=$this->escapeHtmlAttr($list->title)?>"/> -<? endif; ?> -<? $user = $this->auth()->isLoggedIn(); ?> +<?php endif; ?> +<?php $user = $this->auth()->isLoggedIn(); ?> <div class="bulkActionButtons hidden-print"> <div class="bulk-checkbox"> <input type="checkbox" name="selectAll" class="checkbox-select-all" id="myresearchCheckAll"/> <label for="myresearchCheckAll"><?=$this->transEsc('select_page')?> | <?=$this->transEsc('with_selected')?>:</label> </div> - <? /* Keep bulk-action-buttons class, finc-specific SCSS, CK */ ?> + <?php /* Keep bulk-action-buttons class, finc-specific SCSS, CK */ ?> <div class="btn-group bulk-action-buttons hidden-print"> <input class="btn btn-transparent" type="submit" name="email" value="<?=$this->transEsc('Email')?>" title="<?=$this->transEsc('email_selected')?>"/> - <? if ((!is_null($this->list) && $this->list->editAllowed($user)) || is_null($this->list) && $user): ?> + <?php if ((null !== $this->list && $this->list->editAllowed($user)) || null === $this->list && $user): ?> <input class="btn btn-transparent" id="<?=$this->idPrefix?>delete_list_items_<?=!is_null($this->list) ? $this->escapeHtmlAttr($this->list->id) : ''?>" type="submit" name="delete" value="<?=$this->transEsc('Delete')?>" title="<?=$this->transEsc('delete_selected')?>"/> - <? endif; ?> - <? $exportOptions = $this->export()->getActiveFormats('bulk'); + <?php endif; ?> + <?php $exportOptions = $this->export()->getActiveFormats('bulk'); if (count($exportOptions) > 0): ?> <input class="btn btn-transparent" type="submit" name="export" value="<?=$this->transEsc('Export')?>" title="<?=$this->transEsc('export_selected')?>"/> - <? endif; ?> + <?php endif; ?> <input class="btn btn-transparent" type="submit" name="print" value="<?=$this->transEsc('Print')?>" title="<?=$this->transEsc('print_selected')?>" data-lightbox-ignore/> - <? if ($this->cart()->isActive()): ?> + <?php if ($this->cart()->isActive()): ?> <input class="btn btn-transparent" id="<?=$this->idPrefix?>updateCart" type="submit" name="add" value="<?=$this->transEsc('Add to Book Bag')?>"/> - <? endif; ?> + <?php endif; ?> </div> </div> <!-- finc: myresearch - bulkactionbuttons - END --> diff --git a/themes/finc/templates/myresearch/editlist.phtml b/themes/finc/templates/myresearch/editlist.phtml deleted file mode 100644 index 368287f0b11e61c21e811bb77df939eee4af2251..0000000000000000000000000000000000000000 --- a/themes/finc/templates/myresearch/editlist.phtml +++ /dev/null @@ -1,49 +0,0 @@ -<!-- finc: myresearch - editlist --> -<? - // Set up page title: - $pageTitle = empty($this->list->id) ? 'Create a List' : "edit_list"; - $this->headTitle($this->translate($pageTitle)); - - // Set up breadcrumbs: - $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li>' - . '<li>' . $this->transEsc($pageTitle) . '</li>'; -?> - -<?=$this->flashmessages()?> - -<h2><?=$this->transEsc($pageTitle); ?></h2> - -<form class="form-edit-list" method="post" name="<?=empty($this->list->id) ? 'newList' : 'editListForm'?>"> - <input type="hidden" name="id" value="<?=empty($this->list->id) ? 'NEW' : $this->list->id ?>"/> - <div class="form-group"> - <label class="control-label" for="list_title"><?=$this->transEsc('List'); ?>:</label> - <input id="list_title" class="form-control" type="text" name="title" value="<?=isset($this->list['title']) ? $this->escapeHtml($this->list['title']) : ''?>"/> - </div> - <div class="form-group"> - <label class="control-label" for="list_desc"><?=$this->transEsc('Description') ?></label> - <textarea id="list_desc" class="form-control" name="desc" rows="3"><?=isset($this->list['description']) ? $this->escapeHtml($this->list['description']) : ''?></textarea> - </div> - <? if ($this->userlist()->getMode() === 'public_only'): ?> - <input type="hidden" name="public" value="1" /> - <? elseif ($this->userlist()->getMode() === 'private_only'): ?> - <input type="hidden" name="public" value="0" /> - <? else: ?> - <div class="form-group"> - <label class="control-label"><?=$this->transEsc('Access') ?></label> - <div class="radio"> - <label class="control-label"> - <input id="list_public_1" type="radio" name="public" value="1"<? if ($this->list->isPublic()): ?> checked="checked"<? endif; ?>/> <?=$this->transEsc('Public') ?> - </label> - </div> - <div class="radio"> - <label class="control-label"> - <input id="list_public_0" type="radio" name="public" value="0"<? if (!$this->list->isPublic()): ?> checked="checked"<? endif; ?>/> <?=$this->transEsc('Private') ?> - </label> - </div> - </div> - <? endif; ?> - <div class="form-group"> - <input class="btn btn-primary" type="submit" name="submit" value="<?=$this->transEsc('Save') ?>"/> - </div> -</form> -<!-- finc: myresearch - editlist - END --> diff --git a/themes/finc/templates/myresearch/fines.phtml b/themes/finc/templates/myresearch/fines.phtml deleted file mode 100644 index d400c1d69e47e2defbaf0c8c68d7728f7d998aa6..0000000000000000000000000000000000000000 --- a/themes/finc/templates/myresearch/fines.phtml +++ /dev/null @@ -1,59 +0,0 @@ -<!-- finc: myresearch - fines --> -<? - // Set up page title: - $this->headTitle($this->translate('My Fines')); - - // Set up breadcrumbs: - $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li> <li class="active">' . $this->transEsc('Fines') . '</li>'; -?> -<div class="<?=$this->layoutClass('mainbody')?>"> - <h2><?=$this->transEsc('Your Fines')?></h2> - <?=$this->flashmessages()?> - - <?=$this->context($this)->renderInContext('librarycards/selectcard.phtml', ['user' => $this->auth()->isLoggedIn()]); ?> - - <? if (empty($this->fines)): ?> - <?=$this->transEsc('You do not have any fines')?> - <? else: ?> - <table class="table table-striped"> - <? /* Table summary not supported in html 5, finc-specific solution, CK */ ?> - <caption class="sr-only"> - <?=$this->transEsc('Your Fines')?> - </caption> - <tr> - <th><?=$this->transEsc('Title')?></th> - <th><?=$this->transEsc('Checked Out')?></th> - <th><?=$this->transEsc('Due Date')?></th> - <th><?=$this->transEsc('Fine')?></th> - <th><?=$this->transEsc('Fee')?></th> - <th><?=$this->transEsc('Balance')?></th> - </tr> - <? $totalDue = 0; ?> - <? foreach ($this->fines as $record): ?> - <tr> - <td> - <? if (empty($record['title'])): ?> - <?=$this->transEsc('not_applicable')?> - <? elseif (!isset($record['driver']) || !is_object($record['driver'])): ?> - <?=$this->escapeHtml(trim($record['title'], '/:'))?> - <? else: ?> - <a href="<?=$this->recordLink()->getUrl($record['driver'])?>"><?=$this->escapeHtml(trim($record['title'], '/:'))?></a> - <? endif; ?> - </td> - <td><?=isset($record['checkout']) ? $this->escapeHtml($record['checkout']) : ''?></td> - <td><?=isset($record['duedate']) ? $this->escapeHtml($record['duedate']) : ''?></td> - <td><?=isset($record['fine']) ? $this->escapeHtml($record['fine']) : ''?></td> - <td><?=isset($record['amount']) ? $this->safeMoneyFormat($record['amount']/100.00) : ''?></td> - <td><?=isset($record['balance']) ? $this->safeMoneyFormat($record['balance']/100.00) : ''?></td> - </tr> - <? $totalDue += $record['balance']; ?> - <? endforeach; ?> - <tr style="font-weight:bold"><td colspan="5"><?=$this->transEsc('Total Balance Due')?></td><td><?=$this->safeMoneyFormat($totalDue/100.00) ?></td></tr> - </table> - <? endif; ?> -</div> - -<div class="<?=$this->layoutClass('sidebar')?>"> - <?=$this->context($this)->renderInContext("myresearch/menu.phtml", ['active' => 'fines'])?> -</div> -<!-- finc: myresearch - fines - END --> diff --git a/themes/finc/templates/myresearch/menu.phtml b/themes/finc/templates/myresearch/menu.phtml index 5834d440699950351f210403205992d26f0b9407..540876002894e0f2b6aa196e9d63c7c8027e8d54 100644 --- a/themes/finc/templates/myresearch/menu.phtml +++ b/themes/finc/templates/myresearch/menu.phtml @@ -1,121 +1,122 @@ <!-- finc: myresearch - menu --> +<?php +$user = $this->auth()->isLoggedIn(); +$patron = $user ? $this->auth()->getILSPatron() : false; +$capabilityParams = $patron ? ['patron' => $patron] : []; +?> <h4><?=$this->transEsc('Your Account')?></h4> -<? /* finc needs to add .facet-group class and classes on sub items for borders - CK */ ?> -<div class="myresearch-menu facet-group"> - <? if ($this->userlist()->getMode() !== 'disabled'): ?> - - <a href="<?=$this->url('myresearch-favorites')?>"<?=$this->active == 'favorites' ? ' class="active"' : ''?>> - <i class="fa fa-fw fa-star" aria-hidden="true"></i> <?=$this->transEsc('Favorites')?> - </a> - - <? endif; ?> - <? if ('ils-none' !== $this->ils()->getOfflineMode()): ?> - <? if ($this->ils()->checkCapability('getMyTransactions')): ?> - - <a href="<?=$this->url('myresearch-checkedout')?>"<?=$this->active == 'checkedout' ? ' class="active"' : ''?>> - <i class="fa fa-fw fa-book" aria-hidden="true"></i> <?=$this->transEsc('Checked Out Items')?> - <? /* nxt line finc specific - CK */ ?> - <span id="getMyTransactions" class="itemCount pull-right no-padding"></span> - </a> - <? endif; ?> - <? if ($this->ils()->checkCapability('getMyHolds')): ?> - - <a href="<?=$this->url('myresearch-holds')?>"<?=$this->active == 'holds' ? ' class="active"' : ''?>> - <i class="fa fa-fw fa-flag" aria-hidden="true"></i> <?=$this->transEsc('Holds and Recalls')?> - <? /* nxt line finc specific - CK */ ?> - <span id="getMyHolds" class="itemCount pull-right no-padding"></span> - </a> - - <? endif; ?> - <? if ($this->ils()->checkFunction('StorageRetrievalRequests')): ?> - - <a href="<?=$this->url('myresearch-storageretrievalrequests')?>"<?=$this->active == 'storageRetrievalRequests' ? ' class="active"' : ''?>> - <i class="fa fa-fw fa-archive" aria-hidden="true"></i> <?=$this->transEsc('Storage Retrieval Requests')?> - <? /* nxt line finc specific - CK */ ?> - <span id="getMyStorageRetrievalRequests" class="itemCount pull-right no-padding"></span> - </a> - - <? endif; ?> - <? if ($this->ils()->checkFunction('ILLRequests')): ?> +<?php /* finc needs to add .facet-group class and classes on sub items for borders - CK */ ?> +<div class="myresearch-menu account-menu facet-group"> + <?php if ($this->userlist()->getMode() !== 'disabled'): ?> - <a href="<?=$this->url('myresearch-illrequests')?>"<?=$this->active == 'ILLRequests' ? ' class="active"' : ''?>> - <i class="fa fa-fw fa-exchange" aria-hidden="true"></i> <?=$this->transEsc('Interlibrary Loan Requests')?> - <? /* nxt line finc specific - CK */ ?> - <span id="getMyILLRequests" class="itemCount pull-right no-padding"></span> - </a> - - <? endif; ?> - <? if ($this->ils()->checkCapability('getMyFines')): ?> - - <a href="<?=$this->url('myresearch-fines')?>"<?=$this->active == 'fines' ? ' class="active"' : ''?>> - <i class="fa fa-fw fa-usd" aria-hidden="true"></i> <?=$this->transEsc('Fines')?> - </a> - - <? endif; ?> - <? if ($this->ils()->checkCapability('getMyProfile')): ?> - - <a href="<?=$this->url('myresearch-profile')?>"<?=$this->active == 'profile' ? ' class="active"' : ''?>> - <i class="fa fa-fw fa-user" aria-hidden="true"></i> <?=$this->transEsc('Profile')?> - </a> - - <? endif; ?> - <? $user = $this->auth()->isLoggedIn(); - if ($user && $user->libraryCardsEnabled()): ?> - - <a href="<?=$this->url('librarycards-home')?>"<?=$this->active == 'librarycards' ? ' class="active"' : ''?>> - <i class="fa fa-fw fa-barcode" aria-hidden="true"></i> <?=$this->transEsc('Library Cards')?> - </a> + <a href="<?=$this->url('myresearch-favorites')?>"<?=$this->active == 'favorites' ? ' class="active"' : ''?>> + <i class="fa fa-fw fa-star" aria-hidden="true"></i> <?=$this->transEsc('Favorites')?> + </a> - <? endif; ?> - <? endif; ?> - <? if ($this->accountCapabilities()->getSavedSearchSetting() === 'enabled'): ?> + <?php endif; ?> + <?php if ('ils-none' !== $this->ils()->getOfflineMode()): ?> + <?php if ($this->ils()->checkCapability('getMyTransactions', $capabilityParams)): ?> - <a href="<?=$this->url('search-history')?>?require_login"<?=$this->active == 'history' ? ' class="active"' : ''?>> - <i class="fa fa-fw fa-search" aria-hidden="true"></i> <?=$this->transEsc('history_saved_searches')?> + <a href="<?=$this->url('myresearch-checkedout')?>" class="flex checkedout<?=$this->active == 'checkedout' ? ' active' : ''?>"> + <span class="flex-col"><i class="fa fa-fw fa-book" aria-hidden="true"></i> <?=$this->transEsc('Checked Out Items')?></span> + <span class="checkedout-status status hidden"><i class="fa fa-spin fa-spinner" aria-hidden="true"></i></span> + <?php /* nxt line finc specific - CK */ ?> + <span id="getMyTransactions" class="itemCount pull-right no-padding"></span> + </a> + <?php endif; ?> + <?php if ($this->ils()->checkFunction('getMyTransactionHistory', $capabilityParams)): ?> + <a href="<?=$this->url('myresearch-historicloans')?>"<?=$this->active == 'historicloans' ? ' class="active"' : ''?>> + <i class="fa fa-fw fa-history" aria-hidden="true"></i> <?=$this->transEsc('Loan History')?> + </a> + <?php endif; ?> + <?php if ($this->ils()->checkCapability('getMyHolds', $capabilityParams)): ?> + + <a href="<?=$this->url('myresearch-holds')?>" class="flex<?=$this->active == 'holds' ? ' active' : ''?>"> + <span class="flex-col"><i class="fa fa-fw fa-flag" aria-hidden="true"></i> <?=$this->transEsc('Holds and Recalls')?></span> + <span class="holds-status status hidden"><i class="fa fa-spin fa-spinner" aria-hidden="true"></i></span> + <?php /* nxt line finc specific - CK */ ?> + <span id="getMyHolds" class="itemCount pull-right no-padding"></span> + </a> + <?php endif; ?> + <?php if ($this->ils()->checkFunction('StorageRetrievalRequests', $capabilityParams)): ?> + + <a href="<?=$this->url('myresearch-storageretrievalrequests')?>" class="flex<?=$this->active == 'storageRetrievalRequests' ? ' active' : ''?>"> + <span class="flex-col"><i class="fa fa-fw fa-archive" aria-hidden="true"></i> <?=$this->transEsc('Storage Retrieval Requests')?></span> + <span class="storageretrievalrequests-status status hidden"><i class="fa fa-spin fa-spinner" aria-hidden="true"></i></span> + <?php /* nxt line finc specific - CK */ ?> + <span id="getMyStorageRetrievalRequests" class="itemCount pull-right no-padding"></span> + </a> + <?php endif; ?> + <?php if ($this->ils()->checkFunction('ILLRequests', $capabilityParams)): ?> + + <a href="<?=$this->url('myresearch-illrequests')?>" class="flex<?=$this->active == 'ILLRequests' ? ' active' : ''?>"> + <span class="flex-col"><i class="fa fa-fw fa-exchange" aria-hidden="true"></i> <?=$this->transEsc('Interlibrary Loan Requests')?></span> + <span class="illrequests-status status hidden"><i class="fa fa-spin fa-spinner" aria-hidden="true"></i></span> + <?php /* nxt line finc specific - CK */ ?> + <span id="getMyILLRequests" class="itemCount pull-right no-padding"></span> </a> - <? endif; ?> - <? if ($user = $this->auth()->isLoggedIn()): ?> + <?php endif; ?> + <?php if ($this->ils()->checkCapability('getMyFines', $capabilityParams)): ?> + <a href="<?=$this->url('myresearch-fines')?>" class="flex<?=$this->active == 'fines' ? ' active' : ''?>"> + <span class="flex-col"><i class="fa fa-fw fa-usd" aria-hidden="true"></i> <?=$this->transEsc('Fines')?></span> + <span class="fines-status status hidden"><i class="fa fa-spin fa-spinner" aria-hidden="true"></i></span> + </a> + <?php endif; ?> + <a href="<?=$this->url('myresearch-profile')?>"<?=$this->active == 'profile' ? ' class="active"' : ''?>> + <i class="fa fa-fw fa-user" aria-hidden="true"></i> <?=$this->transEsc('Profile')?> + </a> + <?php if ($user && $user->libraryCardsEnabled()): ?> + <a href="<?=$this->url('librarycards-home')?>"<?=$this->active == 'librarycards' ? ' class="active"' : ''?>> + <i class="fa fa-fw fa-barcode" aria-hidden="true"></i> <?=$this->transEsc('Library Cards')?> + </a> + <?php endif; ?> + <?php endif; ?> + <?php if ($this->accountCapabilities()->getSavedSearchSetting() === 'enabled'): ?> + <a href="<?=$this->url('search-history')?>?require_login"<?=$this->active == 'history' ? ' class="active"' : ''?>> + <i class="fa fa-fw fa-search" aria-hidden="true"></i> <?=$this->transEsc('history_saved_searches')?> + </a> + <?php endif; ?> + <?php if ($user): ?> <a href="<?=$this->url('myresearch-logout')?>"> <i class="fa fa-fw fa-sign-out" aria-hidden="true"></i> <?=$this->transEsc("Log Out")?> </a> - <? endif; ?> + <?php endif; ?> </div> -<? if ($this->auth()->isLoggedIn() && $this->auth()->getManager()->supportsPasswordChange()): ?> + +<?php if ($this->auth()->isLoggedIn() && $this->auth()->getManager()->supportsPasswordChange()): ?> <h4><?=$this->transEsc('Preferences')?></h4> <div class="myresearch-menu facet-group"> - <a href="<?=$this->url('myresearch-changepassword')?>"<?=$this->active == 'newpassword' ? ' class="active"' : ''?>> <i class="fa fa-fw fa-lock" aria-hidden="true"></i> <?=$this->transEsc('Change Password')?> </a> - </div> -<? endif; ?> -<? if ($this->userlist()->getMode() !== 'disabled' && $user = $this->auth()->isLoggedIn()): ?> +<?php endif; ?> + +<?php if ($user && $this->userlist()->getMode() !== 'disabled'): ?> <h4><?=$this->transEsc('Your Lists')?></h4> <div class="myresearch-menu facet-group"> - <a href="<?=$this->url('myresearch-favorites')?>"<?=$this->active == 'favorites' ? ' class="active"' : ''?>> <i class="fa fa-fw fa-star" aria-hidden="true"></i> <?=$this->transEsc('Your Favorites')?> </a> - <? $lists = $user->getLists() ?> - <? foreach ($lists as $list): ?> - <? /* finc: keep icon inside + keep braces in badge!; CK*/ ?> + <?php $lists = $user->getLists() ?> + <?php foreach ($lists as $list): ?> + <?php /* finc: keep icon inside + keep braces in badge!; CK*/ ?> <a href="<?=$this->url('userList', ['id' => $list['id']])?>"<?=$this->active == 'list' . $list['id'] ? ' class="active"' : ''?>> <i class="fa fa-fw fa-star-o" aria-hidden="true"></i> <?=$this->escapeHtml($list['title'])?> <span class="badge">(<?=$list->cnt?>)</span> </a> - <? endforeach; ?> + <?php endforeach; ?> <a href="<?=$this->url('editList', ['id' => 'NEW'])?>"> <i class="fa fa-fw fa-plus" aria-hidden="true"></i> <?=$this->transEsc('Create a List')?> </a> </div> -<? endif ?> -<? /* finc: This script is finc-specific - CK */ ?> -<? $script = <<<JS +<?php endif ?> +<?php /* finc: This script is finc-specific - CK */ ?> +<?php $script = <<<JS $(document).ready(function () { countables = new Array; $('.itemCount').each(function() { diff --git a/themes/finc/templates/myresearch/mylist.phtml b/themes/finc/templates/myresearch/mylist.phtml index e6b0196374561eea865038fa427ca26a535709f3..16a97100b770982188891fe6cea499a17f8c2f56 100644 --- a/themes/finc/templates/myresearch/mylist.phtml +++ b/themes/finc/templates/myresearch/mylist.phtml @@ -1,5 +1,5 @@ <!-- finc: myresearch - mylist --> -<? +<?php // Grab list object from search results (if applicable): $list = $this->results->getListObject(); @@ -32,8 +32,8 @@ $user = $this->auth()->isLoggedIn(); <h2><?=$list ? $this->escapeHtml($list->title) : $this->transEsc("Your Favorites")?></h2> <nav class="search-header hidden-print"> <div class="search-stats"> - <? if ($recordTotal > 0): ?> - <? + <?php if ($recordTotal > 0): ?> + <?php $transParams = [ '%%start%%' => $this->localizedNumber($this->results->getStartRecord()), '%%end%%' => $this->localizedNumber($this->results->getEndRecord()), @@ -41,11 +41,11 @@ $user = $this->auth()->isLoggedIn(); ]; ?> <?=$this->translate('showing_items_of_html', $transParams);?> - <? endif; ?> + <?php endif; ?> </div> <div class="search-controls"> - <? if (isset($list)): ?> - <? if ($list->editAllowed($account->isLoggedIn())): ?> + <?php if (isset($list)): ?> + <?php if ($list->editAllowed($account->isLoggedIn())): ?> <a href="<?=$this->url('editList', ['id' => $list->id])?>" class="btn btn-link"><i class="fa fa-edit" aria-hidden="true"></i> <?=$this->transEsc("edit_list")?></a> <div class="btn-group"> <a class="btn btn-link dropdown-toggle" data-toggle="dropdown" href="<?=$this->url('myresearch-deletelist')?>?listID=<?=urlencode($list->id)?>"> @@ -56,38 +56,38 @@ $user = $this->auth()->isLoggedIn(); <li><a href="#"><?=$this->transEsc('confirm_dialog_no')?></a></li> </ul> </div> - <? endif; ?> - <? endif; ?> - <? if ($recordTotal > 0): ?> + <?php endif; ?> + <?php endif; ?> + <?php if ($recordTotal > 0): ?> <?=$this->render('search/controls/limit.phtml')?> <?=$this->render('search/controls/sort.phtml')?> - <? endif; ?> + <?php endif; ?> </div> </nav> - <? if ($list && !empty($list->description)): ?> + <?php if ($list && !empty($list->description)): ?> <p><?=$this->escapeHtml($list->description)?></p> - <? endif; ?> - <? if ($recordTotal > 0): ?> + <?php endif; ?> + <?php if ($recordTotal > 0): ?> <form class="form-inline" method="post" name="bulkActionForm" action="<?=$this->url('cart-myresearchbulk')?>" data-lightbox data-lightbox-onsubmit="bulkFormHandler"> - <?=$this->context($this)->renderInContext('myresearch/bulk-action-buttons.phtml', ['idPrefix' => '', 'list' => isset($list) ? $list : null, 'account' => $this->account])?> - <? foreach ($this->results->getResults() as $i => $current): ?> + <?=$this->context($this)->renderInContext('myresearch/bulk-action-buttons.phtml', ['idPrefix' => '', 'list' => $list ?? null, 'account' => $this->account])?> + <?php foreach ($this->results->getResults() as $i => $current): ?> <?=$this->record($current)->getListEntry($list, $user)?> - <? endforeach; ?> + <?php endforeach; ?> </form> <?=$this->paginationControl($this->results->getPaginator(), 'Sliding', 'search/pagination.phtml', ['results' => $this->results])?> - <? else: ?> + <?php else: ?> <p><?=$this->transEsc('You do not have any saved resources')?></p> - <? endif; ?> + <?php endif; ?> </div> <div class="<?=$this->layoutClass('sidebar')?>"> - <? /* nxt-line and related endif are finc-specific #12053, CK*/ ?> - <? if ($user): ?> + <?php /* nxt-line and related endif are finc-specific #12053, CK*/ ?> + <?php if ($user): ?> <?=$this->context($this)->renderInContext("myresearch/menu.phtml", ['active' => isset($list) ? 'list' . $list['id'] : 'favorites'])?> - <? endif; ?> - <? foreach ($this->results->getRecommendations('side') as $current): ?> + <?php endif; ?> + <?php foreach ($this->results->getRecommendations('side') as $current): ?> <?=$this->recommend($current)?> - <? endforeach; ?> + <?php endforeach; ?> </div> <!-- finc: myresearch - mylist - END --> \ No newline at end of file diff --git a/themes/finc/templates/myresearch/profile.phtml b/themes/finc/templates/myresearch/profile.phtml index 64e929fd9cb28f4dd68fd37997eb662a9c020f51..23a563176f250ea6d5eb7e388fe4089b3a036762 100644 --- a/themes/finc/templates/myresearch/profile.phtml +++ b/themes/finc/templates/myresearch/profile.phtml @@ -1,14 +1,11 @@ <!-- finc: myresearch - profile --> -<? +<?php // Set up page title: $this->headTitle($this->translate('My Profile')); // Set up breadcrumbs: $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li> <li class="active">' . $this->transEsc('Profile') . '</li>'; -// Only display home library form if we have multiple pickup locations: -$showHomeLibForm = (isset($this->pickup) && count($this->pickup) > 1); - // Template for use by the renderArray helper: $arrTemplate = '<tr><th>%%LABEL%%:</th><td> %%VALUE%%</td></tr>'; ?> @@ -17,54 +14,78 @@ $arrTemplate = '<tr><th>%%LABEL%%:</th><td> %%VALUE%%</td></tr>'; <h2><?=$this->transEsc('Your Profile')?></h2> <?=$this->flashmessages();?> - <?=$this->context($this)->renderInContext('librarycards/selectcard.phtml', ['user' => $this->auth()->isLoggedIn()]); ?> - <table class="table table-striped"> - <? - echo $this->renderArray( - $arrTemplate, $this->profile, + <?=$this->renderArray( + $arrTemplate, $this->user, [ $this->transEsc('First Name') => 'firstname', - $this->transEsc('Last Name') => 'lastname' + $this->transEsc('Last Name') => 'lastname', + // finc: show e-mail in table below + // $this->transEsc('Email') => 'email', ] - ); - ?> - <? if ($showHomeLibForm): ?> - <tr> - <th><?=$this->transEsc('Preferred Library')?>:</th> - <? - $selected = (isset($this->profile['home_library']) && $this->profile['home_library'] != "") + )?> + <?php if (count($this->pickup ?? []) > 1): // Skip form if only one location: ?> + <tr><th><?=$this->transEsc('Preferred Library')?>:</th> + <?php + $selected = (strlen($this->profile['home_library'] ?? '') > 0) ? $this->profile['home_library'] : $this->defaultPickupLocation ?> <td> <form id="profile_form" class="form-inline" method="post"> <select id="home_library" name="home_library" class="form-control"> - <? foreach ($this->pickup as $lib): ?> + <?php foreach ($this->pickup as $lib): ?> <option value="<?=$this->escapeHtmlAttr($lib['locationID'])?>"<?=($selected == $lib['locationID']) ? ' selected="selected"' : ''?>><?=$this->transEsc('location_' . $lib['locationDisplay'], null, $lib['locationDisplay'])?></option> - <? endforeach; ?> + <?php endforeach; ?> </select> <input class="btn btn-default" type="submit" value="<?=$this->transEsc('Save')?>"/> </form> </td> - <? endif; ?> - <? - echo $this->renderArray( + <?php endif; ?> + </table> + + <div id="account-actions"> + <?php if ($this->auth()->getManager()->supportsPasswordChange()): ?> + <a class="btn btn-default" href="<?=$this->url('myresearch-changepassword') ?>"> + <i class="fa fa-fw fa-lock" aria-hidden="true"></i> <?=$this->transEsc('Change Password') ?> + </a> + <?php endif; ?> + + <?php if ($this->accountDeletion): ?> + <a class="btn btn-default" href="<?=$this->url('myresearch-deleteaccount') ?>" data-lightbox> + <i class="fa fa-times"></i> <?=$this->transEsc('delete_account_title') ?> + </a> + <?php endif; ?> + </div> + + <?php if (is_array($this->profile)): ?> + <h3><?=$this->transEsc('Library Catalog Profile')?></h3> + <p> + <?=$this->context($this)->renderInContext('librarycards/selectcard.phtml', ['user' => $this->user]); ?> + </p> + <table class="table table-striped"> + <?=$this->renderArray( $arrTemplate, $this->profile, [ + $this->transEsc('First Name') => 'firstname', + $this->transEsc('Last Name') => 'lastname', $this->transEsc('Address') . ' 1' => 'address1', $this->transEsc('Address') . ' 2' => 'address2', $this->transEsc('Zip') => 'zip', $this->transEsc('City') => 'city', $this->transEsc('Country') => 'country', + // finc: show e-mail here $this->transEsc('Email') => 'email', $this->transEsc('Phone Number') => 'phone', + $this->transEsc('Mobile Number') => 'mobile_phone', $this->transEsc('Group') => 'group', $this->transEsc('Expires') => 'expiration_date' ] - ); - ?> + )?> </table> + <?php elseif ('ils-none' !== $this->ils()->getOfflineMode() && $this->patronLoginView && !empty($this->patronLoginView->getTemplate())): ?> + <?=$this->partial($this->patronLoginView);?> + <?php endif; ?> </div> <div class="<?=$this->layoutClass('sidebar')?>"> diff --git a/themes/finc/templates/record/cart-buttons.phtml b/themes/finc/templates/record/cart-buttons.phtml index a2ceeb19af873a5bfd184e78c9d1e6845da1dae3..02c225d8ec57e3515b55551c2e3bd9df57d94568 100644 --- a/themes/finc/templates/record/cart-buttons.phtml +++ b/themes/finc/templates/record/cart-buttons.phtml @@ -1,26 +1,26 @@ <!-- finc: record - cart-buttons --> -<? $cart = $this->cart(); ?> -<? if ($cart->isActive()): ?> +<?php $cart = $this->cart(); ?> +<?php if ($cart->isActive()): ?> - <? $cartId = $this->source . '|' . $this->id; ?> + <?php $cartId = $this->source . '|' . $this->id; ?> <span class="btn-bookbag-toggle" data-cart-id="<?=$this->escapeHtmlAttr($this->id)?>" data-cart-source="<?=$this->escapeHtmlAttr($this->source)?>"> - <a class="cart-add hidden<? if (!$cart->contains($cartId)): ?> correct<? endif ?>"> + <a class="cart-add hidden<?php if (!$cart->contains($cartId)): ?> correct<?php endif ?>"> <i class="cart-link-icon fa fa-plus" aria-hidden="true" title="<?=$this->transEsc('Add to Book Bag')?>"></i><span class="cart-link-label"><?=$this->transEsc('Add to Book Bag')?></span> </a> - <a class="cart-remove hidden<? if ($cart->contains($cartId)): ?> correct<? endif ?>"> + <a class="cart-remove hidden<?php if ($cart->contains($cartId)): ?> correct<?php endif ?>"> <i class="cart-link-icon fa fa-minus-circle" aria-hidden="true" title="<?=$this->transEsc('Remove from Book Bag')?>"></i> <span class="cart-link-label"><?=$this->transEsc('Remove from Book Bag')?></span> </a> <noscript> <form method="post" name="addForm" action="<?=$this->url('cart-processor')?>"> <input type="hidden" name="ids[]" value="<?=$this->escapeHtmlAttr($cartId)?>"/> - <? if ($cart->contains($cartId)): ?> + <?php if ($cart->contains($cartId)): ?> <input class="btn btn-default" type="submit" name="delete" value="<?=$this->transEsc('Remove from Book Bag')?>"/> - <? else: ?> + <?php else: ?> <input class="btn btn-default" type="submit" name="add" value="<?=$this->transEsc('Add to Book Bag')?>"/> - <? endif; ?> + <?php endif; ?> </form> </noscript> </span> -<? endif; ?> +<?php endif; ?> <!-- finc: record - cart-buttons END --> diff --git a/themes/finc/templates/record/cover.phtml b/themes/finc/templates/record/cover.phtml index c87ba27f09dc86142fc76ff254cb082d61fe1df8..db8796d6d737ccb540f2e6992dbbe5a008a163dd 100644 --- a/themes/finc/templates/record/cover.phtml +++ b/themes/finc/templates/record/cover.phtml @@ -1,12 +1,12 @@ <!-- finc: record - cover --> -<? /* Display thumbnail if appropriate: */ ?> -<? /* If we want to load covers in lightbox use .recordcover; +<?php /* Display thumbnail if appropriate: */ ?> +<?php /* If you want to load covers in lightbox use .recordcover; the class .nocover prevents nocover images from loading in lightbox or can be used to hide the images */ ?> -<? if ($cover): ?> - <? if ($this->link): ?><a href="<?=$this->escapeHtmlAttr($this->link)?>"><? endif; ?> - <img alt="<?=$this->transEsc('Cover Image')?>" <? if ($linkPreview): ?>data-linkpreview="true" <? endif; ?>class="recordcover" src="<?=$this->escapeHtmlAttr($cover); ?>"/> - <? if ($this->link): ?></a><? endif; ?> -<? else: ?> - <img src="<?=$this->url('cover-unavailable')?>" <? if ($linkPreview): ?>data-linkpreview="true" <? endif; ?>class="nocover" alt="<?=$this->transEsc('No Cover Image')?>"/> -<? endif; ?> +<?php if ($cover): ?> + <?php if ($this->link): ?><a href="<?=$this->escapeHtmlAttr($this->link)?>" data-lightbox-image><?php endif; ?> + <img alt="<?=$this->transEsc('Cover Image')?>" <?php if ($linkPreview): ?>data-linkpreview="true" <?php endif; ?>class="recordcover" src="<?=$this->escapeHtmlAttr($cover); ?>"/> + <?php if ($this->link): ?></a><?php endif; ?> +<?php else: ?> + <img src="<?=$this->url('cover-unavailable')?>" <?php if ($linkPreview): ?>data-linkpreview="true" <?php endif; ?>class="nocover" alt="<?=$this->transEsc('No Cover Image')?>"/> +<?php endif; ?> <!-- finc: record - cover - END --> diff --git a/themes/finc/templates/record/emailhold.phtml b/themes/finc/templates/record/emailhold.phtml index 8e0597b8c4d710a065738d4f56abcc3d50def439..c036a4a88af99110a148f8f832b61e6653e41a51 100644 --- a/themes/finc/templates/record/emailhold.phtml +++ b/themes/finc/templates/record/emailhold.phtml @@ -1,23 +1,23 @@ <!-- finc: record - emailhold --> -<? - // Set page title. - $this->headTitle($this->translate('EmailHold::email_hold_place_text') . ': ' . $this->driver->getBreadcrumb()); +<?php +// Set page title. +$this->headTitle($this->translate('EmailHold::email_hold_place_text') . ': ' . $this->driver->getBreadcrumb()); - // Set up breadcrumbs: - $this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink($this->transEsc('Search'), '', '</li>') - . '<li>' . $this->recordLink()->getBreadcrumb($this->driver) . '</li>' - . '<li class="active">' . $this->transEsc('EmailHold::email_hold_place_text') . '</li>'; +// Set up breadcrumbs: +$this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink($this->transEsc('Search'), '', '</li>') + . '<li>' . $this->recordLink()->getBreadcrumb($this->driver) . '</li>' + . '<li class="active">' . $this->transEsc('EmailHold::email_hold_place_text') . '</li>'; ?> <h2><?=$this->transEsc('EmailHold::email_hold_place_text')?></h2> -<? if ($this->helpText): ?> -<p class="helptext"><?=$this->helpText?></p> -<? endif; ?> +<?php if ($this->helpText): ?> + <p class="helptext"><?=$this->helpText?></p> +<?php endif; ?> <?=$this->flashmessages()?> <div class="email-hold-form"> <form name="placeEmailHold" method="post"> - <? if (in_array("item-issue", $this->extraFields)): ?> - <div id="emailHoldReference" class="emailHoldReference"> + <?php if (in_array("item-issue", $this->extraFields)): ?> + <div id="emailHoldReference" class="emailHoldReference"> <label class="control-label" for="volume"><?=$this->transEsc('EmailHold::email_hold_volume')?>:</label> <input type="text" name="gatheredDetails[volume]" value="<?=isset($this->gatheredDetails['volume']) ? $this->escapeHtmlAttr($this->gatheredDetails['volume']) : ''?>" id="volume" class="form-control"/><br/> @@ -27,52 +27,53 @@ <label class="control-label" for="year"><?=$this->transEsc('EmailHold::email_hold_year')?>:</label> <input type="text" name="gatheredDetails[year]" value="<?=isset($this->gatheredDetails['year']) ? $this->escapeHtmlAttr($this->gatheredDetails['year']) : ''?>" id="year" class="form-control"/><br/> </div> - <? endif; ?> + <?php endif; ?> - <? if (in_array("requiredByDate", $this->extraFields)): ?> + <?php if (in_array("requiredByDate", $this->extraFields)): ?> <label class="control-label" for="requiredByDate"><?=$this->transEsc("EmailHold::hold_required_by")?>:</label> <input id="requiredByDate" type="text" name="gatheredDetails[requiredBy]" value="<?=(isset($this->gatheredDetails['requiredBy']) && !empty($this->gatheredDetails['requiredBy'])) ? $this->escapeHtmlAttr($this->gatheredDetails['requiredBy']) : $this->escapeHtmlAttr($this->defaultRequiredDate)?>" size="8" class="form-control"/> - (<?=$this->dateTime()->getDisplayDateFormat()?>) + (<?=$this->dateTime()->getDisplayDateFormat()?>) - <? endif; ?> + <?php endif; ?> - <? if (in_array("pickUpLocation", $this->extraFields)): ?> - <? if (count($this->pickup) > 1): ?> - <? - if (isset($this->gatheredDetails['pickUpLocation']) && $this->gatheredDetails['pickUpLocation'] !== "") { - $selected = $this->gatheredDetails['pickUpLocation']; - } elseif (isset($this->homeLibrary) && $this->homeLibrary !== "") { - $selected = $this->homeLibrary; - } else { - $selected = $this->defaultPickup; - } - ?> + <?php if (in_array("pickUpLocation", $this->extraFields)): ?> + <?php if (count($this->pickup) > 1): ?> + <?php + if (isset($this->gatheredDetails['pickUpLocation']) && $this->gatheredDetails['pickUpLocation'] !== "") { + $selected = $this->gatheredDetails['pickUpLocation']; + } elseif (isset($this->homeLibrary) && $this->homeLibrary !== "") { + $selected = $this->homeLibrary; + } else { + $selected = $this->defaultPickup; + } + ?> <label class="control-label" for="pickUpLocation"><?=$this->transEsc("EmailHold::pick_up_location")?>:</label> <select name="gatheredDetails[pickUpLocation]" id="pickUpLocation" class="form-control"> - <? if ($selected === false): ?> - <option value="" selected="selected"> - <?=$this->transEsc('EmailHold::select_pickup_location')?> - </option> - <? endif; ?> - <? foreach ($this->pickup as $lib): ?> - <option value="<?=$this->escapeHtmlAttr($lib['locationID'])?>" <?=($selected == $lib['locationID']) ? ' selected="selected"' : ''?>> - <?=$this->escapeHtml($lib['locationDisplay'])?> - </option> - <? endforeach; ?> - </select> + <?php if ($selected === false): ?> + <option value="" selected="selected"> + <?=$this->transEsc('EmailHold::select_pickup_location')?> + </option> + <?php endif; ?> + <?php foreach ($this->pickup as $lib): ?> + <option value="<?=$this->escapeHtmlAttr($lib['locationID'])?>" <?=($selected == $lib['locationID']) ? ' selected="selected"' : ''?>> + <?=$this->escapeHtml($lib['locationDisplay'])?> + </option> + <?php endforeach; ?> + </select> - <? else: ?> - <input type="hidden" name="gatheredDetails[pickUpLocation]" value="<?=$this->escapeHtmlAttr($this->defaultPickup)?>" /> - <? endif; ?> - <? endif; ?> + <?php else: ?> + <input type="hidden" name="gatheredDetails[pickUpLocation]" value="<?=$this->escapeHtmlAttr($this->defaultPickup)?>"/> + <?php endif; ?> + <?php endif; ?> - <? if (in_array("comments", $this->extraFields)): ?> + <?php if (in_array("comments", $this->extraFields)): ?> <label class="control-label" for="comment"><?=$this->transEsc("Comments")?>:</label> - <textarea rows="3" cols="20" name="gatheredDetails[comment]" id="comment" class="form-control"><?=isset($this->gatheredDetails['comment']) ? $this->escapeHtml($this->gatheredDetails['comment']) : ''?></textarea> - <? endif; ?> + <textarea rows="3" cols="20" name="gatheredDetails[comment]" id="comment" + class="form-control"><?=isset($this->gatheredDetails['comment']) ? $this->escapeHtml($this->gatheredDetails['comment']) : ''?></textarea> + <?php endif; ?> - <input class="btn btn-primary" type="submit" name="placeEmailHold" role="button" value="<?=$this->transEsc('EmailHold::email_hold_submit_text')?>"/> + <input class="btn btn-primary" type="submit" name="placeEmailHold" role="button" value="<?=$this->transEsc('EmailHold::email_hold_submit_text')?>"/> </form> </div> diff --git a/themes/finc/templates/record/pdaform.phtml b/themes/finc/templates/record/pdaform.phtml index daa7748c56059616b7a72981cd76483a73242e88..440c1c275f57ea893e832e569c6fcc3de893b237 100644 --- a/themes/finc/templates/record/pdaform.phtml +++ b/themes/finc/templates/record/pdaform.phtml @@ -1,5 +1,5 @@ <!-- finc: record - pdaform --> -<? +<?php // Set page title. $this->headTitle($this->translate('PDA::Acquisition')); @@ -24,20 +24,19 @@ $this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink <label class="control-label" for="pdaSubject"><?=$this->transEsc('PDA::pda_form_field_of_study_label')?><span class="required">*</span>:</label> <select name="pdaFieldOfStudy" class="form-control"> <option value="-1"><?=$this->transEsc('PDA::pda_form_field_of_study_text')?></option> - <? if (isset($this->fieldOfStudyList) && is_array($this->fieldOfStudyList)): ?> - <? foreach ($this->fieldOfStudyList as $value): ?> - <option value="<?=$value?>" <? if (!empty($this->pdaFieldOfStudy) && $value == $this->pdaFieldOfStudy): ?> selected="selected"<? endif; ?>><?=$this->transEsc('PDA::fos_' . $value)?></option> - <? endforeach; ?> - <? endif; ?> + <?php if (isset($this->fieldOfStudyList) && is_array($this->fieldOfStudyList)): ?> + <?php foreach ($this->fieldOfStudyList as $value): ?> + <option value="<?=$value?>" <?php if (!empty($this->pdaFieldOfStudy) && $value == $this->pdaFieldOfStudy): ?> selected="selected"<?php endif; ?>><?=$this->transEsc('PDA::fos_' . $value)?></option> + <?php endforeach; ?> + <?php endif; ?> </select> </div> <div class="form-group"> - <span> - <?=$this->recaptcha()->html($this->useRecaptcha)?> - </span> + <span> + <?=$this->recaptcha()->html($this->useRecaptcha)?> + </span> <input type="submit" class="btn btn-primary" role="button" name="submit" value="<?=$this->transEsc('Submit')?>"/> - <a class="btn btn-primary" data-lightbox-ignore data-toggle="tooltip" title="<?=$this->transEsc('PDA::pda_open_new_window')?>" href="<?=$this->interlibraryloan()->getSwbLink($this->driver)?>" - target="_blank"><?=$this->transEsc('PDA::pda_tab_interlibrary_button')?> + <a class="btn btn-primary" data-lightbox-ignore data-toggle="tooltip" title="<?=$this->transEsc('PDA::pda_open_new_window')?>" href="<?=$this->interlibraryloan()->getSwbLink($this->driver)?>" target="_blank"><?=$this->transEsc('PDA::pda_tab_interlibrary_button')?> </a> <button class="btn btn-transparent" type="button" data-dismiss="modal" href="#"><?=$this->transEsc('Reset')?></button> </div> diff --git a/themes/finc/templates/record/pdamessage.phtml b/themes/finc/templates/record/pdamessage.phtml index abf32479eade23d86dcd5feda59a4c4c4b7b33c0..1a385ff512d5c06b5f3b5d1da18237defe274a07 100644 --- a/themes/finc/templates/record/pdamessage.phtml +++ b/themes/finc/templates/record/pdamessage.phtml @@ -1,5 +1,5 @@ -<!-- finc: record - PDAMESSAGE --> -<? +<!-- finc: record - pdamessage --> +<?php // Set page title. $this->headTitle($this->translate('PDA::Acquisition')); @@ -9,4 +9,4 @@ . '<li class="active">' . $this->transEsc('PDA::Acquisition') . '</li>'; ?> <?=$this->flashmessages()?> -<!-- finc: record - PDAMESSAGE - END --> +<!-- finc: record - pdamessage - END --> diff --git a/themes/finc/templates/record/reporterrorsform.phtml b/themes/finc/templates/record/reporterrorsform.phtml index 8ce730b47208c7df3dae73b815bd01563442e711..396ecd138f251ac17bc1eaeb8d3aa99382694d52 100644 --- a/themes/finc/templates/record/reporterrorsform.phtml +++ b/themes/finc/templates/record/reporterrorsform.phtml @@ -1,5 +1,5 @@ <!-- finc: record - reporterrorsform --> -<? +<?php // Set page title. $this->headTitle($this->translate('ReportErrors')); @@ -13,8 +13,8 @@ $this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink <?=$this->flashmessages()?> <div class="form-group"> <label class="control-label" for="reporterrors_email"><?=$this->transEsc("Email")?>:</label> - <input type="email" id="reporterrors_email" name="reporterrors_email" class="form-control"<? if (!empty($this->email)): ?> value="<?=$this->email?>"<? endif; ?>/> - <div class="gutter-top gutter-btm <? if (empty($this->email)): ?>hidden<? endif; ?>" id="replyCheckbox"> + <input type="email" id="reporterrors_email" name="reporterrors_email" class="form-control"<?php if (!empty($this->email)): ?> value="<?=$this->email?>"<?php endif; ?>/> + <div class="gutter-top gutter-btm <?php if (empty($this->email)): ?>hidden<?php endif; ?>" id="replyCheckbox"> <label for="reporterrors_checkbox" class="control-label"><?=$this->transEsc("reporterrors_response_requested")?></label> <input type="checkbox" id="reporterrors_checkbox" name="reporterrors_checkbox"<?=($this->reply_requested) ? ' checked' : ''?> /> </div> @@ -27,7 +27,7 @@ $this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink <input type="submit" class="btn btn-primary" role="button" name="submit" value="<?=$this->transEsc('Send')?>"/> </div> </form> -<? $script = <<<JS +<?php $script = <<<JS $(document).ready(function () { // show response email checkbox ReportErrors $('input#reporterrors_email').on('keyup change', function () { diff --git a/themes/finc/templates/record/view.phtml b/themes/finc/templates/record/view.phtml index 1e24eb623bdd4ed31274c8153156591ebe948b42..f9442b2b3e731a5bce282ca51e35c61fb4ab8ac2 100644 --- a/themes/finc/templates/record/view.phtml +++ b/themes/finc/templates/record/view.phtml @@ -1,5 +1,5 @@ <!-- finc: record - view --> -<? +<?php // Set up standard record scripts: $this->headScript()->appendFile("record.js"); $this->headScript()->appendFile("check_save_statuses.js"); @@ -19,108 +19,116 @@ $this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink $this->layout()->title = $this->driver->getShortTitle(); ?> - <? if (isset($this->scrollData) && ($this->scrollData['previousRecord'] || $this->scrollData['nextRecord'])): ?> - <? /* Pager is identical to pager in collection - view! - CK */ ?> - <ul class="pager hidden-print"> - <? if ($this->scrollData['previousRecord']): ?> - <? if ($this->scrollData['firstRecord']): ?> - <li class="left"> - <a href="<?=$this->recordLink()->getUrl($this->scrollData['firstRecord'])?>" title="<?=$this->transEsc('First Search Result')?>" rel="nofollow">« <?=$this->transEsc('First')?></a> + <?php if (isset($this->scrollData) && ($this->scrollData['previousRecord'] || $this->scrollData['nextRecord'])): ?> + <?php + /* Pager is identical to pager in collection - view! + Keep .left/.right classes for alignment on left/right edge - CK */ + ?> + <ul class="pager hidden-print"> + <?php if ($this->scrollData['previousRecord']): ?> + <?php if ($this->scrollData['firstRecord']): ?> + <li class="left"> + <a href="<?=$this->recordLink()->getUrl($this->scrollData['firstRecord'])?>" title="<?=$this->transEsc('First Search Result')?>" rel="nofollow">« <?=$this->transEsc('First')?></a> </li> - <? endif; ?> + <?php endif; ?> <li class="left"> <a href="<?=$this->recordLink()->getUrl($this->scrollData['previousRecord'])?>" title="<?=$this->transEsc('Previous Search Result')?>" rel="nofollow">« <?=$this->transEsc('Prev')?></a> </li> - <? else: ?> - <? if ($this->scrollData['firstRecord']): ?> + <?php else: ?> + <?php if ($this->scrollData['firstRecord']): ?> <li class="disabled left"><a href="#">« <?=$this->transEsc('First')?></a></li> - <? endif; ?> + <?php endif; ?> <li class="disabled left"><a href="#">« <?=$this->transEsc('Prev')?></a></li> - <? endif; ?> - <? /* finc-specific: li + hidden-xs, and li class="right" below CK */ ?> + <?php endif; ?> + <?php + /* finc-specific wrapping: li + hidden-xs for consistency - CK */ + ?> <li class="hidden-xs"> <?=$this->transEsc('of_num_results', [ '%%position%%' => $this->localizedNumber($this->scrollData['currentPosition']), '%%total%%' => $this->localizedNumber($this->scrollData['resultTotal']) ]) ?> </li> - <? if ($this->scrollData['nextRecord']): ?> + <?php if ($this->scrollData['nextRecord']): ?> <li class="right"> <a href="<?=$this->recordLink()->getUrl($this->scrollData['nextRecord'])?>" title="<?=$this->transEsc('Next Search Result')?>" rel="nofollow"><?=$this->transEsc('Next')?> »</a> </li> - <? if ($this->scrollData['lastRecord']): ?> + <?php if ($this->scrollData['lastRecord']): ?> <li class="right"> <a href="<?=$this->recordLink()->getUrl($this->scrollData['lastRecord'])?>" title="<?=$this->transEsc('Last Search Result')?>" rel="nofollow"><?=$this->transEsc('Last')?> »</a> </li> - <? endif; ?> - <? else: ?> + <?php endif; ?> + <?php else: ?> <li class="disabled right"><a href="#"><?=$this->transEsc('Next')?> »</a></li> - <? if ($this->scrollData['lastRecord']): ?> + <?php if ($this->scrollData['lastRecord']): ?> <li class="disabled right"><a href="#"><?=$this->transEsc('Last')?> »</a></li> - <? endif; ?> - <? endif; ?> + <?php endif; ?> + <?php endif; ?> </ul> - <? endif; ?> + <?php endif; ?> - <? /* finc-specific: Remove getToolbar from here and add it to sidebar below - CK */ ?> + <?php + /* finc-specific: Remove getToolbar from here and add it to sidebar below - CK + <?=$this->record($this->driver)->getToolbar()?> */ + ?> <div class="record source<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?>"> - <div class="<?=$this->layoutClass('mainbody')?>"> + <?php /* finc: remove related-sidebar count and "solo" class since we use a custom sidebar, + keep print classes, CK */ ?> + <?php $sidebarList = $this->related()->getList($this->driver); ?> + <div class="<?=$this->layoutClass('mainbody')?> print-full-width"> <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" class="hiddenId"/> <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?>" class="hiddenSource"/> <?=$this->flashmessages()?> <?=$this->record($this->driver)->getCoreMetadata()?> - <? if (count($this->tabs) > 0): ?> + <?php if (count($this->tabs) > 0): ?> <a name="tabnav"></a> <div class="record-tabs"> <ul class="nav nav-tabs"> - <? foreach ($this->tabs as $tab => $obj): ?> - <? // add current tab to breadcrumbs if applicable: + <?php foreach ($this->tabs as $tab => $obj): ?> + <?php // add current tab to breadcrumbs if applicable: $desc = $obj->getDescription(); - $tab_classes = []; + $tabName = preg_replace("/\W/", "-", strtolower($tab)); + $tabClasses = [ 'record-tab', $tabName ]; if (0 === strcasecmp($this->activeTab, $tab)) { if (!$this->loadInitialTabWithAjax || !$obj->supportsAjax()) { - $tab_classes[] = 'active'; + $tabClasses[] = 'active'; } - $tab_classes[] = 'initiallyActive'; + $tabClasses[] = 'initiallyActive'; $this->layout()->breadcrumbs .= '<li class="active">' . $this->transEsc($desc) . '</li>'; $activeTabObj = $obj; } - if (!$obj->isVisible()) { - $tab_classes[] = 'hidden'; - } - if (!$obj->supportsAjax()) { - $tab_classes[] = 'noajax'; - } + if (!$obj->isVisible()) { $tabClasses[] = 'hidden'; } + if (!$obj->supportsAjax()) { $tabClasses[] = 'noajax'; } ?> - <li<?=count($tab_classes) > 0 ? ' class="' . implode(' ', $tab_classes) . '"' : ''?>> - <a class="<?=strtolower($tab)?>" href="<?=$this->recordLink()->getTabUrl($this->driver, $tab)?>#tabnav"<? if ($obj->supportsAjax() && in_array($tab, $this->backgroundTabs)): ?> data-background<? endif ?>><?=$this->transEsc($desc)?></a> + <li class="<?=implode(' ', $tabClasses)?>" data-tab="<?=$tabName?>"> + <a href="<?=$this->recordLink()->getTabUrl($this->driver, $tab)?>#tabnav"<?php if ($obj->supportsAjax() && in_array($tab, $this->backgroundTabs)):?> data-background<?php endif ?>><?=$this->transEsc($desc)?></a> </li> - <? endforeach; ?> + <?php endforeach; ?> </ul> <div class="tab-content"> - <? if (!$this->loadInitialTabWithAjax || !isset($activeTabObj) || !$activeTabObj->supportsAjax()): ?> - <div class="tab-pane active <?=$this->activeTab?>-tab"> + <?php if (!$this->loadInitialTabWithAjax || !isset($activeTabObj) || !$activeTabObj->supportsAjax()): ?> + <div class="tab-pane active <?=$this->escapeHtmlAttr($this->activeTab) ?>-tab"> <?=isset($activeTabObj) ? $this->record($this->driver)->getTab($activeTabObj) : ''?> </div> - <? endif; ?> + <?php endif; ?> </div> </div> - <? endif; ?> + <?php endif; ?> <?=$this->driver->supportsCoinsOpenURL() ? '<span class="Z3988" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenURL()) . '"></span>' : ''?> </div> <div class="<?=$this->layoutClass('sidebar')?>"> - <? /* finc-specific: add toolbar to sidebar - CK */ ?> + <?php /* finc-specific: add toolbar to sidebar - CK */ ?> <?=$this->record($this->driver)->getToolbar()?> - <? foreach ($this->related()->getList($this->driver) as $current): ?> + <?php foreach ($sidebarList as $current): ?> <?=$this->related()->render($current)?> - <? endforeach; ?> + <?php endforeach; ?> </div> </div> diff --git a/themes/finc/templates/search/advanced/layout.phtml b/themes/finc/templates/search/advanced/layout.phtml index 1bf1f46e7eee11004402fc3fe7feb41aa04e3074..56bb3e5dd32481331cb7a32f51253bd5614878d4 100644 --- a/themes/finc/templates/search/advanced/layout.phtml +++ b/themes/finc/templates/search/advanced/layout.phtml @@ -1,5 +1,5 @@ <!-- finc: search - advanced - layout --> -<? +<?php // Set page title. $this->headTitle($this->translate('Advanced Search')); @@ -27,7 +27,7 @@ if (isset($this->saved) && is_object($this->saved)) { $hiddenFilters = $this->saved->getParams()->getHiddenFilters(); } else { $hasDefaultsApplied = $searchDetails = $searchFilters = $groups = false; - $hiddenFilters = $this->searchtabs()->getHiddenFilters($this->searchClassId, true); + $hiddenFilters = $this->searchTabs()->getHiddenFilters($this->searchClassId, true); } // Step 1: Load the javascript @@ -65,58 +65,58 @@ if (isset($searchDetails) && is_object($searchDetails)) { <?=$this->flashmessages()?> <div role="search"> <form name="searchForm" id="advSearchForm" method="get" action="<?=$this->url($this->options->getSearchAction())?>"> - <? foreach ($hiddenFilters as $key => $filter): ?> - <? foreach ($filter as $value): ?> + <?php foreach ($hiddenFilters as $key => $filter): ?> + <?php foreach ($filter as $value): ?> <input type="hidden" name="hiddenFilters[]" value="<?=$this->escapeHtmlAttr($key) . ':' . $this->escapeHtmlAttr($value)?>" /> - <? endforeach; ?> - <? endforeach; ?> + <?php endforeach; ?> + <?php endforeach; ?> <div class="<?=$this->layoutClass('mainbody')?>"> - <? $lastSort = $this->searchMemory()->getLastSort($this->searchClassId); ?> - <? if (!empty($lastSort)): ?> + <?php $lastSort = $this->searchMemory()->getLastSort($this->searchClassId); ?> + <?php if (!empty($lastSort)): ?> <input type="hidden" name="sort" value="<?=$this->escapeHtmlAttr($lastSort)?>" /> - <? endif; ?> + <?php endif; ?> <div class="clearfix"> <h2 class="pull-left flip"><?=$this->transEsc('Advanced Search')?></h2> <div id="groupJoin" class="form-inline pull-right flip"> <label for="groupJoinOptions"><?=$this->transEsc("search_match")?>:</label> <select id="groupJoinOptions" name="join" class="form-control"> - <option value="AND"<? if($searchDetails && $searchDetails->getOperator()=='ALL'):?> selected<?endif?>><?= $this->transEsc('group_AND') ?></option> - <option value="OR"<? if($searchDetails && $searchDetails->getOperator()=='OR'):?> selected<?endif?>><?= $this->transEsc('group_OR') ?></option> + <option value="AND"<?php if($searchDetails && $searchDetails->getOperator()=='ALL'):?> selected<?php endif;?>><?= $this->transEsc('group_AND') ?></option> + <option value="OR"<?php if($searchDetails && $searchDetails->getOperator()=='OR'):?> selected<?php endif;?>><?= $this->transEsc('group_OR') ?></option> </select> </div> </div> - <? /* finc: keep icon inside link for consistent functionality */ ?> + <?php /* finc: keep icon inside link for consistent functionality */ ?> <span id="groupPlaceHolder" class="hidden"> <a href="javascript:void(0);" onClick="addGroup();return false"><i class="fa fa-plus" aria-hidden="true"> </i> <?= $this->transEsc('add_search_group') ?></a> </span> - <? /* fallback to a fixed set of search groups/fields if JavaScript is turned off */ ?> + <?php /* fallback to a fixed set of search groups/fields if JavaScript is turned off */ ?> <div class="no-js"> - <? if(!empty($this->formOverride)): ?> + <?php if(!empty($this->formOverride)): ?> <?=$this->formOverride ?> - <? else: ?> - <? for($group=0 ; $group<3 || $group<=$setGroupCount ; $group++): ?> - <? if($group == 0): ?> + <?php else: ?> + <?php for($group=0 ; $group<3 || $group<=$setGroupCount ; $group++): ?> + <?php if($group == 0): ?> <div id="new_group_template"> - <? endif; ?> + <?php endif; ?> <div id="group<?=$group ?>" class="adv-group"> <div class="adv-group-terms"> <label class="adv-group-label"><?=$this->transEsc("adv_search_label")?>:</label> - <? for($search=0 ; $search<3 || (isset($setQueries[$group]) && $search<count($setQueries[$group])) ; $search++): ?> - <? if($group == 0 && $search == 0): ?> + <?php for($search=0 ; $search<3 || (isset($setQueries[$group]) && $search<count($setQueries[$group])) ; $search++): ?> + <?php if($group == 0 && $search == 0): ?> <div id="new_search_template"> - <? endif; ?> + <?php endif; ?> <div id="search<?=$group.'_'.$search ?>" class="adv-search"> - <input name="lookfor<?=$group ?>[]" id="search_lookfor<?=$group.'_'.$search ?>" class="adv-term-input form-control" type="text"<?if(isset($setQueries[$group][$search])):?> value="<?=$this->escapeHtml($setQueries[$group][$search]->getString())?>"<?endif;?>> - <select class="adv-term-type form-control" name="type<?=$group ?>[]"> - <? foreach ($this->options->getAdvancedHandlers() as $searchVal => $searchDesc): ?> - <option value="<?=$this->escapeHtml($searchVal)?>"<?if(isset($setQueries[$group][$search]) && $searchVal == $setQueries[$group][$search]->getHandler()):?> selected<?endif;?>><?=$this->transEsc($searchDesc)?></option> - <? endforeach; ?> + <input name="lookfor<?=$group ?>[]" id="search_lookfor<?=$group . '_' . $search ?>" class="adv-term-input form-control" type="text"<?php if (isset($setQueries[$group][$search])): ?> value="<?=$this->escapeHtml($setQueries[$group][$search]->getString())?>"<?php endif; ?> aria-label="<?=$this->transEsc("search_terms")?>"> + <select class="adv-term-type form-control" name="type<?=$group ?>[]" aria-label="<?=$this->transEsc("Search type")?>"> + <?php foreach ($this->options->getAdvancedHandlers() as $searchVal => $searchDesc): ?> + <option value="<?=$this->escapeHtml($searchVal)?>"<?php if(isset($setQueries[$group][$search]) && $searchVal == $setQueries[$group][$search]->getHandler()):?> selected<?php endif;?>><?=$this->transEsc($searchDesc)?></option> + <?php endforeach; ?> </select> <a href="javascript:void(0);" class="adv-term-remove hidden">×</a> </div> - <? if($group == 0 && $search == 0): ?> + <?php if($group == 0 && $search == 0): ?> </div> - <? /* finc: moving entire original icon tag inside link WILL BUST removal-button functionality! + <?php /* finc: moving entire original icon tag inside link WILL BUST removal-button functionality! (As this will also 'shift search_place_holder') Therefore Keep 'search_place_holder' separate and move icon only ! */ ?> <span class="float-left"> @@ -124,31 +124,31 @@ if (isset($searchDetails) && is_object($searchDetails)) { <a href="javascript:void(0);" class="add_search_link hidden"> <i class="fa fa-plus" aria-hidden="true"></i> <?=$this->transEsc("add_search")?></a> </span> - <? endif; ?> - <? endfor; ?> + <?php endif; ?> + <?php endfor; ?> </div> <div class="adv-group-match"> <label class="search_bool"><?=$this->transEsc("search_match")?>: </label> <select name="bool<?=$group ?>[]" id="search_bool<?=$group ?>" class="form-control"> - <option value="AND"<? if(isset($setSearchGroups[$group]) && 'AND' == $setSearchGroups[$group]):?> selected<?endif;?>><?=$this->transEsc("search_AND")?></option> - <option value="OR"<? if(isset($setSearchGroups[$group]) && 'OR' == $setSearchGroups[$group]):?> selected<?endif;?>><?=$this->transEsc("search_OR")?></option> - <option value="NOT"<? if(isset($setSearchGroups[$group]) && 'NOT' == $setSearchGroups[$group]):?> selected<?endif;?>><?=$this->transEsc("search_NOT")?></option> + <option value="AND"<?php if(isset($setSearchGroups[$group]) && 'AND' == $setSearchGroups[$group]):?> selected<?php endif;?>><?=$this->transEsc("search_AND")?></option> + <option value="OR"<?php if(isset($setSearchGroups[$group]) && 'OR' == $setSearchGroups[$group]):?> selected<?php endif;?>><?=$this->transEsc("search_OR")?></option> + <option value="NOT"<?php if(isset($setSearchGroups[$group]) && 'NOT' == $setSearchGroups[$group]):?> selected<?php endif;?>><?=$this->transEsc("search_NOT")?></option> </select> </div> <a href="javascript:void(0);" class="adv-group-close hidden"><i class="fa fa-close"></i> <?=$this->transEsc("del_search")?></a> </div> - <? if($group == 0): ?> + <?php if($group == 0): ?> </div> - <? endif; ?> - <? endfor; ?> - <? endif; ?> + <?php endif; ?> + <?php endfor; ?> + <?php endif; ?> </div> - <? /* finc: introduce 'fnd-btn'-class to swap submit and clear buttons for consistency */ ?> + <?php /* finc: introduce 'fnd-btn'-class to swap submit and clear buttons for consistency */ ?> <div class="adv-submit"> <input class="clear-btn btn btn-transparent" type="button" value="<?=$this->transEsc('Clear')?>"> <input class="fnd-btn btn btn-primary" type="submit" value="<?= $this->transEsc('Find')?>"> </div> - <? if (isset($this->extraAdvancedControls)): ?> + <?php if (isset($this->extraAdvancedControls)): ?> <div class="clearfix"> <?=$this->extraAdvancedControls ?> </div> @@ -156,14 +156,14 @@ if (isset($searchDetails) && is_object($searchDetails)) { <input class="clear-btn btn btn-transparent" type="button" value="<?=$this->transEsc('Clear')?>"> <input class="fnd-btn btn btn-primary" type="submit" value="<?= $this->transEsc('Find')?>"> </div> - <? endif; ?> + <?php endif; ?> </div> <div class="<?=$this->layoutClass('sidebar')?>"> - <? if ($hasDefaultsApplied): ?> + <?php if ($hasDefaultsApplied): ?> <input type="hidden" name="dfApplied" value="1" /> - <? endif ?> - <? if (!empty($searchFilters)): ?> + <?php endif ?> + <?php if (!empty($searchFilters)): ?> <h4><?=$this->transEsc("adv_search_filters")?></h4> <div class="facet-group"> <label class="checkbox"> @@ -171,15 +171,15 @@ if (isset($searchDetails) && is_object($searchDetails)) { <?=$this->transEsc("adv_search_select_all")?> </label> </div> - <? foreach ($searchFilters as $field => $data): ?> + <?php foreach ($searchFilters as $field => $data): ?> <div class="facet-group"> <div class="title"><?=$this->transEsc($field)?></div> - <? foreach ($data as $value): ?> + <?php foreach ($data as $value): ?> <label class="facet checkbox"><input class="checkbox-select-item" type="checkbox" checked="checked" name="filter[]" value='<?=$this->escapeHtmlAttr($value['field'])?>:"<?=$this->escapeHtmlAttr($value['value'])?>"' /> <?=$this->escapeHtml($value['displayText'])?></label> - <? endforeach; ?> + <?php endforeach; ?> </div> - <? endforeach; ?> - <? endif; ?> + <?php endforeach; ?> + <?php endif; ?> <h4><?=$this->transEsc("Search Tips")?></h4> <div class="facet-group"> <a class="facet help-link" data-lightbox href="<?=$this->url('help-home')?>?topic=advsearch&_=<?=time() ?>"><?=$this->transEsc("Help with Advanced Search")?></a> diff --git a/themes/finc/templates/search/advanced/limit.phtml b/themes/finc/templates/search/advanced/limit.phtml deleted file mode 100644 index 570f40dc694e1de7d3c2f5b5facb400c2336950a..0000000000000000000000000000000000000000 --- a/themes/finc/templates/search/advanced/limit.phtml +++ /dev/null @@ -1,21 +0,0 @@ -<!-- finc: search - advanced - limit --> -<? /* BS version has error in line 16 -- space missing before 'selected' - throws w3c error - CK */ ?> -<? -// Set up convenience variables: -$limitList = $this->options->getLimitOptions(); - -// If a previous limit was used, make that the default; otherwise, use the "default default" -$lastLimit = $this->searchMemory()->getLastLimit($this->options->getSearchClassId()); -$defaultLimit = empty($lastLimit) ? $this->options->getDefaultLimit() : $lastLimit; -?> -<? if (count($limitList) > 1): ?> - <fieldset class="limits"> - <legend><?=$this->transEsc('Results per page')?></legend> - <select id="limit" name="limit" class="form-control"> - <? foreach ($limitList as $limitVal): ?> - <option value="<?=$this->escapeHtmlAttr($limitVal)?>"<?=($limitVal == $defaultLimit) ? ' selected="selected"' : ''?>><?=$this->escapeHtml($limitVal)?></option> - <? endforeach; ?> - </select> - </fieldset> -<? endif; ?> -<!-- finc: search - advanced - limit - END --> diff --git a/themes/finc/templates/search/advanced/solr.phtml b/themes/finc/templates/search/advanced/solr.phtml index 8aba06e67947bf42a3cc14676a335cb341c24011..a25a6a5a85a218f86d16aa5f2a06ae3451d48b41 100644 --- a/themes/finc/templates/search/advanced/solr.phtml +++ b/themes/finc/templates/search/advanced/solr.phtml @@ -1,30 +1,30 @@ <!-- finc: search - advanced - solr --> -<? if (!empty($this->facetList) || !empty($this->checkboxFacets)): ?> +<?php if (!empty($this->facetList) || !empty($this->checkboxFacets)): ?> <fieldset class="solr-facets"> <legend><?=$this->transEsc('Limit To')?></legend> - <? if (!empty($this->checkboxFacets)): ?> + <?php if (!empty($this->checkboxFacets)): ?> <?=$this->render('search/advanced/checkbox-filters.phtml')?> - <? endif; ?> - <? /* finc: we need the limiter-boxes class to set select height to auto + remove bg image - CK */ ?> + <?php endif; ?> + <?php /* finc: we need the limiter-boxes class to set select height to auto + remove bg image - CK */ ?> <div class="solr-facet-container limiter-boxes"> - <? //narrow the facet list via whitespace from config, #13783, DM + <?php //finc: narrow the facet list via whitespace from config, #13783, DM $this->facetList = $this->sideFacet()->displayAllowedFacetValues($this->facetList); ?> - <? foreach ($this->facetList as $field => $list): ?> + <?php foreach ($this->facetList as $field => $list): ?> <div class="solr-adv-facet"> <label for="limit_<?=$this->escapeHtmlAttr(str_replace(' ', '', $field))?>"><?=$this->transEsc($list['label'])?>:</label> <select class="form-control" id="limit_<?=$this->escapeHtmlAttr(str_replace(' ', '', $field))?>" name="filter[]" multiple="multiple" size="10"> - <? if (is_array($this->hierarchicalFacets) && in_array($field, $this->hierarchicalFacets)): ?> - <? foreach ($list['list'] as $value): ?> - <? $display = str_pad('', 4 * $value['level'] * 6, ' ', STR_PAD_LEFT) . $this->escapeHtml($value['displayText']); ?> + <?php if (is_array($this->hierarchicalFacets) && in_array($field, $this->hierarchicalFacets)): ?> + <?php foreach ($list['list'] as $value): ?> + <?php $display = str_pad('', 4 * $value['level'] * 6, ' ', STR_PAD_LEFT) . $this->escapeHtml($value['displayText']); ?> <option value="<?=$this->escapeHtmlAttr(($value['operator'] == 'OR' ? '~' : '') . $field . ':"' . $value['value'] . '"')?>"<?=(isset($value['selected']) && $value['selected']) ? ' selected="selected"' : ''?>><?=$display?></option> - <? endforeach; ?> - <? else: ?> - <? + <?php endforeach; ?> + <?php else: ?> + <?php // Sort the current facet list alphabetically; we'll use this data // along with the foreach below to display facet options in the // correct order. - $sorted = array(); + $sorted = []; foreach ($list['list'] as $i => $value) { if (!empty($value['displayText'])) { $sorted[$i] = $value['displayText']; @@ -32,30 +32,30 @@ } natcasesort($sorted); ?> - <? foreach ($sorted as $i => $display): ?> - <? $value = $list['list'][$i]; ?> + <?php foreach ($sorted as $i => $display): ?> + <?php $value = $list['list'][$i]; ?> <option value="<?=$this->escapeHtmlAttr(($value['operator'] == 'OR' ? '~' : '') . $field . ':"' . $value['value'] . '"')?>"<?=(isset($value['selected']) && $value['selected']) ? ' selected="selected"' : ''?>><?=$this->escapeHtml($display)?></option> - <? endforeach; ?> - <? endif; ?> + <?php endforeach; ?> + <?php endif; ?> </select> </div> - <? endforeach; ?> + <?php endforeach; ?> </div> </fieldset> -<? endif; ?> +<?php endif; ?> -<? if (isset($this->illustratedLimit)): ?> +<?php if (isset($this->illustratedLimit)): ?> <fieldset class="solr"> <legend><?=$this->transEsc("Illustrated")?>:</legend> - <? foreach ($this->illustratedLimit as $current): ?> + <?php foreach ($this->illustratedLimit as $current): ?> <input id="illustrated_<?=$this->escapeHtmlAttr($current['value'])?>" type="radio" name="illustration" value="<?=$this->escapeHtmlAttr($current['value'])?>"<?=$current['selected'] ? ' checked="checked"' : ''?>/> <label for="illustrated_<?=$this->escapeHtmlAttr($current['value'])?>"><?=$this->transEsc($current['text'])?></label><br/> - <? endforeach; ?> + <?php endforeach; ?> </fieldset> -<? endif; ?> +<?php endif; ?> <?=$this->render('search/advanced/limit.phtml')?> <?=$this->render('search/advanced/ranges.phtml')?> <!-- finc: search - advanced - solr - END --> diff --git a/themes/finc/templates/search/bulk-action-buttons.phtml b/themes/finc/templates/search/bulk-action-buttons.phtml index 367fa90c12779fe53e6a74b32b7a997a807be9aa..000657184878a36dd55ac105a2e0987fd6dbbdcb 100644 --- a/themes/finc/templates/search/bulk-action-buttons.phtml +++ b/themes/finc/templates/search/bulk-action-buttons.phtml @@ -1,28 +1,28 @@ <!-- finc: search - bulk-action-buttons --> -<? if (isset($this->showCheckboxes) && $this->showCheckboxes): ?> +<?php if (isset($this->showCheckboxes) && $this->showCheckboxes): ?> <div class="bulkActionButtons hidden-print"> <div class="bulk-checkbox"> - <input type="checkbox" class="checkbox-select-all" name="selectAll" id="<?=$this->idPrefix?>addFormCheckboxSelectAll"<?if($this->formAttr):?> form="<?=$this->escapeHtmlAttr($this->formAttr) ?>"<? endif; ?>/> + <input type="checkbox" class="checkbox-select-all" name="selectAll" id="<?=$this->idPrefix?>addFormCheckboxSelectAll"<?php if($this->formAttr):?> form="<?=$this->escapeHtmlAttr($this->formAttr) ?>"<?php endif; ?>/> <label for="<?=$this->idPrefix?>addFormCheckboxSelectAll"> <?=$this->transEsc('select_page')?> | <?=$this->transEsc('with_selected')?>: </label> </div> <div class="btn-group"> - <? if (isset($this->showBulkOptions) && $this->showBulkOptions): ?> - <input id="ribbon-email" class="btn btn-transparent" type="submit" name="email" title="<?=$this->transEsc('bookbag_email_selected')?>" value="<?=$this->transEsc('Email')?>"<?if($this->formAttr):?> form="<?=$this->escapeHtmlAttr($this->formAttr) ?>"<? endif; ?>/> - <? $exportOptions = $this->export()->getBulkOptions(); if (count($exportOptions) > 0): ?> - <input id="ribbon-export" class="btn btn-transparent" type="submit" name="export" title="<?=$this->transEsc('bookbag_export_selected')?>" value="<?=$this->transEsc('Export')?>"<?if($this->formAttr):?> form="<?=$this->escapeHtmlAttr($this->formAttr) ?>"<? endif; ?>/> - <? endif; ?> - <input id="ribbon-print" class="btn btn-transparent" type="submit" name="print" title="<?=$this->transEsc('bookbag_print_selected')?>" value="<?=$this->transEsc('Print')?>"<?if($this->formAttr):?> form="<?=$this->escapeHtmlAttr($this->formAttr) ?>"<? endif; ?>/> - <? if ($this->userlist()->getMode() !== 'disabled'): ?> - <input id="ribbon-save" class="btn btn-transparent" type="submit" name="saveCart" title="<?=$this->transEsc('bookbag_save_selected')?>" value="<?=$this->transEsc('Save')?>"<?if($this->formAttr):?> form="<?=$this->escapeHtmlAttr($this->formAttr) ?>"<? endif; ?>/> - <? endif; ?> - <? endif; ?> - <? if (isset($this->showCartControls) && $this->showCartControls): ?> - <input id="<?=$this->idPrefix?>updateCart" type="submit" class="btn btn-transparent" name="add" value="<?=$this->transEsc('Add to Book Bag')?>"<?if($this->formAttr):?> form="<?=$this->escapeHtmlAttr($this->formAttr) ?>"<? endif; ?>/> - <? endif; ?> + <?php if (isset($this->showBulkOptions) && $this->showBulkOptions): ?> + <input id="ribbon-email" class="btn btn-transparent" type="submit" name="email" title="<?=$this->transEsc('bookbag_email_selected')?>" value="<?=$this->transEsc('Email')?>"<?php if($this->formAttr):?> form="<?=$this->escapeHtmlAttr($this->formAttr) ?>"<?php endif; ?>/> + <?php $exportOptions = $this->export()->getBulkOptions(); if (count($exportOptions) > 0): ?> + <input id="ribbon-export" class="btn btn-transparent" type="submit" name="export" title="<?=$this->transEsc('bookbag_export_selected')?>" value="<?=$this->transEsc('Export')?>"<?php if($this->formAttr):?> form="<?=$this->escapeHtmlAttr($this->formAttr) ?>"<?php endif; ?>/> + <?php endif; ?> + <input id="ribbon-print" class="btn btn-transparent" type="submit" name="print" title="<?=$this->transEsc('bookbag_print_selected')?>" value="<?=$this->transEsc('Print')?>"<?php if($this->formAttr):?> form="<?=$this->escapeHtmlAttr($this->formAttr) ?>"<?php endif; ?>/> + <?php if ($this->userlist()->getMode() !== 'disabled'): ?> + <input id="ribbon-save" class="btn btn-transparent" type="submit" name="saveCart" title="<?=$this->transEsc('bookbag_save_selected')?>" value="<?=$this->transEsc('Save')?>"<?php if($this->formAttr):?> form="<?=$this->escapeHtmlAttr($this->formAttr) ?>"<?php endif; ?>/> + <?php endif; ?> + <?php endif; ?> + <?php if (isset($this->showCartControls) && $this->showCartControls): ?> + <input id="<?=$this->idPrefix?>updateCart" type="submit" class="btn btn-transparent" name="add" value="<?=$this->transEsc('Add to Book Bag')?>"<?php if($this->formAttr):?> form="<?=$this->escapeHtmlAttr($this->formAttr) ?>"<?php endif; ?>/> + <?php endif; ?> </div> </div> -<? endif; ?> -<!-- finc: search - bulk-action-buttons - END --> \ No newline at end of file +<?php endif; ?> +<!-- finc: search - bulk-action-buttons - END --> diff --git a/themes/finc/templates/search/controls/limit.phtml b/themes/finc/templates/search/controls/limit.phtml index 03befccf3df28b2ab0fdd1eb9633517988b2c1c6..9284b184791a9838154e3c8a3e277b6c4af9a76e 100644 --- a/themes/finc/templates/search/controls/limit.phtml +++ b/themes/finc/templates/search/controls/limit.phtml @@ -1,16 +1,16 @@ <!-- finc: search - controls - limit --> -<? $limitList = $this->params->getLimitList(); ?> -<? if (count($limitList) > 1): ?> - <? /* finc: DO NOT use 'form-inline' as it messes up the select box */ ?> +<?php $limitList = $this->params->getLimitList(); ?> +<?php if (count($limitList) > 1): ?> + <?php /* finc: DO NOT use class 'form-inline' as it messes up the select box */ ?> <form class="limit" action="<?=$this->currentPath() . $this->results->getUrlQuery()->setLimit(null)?>" method="post"> <label for="limit"><?=$this->transEsc('Results per page')?></label> - <? /* finc: DO NOT use 'form-control' as it messes up the select box */ ?> + <?php /* finc: DO NOT use class 'form-control' as it messes up the select box */ ?> <select id="limit" name="limit" class="jumpMenu"> - <? foreach ($limitList as $limitVal => $limitData): ?> + <?php foreach ($limitList as $limitVal => $limitData): ?> <option value="<?=$this->escapeHtmlAttr($limitVal)?>" <?=$limitData['selected']? ' selected="selected" ':'' ?>><?=$this->escapeHtml($limitData['desc'])?></option> - <? endforeach; ?> + <?php endforeach; ?> </select> <noscript><input type="submit" value="<?=$this->transEsc("Set")?>" /></noscript> </form> -<? endif; ?> +<?php endif; ?> <!-- finc: search - controls - limit - END --> diff --git a/themes/finc/templates/search/controls/sort.phtml b/themes/finc/templates/search/controls/sort.phtml index c007e3e5a7c74012cae8f5d02aa0fcb87a01eb37..c8a8186475864d0fe27206dd387136eb5a82ea4f 100644 --- a/themes/finc/templates/search/controls/sort.phtml +++ b/themes/finc/templates/search/controls/sort.phtml @@ -1,16 +1,16 @@ <!-- finc: search - controls - sort --> -<? $list = $this->params->getSortList(); if (!empty($list)): ?> - <? /* finc: DO NOT use 'form-inline' as it messes up the select box */ ?> +<?php $list = $this->params->getSortList(); if (!empty($list)): ?> + <?php /* finc: we use class 'text-right' */ ?> <form class="search-sort text-right" action="<?=$this->currentPath()?>" method="get" name="sort"> - <?=$this->results->getUrlQuery()->asHiddenFields(array('sort' => '/.*/'));?> + <?=$this->results->getUrlQuery()->asHiddenFields(['sort' => '/.*/']);?> <label for="sort_options_1"><?=$this->transEsc('Sort')?></label> - <? /* finc: DO NOT use 'form-control' as it messes up the select box */ ?> + <?php /* finc: DO NOT use class 'form-control' as it messes up the select box */ ?> <select id="sort_options_1" name="sort" class="jumpMenu"> - <? foreach ($list as $sortType => $sortData): ?> + <?php foreach ($list as $sortType => $sortData): ?> <option value="<?=$this->escapeHtmlAttr($sortType)?>" <?=$sortData['selected']?' selected="selected"':''?>><?=$this->transEsc($sortData['desc'])?></option> - <? endforeach; ?> + <?php endforeach; ?> </select> <noscript><input type="submit" class="btn btn-primary" value="<?=$this->transEsc("Set")?>" /></noscript> </form> -<? endif; ?> +<?php endif; ?> <!-- finc: search - controls - sort - END --> diff --git a/themes/finc/templates/search/home.phtml b/themes/finc/templates/search/home.phtml index 7c0e5f69a12dce82a523763bbb3e49e084023954..723835dde5337b59e190509d6de0b2367e213ea3 100644 --- a/themes/finc/templates/search/home.phtml +++ b/themes/finc/templates/search/home.phtml @@ -1,5 +1,5 @@ <!-- finc: search - home --> -<? +<?php // Set page title. $this->headTitle($this->translate('Search Home')); @@ -11,17 +11,12 @@ if (!isset($this->searchClassId)) { $this->searchClassId = 'Solr'; } -// Load search actions and settings (if any): -$options = $this->searchOptions($this->searchClassId); -$basicSearch = $options->getSearchAction(); -$advSearch = $options->getAdvancedSearchAction(); - $this->layout()->breadcrumbs = false; ?> <div class="searchHomeContent"> - <? /* finc-specific: #7187@89bb6e70; VF moved the original BS code to a separate template: helpers - ils-offline.phtml - CK */ ?> - <? + <?php /* finc-specific: #7187@89bb6e70; VF moved the original BS code to a separate template: helpers - ils-offline.phtml - CK */ ?> + <?php $ilsStatusScript = <<<JS $(document).ready(function() { $.ajax({ @@ -36,30 +31,32 @@ $this->layout()->breadcrumbs = false; }); JS; ?> - <? /* finc-specific: #7187 - END */ ?> + <?php /* finc-specific: #7187 - END */ ?> <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $ilsStatusScript, 'SET');?> - <? /* finc: Activate search box here if you want the old look -- otherwise we keep the consisten look with searchbox in header */ ?> - <? /* =$this->context($this)->renderInContext("search/searchbox.phtml", ['ignoreHiddenFilterMemory' => true])?> - <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, '$("#searchForm_lookfor").focus();', 'SET'); */ ?> + <?php /* finc: Activate search box here if you want the old look -- otherwise we keep the consistent look with searchbox in header */ ?> + <?php /* + <?=$this->context($this)->renderInContext("search/searchbox.phtml", ['ignoreHiddenFilterMemory' => true])?> + <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, '$("#searchForm_lookfor").focus();', 'SET'); ?> + */ ?> </div> -<? if (isset($facetList) && is_array($facetList)): ?> +<?php if (!empty($facetList)): ?> <div class="search-home-facets"> - <? foreach ($facetList as $field => $details): ?> - <? if (isset($this->hierarchicalFacets) && in_array($field, $this->hierarchicalFacets)): ?> - <? $this->headScript()->appendFile('vendor/jsTree/jstree.min.js'); ?> - <? $this->headScript()->appendFile('facets.js'); ?> - <? $sort = isset($this->hierarchicalFacetSortOptions[$field]) ? $this->hierarchicalFacetSortOptions[$field] : ''; ?> - <? + <?php foreach ($facetList as $field => $details): ?> + <?php if ($isHierarchy = in_array($field, $this->hierarchicalFacets ?? [])): + $this->headScript()->appendFile('vendor/jsTree/jstree.min.js'); + $this->headScript()->appendFile('facets.js'); + $sort = $this->hierarchicalFacetSortOptions[$field] ?? ''; $script = <<<JS $(document).ready(function() { + $('#facet_{$this->escapeHtml($field)}_container').removeClass('hide'); initFacetTree($('#facet_{$this->escapeHtml($field)}'), false); }); JS; + echo $this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET'); ?> - <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET');?> - <div class="home-facet <?=$this->escapeHtmlAttr($field)?>"> + <div id="facet_<?=$this->escapeHtml($field)?>_container" class="home-facet <?=$this->escapeHtmlAttr($field)?> hide"> <h2><?=$this->transEsc('home_browse') . ' ' . $this->transEsc($details['label'])?></h2> <div id="facet_<?=$this->escapeHtml($field)?>" class="jstree-facet" data-facet="<?=$this->escapeHtml($field)?>" @@ -71,56 +68,52 @@ JS; </div> </div> <noscript> - <? endif; ?> - <? $sortedList = $this->sortFacetList($this->results, $field, $details['list'], $basicSearch); ?> + <?php if (!$noJsSupport): ?> + <h2><?=$this->transEsc('home_browse') . ' ' . $this->transEsc($details['label'])?></h2> + <?=$this->transEsc('Please enable JavaScript.')?> + <?php endif; ?> + <?php endif; ?> + <?php if (!$isHierarchy || $noJsSupport): // do we need regular display? ?> + <?php $sortedList = $this->sortFacetList($this->results, $field, $details['list'], $basicSearch); ?> <div class="home-facet <?=$this->escapeHtmlAttr($field)?>"> <h2><?=$this->transEsc('home_browse') . ' ' . $this->transEsc($details['label'])?></h2> <div class="home-facet-container"> <ul class="home-facet-list"> - <? /* Special case: two columns for LC call numbers... */ ?> - <? if ($field == "callnumber-first"): ?> - <? $i = 0; - foreach ($sortedList + <?php + // Special case: two columns for LC call numbers... + $maxListLength = $field == 'callnumber-first' + ? $columnSize * 2 : $columnSize; - as $url => $value): ?> - <? if (!empty($value)): ?> - <li><a href="<?=$url?>"><?=$this->escapeHtml($value)?></a></li> - <? else: $i--; ?> - <? endif; ?> - <? if (++$i == 10): ?> - </ul> - <ul class="home-facet-list"> - <? endif; ?> - <? endforeach; ?> - <? /* Special case: collections */ ?> - <? elseif ($field == 'hierarchy_top_title'): ?> - <? $i = 0; - foreach ($sortedList as $url => $value): ?> - <? if (++$i > 10): ?> - <li><a href="<?=$this->url('collections-home')?>"><strong><?=$this->transEsc("More options")?> ...</strong></a></li> - <? break; ?> - <? endif; ?> - <li><a href="<?=$this->url('collections-bytitle')?>?title=<?=urlencode($value)?>"><?=$this->escapeHtml($value)?></a></li> - <? endforeach; ?> - <? else: ?> - <? $i = 0; - foreach ($sortedList as $url => $value): ?> - <? if (++$i > 10): ?> - <li><a href="<?=$this->url($advSearch)?>"><strong><?=$this->transEsc("More options")?> ...</strong></a></li> - <? break; ?> - <? elseif (!empty($value)): ?> - <li><a href="<?=$url?>"><?=$this->escapeHtml($value)?></a></li> - <? else: $i--; ?> - <? endif; ?> - <? endforeach; ?> - <? endif; ?> + // Special case: custom URLs for collections... + $moreUrl = $field == 'hierarchy_top_title' + ? $this->url('collections-home') : $this->url($advSearch); + + // Convenience variable: + $currentListLength = count($sortedList); + ?> + <?php $i = 0; foreach ($sortedList as $url => $value): + // Special case: custom URLs for collections... + if ($field == 'hierarchy_top_title') { + $url = $this->url('collections-bytitle') . '?title=' . urlencode($value); + } + ?> + <li><a href="<?=$url?>"><?=$this->escapeHtml(empty($value) ? '-' : $value)?></a></li> + <?php if (++$i >= $currentListLength) break; // end of list? bail out! ?> + <?php if ($i >= $maxListLength): // list too long? show more link! ?> + <li><a href="<?=$moreUrl?>"><strong><?=$this->transEsc("More options")?>...</strong></a></li> + <?php break; ?> + <?php elseif ($i % $columnSize === 0): // end of column? insert break! ?> + </ul><ul class="home-facet-list"> + <?php endif; ?> + <?php endforeach; ?> </ul> </div> </div> - <? if (isset($this->hierarchicalFacets) && in_array($field, $this->hierarchicalFacets)): ?> + <?php endif; ?> + <?php if ($isHierarchy): // close tag opened in matching if above ?> </noscript> - <? endif; ?> - <? endforeach; ?> + <?php endif; ?> + <?php endforeach; ?> </div> -<? endif; ?> +<?php endif; ?> <!-- finc: search - home - END --> diff --git a/themes/finc/templates/search/pagination.phtml b/themes/finc/templates/search/pagination.phtml index 5df5bfdb8980e89fcdefe7633c73568497e61bb8..74708050efea7cfeea85875e4b59b50511ec30f3 100644 --- a/themes/finc/templates/search/pagination.phtml +++ b/themes/finc/templates/search/pagination.phtml @@ -1,29 +1,29 @@ <!-- finc: search - pagination --> -<? if ($this->pageCount): ?> +<?php if ($this->pageCount): ?> <ul class="pagination"> - <? if (isset($this->previous)): ?> - <? if (!isset($this->options['disableFirst']) || !$this->options['disableFirst']): ?> + <?php if (isset($this->previous)): ?> + <?php if (!isset($this->options['disableFirst']) || !$this->options['disableFirst']): ?> <li class="first"><a href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage(1)?>">[1]</a></li> - <? endif; ?> + <?php endif; ?> <li class="page-prev"><a href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage($this->previous)?>">« <span class="hidden-xs"><?=$this->transEsc('Prev')?></span></a></li> - <? endif; ?> + <?php endif; ?> - <? if (count($this->pagesInRange) > 1): ?> - <? foreach ($this->pagesInRange as $page): ?> - <? if ($page != $this->current): ?> + <?php if (count($this->pagesInRange) > 1): ?> + <?php foreach ($this->pagesInRange as $page): ?> + <?php if ($page != $this->current): ?> <li><a href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage($page)?>"><?=$page?></a></li> - <? else: ?> + <?php else: ?> <li class="active"><span><?=$page?></span></li> - <? endif; ?> - <? endforeach; ?> - <? endif; ?> + <?php endif; ?> + <?php endforeach; ?> + <?php endif; ?> - <? if (isset($this->next)): ?> + <?php if (isset($this->next)): ?> <li class="page-next"><a href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage($this->next)?>"><span class="hidden-xs"><?=$this->transEsc('Next');?></span> »</a></li> - <? if (!isset($this->options['disableLast']) || !$this->options['disableLast']): ?> + <?php if (!isset($this->options['disableLast']) || !$this->options['disableLast']): ?> <li class="last"><a href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage($this->pageCount)?>">[<?=$this->pageCount?>]</a></li> - <? endif; ?> - <? endif; ?> + <?php endif; ?> + <?php endif; ?> </ul> -<? endif; ?> +<?php endif; ?> <!-- finc: search - pagination - END --> diff --git a/themes/finc/templates/search/results.phtml b/themes/finc/templates/search/results.phtml index 4ec2aee5626492de661a4756177925bebc6f631e..fe22d92e56bdd3226eefbce493f4aa52d092b449 100644 --- a/themes/finc/templates/search/results.phtml +++ b/themes/finc/templates/search/results.phtml @@ -1,106 +1,122 @@ <!-- finc: search - results --> -<? - // Set up page title: - $lookfor = $this->results->getUrlQuery()->isQuerySuppressed() ? '' : $this->params->getDisplayQuery(); - if (isset($this->overrideTitle)) { - $this->headTitle($this->overrideTitle); - } else { - $this->headTitle($this->translate('Search Results') . (empty($lookfor) ? '' : " - {$lookfor}")); - } +<?php +// Set up page title: +$lookfor = $this->results->getUrlQuery()->isQuerySuppressed() ? '' : $this->params->getDisplayQuery(); +if (isset($this->overrideTitle)) { + $this->headTitle($this->overrideTitle); +} else { + $this->headTitle($this->translate('Search Results') . (empty($lookfor) ? '' : " - {$lookfor}")); +} - // Set up search box: - $this->layout()->searchbox = $this->context($this)->renderInContext( - 'search/searchbox.phtml', - [ - 'lookfor' => $lookfor, - 'searchIndex' => $this->params->getSearchHandler(), - 'searchType' => $this->params->getSearchType(), - 'searchId' => $this->results->getSearchId(), - 'searchClassId' => $this->params->getSearchClassId(), - 'checkboxFilters' => $this->params->getCheckboxFacets(), - 'filterList' => $this->params->getFilters(), - 'hasDefaultsApplied' => $this->params->hasDefaultsApplied(), - 'selectedShards' => $this->params->getSelectedShards(), - 'ignoreHiddenFiltersInRequest' => isset($this->ignoreHiddenFiltersInRequest) ? $this->ignoreHiddenFiltersInRequest : false, - 'ignoreHiddenFilterMemory' => isset($this->ignoreHiddenFilterMemory) ? $this->ignoreHiddenFilterMemory : false, - ] - ); +// Set up search box: +$this->layout()->searchbox = $this->context($this)->renderInContext( + 'search/searchbox.phtml', + [ + 'lookfor' => $lookfor, + 'searchIndex' => $this->params->getSearchHandler(), + 'searchType' => $this->params->getSearchType(), + 'searchId' => $this->results->getSearchId(), + 'searchClassId' => $this->params->getSearchClassId(), + 'checkboxFilters' => $this->params->getCheckboxFacets(), + 'filterList' => $this->params->getFilters(), + 'hasDefaultsApplied' => $this->params->hasDefaultsApplied(), + 'selectedShards' => $this->params->getSelectedShards(), + 'ignoreHiddenFiltersInRequest' => isset($this->ignoreHiddenFiltersInRequest) ? $this->ignoreHiddenFiltersInRequest : false, + 'ignoreHiddenFilterMemory' => isset($this->ignoreHiddenFilterMemory) ? $this->ignoreHiddenFilterMemory : false, + ] +); - // Set up breadcrumbs: - if (isset($this->overrideTitle)) { - $this->layout()->breadcrumbs .= '<li class="active">' . $this->escapeHtml($this->overrideTitle) . '</li>'; - } else { - $this->layout()->breadcrumbs .= '<li class="active">' . $this->transEsc('Search') . ': ' . $this->escapeHtml($lookfor) . '</li>'; - } +// Set up breadcrumbs: +if (isset($this->overrideTitle)) { + $this->layout()->breadcrumbs .= '<li class="active">' . $this->escapeHtml($this->overrideTitle) . '</li>'; +} else { + $this->layout()->breadcrumbs .= '<li class="active">' . $this->transEsc('Search') . ': ' . $this->escapeHtml($lookfor) . '</li>'; +} - // Enable cart if appropriate: - $this->showBulkOptions = $this->params->getOptions()->supportsCart() && $this->showBulkOptions; - // Checkboxes if appropriate: - $this->showCartControls = $this->params->getOptions()->supportsCart() && $this->cart()->isActive() - && ($this->showBulkOptions || !$this->cart()->isActiveInSearch()); - // Enable bulk options if appropriate: - $this->showCheckboxes = $this->showCartControls || $this->showBulkOptions; +// Enable cart if appropriate: +$this->showBulkOptions = $this->params->getOptions()->supportsCart() && $this->showBulkOptions; +// Checkboxes if appropriate: +$this->showCartControls = $this->params->getOptions()->supportsCart() && $this->cart()->isActive() + && ($this->showBulkOptions || !$this->cart()->isActiveInSearch()); +// Enable bulk options if appropriate: +$this->showCheckboxes = $this->showCartControls || $this->showBulkOptions; - // Load Javascript only if list view parameter is NOT full: - if ($this->params->getOptions()->getListViewOption() != "full") { - $this->headScript()->appendFile("record.js"); - $this->headScript()->appendFile("embedded_record.js"); - } +// Load Javascript only if list view parameter is NOT full: +if ($this->params->getOptions()->getListViewOption() != "full") { + $this->headScript()->appendFile("record.js"); + $this->headScript()->appendFile("embedded_record.js"); +} - // Load Javascript dependencies into header: - $this->headScript()->appendFile("vendor/hunt.min.js"); - $this->headScript()->appendFile("check_item_statuses.js"); - $this->headScript()->appendFile("check_save_statuses.js"); +// Load Javascript dependencies into header: +$this->headScript()->appendFile("vendor/hunt.min.js"); +$this->headScript()->appendFile("check_item_statuses.js"); +$this->headScript()->appendFile("check_save_statuses.js"); ?> -<div class="<?=$this->layoutClass('mainbody')?>"> - <? if (($recordTotal = $this->results->getResultTotal()) > 0): // only display these at very top if we have results ?> - <? foreach ($this->results->getRecommendations('top') as $current): ?> - <?=$this->recommend($current)?> - <? endforeach; ?> - <? endif; ?> +<?php /* finc: we need search-results-col to pull content to full width, also used in print styles! - CK */?> +<div class="<?=$this->layoutClass('mainbody')?> search-results-col"> + <?php if (($recordTotal = $this->results->getResultTotal()) > 0): // only display these at very top if we have results ?> + <?php foreach ($this->results->getRecommendations('top') as $index => $current): ?> + <?=$this->recommend($current, 'top', $index)?> + <?php endforeach; ?> + <?php endif; ?> <?=$this->flashmessages()?> - <? /* finc: remove 'hidden' below to show search-stats; we also hide the entire bar on xs + sm - CK */ ?> - <nav class="search-header hidden-xs hidden-sm hidden-print"> - <div class="search-stats hidden"> - <? if ($recordTotal > 0): ?> + <?php /* finc: remove 'hidden' below to show search-stats; we also hide the entire bar on xs + sm - CK */ ?> + <nav class="search-header hidden-print"> + <div class="search-stats"> + <?php /* finc: use spans for easier to show/hide choices - CK */ ?> + <?php if ($recordTotal > 0): ?> + <span class="hit-stats hidden-xs hidden-sm"> <?=$this->context()->renderInContext('search/controls/showing.phtml', ['lookfor' => $lookfor, 'recordTotal' => $recordTotal]) ?> - <? else: ?> + </span> + <span class="offcanvas-toogler"> + <button class="search-filter-toggle btn btn-primary visible-xs" href="#search-sidebar" data-toggle="offcanvas" title="<?=$this->transEsc('sidebar_expand') ?>"> + <?=$this->transEsc('Refine Results') ?> + </button> + </span> + <?php else: ?> <h2><?=$this->transEsc('nohit_heading')?></h2> - <? endif; ?> + <?php endif; ?> </div> - <? if ($recordTotal > 0): ?> - <div class="search-controls"> - <?=$this->render('search/controls/limit.phtml')?> - <?=$this->render('search/controls/sort.phtml')?> - <?=$this->render('search/controls/view.phtml')?> - </div> - <? endif; ?> - </nav> - <? /* End Listing Options */ ?> + <?php if ($recordTotal > 0): ?> + <?php /* finc: use spans for easier to show/hide choices - CK */ ?> + <div class="search-controls"> + <span class="limit"> + <?=$this->render('search/controls/limit.phtml')?> + </span> + <span class="sort right"> + <?=$this->render('search/controls/sort.phtml')?> + </span> + <span class="view"> + <?=$this->render('search/controls/view.phtml')?> + </span> + </div> + <?php endif; ?> + </nav> + <?php /* End Listing Options */ ?> - <? if ($recordTotal < 1): ?> - <p> - <? if (isset($this->overrideEmptyMessage)): ?> - <?=$this->overrideEmptyMessage?> - <? else: ?> - <? $this->layout()->srmessage = $this->translate('nohit_lookfor_html', ['%%lookfor%%' => $this->escapeHtml($lookfor)]); ?> - <?=$this->layout()->srmessage ?> - <? endif; ?> - </p> - <? if (isset($this->parseError)): ?> - <p class="alert alert-danger"><?=$this->transEsc('nohit_parse_error')?></p> - <? endif; ?> - <? foreach (($top = $this->results->getRecommendations('top')) as $current): ?> - <?=$this->recommend($current)?> - <? endforeach; ?> - <? foreach ($this->results->getRecommendations('noresults') as $current): ?> - <? if (!in_array($current, $top)): ?> - <?=$this->recommend($current)?> - <? endif; ?> - <? endforeach; ?> - <? else: ?> + <?php if ($recordTotal < 1): ?> + <p> + <?php if (isset($this->overrideEmptyMessage)): ?> + <?=$this->overrideEmptyMessage?> + <?php else: ?> + <?php $this->layout()->srmessage = $this->translate('nohit_lookfor_html', ['%%lookfor%%' => $this->escapeHtml($lookfor)]); ?> + <?=$this->layout()->srmessage?> + <?php endif; ?> + </p> + <?php if (isset($this->parseError)): ?> + <p class="alert alert-danger"><?=$this->transEsc('nohit_parse_error')?></p> + <?php endif; ?> + <?php foreach (($top = $this->results->getRecommendations('top')) as $index => $current): ?> + <?=$this->recommend($current, 'top', $index)?> + <?php endforeach; ?> + <?php foreach ($this->results->getRecommendations('noresults') as $index => $current): ?> + <?php if (!in_array($current, $top)): ?> + <?=$this->recommend($current, 'noresults', $index)?> + <?php endif; ?> + <?php endforeach; ?> + <?php else: ?> <form id="search-cart-form" method="post" name="bulkActionForm" action="<?=$this->url('cart-searchresultsbulk')?>" data-lightbox data-lightbox-onsubmit="bulkFormHandler"> <?=$this->context($this)->renderInContext('search/bulk-action-buttons.phtml', ['idPrefix' => ''])?> </form> @@ -108,33 +124,33 @@ <?=$this->context($this)->renderInContext('search/bulk-action-buttons.phtml', ['idPrefix' => 'bottom_', 'formAttr' => 'search-cart-form'])?> <?=$this->paginationControl($this->results->getPaginator(), 'Sliding', 'search/pagination.phtml', ['results' => $this->results, 'options' => isset($this->paginationOptions) ? $this->paginationOptions : []])?> - <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> - — - <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> - <? if ($this->accountCapabilities()->getSavedSearchSetting() === 'enabled'): ?> - — - <? if (is_numeric($this->results->getSearchId())): ?> - <? 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> - <? else: ?> - <a href="<?=$this->url('myresearch-savesearch')?>?save=<?=urlencode($this->results->getSearchId())?>"><i class="fa fa-save" aria-hidden="true"></i> <?=$this->transEsc('save_search')?></a> - <? endif; ?> - <? endif; ?> - <? endif; ?> - </div> - <? endif; ?> - </div> - <? /* End Main Listing */ ?> + <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> + <?php else: ?> + <a href="<?=$this->url('myresearch-savesearch')?>?save=<?=urlencode($this->results->getSearchId())?>"><i class="fa fa-save" aria-hidden="true"></i> <?=$this->transEsc('save_search')?></a> + <?php endif; ?> + <?php endif; ?> + <?php endif; ?> + </div> + <?php endif; ?> +</div> +<?php /* End Main Listing */ ?> - <? /* Narrow Search Options */ ?> - <div class="<?=$this->layoutClass('sidebar')?>"> - <? foreach ($this->results->getRecommendations('side') as $current): ?> - <?=$this->recommend($current)?> - <? endforeach; ?> - </div> - <? /* End Narrow Search Options */ ?> +<?php /* Narrow Search Options */ ?> +<div class="<?=$this->layoutClass('sidebar')?>" id="search-sidebar"> + <?php foreach ($this->results->getRecommendations('side') as $index => $current): ?> + <?=$this->recommend($current, 'side', $index)?> + <?php endforeach; ?> +</div> +<?php /* End Narrow Search Options */ ?> <!-- finc: search - results - END --> diff --git a/themes/finc/templates/search/searchTabs.phtml b/themes/finc/templates/search/searchTabs.phtml index 3dfe07d34e0ce1387cbdc9d8fc907ec4b088dc1d..f5be8f1aaa1fb5a512e0a272b97ebad9c24e0fa7 100644 --- a/themes/finc/templates/search/searchTabs.phtml +++ b/themes/finc/templates/search/searchTabs.phtml @@ -1,16 +1,16 @@ <!-- finc: search - searchTabs --> -<? if (isset($searchTabs) && count($searchTabs) > 0): ?> +<?php if (isset($searchTabs) && count($searchTabs) > 0): ?> <ul class="nav nav-tabs"> - <? foreach ($searchTabs as $tab): ?> - <? if ($this->permission()->allowDisplay($tab['permission'])): ?> + <?php foreach ($searchTabs as $tab): ?> + <?php if ($this->permission()->allowDisplay($tab['permission'])): ?> <li<?=$tab['selected'] ? ' class="active"' : ''?>> <a <?=$tab['selected'] ? '' : 'href="' . $this->escapeHtmlAttr($tab['url']) . '"'?>><?=$this->transEsc($tab['label']);?></a> </li> - <? elseif ($block = $this->permission()->getAlternateContent($tab['permission'])): ?> + <?php elseif ($block = $this->permission()->getAlternateContent($tab['permission'])): ?> <?=$block?> - <? endif; ?> - <? endforeach; ?> + <?php endif; ?> + <?php endforeach; ?> </ul> -<? endif; ?> +<?php endif; ?> <!-- finc: search - searchTabs - END --> diff --git a/themes/finc/templates/search/searchbox.phtml b/themes/finc/templates/search/searchbox.phtml index 050d3d733a74969e960baec9613e1de3097dc0ae..de089ef016d20764bce9ea2c8fd54a0bb7b6a986 100644 --- a/themes/finc/templates/search/searchbox.phtml +++ b/themes/finc/templates/search/searchbox.phtml @@ -1,5 +1,5 @@ <!-- finc: search - searchbox --> -<? +<?php // Set default value if necessary: if (!isset($this->searchClassId)) { $this->searchClassId = 'Solr'; @@ -28,109 +28,106 @@ if (empty($hiddenFilters) && !$ignoreHiddenFilterMemory) { } $hiddenFilterParams = $this->searchTabs()->getCurrentHiddenFilterParams($this->searchClassId, $ignoreHiddenFilterMemory, '?'); ?> -<? $searchTabs = $this->searchTabs()->getTabConfig($this->searchClassId, $this->lookfor, $this->searchIndex, $this->searchType, $hiddenFilters); ?> -<? if ($this->searchType == 'advanced'): ?> - <? /* finc: keep .no-margin-t or advanced search box will be pushed down too far (navbar-form) */ ?> - <div class="navbar-left flip no-margin-t"> - <? $tabs = $this->context($this)->renderInContext('search/searchTabs', ['searchTabs' => $searchTabs['tabs']]); ?> - <? if (!empty($tabs)): ?><?=$tabs?> - <div class="tab-content clearfix no-gutter-all"><? endif; ?> +<?php $tabConfig = $this->searchTabs()->getTabConfig($this->searchClassId, $this->lookfor, $this->searchIndex, $this->searchType, $hiddenFilters); ?> +<?php if ($this->searchType == 'advanced'): ?> + <?php /* finc: keep .no-margin-t or advanced search box will be pushed down too far (navbar-form) */ ?> + <div class="navbar-form navbar-left flip no-margin-t"> + <?php $tabs = $this->context($this)->renderInContext('search/searchTabs', ['searchTabs' => $tabConfig['tabs']]); ?> + <?php if (!empty($tabs)): ?><?=$tabs?> + <div class="tab-content clearfix no-gutter-all"><?php endif; ?> <p class="adv_search_terms"><?=$this->transEsc("Your search terms")?> : "<strong><?=$this->escapeHtml($this->lookfor)?></strong>"</p> - <? /* finc: we use an ul li list, CK */ ?> + <?php /* finc: we use an ul li list, CK */ ?> <ul class="adv_search_links"> <li><a href="<?=$this->url($advSearch)?>?edit=<?=$this->escapeHtmlAttr($this->searchId)?>"><?=$this->transEsc("Edit this Advanced Search")?></a></li> <li><a href="<?=$this->url($advSearch) . $hiddenFilterParams?>"><?=$this->transEsc("Start a new Advanced Search")?></a></li> <li><a href="<?=$this->url($searchHome) . $hiddenFilterParams?>"><?=$this->transEsc("Start a new Basic Search")?></a></li> </ul> - <? if (!empty($tabs)): ?></div><? endif; ?> + <?php if (!empty($tabs)): ?></div><?php endif; ?> </div> -<? else: ?> - <form id="searchForm" class="searchForm navbar-form navbar-left flip" role="search" method="get" action="<?=$this->url($basicSearch)?>" name="searchForm" autocomplete="off"> - <?=$this->context($this)->renderInContext('search/searchTabs', ['searchTabs' => $searchTabs['tabs']]);?> - <? $placeholder = $this->searchbox()->getPlaceholderText(isset($searchTabs['selected']['id']) ? $searchTabs['selected']['id'] : null); ?> - <? /* finc: We use a list here, CK */ ?> +<?php else: ?> + <form id="searchForm" class="searchForm navbar-form navbar-left flip" method="get" action="<?=$this->url($basicSearch)?>" name="searchForm" autocomplete="off"> + <?= $this->context($this)->renderInContext('search/searchTabs', ['searchTabs' => $tabConfig['tabs']]); ?> + <?php $placeholder = $this->searchbox()->getPlaceholderText($tabConfig['selected']['id'] ?? null); ?> + <?php /* finc: keep "required" */ ?> + <input id="searchForm_lookfor" class="searchForm_lookfor form-control search-query<?php if($this->searchbox()->autocompleteEnabled($this->searchClassId)):?> autocomplete searcher:<?=$this->escapeHtmlAttr($this->searchClassId) ?><?=$this->searchbox()->autocompleteAutoSubmit($this->searchClassId) ? ' ac-auto-submit' : '' ?><?php endif ?>" type="text" name="lookfor" value="<?=$this->escapeHtmlAttr($this->lookfor)?>"<?php if ($placeholder): ?> placeholder="<?=$this->transEsc($placeholder) ?>"<?php endif ?> aria-label="<?=$this->transEsc("search_terms")?>" required="required" /> + <?php /* finc: We use a list here, CK */ ?> <ul class="navbar-left list-unstyled"> - <li> - <? /* finc: we use required='required', CK */ ?> - <input id="searchForm_lookfor" - class="searchForm_lookfor form-control search-query<? if ($this->searchbox()->autocompleteEnabled($this->searchClassId)): ?> autocomplete searcher:<?=$this->escapeHtmlAttr($this->searchClassId)?><? endif ?>" - type="text" name="lookfor" value="<?=$this->escapeHtmlAttr($this->lookfor)?>"<? if ($placeholder): ?> placeholder="<?=$this->transEsc($placeholder)?>"<? endif ?> required="required"/> - </li> - <? if ($handlerCount > 1): ?> + <?php if ($handlerCount > 1): ?> <li class="hidden-xs"> - <select id="searchForm_type" class="searchForm_type form-control" name="type" data-native-menu="false"> - <? foreach ($handlers as $handler): ?> + <select id="searchForm_type" class="searchForm_type form-control" name="type" data-native-menu="false" aria-label="<?=$this->transEsc("Search type")?>"> + <?php foreach ($handlers as $handler): ?> <option value="<?=$this->escapeHtmlAttr($handler['value'])?>"<?=$handler['selected'] ? ' selected="selected"' : ''?>><?=$handler['indent'] ? '-- ' : ''?><?=$this->transEsc($handler['label'])?></option> - <? endforeach; ?> + <?php endforeach; ?> </select> </li> - <? elseif ($handlerCount == 1): ?> + <?php elseif ($handlerCount == 1): ?> <input type="hidden" name="type" value="<?=$this->escapeHtmlAttr($handlers[0]['value'])?>"/> - <? endif; ?> + <?php endif; ?> <li> <button type="submit" class="btn btn-primary"><i class="fa fa-search" aria-hidden="true"></i> <span class="find-label"><?=$this->transEsc("Find")?></span></button> </li> - <? if ($advSearch): ?> + <?php if ($advSearch): ?> <li class="hidden-xs"> - <a href="<?=$this->url($advSearch) . ((isset($this->searchId) && $this->searchId) ? '?edit=' . $this->escapeHtmlAttr($this->searchId) : $hiddenFilterParams)?>" class="btn btn-transparent" - role="button" rel="nofollow"><i class="fa fa-cog"></i> <span class="hidden-xs hidden-sm hidden-md"><?=$this->transEsc("Advanced")?></span></a> + <a href="<?=$this->url($advSearch) . ((isset($this->searchId) && $this->searchId) ? '?edit=' . $this->escapeHtmlAttr($this->searchId) : $hiddenFilterParams)?>" class="btn btn-transparent" role="button" rel="nofollow"><i class="fa fa-cog"></i> <span class="hidden-xs hidden-sm hidden-md"><?=$this->transEsc("Advanced")?></span></a> </li> - <? endif; ?> + <?php endif; ?> <li> - <? if ($geoUrl = $this->geocoords()->getSearchUrl($options)) : ?> + <?php if ($geoUrl = $this->geocoords()->getSearchUrl($options)) : ?> <a href="<?=$geoUrl?>" class="btn btn-link"><?=$this->transEsc('Geographic Search')?></a> - <? endif; ?> + <?php endif; ?> </li> </ul> - <? /* finc: We hide this for small and keep the solution using labels, same below - CK */ ?> + <?php /* finc: We hide this for small and keep the solution using labels, same below - CK */ ?> <div class="checkbox hidden-xs"> - <? $shards = $options->getShards(); + <?php $shards = $options->getShards(); if ($options->showShardCheckboxes() && !empty($shards)): ?> - <? + <?php $selectedShards = isset($this->selectedShards) ? $this->selectedShards : $options->getDefaultSelectedShards(); ?> - <? foreach ($shards as $shard => $val): ?> - <? $isSelected = empty($selectedShards) || in_array($shard, $selectedShards); ?> - <input type="checkbox" <?=$isSelected ? 'checked="checked" ' : ''?>name="shard[]" value='<?=$this->escapeHtmlAttr($shard)?>' id='checkbox_<?=$this->escapeHtmlAttr($shard)?>'/> <label for="checkbox_<?=$this->escapeHtmlAttr($shard)?>"><?=$this->transEsc($shard)?></label> - <? endforeach; ?> - <? endif; ?> + <?php foreach ($shards as $shard => $val): ?> + <?php $isSelected = empty($selectedShards) || in_array($shard, $selectedShards); ?> + <label for="checkbox_<?=$this->escapeHtmlAttr($shard)?>"><?=$this->transEsc($shard)?> + <input type="checkbox" <?=$isSelected ? 'checked="checked" ' : ''?>name="shard[]" value='<?=$this->escapeHtmlAttr($shard)?>' id='checkbox_<?=$this->escapeHtmlAttr($shard)?>'/> + </label> + <?php endforeach; ?> + <?php endif; ?> </div> - <? + <?php $filterDetails = $this->searchbox()->getFilterDetails( isset($this->filterList) && is_array($this->filterList) ? $this->filterList : [], isset($this->checkboxFilters) && is_array($this->checkboxFilters) ? $this->checkboxFilters : [] ); ?> - <? if ((isset($hasDefaultsApplied) && $hasDefaultsApplied) || !empty($filterDetails)): ?> - <? $defaultFilterState = $options->getRetainFilterSetting() ? ' checked="checked"' : ''; ?> + <?php if ((isset($hasDefaultsApplied) && $hasDefaultsApplied) || !empty($filterDetails)): ?> + <?php $defaultFilterState = $options->getRetainFilterSetting() ? ' checked="checked"' : ''; ?> <div class="checkbox"> - <input type="checkbox"<?=$defaultFilterState?> class="searchFormKeepFilters" id="keepfilters"> - <label for="keepfilters"> + <label> + <input type="checkbox"<?=$defaultFilterState?> class="searchFormKeepFilters"/> <?=$this->transEsc("basic_search_keep_filters")?> </label> </div> <div class="hidden"> - <? foreach ($filterDetails as $current): ?> + <?php foreach ($filterDetails as $current): ?> <input class="applied-filter" id="<?=$this->escapeHtmlAttr($current['id'])?>" type="checkbox"<?=$defaultFilterState?> name="filter[]" value="<?=$this->escapeHtmlAttr($current['value'])?>"/> <label for="<?=$this->escapeHtmlAttr($current['id'])?>"><?=$this->escapeHtml($current['value'])?></label> - <? endforeach; ?> - <? if (isset($hasDefaultsApplied) && $hasDefaultsApplied): ?> + <?php endforeach; ?> + <?php if (isset($hasDefaultsApplied) && $hasDefaultsApplied): ?> <!-- this is a hidden element that flags whether or not default filters have been applied; it is intentionally unlabeled, as users are not meant to manipulate it directly. --> <input class="applied-filter" id="dfApplied" type="checkbox" name="dfApplied" value="1"<?=$defaultFilterState?> /> - <? endif; ?> + <?php endif; ?> </div> - <? endif; ?> - <? foreach ($hiddenFilters as $key => $filter): ?> - <? foreach ($filter as $value): ?> + <?php endif; ?> + <?php foreach ($hiddenFilters as $key => $filter): ?> + <?php foreach ($filter as $value): ?> <input type="hidden" name="hiddenFilters[]" value="<?=$this->escapeHtmlAttr($key) . ':' . $this->escapeHtmlAttr($value)?>"/> - <? endforeach; ?> - <? endforeach; ?> - <? + <?php endforeach; ?> + <?php endforeach; ?> + <?php /* Show hidden field for active search class when in combined handler mode. */ if ($this->searchbox()->combinedHandlersActive()) { echo '<input type="hidden" name="activeSearchClassId" value="' . $this->escapeHtmlAttr($this->searchClassId) . '" />'; @@ -144,5 +141,5 @@ $hiddenFilterParams = $this->searchTabs()->getCurrentHiddenFilterParams($this->s } ?> </form> -<? endif; ?> +<?php endif; ?> <!-- finc: search - searchbox - END --> diff --git a/themes/finc/theme.config.php b/themes/finc/theme.config.php index 0d40a70f59dc9970a7435799fd12f521924bc4ff..02cfd66e1a3e14e1f4300f3e2d7dcfe374d47e11 100644 --- a/themes/finc/theme.config.php +++ b/themes/finc/theme.config.php @@ -4,15 +4,13 @@ return [ 'js' => [ 'openurl.js', 'check_item_statuses.js', - // remove nxt line when aria-hidden issue fixed, obsolete in VF5, see #12684 - 'finc.js', ], 'helpers' => [ 'aliases' => [ 'branchInfo' => 'finc\View\Helper\Root\BranchInfo', 'externalCatalogueLink' => 'finc\View\Helper\Root\ExternalCatalogueLink', 'interlibraryloan' => 'finc\View\Helper\Root\InterlibraryLoanLink', - 'sidefacet' => 'finc\View\Helper\Root\SideFacet', + 'sideFacet' => 'finc\View\Helper\Root\SideFacet', ], 'factories' => [ 'finc\View\Helper\Root\BranchInfo' => diff --git a/themes/foundation5/templates/myresearch/bulk-action-buttons.phtml b/themes/foundation5/templates/myresearch/bulk-action-buttons.phtml index fefff2ae29e29a4981a8afbef4a2d16de85200b7..2789df76f8bd06bcde437f3ad301cad6a3f11c54 100644 --- a/themes/foundation5/templates/myresearch/bulk-action-buttons.phtml +++ b/themes/foundation5/templates/myresearch/bulk-action-buttons.phtml @@ -1,7 +1,7 @@ <!-- myresearch - BULK-ACTION-BUTTONS.phtml --> -<? if (isset($list)): ?> - <input type="hidden" name="listID" value="<?=$this->escapeHtmlAttr($list->id)?>" /> - <input type="hidden" name="listName" value="<?=$this->escapeHtmlAttr($list->title)?>" /> +<? if (isset($locations)): ?> + <input type="hidden" name="listID" value="<?=$this->escapeHtmlAttr($locations->id)?>" /> + <input type="hidden" name="listName" value="<?=$this->escapeHtmlAttr($locations->title)?>" /> <? endif; ?> <? $user = $this->auth()->isLoggedIn(); ?> <div class="checkbox select-all hide-for-print">