From 7fbc7752bb3cad7102ba6b352c4653e9dc8c691a Mon Sep 17 00:00:00 2001 From: Martin Persson Date: Thu, 15 Sep 2016 14:26:56 +1200 Subject: [PATCH] Bug 14764: OPAC news selector - Template tags Test plan: 1) Add more than one library, at least two in total is needed. Make note of which is your current user's home branch. 2) Go to Tools -> News and add one global ("All") news item and one specific for each branch. 3) Apply the patches. 4) Perform database upgrades when you log in. 5) Go to OPAC main, it should work as before: Showing global news as well as the news for your home branch once logged in. 6) Go to System Preferences -> OPAC and set 'OPACNewsBranchSelect' to yes. 7) Go to OPAC main, you should see the global news item plus any items for your home branch for the current user if logged in. 8) Above the news, you will see a dropdown that lists the branches. Select one, and click "Change library." 9) You should now see global news and the news for the selected branch, regardless of whether logged in or not. Sponsored-By: Halland County Library Signed-off-by: Jesse Maseto --- .../bootstrap/en/includes/opac-bottom.inc | 8 ++++++++ .../opac-tmpl/bootstrap/en/modules/opac-main.tt | 24 +++++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc index 1a13370..9be4768 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc @@ -267,6 +267,14 @@ $.widget.bridge('uitooltip', $.ui.tooltip); [% END # / IF persona %] +[% IF Koha.Preference( 'OpacNewsBranchSelect' ) == 1 %] + +[% END %] +