From 4717c4312a9db8ff59bfb810be620dec75afbe58 Mon Sep 17 00:00:00 2001
From: Bill Erickson <berick@esilibrary.com>
Date: Mon, 21 Nov 2011 15:44:40 -0500
Subject: [PATCH] TPac; support context-genereted refresh content

If the tpac context object contains a "refresh" attribute, it will be
used as the content attribute in a <meta http-equiv="refresh" ...>
element in the page head.  If present, it will override the default
refresh content for the authentication timeout.

While we're in there, let's use the more correct form of the content
attribute:  content="x; url=foo"

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
---
 Open-ILS/src/templates/opac/parts/base.tt2 | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Open-ILS/src/templates/opac/parts/base.tt2 b/Open-ILS/src/templates/opac/parts/base.tt2
index 239ab30bea..1721a9cbf1 100644
--- a/Open-ILS/src/templates/opac/parts/base.tt2
+++ b/Open-ILS/src/templates/opac/parts/base.tt2
@@ -2,8 +2,10 @@
 <html xmlns='http://www.w3.org/1999/xhtml' lang='[% ctx.locale %]' xml:lang='[% ctx.locale %]'>
     <head>
         <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
-        [% IF ctx.authtime %]
-        <meta http-equiv="refresh" content="[% ctx.authtime %];[% ctx.logout_page %]">
+        [% IF ctx.refresh %]
+        <meta http-equiv="refresh" content="[% ctx.refresh %]">
+        [% ELSIF ctx.authtime %]
+        <meta http-equiv="refresh" content="[% ctx.authtime %]; url=[% ctx.logout_page %]">
         [% END %]
         <link rel="stylesheet" type="text/css" href="[% ctx.media_prefix %]/css/skin/default/opac/semiauto.css" />
         <link rel="stylesheet" type="text/css" href="[% ctx.media_prefix %]/css/skin/default/opac/style.css" />
-- 
2.11.0