Bug 15311 - Let libraries set text to display when OpacMaintenance = on
authorBarry Cannon <bc@interleaf.ie>
Wed, 16 Dec 2015 10:37:17 +0000 (10:37 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 26 Feb 2016 14:19:20 +0000 (14:19 +0000)
commit62860d53ae9653daa07943786bb07482ea9f0bb0
treed1ad1a7e95f021fd3c830389cbe9da8e4207723d
parent3a3b0472245153c515b09a3c2c69f3e4cea80121
Bug 15311 - Let libraries set text to display when OpacMaintenance = on

Added new systempreference OpacMaintenanceNotice.
When OpacMaintenance is ON the HTML contents of OpacMaintenanceNotice will
be displayed.
Enabling OpacMaintenance is all that is required to enable this preference.
If OpacMaintenanceNotice is undefined, the default (original) notice will
appear when OpacMaintenance is enabled.

To test:
- 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

Moving code to atomic update and fixing merge conflict

NOTE: Accounted for an SQL typo and autoescaping of the template.
      If someone else could test this, then I would be fine with
      marking it signed off.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
installer/data/mysql/atomicupdate/Bug_15311-OpacMaintenanceNotice_syspref.sql [new file with mode: 0644]
installer/data/mysql/sysprefs.sql
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
koha-tmpl/opac-tmpl/bootstrap/en/modules/maintenance.tt