From 92d8a1233a90b23884fe02e207d2bf7a132ec8a6 Mon Sep 17 00:00:00 2001
From: Mark Tompsett <mtompset@hotmail.com>
Date: Sun, 31 May 2015 23:16:17 -0400
Subject: [PATCH] Bug 14252: Follow up noprint and default values

TEST PLAN
---------
0) Back up your DB
1) open OPAC
   -- should only have languages in footer.
      Annoyingly below the fold.
2) Drop your koha database, and create a blank one.
3) Apply all patches
4) Go to staff client and do an install of koha, with
   all the dummy data.
5) Once installed, refresh your OPAC page
   -- language selector position should be in footer
      still as expected.
   -- this confirms the sysprefs.sql change.
6) Restore your DB
7) run the updatedatabase.pl script
8) Refresh the OPAC page
   -- should still only have languages in the footer.
   -- this confirms that upgrade won't change anything.
   -- this confirms the atomic update.
9) git diff origin/master
   -- the opac-bottom.inc difference should only
      have changes around a SET, IF, and END.
      This confirms the noprint was fixed.
10) In the staff client, change the OPAC system preference,
    OpacLangSelectorMode, to all three values.
    For each value, refresh the OPAC page, and confirm the
    position of the language selector.
    -- should work as expected.
11) run koha qa test tools

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
---
 .../data/mysql/atomicupdate/bug_14252-OpacLangSelectorMode_syspref.sql  | 2 +-
 installer/data/mysql/sysprefs.sql                                       | 2 +-
 koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc               | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/installer/data/mysql/atomicupdate/bug_14252-OpacLangSelectorMode_syspref.sql b/installer/data/mysql/atomicupdate/bug_14252-OpacLangSelectorMode_syspref.sql
index 229a7a5..db4d8ac 100644
--- a/installer/data/mysql/atomicupdate/bug_14252-OpacLangSelectorMode_syspref.sql
+++ b/installer/data/mysql/atomicupdate/bug_14252-OpacLangSelectorMode_syspref.sql
@@ -1,4 +1,4 @@
 --
 -- Adds OpacLangSelectorMode syspref for bug 14252
 --
-INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('OpacLangSelectorMode','both','both|mast|foot','Select the location to display the language selector','Choice');
+INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('OpacLangSelectorMode','foot','both|mast|foot','Select the location to display the language selector','Choice');
diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql
index cfa9616..0300930 100644
--- a/installer/data/mysql/sysprefs.sql
+++ b/installer/data/mysql/sysprefs.sql
@@ -270,7 +270,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
 ('OpacItemLocation','callnum','callnum|ccode|location','Show the shelving location of items in the opac','Choice'),
 ('OPACItemsResultsDisplay','0','','If OFF : show only the status of items in result list.If ON : show full location of items (branch+location+callnumber) as in staff interface','YesNo'),
 ('OpacKohaUrl','1',NULL,'Show \'Powered by Koha\' text on OPAC footer.',NULL),
-('OpacLangSelectorMode','both','both|mast|foot','Select the location to display the language selector','Choice'),
+('OpacLangSelectorMode','foot','both|mast|foot','Select the location to display the language selector','Choice'),
 ('opaclanguages','en',NULL,'Set the default language in the OPAC.','Languages'),
 ('opaclanguagesdisplay','0','','If ON, enables display of Change Language feature on OPAC','YesNo'),
 ('opaclayoutstylesheet','opac.css','','Enter the name of the layout CSS stylesheet to use in the OPAC','free'),
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc
index 7f54e6f..ec06d94 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc
@@ -34,7 +34,7 @@
     [% IF ( opaclanguagesdisplay ) %]
         [% IF ( languages_loop && opaclanguagesdisplay ) %]
             [% UNLESS ( one_language_enabled ) %]
-                <div id="changelanguage" class="navbar navbar-fixed-bottom navbar-static-bottom">
+                <div id="changelanguage" class="navbar navbar-fixed-bottom navbar-static-bottom noprint">
                     <div class="navbar-inner">
                         <ul id="i18nMenu" class="nav">
                             <li><p class="lang navbar-text"><strong>Languages:&nbsp;</strong></p></li>
-- 
2.1.4