From 8da9d099c6a3455edd3c0aee2253b68050d3c596 Mon Sep 17 00:00:00 2001 From: Indranil Das Gupta Date: Mon, 1 Jun 2015 05:26:31 +0530 Subject: [PATCH] Bug 14252: (Followup) Fixed issues pointed to in comment #40 Based on Mark's inputs in comment #40 - [1] selected 'mast' (short of 'masthead') and updated : (a) bug_14252-OpacLangSelectorMode_syspref.sql (b) sysprefs.sql (c) opac.pref [2] Reduced the calls to Koha.Preference() from : (a) masthead.inc (b) opac-bottom.inc After applying this patch, update the database once for it to pick up the new option values -'both|mast|foot'. Signed-off-by: Mark Tompsett Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- .../atomicupdate/bug_14252-OpacLangSelectorMode_syspref.sql | 2 +- installer/data/mysql/sysprefs.sql | 2 +- .../intranet-tmpl/prog/en/modules/admin/preferences/opac.pref | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc | 3 ++- koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc | 3 ++- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_14252-OpacLangSelectorMode_syspref.sql b/installer/data/mysql/atomicupdate/bug_14252-OpacLangSelectorMode_syspref.sql index edaed6c43b..229a7a5c5e 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|head|foot','Select the location to display the language selector','Choice'); +INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('OpacLangSelectorMode','both','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 004ebadee4..1981f84e33 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -269,7 +269,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|head|foot','Select the location to display the language selector','Choice'), +('OpacLangSelectorMode','both','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/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref index af7872122b..1b48977b9d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -322,7 +322,7 @@ OPAC: - pref: OpacLangSelectorMode choices: both: "both masthead and footer" - head: "only header" + mast: "only masthead" foot: "only footer" Features: - diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc index c8dff498be..4e08ed8c43 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ -1,4 +1,5 @@ [% USE Koha %] +[% SET OpacLangSelectorMode = Koha.Preference('OpacLangSelectorMode') %]