From: Bill Erickson Date: Mon, 19 Aug 2013 13:27:58 +0000 (-0400) Subject: PINES GALILEO TPAC link and auth redirector X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=5dbbe7e7f10489dd86b725e668ce6d56b01640f2;p=evergreen%2Fpines.git 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. --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm index 6aa1f5811d..9b80161542 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm @@ -215,6 +215,8 @@ sub load { return $self->load_myopac_prefs if $path =~ m|opac/myopac/prefs|; return $self->load_sms_cn if $path =~ m|opac/sms_cn|; + return $self->load_galileo if $path =~ m|opac/galileo|; + return Apache2::Const::OK; } @@ -558,5 +560,20 @@ sub load_logout { ); } + +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 81758e7a91..a25cc8b492 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 %]