PINES/GALILEO avoid auth redirect within library pines-tpac-galileo-2.3
authorBill Erickson <berick@esilibrary.com>
Wed, 25 Sep 2013 19:18:35 +0000 (15:18 -0400)
committerBill Erickson <berick@esilibrary.com>
Wed, 25 Sep 2013 19:18:35 +0000 (15:18 -0400)
If the physical_loc is set, indicating the patron is physically at a
branch (via IP redirect), link directly to the GALILEO site with no
authentication pass-through.  GALILEO does not requires PINES auth
if the client is coming from a known IP address.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/templates/opac/parts/footer.tt2

index 8c7d327..3e8e01d 100644 (file)
@@ -1,7 +1,13 @@
 <div id="footer-wrap">
 <div id="footer">
     <a href="/">[% l('Dynamic catalog') %]</a> &nbsp;|&nbsp;
-    [% gurl = mkurl(ctx.opac_root _ '/galileo', {}, 1) %]
+    [% IF ctx.physical_loc;
+        # patron is at the branch, no redirect needed
+        gurl = 'http://www.galileo.usg.edu/express';
+    ELSE;
+        # send patron to galileo auth redirector
+        gurl = mkurl(ctx.opac_root _ '/galileo', {}, 1);
+    END %]
     <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;