From dc0c6639b01d4201700bb0cdeb76e1b5b6513a51 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 9 Oct 2024 09:18:07 +0200 Subject: [PATCH] Bug 38130: Add the ability to filter item by library name On the item list of the bibliographic record page you actually can filter items by library, either using the dropdown list on top of the column or using the library_id (branchcode) in the global search. But you cannot search using the library's name in the global search. This patch add yet other embeds to allow this. I am not sure this is needed, we won't be able to do the same for item type and AV, so maybe it is not worth 2 additional JOINS. Maybe we should tell people you should use the column filters when a dropdown list is there, instead of: "it works, sometimes". Signed-off-by: Lucas Gass Signed-off-by: Brendan Lawlor --- .../includes/html_helpers/tables/items/catalogue_detail.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc index f0672e86ce..6eaa524922 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc @@ -207,7 +207,7 @@ [%# In case or SeparateHoldings we may need to display the number of biblios in each tab %] [%# Do we need separate/new endpoints or do we hack the somewhere client-side? %] let item_table_url = "/api/v1/biblios/[% biblio.biblionumber | uri %]/items?"; - let embed = ["+strings,checkout,checkout.patron,transfer,transfer+strings,first_hold,first_hold+strings,first_hold.patron,first_hold.desk"]; + let embed = ["+strings,home_library,holding_library,checkout,checkout.patron,transfer,transfer+strings,first_hold,first_hold+strings,first_hold.patron,first_hold.desk"]; [% IF Koha.Preference('LocalCoverImages') %] embed.push('cover_image_ids'); [% END %] @@ -350,7 +350,7 @@ }, [% END %] { - data: "me.holding_library_id", + data: "me.holding_library_id:holding_library.name", className: "location", searchable: true, orderable: true, @@ -359,7 +359,7 @@ } }, { - data: "me.home_library_id", + data: "me.home_library_id:home_library.name", className: "homebranch", searchable: true, orderable: true, -- 2.39.5