From f58bb896b6dbd4207e7b888378746b9280e00a5e 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 --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm | 17 +++++++++++++++++ Open-ILS/src/templates/opac/parts/footer.tt2 | 3 ++- 2 files changed, 19 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 ad222e5a93..f283f83566 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm @@ -194,6 +194,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; } @@ -471,5 +473,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 1517c8746c..bae0a8c6af 100644 --- a/Open-ILS/src/templates/opac/parts/footer.tt2 +++ b/Open-ILS/src/templates/opac/parts/footer.tt2 @@ -5,7 +5,8 @@ [% l('Find a Library Near Me') %]  |  [% l('Help') %]  |  [% l('About PINES') %]  |  - [% l('GALILEO') %] + [% gurl = mkurl(ctx.opac_root _ '/galileo', {}, 1) %] + [% l('GALILEO') %]  |  [% IF ctx.timing %]
[% FOR event IN ctx.timing %] -- 2.11.0