From 96183c8a806061743d27643dc1a115c6879f02ae Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 17 Mar 2025 09:39:47 +0100 Subject: [PATCH] Bug 39350: (bug 38664 follow-up) Restore language selector for Vue.js module ERM and Preservation modules have lost the language selector during the tidy work. There has been a closing div added to the "home" files, which broke the HTML structure. Test plan: Have more than one language selected for StaffInterfaceLanguages. Go to the ERM and Preservation module and confirm that with this patch applied the language selector menu is displayed. Signed-off-by: David Nind Signed-off-by: Martin Renvoize --- .../intranet-tmpl/prog/en/modules/erm/erm.tt | 58 +++++++++---------- .../prog/en/modules/preservation/home.tt | 36 ++++++------ 2 files changed, 45 insertions(+), 49 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/erm/erm.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/erm/erm.tt index a662808540a..8032e68a1da 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/erm/erm.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/erm/erm.tt @@ -21,37 +21,35 @@ [% INCLUDE 'erm-search.inc' %] [% END %] -
- +
- [% MACRO jsinclude BLOCK %] - [% INCLUDE 'calendar.inc' %] - [% INCLUDE 'datatables.inc' %] - [% INCLUDE 'js-patron-format.inc' %] - [% INCLUDE 'js-date-format.inc' %] - - [% Asset.js("js/vue/dist/erm.js") | $raw %] - [% INCLUDE 'select2.inc' %] - [% SET columns = ['cardnumber','name','category','branch','action'] %] - [% SET filter = "erm_users" %] - [% PROCESS patron_search_modal columns => columns, modal_title => t("Select user") %] - [% PROCESS patron_search_js columns => columns, actions => ["select"], preview_on_name_click => 1 %] - [% END %] - [% INCLUDE 'intranet-bottom.inc' %]
+ const logged_in_user = [% To.json(logged_in_user.unblessed) | $raw %]; + + [% Asset.js("js/vue/dist/erm.js") | $raw %] + [% INCLUDE 'select2.inc' %] + [% SET columns = ['cardnumber','name','category','branch','action'] %] + [% SET filter = "erm_users" %] + [% PROCESS patron_search_modal columns => columns, modal_title => t("Select user") %] + [% PROCESS patron_search_js columns => columns, actions => ["select"], preview_on_name_click => 1 %] +[% END %] +[% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/preservation/home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/preservation/home.tt index 1f2914e7400..0b1c1bb1ae3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/preservation/home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/preservation/home.tt @@ -17,24 +17,22 @@ [% INCLUDE 'preservation-search.inc' %] [% END %] -
- +
- [% MACRO jsinclude BLOCK %] - [% INCLUDE 'calendar.inc' %] - [% INCLUDE 'datatables.inc' %] - [% INCLUDE 'js-patron-format.inc' %] - [% INCLUDE 'js-date-format.inc' %] - [% INCLUDE 'js-biblio-format.inc' %] - - [% Asset.js("js/vue/dist/preservation.js") | $raw %] - [% END %] - [% INCLUDE 'intranet-bottom.inc' %]
+ const csrf_token = "[% Koha.GenerateCSRF | $raw %]"; + + [% Asset.js("js/vue/dist/preservation.js") | $raw %] +[% END %] +[% INCLUDE 'intranet-bottom.inc' %] -- 2.49.0