@@ -, +, @@ OPAC - Apply patch - Udate database - Restart plack and memchached - Go to staff client, verify that language selector displays at the bottom of the page (as before) - Go to system preferences, verify that there is a new preference StaffLanguageSelectorMode (name similar to the sypref ror OPAC), and that it is set to 'footer' - Change mode for top, both and footer and verify, go to staff client and verify for each that the language selector displays as appropriate --- ...icupdate_bug_18718_Language_Selector_Staff.perl | 13 +++++++++ installer/data/mysql/sysprefs.sql | 3 ++- .../intranet-tmpl/prog/en/includes/header.inc | 1 + .../prog/en/includes/intranet-bottom.inc | 4 +-- .../prog/en/includes/langmenu-staff-top.inc | 31 ++++++++++++++++++++++ .../en/modules/admin/preferences/staff_client.pref | 7 +++++ 6 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/atomicupdate_bug_18718_Language_Selector_Staff.perl create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/langmenu-staff-top.inc --- a/installer/data/mysql/atomicupdate/atomicupdate_bug_18718_Language_Selector_Staff.perl +++ a/installer/data/mysql/atomicupdate/atomicupdate_bug_18718_Language_Selector_Staff.perl @@ -0,0 +1,13 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do("INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('StaffLangSelectorMode','footer','top|both|footer','Select the location to display the language selector in staff client','Choice')" ); + + # or perform some test and warn + # if( !column_exists( 'biblio', 'biblionumber' ) ) { + # warn "There is something wrong"; + # } + + # Always end with this (adjust the bug info) + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 18718 - Language selector in staff header menu similar to OPAC )\n"; +} --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -337,7 +337,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','top|both|footer','Select the location to display the language selector','Choice'), +('OpacLangSelectorMode','both','top|both|footer','Select the location to display the language selector in OPAC','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'), @@ -493,6 +493,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('SpineLabelShowPrintOnBibDetails','0','','If turned on, a \"Print Label\" link will appear for each item on the bib details page in the staff interface.','YesNo'), ('staffClientBaseURL','',NULL,'Specify the base URL of the staff client','free'), ('StaffDetailItemSelection', '1', NULL, 'Enable item selection in record detail page', 'YesNo'), +('StaffLangSelectorMode','footer','top|both|footer','Select the location to display the language selector in staff client','Choice'), ('StaffSearchResultsDisplayBranch','holdingbranch','holdingbranch|homebranch','Controls the display of the home or holding branch for staff search results','Choice'), ('StaffSerialIssueDisplayCount','3','','Number of serial issues to display per subscription in the Staff client','Integer'), ('StaticHoldsQueueWeight','0',NULL,'Specify a list of library location codes separated by commas -- the list of codes will be traversed and weighted with first values given higher weight for holds fulfillment -- alternatively, if RandomizeHoldsQueueWeight is set, the list will be randomly selective','Integer'), --- a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc @@ -97,6 +97,7 @@ + [% INCLUDE 'langmenu-staff-top.inc' %]
  • Help
  • --- a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc @@ -1,6 +1,6 @@ +[% USE Koha %] - -[% IF ( languages_loop && ! popup_window ) %] +[% IF ( ( languages_loop ) && ( ! popup_window ) && ( Koha.Preference('StaffLangSelectorMode') == 'both' || Koha.Preference('StaffLangSelectorMode') == 'footer') ) %] [% UNLESS ( one_language_enabled ) %]