Bug 22880: Convert opacheader system preference to news block
authorOwen Leonard <oleonard@myacpl.org>
Thu, 9 May 2019 13:52:30 +0000 (13:52 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 24 Feb 2020 13:24:12 +0000 (13:24 +0000)
commit65a5d1298c2594ed948cdb9be95367e5c7f1b61f
tree15517456afea3e1c757d6046a46e5ef90ec0c1f0
parente5adbed369074d1314df6d1b73392f7d823a3287
Bug 22880: Convert opacheader system preference to news block

This patch builds on Bug 22318 to move the opacheader system preference
into the Koha news system, making it possible to have language- and
library-specific content.

It extends the original patch by adding an option to the template plugin
specifying whether the content title should be shown (probably should be
a flag in opac_news). It also adds a wrapper div with the content
location as the ID (e.g. 'opacheader'). This will make it slightly more
backwards-compatible with CSS customizations.

To test you should have some content in the opacheader system
preference. Apply the patch and run the database update process.

 - Go to the OPAC and confirm that the content which was previously in
   the opacheader system preference now displays correctly where it was
   before.
 - In the staff client, go to Tools -> News and verify that the content
   from opacheader is now stored in a news item with the location
   'opacheader_en.'
 - Go to Administration -> System preferences and confirm that the
   opacheader preference has been removed.

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/Template/Plugin/KohaNews.pm
installer/data/mysql/atomicupdate/bug_22880-move-opacheader-to-news.perl [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt
koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc
koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc