diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 25f94052aa..6883a53ab9 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4384,6 +4384,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = "3.05.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpenLibraryCovers',0,'If ON Openlibrary book covers will be show',NULL,'YesNo');"); + print "Upgrade to $DBversion done (Add syspref OpenLibraryCovers)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt index 3430cbbe1e..1da6e3837f 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt @@ -21,8 +21,14 @@ dateFormat: 'uk',[% END %] widgets : ['zebra'], sortList: [[0,0]] - });[% IF ( GoogleJackets ) %] - KOHA.Google.GetCoverFromIsbn([% covernewwindow %]);[% END %][% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %] + }); + [% IF ( GoogleJackets ) %] + KOHA.Google.GetCoverFromIsbn([% covernewwindow %]); + [% END %] + [% IF OpenLibraryCovers %] + KOHA.OpenLibrary.GetCoverFromIsbn(); + [% END %] + [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %] $(".tagbutton").click(KOHA.Tags.add_tag_button);[% END %][% END %][% END %] }); @@ -72,6 +78,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { [% ELSE %]No cover image available[% END %][% END %][% END %] [% IF ( GoogleJackets ) %]
[% END %] + [% IF OpenLibraryCovers %][% END %] [% IF ( BakerTaylorEnabled ) %][% IF ( normalized_isbn ) %][% IF ( OPACurlOpenInNewWindow ) %][% ELSE %][% END %][% END %][% END %]