]> git.koha-community.org Git - koha.git/commit
Bug 23076: Include OpacUserJS on OPAC maintenance page
authorOwen Leonard <oleonard@myacpl.org>
Fri, 7 Jun 2019 12:10:01 +0000 (12:10 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Tue, 11 Jun 2019 15:24:54 +0000 (17:24 +0200)
commitc6464d55601f98746ac7327141e538484a8842f2
tree0ebc54e1969cab847d36ed2d79faa4632b5e5aa8
parent21cff327830a04f51dd568b63013b0a53a725f7a
Bug 23076: Include OpacUserJS on OPAC maintenance page

This patch coverts the syntax for embedding OpacUserJS in the global
include file so that it uses 'Koha.Preference' syntax. This makes the
data available in templates, like the OPAC maintenance page, to which
the preference data has not been explicitly provided.

To reproduce: Add some JavaScript to the OPACUserJS system preference
which will let you know it's working. For instance:

alert("OPACUserJS!");

Turn on the OPAC maintenance message using the OpacMaintenance system
preference. Navigate to the OPAC. You should see the system maintenance
page but you should not see an alert.

To test, apply the patch and reload the OPAC page. Your alert should
show.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 82dcb5cf546c881af0003c272d9326e12fb5f1ce)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc