Adding GALILEO in-library link logic to topnav links.
authorChris Sharp <csharp@georgialibraries.org>
Mon, 4 May 2015 20:49:01 +0000 (16:49 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Mon, 10 Oct 2016 12:26:49 +0000 (08:26 -0400)
Open-ILS/src/templates/opac/parts/topnav_links.tt2

index c269f66..0002952 100644 (file)
            <img alt="[% l('Kids Catalog') %]" src="[% ctx.media_prefix %]/images/navbar-kids.png" />
                [% l("Kids' Catalog") %]</a> 
     <!-- <a href="http://pines.georgialibraries.org/about">[% l('About PINES') %]</a> -->
-       <a href="http://gapines.org/eg/opac/galileo">
+    [% 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 %]">
            <img alt="[% l('GALILEO') %]" src="[% ctx.media_prefix %]/images/navbar-galileo.png" />
                [% l('GALILEO Research Databases') %]</a>
     <a href="http://pines.georgialibraries.org/catalog-help">
@@ -28,4 +35,4 @@
     </div>
 </div>
 
-<div style="clear:both;" />
\ No newline at end of file
+<div style="clear:both;" />