Koha/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead-langmenu.inc
Fridolin Somers 8c63a4bb04
Bug 34646: Fix two attributes class in OPAC masthead-langmenu.inc
In OPAC template masthead-langmenu.inc a link as two class attributes :
  <a class="dropdown-item" href="#" tabindex="-1" class="menu-inactive" role="menuitem">

Test plan :
1) Go to OPAC with at least one translation
2) Look at HTML source code
=> Without patch you see a link with 2 class attributes
=> With patch you see the 2 classes in same class attribute

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-09-01 11:23:30 -03:00

47 lines
4.1 KiB
HTML

[%# Following on one line for translatability %]
[% IF ( ( opaclanguagesdisplay ) && ( ! one_language_enabled ) && ( languages_loop ) && ( OpacLangSelectorMode == 'both' || OpacLangSelectorMode == 'top') ) %]
<div id="header_langmenu">
<ul class="navbar-nav">
<li class="dropdown">
<a href="#" title="Switch languages" class="nav-link dropdown-toggle" id="langmenu" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-flag fa-icon-black" aria-hidden="true"></i> <span class="langlabel">Languages</span> <b class="caret"></b></a>
<div aria-labelledby="langmenu" role="menu" class="dropdown-menu dropdown-menu-right">
[% FOREACH languages_loo IN languages_loop %]
[% IF ( languages_loo.group_enabled ) %]
[% IF ( languages_loo.plural ) %]
[% FOREACH sublanguages_loo IN languages_loo.sublanguages_loop %]
[% IF ( sublanguages_loo.enabled ) %]
[% IF ( sublanguages_loo.sublanguage_current ) %]
<a class="dropdown-item" href="#" tabindex="-1" role="menuitem">[% sublanguages_loo.native_description | html %] [% sublanguages_loo.script_description | html %] [% sublanguages_loo.region_description | html %] [% sublanguages_loo.variant_description | html %]&nbsp;<i class="fa fa-check" aria-hidden="true"></i></a>
[% ELSE %]
<a class="dropdown-item" href="/cgi-bin/koha/opac-changelanguage.pl?language=[% sublanguages_loo.rfc4646_subtag | uri %]" tabindex="-1" role="menuitem"> [% sublanguages_loo.native_description | html %] [% sublanguages_loo.script_description | html %] [% sublanguages_loo.region_description | html %] [% sublanguages_loo.variant_description | html %]</a>
[% END # /IF ( sublanguages_loo.sublanguage_current ) %]
[% END # / IF sublanguages_loo.enabled %]
[% END # / FOREACH sublanguages_loo %]
[% ELSE %]
[% IF ( languages_loo.group_enabled ) %]
[% IF ( languages_loo.current ) %]
<a class="dropdown-item menu-inactive" href="#" tabindex="-1" role="menuitem">
[% IF ( languages_loo.native_description ) %]
[% languages_loo.native_description | html %]
[% ELSE %]
[% languages_loo.rfc4646_subtag | html %]
[% END %]&nbsp;<i class="fa fa-check" aria-hidden="true"></i>
</a>
[% ELSE %]
<a class="dropdown-item" href="/cgi-bin/koha/opac-changelanguage.pl?language=[% languages_loo.rfc4646_subtag | uri %]" tabindex="-1" role="menuitem">
[% IF ( languages_loo.native_description ) %]
[% languages_loo.native_description | html %]
[% ELSE %]
[% languages_loo.rfc4646_subtag | html %]
[% END %]
</a>
[% END # / IF ( languages_loo.current )%]
[% END # / IF languages_loo.current %]
[% END # / IF ( languages_loo.plural ) %]
[% END # / IF ( languages_loo.group_enabled ) %]
[% END # / FOREACH languages_loo IN languages_loop %]
</div> <!-- /# .dropdown-menu -->
</li> <!-- / .dropdown -->
</ul> <!-- /.nav.pull-right -->
</div> <!-- /#header_langmenu -->
[% END # / IF opaclanguagedisplay %]