From 75eeedd7351cb02325e431bb2e9b50fc28a2bbbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Cohen=20Arazi?= Date: Tue, 24 Mar 2026 10:14:26 +0100 Subject: [PATCH] Bug 22639: Add export mappings button to mappings page This patch adds an 'Export mappings' button to the Elasticsearch mappings configuration page. It triggers a YAML download of the current search field mappings using the new API endpoint. To test: 1. Apply this patch (and the previous API endpoint patch) 2. Navigate to Administration > Search engine configuration => SUCCESS: An 'Export mappings' button appears next to 'Reset mappings' 3. Click 'Export mappings' => SUCCESS: A 'search_mappings.yaml' file is downloaded 4. Verify the YAML file contains the expected mappings structure => SUCCESS: File contains search fields grouped by index 5. Sign off :-D Signed-off-by: Laurence Signed-off-by: Thomas Klausner Signed-off-by: Lucas Gass --- .../searchengine/elasticsearch/mappings.tt | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt index 157aafad8c..7e3ffa20bc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt @@ -18,9 +18,9 @@ cursor: pointer; } - + - + [% WRAPPER 'header.inc' %] [% INCLUDE 'prefs-admin-search.inc' %] [% END %] @@ -590,6 +590,7 @@
+ Export mappings
[% END %] @@ -597,6 +598,31 @@ [% MACRO jsinclude BLOCK %] [% INCLUDE 'datatables.inc' %] [% Asset.js("js/elasticsearch-mappings.js") | $raw %] + [% END %] [% INCLUDE 'intranet-bottom.inc' %]