From 3127f2163c4582e6636c8180ac8246fc1ee1c1b1 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Thu, 30 Apr 2020 11:02:35 +0200 Subject: [PATCH] Bug 25376: Use LANG authorised values for language facet Instead of relying on language_descriptions table, on which users have no control, use LANG authorised values It will give more control to users which will be able to add new languages or change descriptions (for instance to translate them in their own language) Test plan: 1. Do a search that return values for the language facet 2. Check that if you change a description in LANG authorised values, it changes the displayed facet --- koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc index 243045b24a..001856074c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc @@ -35,7 +35,7 @@ [% END %] [% FOREACH facet IN facets_loo.facets %] [% IF facets_loo.type_label_CollectionCodes %][% SET facet.facet_label_value = AuthorisedValues.GetByCode('CCODE',facet.facet_label_value,0) || facet.facet_label_value %][% END %] - [% IF facets_loo.type_label_Language %][% SET facet.facet_label_value = Languages.GetByISOCode(lang,facet.facet_label_value) || facet.facet_label_value %][% END %] + [% IF facets_loo.type_label_Language %][% SET facet.facet_label_value = AuthorisedValues.GetByCode('LANG', facet.facet_label_value, 0) || facet.facet_label_value %][% END %] [% IF loop.count > 5 && !facet.active %]