]> git.koha-community.org Git - koha.git/commit
Bug 29691: Use template to display news on opac homepage
authorNick Clemens <nick@bywatersolutions.com>
Tue, 14 Dec 2021 13:35:45 +0000 (13:35 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Thu, 15 Jun 2023 11:48:13 +0000 (08:48 -0300)
commitc1f628fbc98b572cfc06ba00a88f656f753cadee
tree55279e5ce7debd24a7dc8af7a30a6aa6850b8aa6
parentde49b8cd3a45941565f6d2bf7e856eeb6af75c8f
Bug 29691: Use template to display news on opac homepage

This patch moves the fetching of news to the template and
adds a p[lugin method to get news by id

TO test:
1 - Define some general and library specific news items
2 - Define in various languages
3 - Define some 'Additional contents' as well
4 - Apply patch
5 - Confirm onlly 'all libraries' news show if not loigged in to opac
6 - Confirm correct library news show when logged in
7 - View specific news items:
    http://localhost:8080/cgi-bin/koha/opac-main.pl?news_id=12
8 - Confirm that non-existent ids show " This news item does not exist. "
9 - Confirm if you enter ID for additional contents you get 'does not exist'

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/Template/Plugin/AdditionalContents.pm
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt
opac/opac-main.pl