From ff8e289c53de4c17491d9dde97779aafd10f5294 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 1 Aug 2022 13:58:50 +0000 Subject: [PATCH] Bug 29144: Add OpacBranchInfo as HTML option, show it on opac Test plan: Add a few OpacBranchInfo for libraries. Verify that opac-library shows the correct info per library. Signed-off-by: Marcel de Rooy Signed-off-by: Owen Leonard --- .../prog/en/modules/tools/additional-contents.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-library.tt | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt index b71696d6b4..daad6ac69e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt @@ -447,7 +447,7 @@ [% END %] [% ELSE %] - [% SET available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote' ] %] + [% SET available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacBranchInfo' ] %] [% FOREACH l IN available_options.sort %] [% IF l == location %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-library.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-library.tt index 29b44767cd..183d8ece41 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-library.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-library.tt @@ -3,6 +3,7 @@ [% USE Koha %] [% PROCESS 'display-library-address.inc' %] [% USE AdditionalContents %] +[% SET OpacBranchInfo = AdditionalContents.get( location => "OpacBranchInfo", lang => lang, library => library.branchcode || branchcode, blocktitle => 0 ) %] [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] @@ -36,7 +37,7 @@ [% BLOCK library_description %]
- [% library.opac_info | $raw %] + [% PROCESS koha_news_block news => OpacBranchInfo %]
[% END %] @@ -97,7 +98,7 @@
[% PROCESS library_info %] - [% IF ( library.opac_info ) %] + [% IF ( OpacBranchInfo ) %]

[% PROCESS library_description %] -- 2.20.1