[open-ils-commits] [GIT] Evergreen ILS branch master updated. 6a25b321280371818281ea180cdbf4e90509acc2

Evergreen Git git at git.evergreen-ils.org
Thu Jul 11 11:03:51 EDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  6a25b321280371818281ea180cdbf4e90509acc2 (commit)
      from  6fbaf6cec686cfe25b2186799ed7b0368aa1cc6f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6a25b321280371818281ea180cdbf4e90509acc2
Author: Dan Scott <dscott at laurentian.ca>
Date:   Thu Jul 11 10:41:32 2013 -0400

    Maintenance message: avoid Unicode corruption, support KPAC
    
    By shifting from an Apache config environment variable to a config.tt2
    variable, we gain the advantage of more robust Unicode support as well
    as the ability to turn maintenance messages on or off without requiring
    a reload of Apache.
    
    However, we do lose the convenience of per-vhost maintenance messages;
    sites requiring this functionality can use the ctx.hostname variable to
    provide conditional per-host messages.
    
    This also adds support for displaying the maintenance message in the
    KPAC.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/examples/apache/eg.conf.in b/Open-ILS/examples/apache/eg.conf.in
index 53347df..d095e15 100644
--- a/Open-ILS/examples/apache/eg.conf.in
+++ b/Open-ILS/examples/apache/eg.conf.in
@@ -149,6 +149,3 @@ NameVirtualHost *:443
     Include eg_vhost.conf
 </VirtualHost>
 
-# Set a maintenance message for notifying OPAC users of scheduled downtime
-# This can be put in specific vhosts as needed
-#SetEnv MAINTENANCE_MESSAGE "The system will be down tomorrow night so use the card catalog at that time."
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index e2de1e8..0838a29 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -243,8 +243,6 @@ sub load_common {
         return $self->redirect_ssl unless $self->cgi->https;
     }
 
-    $ctx->{maintenance_message} = $self->apache->subprocess_env("MAINTENANCE_MESSAGE");
-
     $ctx->{referer} = $self->cgi->referer;
     $ctx->{path_info} = $self->cgi->path_info;
     $ctx->{full_path} = $ctx->{base_path} . $self->cgi->path_info;
diff --git a/Open-ILS/src/templates/kpac/parts/base.tt2 b/Open-ILS/src/templates/kpac/parts/base.tt2
index 0685035..7af00ed 100644
--- a/Open-ILS/src/templates/kpac/parts/base.tt2
+++ b/Open-ILS/src/templates/kpac/parts/base.tt2
@@ -10,6 +10,9 @@
         <title>[% l("Kid's Catalog - [_1]", ctx.page_title) %]</title>
     </head>
     <body>
+        [%- IF ctx.maintenance_message -%]
+        <div id="maintenance_message">[% ctx.maintenance_message %]</div>
+        [%- END -%]
         <div class="main_center">
             [% INCLUDE 'kpac/parts/header.tt2' %]
             <div class="main_wrapper"> [% content %] </div>
diff --git a/Open-ILS/src/templates/opac/parts/config.tt2 b/Open-ILS/src/templates/opac/parts/config.tt2
index c8e87ef..1ba05cc 100644
--- a/Open-ILS/src/templates/opac/parts/config.tt2
+++ b/Open-ILS/src/templates/opac/parts/config.tt2
@@ -149,4 +149,9 @@ search.basic_config = {
 # Set to 1 or 'true' to enable
 ctx.google_books_preview = 0;
 
+##############################################################################
+# Set a maintenance message to display in the catalogue
+#
+# ctx.maintenance_message = "The system will not be available February 29, 2104.";
+
 %]
diff --git a/Open-ILS/src/templates/opac/parts/topnav.tt2 b/Open-ILS/src/templates/opac/parts/topnav.tt2
index b6ba5e7..46c497a 100644
--- a/Open-ILS/src/templates/opac/parts/topnav.tt2
+++ b/Open-ILS/src/templates/opac/parts/topnav.tt2
@@ -1,8 +1,6 @@
-[% IF ctx.maintenance_message %]
-<div id="maintenance_message">
-[%= ctx.maintenance_message %]
-</div>
-[% END %]
+[%- IF ctx.maintenance_message -%]
+<div id="maintenance_message">[% ctx.maintenance_message %]</div>
+[%- END -%]
 [% IF !ctx.is_staff %]
 <div id="header-wrap">
 <div id="header">
diff --git a/Open-ILS/web/css/skin/default/kpac/style.css b/Open-ILS/web/css/skin/default/kpac/style.css
index 9e433e8..ed7e092 100755
--- a/Open-ILS/web/css/skin/default/kpac/style.css
+++ b/Open-ILS/web/css/skin/default/kpac/style.css
@@ -1023,3 +1023,10 @@ div.hr {
     display : none;
 }
 
+#maintenance_message {
+    padding: 5px;
+    width: 100%;
+    background-color: #c00;
+    color: #fff;
+    text-align: center;
+}

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/examples/apache/eg.conf.in                |    3 ---
 .../src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm    |    2 --
 Open-ILS/src/templates/kpac/parts/base.tt2         |    3 +++
 Open-ILS/src/templates/opac/parts/config.tt2       |    5 +++++
 Open-ILS/src/templates/opac/parts/topnav.tt2       |    8 +++-----
 Open-ILS/web/css/skin/default/kpac/style.css       |    7 +++++++
 6 files changed, 18 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list