From 8dda2f45fd0fdb348578544af346269920c5abfa 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 Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- .../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 77b3b2bf24..cf39e1aaa6 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 @@ -484,7 +484,7 @@ [% END %] [% 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.39.5