@@ -, +, @@ when OpacMaintenance = on - Enable OpacMaintenance systempreference - Observe the default maintenance message when OPAC is viewed - Edit OpacMaintenanceNotice systempreference, adding custom HTML - Observe the custom HTML appear on the opac - Remove OpacMaintenanceNotice (mindful of orphaned spaces etc.) - Observe the default opac notice appears in the opac - Disable OpacMaintenance - Observce opac is back online If someone else could test this, then I would be fine with marking it signed off. --- .../atomicupdate/Bug_15311-OpacMaintenanceNotice_syspref.sql | 1 + installer/data/mysql/sysprefs.sql | 1 + installer/data/mysql/updatedatabase.pl | 10 ++++++++++ .../intranet-tmpl/prog/en/modules/admin/preferences/opac.pref | 6 ++++++ koha-tmpl/opac-tmpl/bootstrap/en/modules/maintenance.tt | 9 +++++++-- 5 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/Bug_15311-OpacMaintenanceNotice_syspref.sql --- a/installer/data/mysql/atomicupdate/Bug_15311-OpacMaintenanceNotice_syspref.sql +++ a/installer/data/mysql/atomicupdate/Bug_15311-OpacMaintenanceNotice_syspref.sql @@ -0,0 +1, @@ +INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('OpacMaintenanceNotice','','','A user-defined block of HTML to appear on screen when OpacMaintenace is enabled','Textarea'); --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -299,6 +299,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('OpacLocationBranchToDisplay','holding','holding|home|both','In the OPAC, under location show which branch for Location in the record details.','Choice'), ('OpacLocationBranchToDisplayShelving','holding','holding|home|both','In the OPAC, display the shelving location under which which column.', 'Choice'), ('OpacMaintenance','0','','If ON, enables maintenance warning in OPAC','YesNo'), +('OpacMaintenanceNotice','','','A user-defined block of HTML to appear on screen when OpacMaintenace is enabled','Textarea'), ('OpacMainUserBlock','Welcome to Koha...\r\n
The [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog is offline for system maintenance. We'll be back soon! If you have any questions, please contact the site administrator
+ [% IF Koha.Preference( 'OpacMaintenanceNotice' ) %] + [% Koha.Preference( 'OpacMaintenanceNotice' ).raw %] + [% ELSE %] +The [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog is offline for system maintenance. We'll be back soon! If you have any questions, please contact the site administrator
+ [% END %]