Bug 40165: Incomplete logic for controlling display of OPAC language footer

This patch adds some additional logic to the template which controls the
appearance of the footer in the OPAC. Some additional checks are
required to make sure an empty footer doesn't display in some
circumstances.

To test, apply the patch and install at least one additional translation
besides English.

Check any OPAC page when various combinations of system preferences are
enabled:

- opaclanguagesdisplay
- OPACLanguages
- OpacLangSelectorMode
- OPACReportProblem
- CookieConsent
- OpacKohaUurl

In particular, confirm that there is not an empty footer when
opaclanguagesdisplay is enabled but there is only one translation
enabled.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Owen Leonard 2025-06-18 16:59:08 +00:00 committed by Lucas Gass
parent 51cb82b02e
commit 78b8a2e6f1
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@
</div> <!-- / #wrapper in masthead.inc -->
<!-- prettier-ignore-end -->
[% IF ( Koha.Preference('OPACReportProblem') && Koha.Preference('KohaAdminEmailAddress') ) || Koha.Preference( 'CookieConsent' ) || OpacKohaUrl || ( ( OpacLangSelectorMode == 'both' || OpacLangSelectorMode == 'footer') ) %]
[% IF ( Koha.Preference('OPACReportProblem') && Koha.Preference('KohaAdminEmailAddress') ) || Koha.Preference( 'CookieConsent' ) || OpacKohaUrl || ( ( opaclanguagesdisplay ) && ( ! one_language_enabled ) && ( languages_loop ) && ( OpacLangSelectorMode == 'both' || OpacLangSelectorMode == 'footer') ) %]
<footer id="changelanguage" class="navbar navbar-expand navbar-light bg-light noprint">
<div class="container-fluid">
<div class="collapse navbar-collapse">