From b52ddb0d4e4e8bf11255450a30d28964df535fa5 Mon Sep 17 00:00:00 2001 From: Ian Walls Date: Wed, 21 Sep 2011 16:44:41 -0400 Subject: [PATCH 1/2] Enh 6902: Novelist Select enhanced content Content-Type: text/plain; charset="utf-8" Adds support for EBSCO's NoveList Select service. The library provides their user profile and password, as well as where they'd like the content to appear on the OPAC page (options are: in a tab (default), above holdings table, below holdings table, and under Save Record on the right) Sponsored by Los Gatos Public Library and EBSCO Signed-off-by: Owen Leonard --- .../admin/preferences/enhanced_content.pref | 23 +++++++++++ koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 42 +++++++++++++++++++- opac/opac-detail.pl | 8 ++++ 3 files changed, 72 insertions(+), 1 deletions(-) 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 8709181..171b5f4 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 @@ -123,6 +123,29 @@ Enhanced Content: - pref: BakerTaylorPassword class: password - . + Novelist Select: + - + - pref: NovelistSelectEnabled + choices: + yes: Add + no: "Don't add" + - Novelist Select content to the OPAC (requires that you have entered in a user profile and password, which can be seen in image links). + - + - Display Novelist Select content + - pref: NovelistSelectView + choices: + tab: in an OPAC tab + above: above the holdings table + below: below the holdings table + right: under the Save Record dropdown, on the right + - . + - + - Access Novelist Select using user profile + - pref: NovelistSelectProfile + - and password + - pref: NovelistSelectPassword + class: password + - . Google: - - pref: GoogleJackets 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 3e8586d..a42ceea 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt @@ -28,6 +28,9 @@ [% IF OpenLibraryCovers %] KOHA.OpenLibrary.GetCoverFromIsbn(); [% END %] + [% IF ( NovelistSelectProfile ) %] + novSelect.loadContentForISBN('[% normalized_isbn %]','[% NovelistSelectProfile %]', '[% NovelistSelectPassword %]', function(d){}); + [% END %] [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %] $(".tagbutton").click(KOHA.Tags.add_tag_button);[% END %][% END %][% END %] @@ -314,9 +317,18 @@ YAHOO.util.Event.onContentReady("furtherm", function () { [% IF ( BakerTaylorContentURL ) %] Enhanced Content: - [% IF ( OPACurlOpenInNewWindow ) %]Content Cafe[% ELSE %]Content Cafe[% END %] + [% IF ( OPACurlOpenInNewWindow ) %]Content Cafe[% ELSE %]Content Cafe[% END %] + + [% END %] + [% IF ( NovelistSelectProfile ) %] + [% IF ( NovelistSelectView == 'above') %] + + Novelist Select: +
+ [% END %] [% END %] +
@@ -360,6 +372,12 @@ YAHOO.util.Event.onContentReady("furtherm", function () { ( [% IF reviews.defined %][% reviews.size %][% ELSE %]0[% END %] ) [% END %] +[% IF ( NovelistSelectProfile ) %] +[% IF ( NovelistSelectView == 'tab') %] +
  • Novelist Select
  • +[% END %] +[% END %] + [% IF ( OPACAmazonEnabled ) %][% IF ( OPACAmazonSimilarItems ) %][% IF ( AMAZON_SIMILAR_PRODUCTS ) %]
  • Related
  • [% END %][% END %][% END %] [% IF ( OPACFRBRizeEditions ) %][% IF ( XISBNS ) %]
  • Editions
  • [% END %][% END %] @@ -591,6 +609,12 @@ YAHOO.util.Event.onContentReady("furtherm", function () { [% END %][% END %] [% END %] +[% IF ( NovelistSelectProfile ) %] [% IF ( NovelistSelectView == 'tab') %] +
    +
    +
    +[% END %] [% END %] + [% IF ( subscriptionsnumber ) %]

    This is a serial

    @@ -802,6 +826,12 @@ YAHOO.util.Event.onContentReady("furtherm", function () { [% END %]
    +[% IF ( NovelistSelectProfile ) %][% IF ( NovelistSelectView == 'below' ) %] +
    +

    Novelist Select

    +
    +
    +[% END %][% END %]
    @@ -863,6 +893,13 @@ YAHOO.util.Event.onContentReady("furtherm", function () { + [% IF ( NovelistSelectProfile ) %] [% IF ( NovelistSelectView == 'right') %] +
    +

    Novelist Select

    +
    +
    + [% END %] [% END %] + @@ -883,4 +920,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { [% LibraryThingForLibrariesID %]&accessibility=1">here. [% END %] [% END %] +[% IF ( NovelistSelectProfile ) %] + +[% END %] [% INCLUDE 'opac-bottom.inc' %] diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index e18e046..ebb2d1c 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -494,6 +494,14 @@ $template->param(LibraryThingForLibrariesTabbedView => C4::Context->preference('LibraryThingForLibrariesTabbedView') ); } +# Novelist Select +if( C4::Context->preference('NovelistSelectEnabled') ) +{ +$template->param(NovelistSelectProfile => C4::Context->preference('NovelistSelectProfile') ); +$template->param(NovelistSelectPassword => C4::Context->preference('NovelistSelectPassword') ); +$template->param(NovelistSelectView => C4::Context->preference('NovelistSelectView') ); +} + # Babelthèque if ( C4::Context->preference("Babeltheque") ) { -- 1.7.3