From: Bill Erickson Date: Thu, 11 Oct 2012 20:09:12 +0000 (-0400) Subject: Support new-style Novelist for TPAC. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=376978e2f507b22521d3ae03251e141b7e579323;p=contrib%2FConifer.git Support new-style Novelist for TPAC. Updates the Novelist loading script to use the newer Novelist API. Includes minor change to example/apache/eg_vhost.conf for environment variables. Signed-off-by: Bill Erickson Signed-off-by: Ben Shum --- diff --git a/Open-ILS/examples/apache_24/eg_vhost.conf b/Open-ILS/examples/apache_24/eg_vhost.conf index 2257bf8a15..a5e3fcf89c 100644 --- a/Open-ILS/examples/apache_24/eg_vhost.conf +++ b/Open-ILS/examples/apache_24/eg_vhost.conf @@ -617,6 +617,12 @@ RewriteRule ^/openurl$ ${openurl:%1} [NE,PT] #SetEnv OILS_CHILIFRESH_ACCOUNT #SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js #SetEnv OILS_CHILIFRESH_HTTPS_URL https://secure.chilifresh.com/on-site/js/evergreen.js + + # Novelist + # SetEnv OILS_NOVELIST_URL http://imageserver.ebscohost.com/novelistselect/ns2init.js + # SetEnv OILS_NOVELIST_PROFILE + # SetEnv OILS_NOVELIST_PASSWORD + #------------------------------------------------- diff --git a/Open-ILS/src/templates/opac/parts/acjs.tt2 b/Open-ILS/src/templates/opac/parts/acjs.tt2 index 438daf5361..9cf83ec4cb 100644 --- a/Open-ILS/src/templates/opac/parts/acjs.tt2 +++ b/Open-ILS/src/templates/opac/parts/acjs.tt2 @@ -48,7 +48,24 @@ }); }); [% END; # IF status unknown - END; - END; # IF ident + END %] + + /* Load novelist content */ + novSelect.loadContentForQuery( + { + ClientIdentifier : '[% ident %]', + ISBN : '[% ident %]', + version : '2.1' + }, + '[% ENV.OILS_NOVELIST_PROFILE %]', + '[% ENV.OILS_NOVELIST_PASSWORD %]', + function(d){ + // note if d.length == 0, there is no content to display + // hide the Loading... text + dojo.byId('novelist-loading').innerHTML = ''; + } + ); + + [% END; # IF ident %] diff --git a/Open-ILS/src/templates/opac/parts/record/awards.tt2 b/Open-ILS/src/templates/opac/parts/record/awards.tt2 index 94c72a24d6..915b0e03bd 100644 --- a/Open-ILS/src/templates/opac/parts/record/awards.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/awards.tt2 @@ -7,26 +7,13 @@ - - - [% IF 0 %] - [% l('Reviews:') %] -
- [% END %] [% IF ENV.OILS_NOVELIST_URL %] - [% l('Similar Books:') %] -
-
-
-
-
-
-
-
-
+
[% l('Loading...') %]
+
[% END %] +