TADL: init ezproxy session if logged in
authorJeff Godin <jgodin@tadl.org>
Fri, 12 Oct 2012 19:06:10 +0000 (15:06 -0400)
committerJeff Godin <jgodin@tadl.org>
Fri, 12 Oct 2012 20:25:05 +0000 (16:25 -0400)
If the user is logged in and there is no ezproxy cookie present,
attempt to begin an ezproxy session using a hidden iframe.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
templates_tadlskin/opac/parts/topnav.tt2

index 66681ca..33c53e4 100644 (file)
@@ -1,6 +1,9 @@
 [% IF !ctx.is_staff %]
 <div id="header-wrap">
 <div id="header">
+    [% IF ctx.user && !CGI.cookie('ezproxy') %]
+    <iframe style="display: none;" height="1" width="1" src="https://www.tadl.org/proxyvia/login?url=http://via.tadl.org/loggedin/login.html"></iframe>
+    [% END %]
     <div class="float-left">
         [% INCLUDE "opac/parts/topnav_logo.tt2" %]
     </div>