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, 17 Oct 2013 18:14:39 +0000 (14:14 -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>
Conflicts:

Open-ILS/src/templates/opac/parts/footer.tt2

Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
Open-ILS/src/templates/opac/parts/footer.tt2

index ad222e5..f283f83 100644 (file)
@@ -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;
 
index 1517c87..bae0a8c 100644 (file)
@@ -5,7 +5,8 @@
     <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) %]
+    <a href="[% gurl %]"> [% l('GALILEO') %] </a> &nbsp;|&nbsp;
     [% IF ctx.timing %]
     <div id="timing">
         [% FOR event IN ctx.timing %]