From 352fb4386d70602a5275a3eb7bd95ebac92a3509 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 2 Jun 2025 13:43:03 +0200 Subject: [PATCH] Bug 31642: (QA follow-up) Hide Custom section when it has no children Content-Type: text/plain; charset=utf-8 Test plan: Have no entries under AV category ADD_CONT_HTML_CUSTOM. Verify that you do not see Custom at the bottom of the Display location combo when adding a new html block. Add one AV entry under ADD_CONT_HTML_CUSTOM. Refresh and make sure that you see the Custom section now. Signed-off-by: Marcel de Rooy --- .../en/modules/tools/additional-contents.tt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 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 d82c0f1260..d09bcf0b2a 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 @@ -556,15 +556,17 @@ [% END %] [% SET custom_available_options = AuthorisedValues.Get('ADD_CONT_HTML_CUSTOM') %] - - [% FOREACH l IN custom_available_options %] - [% IF l.authorised_value == location %] - - [% ELSE %] - + [% IF custom_available_options.size %] + + [% FOREACH l IN custom_available_options %] + [% IF l.authorised_value == location %] + + [% ELSE %] + + [% END %] [% END %] - [% END %] - + + [% END %] [% END %] [% END %] -- 2.39.5