PINES GALILEO TPAC link and auth redirector
authorBill Erickson <berick@esilibrary.com>
Mon, 19 Aug 2013 13:27:58 +0000 (09:27 -0400)
committerBill Erickson <berick@esilibrary.com>
Mon, 19 Aug 2013 13:27:58 +0000 (09:27 -0400)
* 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 <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
Open-ILS/src/templates/opac/parts/footer.tt2

index 210a3c0..a8559f9 100644 (file)
@@ -196,6 +196,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;
 }
 
@@ -474,5 +476,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;
 
index 2368055..8c7d327 100644 (file)
@@ -1,6 +1,8 @@
 <div id="footer-wrap">
 <div id="footer">
     <a href="/">[% l('Dynamic catalog') %]</a> &nbsp;|&nbsp;
+    [% gurl = mkurl(ctx.opac_root _ '/galileo', {}, 1) %]
+    <a href="[% gurl %]"> [% l('GALILEO') %] </a> &nbsp;|&nbsp;
     <a href="http://example.com">[% l('Bottom Link 2') %]</a> &nbsp;|&nbsp;
     <a href="http://example.com">[% l('Bottom Link 3') %]</a> &nbsp;|&nbsp;
     <a href="http://example.com">[% l('Bottom Link 4') %]</a> &nbsp;|&nbsp;