From 63c5076f0d78c85a6b39e636d933d75164a32bf9 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 | 4 +++- 2 files changed, 20 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 bd9c3df0dd..72fff1d97b 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm @@ -207,6 +207,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; } @@ -529,5 +531,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 a5d7d9fb36..a79053083d 100644 --- a/Open-ILS/src/templates/opac/parts/footer.tt2 +++ b/Open-ILS/src/templates/opac/parts/footer.tt2 @@ -6,6 +6,8 @@ [% l('Request Library Card') %]  |  [% ELSE %] + [% gurl = mkurl(ctx.opac_root _ '/galileo', {}, 1) %] + [% l('GALILEO') %]  |  [% l('Bottom Link 2') %]  |  [% END %] [% l('Bottom Link 3') %]  |  @@ -33,4 +35,4 @@ -[% END %] \ No newline at end of file +[% END %] -- 2.11.0