@@ -, +, @@ --- installer/data/mysql/sysprefs.sql | 1 + installer/data/mysql/updatedatabase.pl | 7 +++++++ .../admin/preferences/enhanced_content.pref | 7 +++++++ koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 9 +++++++++ opac/opac-detail.pl | 5 ++++- 5 files changed, 28 insertions(+), 1 deletions(-) --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -365,3 +365,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacBrowseResults','1','Disable/enable browsing and paging search results from the OPAC detail page.',NULL,'YesNo'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('SvcMaxReportRows','10','Maximum number of rows to return via the report web service.',NULL,'Integer'); INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('ReservesControlBranch','PatronLibrary','ItemHomeLibrary|PatronLibrary','Branch checked for members reservations rights','Choice'); +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('GoogleBooksPreview','1','Display the ability to place multiple holds or not','','YesNo'); --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -5308,6 +5308,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = "3.09.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('GoogleBooksPreview','1','Display the ability to place multiple holds or not','','YesNo')"); + print "Upgrade to $DBversion done (Add GooglePreview syspref)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) --- 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 @@ -166,6 +166,13 @@ Enhanced Content: yes: Add no: "Don't add" - cover images from Open Library to search results and item detail pages on the OPAC. + Google Books Preview: + - + - pref: GoogleBooksPreview + choices: + yes: Add + no: "Don't add" + - a Google Books preview link to the OPAC item details page when a matching ISBN is found. Library Thing: # Awkward syntax below, due to quoting conflicts - --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt +++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt @@ -295,6 +295,15 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
+ + [% IF ( GoogleBooksPreview ) %] + [% IF ( normalized_isbn ) %] + + +
+ [% END %] + [% END %] + [% IF ( OPACLocalCoverImages ) %]
[% END %] [% IF ( OPACAmazonEnabled ) %][% IF ( OPACAmazonCoverImages ) %][% IF ( OPACurlOpenInNewWindow ) %]Cover image[% ELSE %]Cover image[% END %][% END %][% END %] --- a/opac/opac-detail.pl +++ a/opac/opac-detail.pl @@ -75,7 +75,10 @@ if ( ! $record ) { print $query->redirect("/cgi-bin/koha/errors/404.pl"); # escape early exit; } -$template->param( biblionumber => $biblionumber ); +$template->param( + biblionumber => $biblionumber, + GoogleBooksPreview => C4::Context->preference('GoogleBooksPreview'), +); # get biblionumbers stored in the cart my @cart_list; --