From 5d45b1b1732f9e861fc0248ee0a3be2407a08630 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Wed, 6 Mar 2024 00:02:31 +0000 Subject: [PATCH] Bug 36227: Add warning when item group has no holdable items To test: 1. Enable EnableItemGroups and EnableItemGroupHolds 2. Find a bib and add an item group but do not attach any items to the item group. 3. Place a hold from the staff interface. 4. Under Hold next available item from an item group you see the option for your item group, select it and place the hold. 5. It's a hold that can not be filled 6. APPLY PATCH 7. How on the hold page under Hold next available item from an item group there is a 3rd column called 'Holdable items'. 8. Your item group, without any items, should have a disabled radio button and a warning "No holdable items in this item group." 9. Add items to your item group. 10. Now on the hold page in the new 'Holdable items' you should see links for each item, make sure those links work. --- .../prog/en/modules/reserve/request.tt | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index 1d668cde78..c1e54a50c8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -666,11 +666,12 @@ Hold Item group + Holdable items [% FOREACH g IN biblio.object.item_groups.search({}, { order_by => ['display_order'] }) %] - [% IF g.items %] + [% IF g.items.count %] @@ -678,6 +679,23 @@ + + [% FOREACH i IN g.items %] +
[% i.barcode | html %]
+ [% END %] + + + [% ELSE %] + + + + + + + + +
No holdable items in this item group.
+ [% END %] [% END %] -- 2.30.2