From: koha@smfpl.org To: koha-patches@lists.koha-community.org Date: Fri, 8 Oct 2010 11:46:34 -0400 Message-Id: <1286552794-643-1-git-send-email-koha@smfpl.org> X-Mailer: git-send-email 1.5.6.5 Subject: [Koha-patches] [PATCH] Bug 5292 Google Preview Option for OPAC X-BeenThere: koha-patches@lists.koha-community.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Patches submitted to Koha List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: koha-patches-bounces@lists.koha-community.org Errors-To: koha-patches-bounces@lists.koha-community.org From: koha --- installer/data/mysql/en/mandatory/sysprefs.sql | 1 + .../admin/preferences/enhanced-content.pref | 6 ++++++ .../opac-tmpl/prog/en/modules/opac-detail.tmpl | 10 ++++++++++ opac/opac-detail.pl | 2 ++ 4 files changed, 19 insertions(+), 0 deletions(-) diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql index 8bfed37..e2fe020 100644 --- a/installer/data/mysql/en/mandatory/sysprefs.sql +++ b/installer/data/mysql/en/mandatory/sysprefs.sql @@ -286,3 +286,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ILS-DI:Authorized_IPs','','.','Restricts usage of ILS-DI to some IPs','Free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OverduesBlockCirc','noblock','When checking out an item should overdues block checkout, generate a confirmation dialogue, or allow checkout','noblock|confirmation|block','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('DisplayMultiPlaceHold','1','Display the ability to place multiple holds or not','','YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('GooglePreview','1','Display the ability to place multiple holds or not','','YesNo'); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced-content.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced-content.pref index cecb7a6..0650808 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced-content.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced-content.pref @@ -130,6 +130,12 @@ Enhanced Content: yes: Add no: "Don't add" - cover images from Google Books to search results and item detail pages on the OPAC. + - + - pref: GooglePreview + choices: + yes: Add + no: "Don't add" + - add link to detail page to Google preview when it exists for a biblio (by isbn) Library Thing: # Awkward syntax below, due to quoting conflicts - diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl index b1fdf84..36cd7bb 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl @@ -70,6 +70,16 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
+ + + + +
+ + + /gp/reader//ref=sib_dp_pt/002-7879865-0184864#reader-link" target="_blank">.01.MZZZZZZZ.jpg" alt="Cover Image" />/gp/reader//ref=sib_dp_pt/002-7879865-0184864#reader-link">.01.MZZZZZZZ.jpg" alt="Cover Image" /> diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 629ebd2..cec8e15 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -62,6 +62,8 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( my $biblionumber = $query->param('biblionumber') || $query->param('bib'); +$template->param( 'GooglePreview' => C4::Context->preference('GooglePreView') ); + $template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') ); $template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) ); -- 1.5.6.5