From 8249341b8e390ca738161358c82bff1ca1678cea Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 19 Aug 2013 09:27:58 -0400 Subject: [PATCH] PINES GALILEO TPAC link and auth redirector * adds a GALILEO link in the footer template * adds a new TPAC URL target for /eg/opac/galileo, which redirects the user to the GALILEO URL, ensuring the user is first logged in. Signed-off-by: Bill Erickson Conflicts: Open-ILS/src/templates/opac/parts/footer.tt2 PINES/GALILEO avoid auth redirect within library If the physical_loc is set, indicating the patron is physically at a branch (via IP redirect), link directly to the GALILEO site with no authentication pass-through. GALILEO does not requires PINES auth if the client is coming from a known IP address. Signed-off-by: Bill Erickson Conflicts: Open-ILS/src/templates/opac/parts/footer.tt2 Sadly, GALILEO/EBSCO does not use HTTPS, so this will create errors for patrons who authenticate via PINES. Reverting to HTTP. --- .../src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm | 17 +++++++++ Open-ILS/src/templates/opac/parts/footer.tt2 | 42 ++++++++++++++++++++-- 2 files changed, 56 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm index fab9dd6a6e..629389f7c8 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm @@ -285,6 +285,8 @@ sub load { return $self->load_myopac_reservations if $path =~ m|opac/myopac/reservations|; return $self->load_openathens_sso if $path =~ m|opac/sso/openathens$|; + return $self->load_galileo if $path =~ m|opac/galileo|; + return Apache2::Const::OK; } @@ -852,5 +854,20 @@ sub _perform_any_sso_signout_required { ); } + +sub load_galileo { + my $self = shift; + + my $token = $U->simplereq( + 'open-ils.actor', + 'open-ils.actor.session.safe_token', + $self->ctx->{authtoken} + ); + + return $self->generic_redirect( + "http://www.galileo.usg.edu/express?pinesid=$token"); +} + + 1; diff --git a/Open-ILS/src/templates/opac/parts/footer.tt2 b/Open-ILS/src/templates/opac/parts/footer.tt2 index 80f6a8b1ba..969aa55f81 100644 --- a/Open-ILS/src/templates/opac/parts/footer.tt2 +++ b/Open-ILS/src/templates/opac/parts/footer.tt2 @@ -6,11 +6,47 @@ [% l('Request Library Card') %]  |  [% ELSE %] + [% gurl = mkurl(ctx.opac_root _ '/galileo', {}, 1) %] + [% l('GALILEO') %]  |  [% l('Bottom Link 2') %]  |  [% END %] - [% l('Bottom Link 3') %]  |  - [% l('Bottom Link 4') %]  |  - [% l('Bottom Link 5') %] + + + + + [% l('About PINES') %][%- l('Learn More About PINES') %] + + + + + [% IF ctx.timing %]
[% FOR event IN ctx.timing %] -- 2.11.0