From 185754b3d9261d81a341ba283f36930420b4c92b Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Mon, 30 Aug 2021 20:59:27 -1000 Subject: [PATCH] Since preference OpacMainUserBlock is an HTML customization, there is an HTML tags with id="opacmainuserblock" and one with id="OpacMainUserBlock". I think template block "koha_news_block" should add a class (lowercase) instead of an id. It fixes the bug and also it may be used several times in same page in the future. Test plan : 1) Create an HTML customization for OpacMainUserBlock with some text 2) Go to OPAC main page 3) Check HTML code of the page 4) Check you see class="opacmainuserblock" and not id="OpacMainUserBlock" https://bugs.koha-community.org/show_bug.cgi?id=28927 --- koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt | 4 +--- .../bootstrap/en/modules/opac-registration-confirmation.tt | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc index f292178697..868f2a64cf 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc @@ -10,7 +10,7 @@ [% BLOCK koha_news_block %] [% IF ( news.content.count > 0 ) %] -
+
[% FOREACH n IN news.content %]
[% IF ( n.title && news.blocktitle ) %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt index d46100fcbe..5e0c99f229 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt @@ -167,9 +167,7 @@ [% END %] [% IF ( OpacMainUserBlock ) %] -
- [% PROCESS koha_news_block news => OpacMainUserBlock %] -
+ [% PROCESS koha_news_block news => OpacMainUserBlock %] [% END %] [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt index b688de43d1..d2ab28b68f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt @@ -106,9 +106,7 @@ [% END # /casAuthentication %] [% END # / loggedinusername %] [% IF ( OpacNavRight ) %] -
- [% PROCESS koha_news_block news => OpacNavRight %] -
+ [% PROCESS koha_news_block news => OpacNavRight %] [% END # /OpacNavRight %]
-- 2.32.0