From dc11832078244cc5f171a578acc4b38c658e076d 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 --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm | 17 +++++++++++++++++ Open-ILS/src/templates/opac/parts/footer.tt2 | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm index eda0c657bd..fb5e98caa9 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm @@ -206,6 +206,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; } @@ -503,5 +505,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( + "https://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 bd4aea450a..05b6d331f3 100644 --- a/Open-ILS/src/templates/opac/parts/footer.tt2 +++ b/Open-ILS/src/templates/opac/parts/footer.tt2 @@ -11,7 +11,7 @@ [% l('Find a Library Near Me') %]  |  [% l('Help') %]  |  [% l('About PINES') %]  |  - [% l('GALILEO') %] + [% gurl = mkurl(ctx.opac_root _ '/galileo', {}, 1) %] [% IF ctx.timing %]
[% FOR event IN ctx.timing %] -- 2.11.0