Bug 10879: OverDrive should check for OverDriveLibraryID before performing search
commit667f7204678a9dafd01a960cdd294e130e31d267
authorOwen Leonard <oleonard@myacpl.org>
Tue, 19 Nov 2019 17:02:02 +0000 (19 17:02 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 14 Feb 2020 21:25:46 +0000 (14 21:25 +0000)
treeeb76b45ba37cb2c5fbeedaf85287dc2cd4907f0c
parentf79f4dc5b1c78db56d43e097d5188aef49a75fe7
Bug 10879: OverDrive should check for OverDriveLibraryID before performing search

This patch modifies the OPAC search results template to check for three
populated system preferences before performing an OverDrive search:
OverDriveLibraryID, OverDriveClientKey, and OverDriveClientSecret.
Previously OverDriveLibraryID was not checked, but without it the
interface reports an error performing the search.

To test you must have credentials for the OverDrive API as defined
in OverDriveClientKey, OverDriveClientSecret, and OverDriveLibraryID
system preferences.

 - With OverDriveLibraryID defined, the catalog search results page in
   the OPAC should show a link to results in the library's OverDrive
   collection.

 - With no value in the OverDriveLibraryID preference the catalog
   search page should not show any message about an OverDrive
   collection.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit cf1c2c1a2a90a376309daee1f08b1dbe3df18bc1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt