From: Bill Erickson Date: Fri, 6 Apr 2012 20:32:13 +0000 (-0400) Subject: kpac : added content work X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b057cff72846fe42438fd4afb428fbe7b2ee8ff0;p=evergreen%2Fequinox.git kpac : added content work 1. Consolidated added content apache configs under /eg 2. Added (untested) code to support LibraryThing reviews. -- It looks like we'll need to coordinate w/ LT to get it all hooked up. More research pending. Signed-off-by: Bill Erickson Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/examples/apache/eg_vhost.conf b/Open-ILS/examples/apache/eg_vhost.conf index 62980a2783..4e2ee8fed6 100644 --- a/Open-ILS/examples/apache/eg_vhost.conf +++ b/Open-ILS/examples/apache/eg_vhost.conf @@ -572,6 +572,23 @@ RewriteRule ^/openurl$ ${openurl:%1} [NE,PT] PerlAddVar OILSWebTemplatePath "/openils/var/templates" #PerlAddVar OILSWebTemplatePath "/openils/var/templates_localskin" + #------------------------------------------------- + # Added Content Configuration + #------------------------------------------------- + # Content Cafe + #SetEnv OILS_CONTENT_CAFE_USER MYUSER + #SetEnv OILS_CONTENT_CAFE_PASS MYPASS + + # LibraryThing + #SetEnv OILS_LIBRARYTHING_URL http://ltfl.librarything.com/forlibraries/widget.js?id=MYID + #SetEnv OILS_LIBRARYTHING_HTTPS_URL https://ltfl.librarything.com/forlibraries/widget.js?id=MYID + + # ChiliFresh + #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 + #------------------------------------------------- + SetOutputFilter DEFLATE BrowserMatch ^Mozilla/4 gzip-only-text/html @@ -604,30 +621,13 @@ RewriteRule ^/openurl$ ${openurl:%1} [NE,PT] ExpiresActive On ExpiresByType text/html "access plus 5 seconds" PerlSetVar KPacConfigFile "/openils/conf/kpac.xml.example" - - # For use with embedded Content Cafe content - #SetEnv OILS_CONTENT_CAFE_USER 123 - #SetEnv OILS_CONTENT_CAFE_PASS 456 - # Consider copying/moving other added content configs - # (e.g. NOVELIST) into here or to an outer container shared by - # both /opac and /eg/opac since some are used in both places PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGKPacLoader" - # Expire the HTML quickly since we're loading dynamic data for each page ExpiresActive On ExpiresByType text/html "access plus 5 seconds" - - # For use with embedded Content Cafe content - #SetEnv OILS_CONTENT_CAFE_USER 123 - #SetEnv OILS_CONTENT_CAFE_PASS 456 - # Consider copying/moving other added content configs - # (e.g. NOVELIST) into here or to an outer container shared by - # both /opac and /eg/opac since some are used in both places - - # Note: the template processor will decline handling anything it does not # have an explicit configuration for, which means it will fall back to # Apache to serve the file. However, in the interest of speed, go ahead diff --git a/Open-ILS/src/templates/kpac/parts/acimport.tt2 b/Open-ILS/src/templates/kpac/parts/acimport.tt2 new file mode 100644 index 0000000000..7017cffd6e --- /dev/null +++ b/Open-ILS/src/templates/kpac/parts/acimport.tt2 @@ -0,0 +1,29 @@ +[% + # added content only shows on record detail page + IF ctx.page == 'record'; + + # chilifresh + IF ENV.OILS_CHILIFRESH_URL AND ENV.OILS_CHILIFRESH_ACCOUNT; + chili_url = ENV.OILS_CHILIFRESH_URL; + IF CGI.https AND ENV.OILS_CHILIFRESH_HTTPS_URL; + chili_url = ENV.OILS_CHILIFRESH_HTTPS_URL; + END %] + + + + + + + + [% END; + + # LibraryThing + IF ENV.OILS_LIBRARYTHING_URL; + lt_url = ENV.OILS_LIBRARYTHING_URL; + IF CGI.https AND ENV.OILS_LIBRARYTHING_HTTPS_URL; + lt_url = ENV.OILS_LIBRARYTHING_HTTPS_URL; + END %] + + + [% END %] +[%- END %] diff --git a/Open-ILS/src/templates/kpac/parts/base.tt2 b/Open-ILS/src/templates/kpac/parts/base.tt2 index e80a4c18fc..0685035855 100644 --- a/Open-ILS/src/templates/kpac/parts/base.tt2 +++ b/Open-ILS/src/templates/kpac/parts/base.tt2 @@ -16,6 +16,6 @@ [% INCLUDE 'kpac/parts/footer.tt2' %] - [%- INCLUDE 'kpac/parts/chilifresh.tt2' %] + [%- INCLUDE 'kpac/parts/acimport.tt2' %] diff --git a/Open-ILS/src/templates/kpac/parts/chilifresh.tt2 b/Open-ILS/src/templates/kpac/parts/chilifresh.tt2 deleted file mode 100644 index 9366f602c4..0000000000 --- a/Open-ILS/src/templates/kpac/parts/chilifresh.tt2 +++ /dev/null @@ -1,13 +0,0 @@ -[%- IF ENV.OILS_CHILIFRESH_URL AND ENV.OILS_CHILIFRESH_ACCOUNT AND ctx.page == 'record'; - chili_url = ENV.OILS_CHILIFRESH_URL; - IF CGI.https AND ENV.OILS_CHILIFRESH_HTTPS_URL; - chili_url = ENV.OILS_CHILIFRESH_HTTPS_URL; - END; -%] - - - - - - -[%- END %] diff --git a/Open-ILS/src/templates/kpac/record.tt2 b/Open-ILS/src/templates/kpac/record.tt2 index e34ea29145..63888089b8 100644 --- a/Open-ILS/src/templates/kpac/record.tt2 +++ b/Open-ILS/src/templates/kpac/record.tt2 @@ -32,6 +32,7 @@
+