@@ -, +, @@ for Providers - OK for the 'Coce' syspref: it's sensible to distinct configuration from enabling/disbaling the service. - OK also for the multichoices systempreference. If a new service popup, it won't be difficult to amend the .pref file. --- installer/data/mysql/sysprefs.sql | 3 ++- installer/data/mysql/updatedatabase.pl | 8 ++++++-- .../prog/en/modules/admin/preferences/enhanced_content.pref | 13 +++++++++++-- koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 8 ++++---- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 6 ++++-- 7 files changed, 29 insertions(+), 13 deletions(-) --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -86,8 +86,9 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('CircAutocompl','1',NULL,'If ON, autocompletion is enabled for the Circulation input','YesNo'), ('CircAutoPrintQuickSlip','qslip',NULL,'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window, Display a print slip window or Clear the screen.','Choice'), ('CircControl','ItemHomeLibrary','PickupLibrary|PatronLibrary|ItemHomeLibrary','Specify the agency that controls the circulation and fines policy','Choice'), +('Coce','0', NULL, 'If on, enables cover retrieval from the configured Coce server', 'YesNo'), ('CoceHost', NULL, NULL, 'Coce server URL', 'Free'), -('CoceProviders', NULL, NULL, 'Coce providers, for example aws,gb', 'Free'), +('CoceProviders', NULL, 'aws,gb,ol', 'Coce providers', 'multiple'), ('COinSinOPACResults','1','','If ON, use COinS in OPAC search results page. NOTE: this can slow down search response time significantly','YesNo'), ('ConfirmFutureHolds','0','','Number of days for confirming future holds','Integer'), ('CurrencyFormat','US','US|FR','Determines the display format of currencies. eg: \'36000\' is displayed as \'360 000,00\' in \'FR\' or \'360,000.00\' in \'US\'.','Choice'), --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -9958,13 +9958,17 @@ $DBversion = "3.19.00.XXX"; if ( CheckVersion($DBversion) ) { $dbh->do(q{ INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) + VALUES('Coce','0', 'If on, enables cover retrieval from the configured Coce server', NULL, 'YesNo') + }); + $dbh->do(q{ + INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES('CoceHost', NULL, 'Coce server URL', NULL,'Free') }); $dbh->do(q{ INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) - VALUES('CoceProviders', NULL, 'Coce Providers, for example: aws,gb', NULL,'Free') + VALUES('CoceProviders', NULL, 'Coce providers', 'aws,gb,ol', 'multiple') }); - print "Upgrade to $DBversion done (Bug 9580 - Cover image from Coce, a remote image URL cache)\n"; + print "Upgrade to $DBversion done (Bug 9580: Cover image from Coce, a remote image URL cache)\n"; SetVersion($DBversion); } --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref @@ -339,10 +339,19 @@ Enhanced Content: - . Coce Cover images cache: - + - pref: Coce + choices: + yes: Enable + no: "Don't enable" + - a Coce image cache service. + - - Coce server URL - pref: CoceHost class: url - - - Providers + - Use the following providers to fetch the covers - pref: CoceProviders - - 'separated by comma, for example: aws,gb. Leave empty not to activate this service.' + multiple: + aws: Amazon Web Services + gb: Google Books + ol: Open Library --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc +++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc @@ -165,7 +165,7 @@ $.widget.bridge('uitooltip', $.ui.tooltip); //]]> [% END %] -[% IF Koha.Preference('CoceProviders') %] +[% IF ( Koha.Preference('Coce') && Koha.Preference('CoceProviders') ) %]