PINES GALILEO TPAC link and auth redirector
authorBill Erickson <berick@esilibrary.com>
Mon, 19 Aug 2013 13:27:58 +0000 (09:27 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Thu, 6 Nov 2014 17:53:56 +0000 (12:53 -0500)
* 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 868907d..d3547ba 100644 (file)
@@ -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;
 }
 
@@ -509,5 +511,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 bd4aea4..05b6d33 100644 (file)
@@ -11,7 +11,7 @@
     <a href="http://www.georgialibraries.org/lib/directories/pineslibdir.html">[% l('Find a Library Near Me') %]</a> &nbsp;|&nbsp;
     <a href="http://pines.georgialibraries.org/catalog-help">[% l('Help') %]</a> &nbsp;|&nbsp;
     <a href="http://www.georgialibraries.org/public/pines.html">[% l('About PINES') %]</a> &nbsp;|&nbsp;
-    <a href="http://www.galileo.usg.edu/">[% l('GALILEO') %]</a>
+    [% gurl = mkurl(ctx.opac_root _ '/galileo', {}, 1) %]
     [% IF ctx.timing %]
     <div id="timing">
         [% FOR event IN ctx.timing %]