Bugzilla – Attachment 185229 Details for
Bug 40612
Eliminate duplicate element id in OPAC language menus
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40612: Eliminate duplicate element id in OPAC language menus
Bug-40612-Eliminate-duplicate-element-id-in-OPAC-l.patch (text/plain), 2.73 KB, created by
Owen Leonard
on 2025-08-07 15:58:26 UTC
(
hide
)
Description:
Bug 40612: Eliminate duplicate element id in OPAC language menus
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2025-08-07 15:58:26 UTC
Size:
2.73 KB
patch
obsolete
>From 6e0fa56d43ba18426bb497b80b07ddf2ff9bde0c Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 7 Aug 2025 15:51:44 +0000 >Subject: [PATCH] Bug 40612: Eliminate duplicate element id in OPAC language > menus > >This patch updates the include file used to display the OPAC language >menu in the header and footer. The include already makes use of a >"context" variable which tells it whether it's in the header or footer. >We can use the same logic to give unique ids for each instance. > >To test, apply the patch and rebuild the OPAC CSS. > >- Go to Administration -> System preferences -> OpacLangSelectorMode and > set it to "both top and footer." >- Go to the OPAC and inspect the HTML for each language menu. The one in > the header should have the id "header_langmenu." The one in the footer > should have "footer_langmenu." > >Sponsored-by: Athens County Public Libraries >--- > koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss | 2 +- > .../opac-tmpl/bootstrap/en/includes/langmenu.inc | 16 +++++++++------- > 2 files changed, 10 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >index 52cfc9a2f98..ea8db4c9b81 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >+++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >@@ -312,7 +312,7 @@ th { > margin: .2rem .2rem .2rem 0; > } > >-#header_langmenu { >+.langmenu { > flex-shrink: 1; > } > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/langmenu.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/langmenu.inc >index 06815665fb9..e84e3c82fea 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/langmenu.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/langmenu.inc >@@ -1,10 +1,12 @@ >-<div id="header_langmenu"> >+[% IF ( context == "footer" ) -%] >+ [% SET li_class = 'nav-item dropup' %] >+ [% SET menu_id = 'footer_langmenu' %] >+[% ELSE %] >+ [% SET li_class = 'nav-item dropdown' %] >+ [% SET menu_id = 'header_langmenu' %] >+[% END %] >+<div id="[% menu_id | html %]" class="langmenu"> > <ul class="navbar-nav"> >- [% IF ( context == "footer" ) -%] >- [% SET li_class = 'nav-item dropup' %] >- [% ELSE %] >- [% SET li_class = 'nav-item dropdown' %] >- [% END %] > <li class="[% li_class | html %]"> > <a href="#" title="Switch languages" class="nav-link dropdown-toggle" id="langmenu" data-bs-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" > ><i class="fa fa-flag fa-fw fa-icon-[% context | html %]" aria-hidden="true"></i> <span class="langlabel">Languages</span> <b class="caret"></b >@@ -64,4 +66,4 @@ > </ul> > <!-- /.navbar-nav --> > </div> >-<!-- /#header_langmenu --> >+<!-- /#[menu_id] --> >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40612
: 185229