Currently the news for display are fetched in the script, if we move this to the template, bug 28955 will allow displaying branch news by default on home page
Created attachment 128506 [details] [review] 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'
Created attachment 128508 [details] [review] 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>
Nice work Nick.. signing off :)
Missing POD and tests.
113 [% IF ( news_item ) %] 114 • <a href="/cgi-bin/koha/opac-main.pl">Show all news</a> 115 [% END %] This is not displayed.
The news is not displayed in the translated version of the interface (does not seem related to this patch however).
Do you intend to revisit this Nick?