From 495fe75119c8669183e54f35c6cec9a9fdb15124 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Mon, 30 Aug 2021 20:59:27 -1000 Subject: [PATCH] Bug 28927: Fix id opacmainuserblock used twice in OPAC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Sally Rebased-by: Joonas Kylmälä Signed-off-by: Joonas Kylmälä --- 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 7a964de596..d5c7db82c8 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 && 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.20.1