From b95217a5edda5eec9c9959ca1cd902aa707281fe 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 Signed-off-by: Pedro Amorim --- .../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 7e44c02a5a..eb7ac8e0ea 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 @@ -226,7 +226,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 %] @@ -372,7 +372,7 @@ }, [% END %] { - data: "me.holding_library_id", + data: "me.holding_library_id:holding_library.name", className: "location", searchable: true, orderable: true, @@ -381,7 +381,7 @@ } }, { - data: "me.home_library_id", + data: "me.home_library_id:home_library.name", className: "homebranch", searchable: true, orderable: true, -- 2.39.5