Bug 36227: Remove item group option if there are no items

To test:
1. Test from OPAC. Any item group without items in it should not display as an option in the "Request specific item group:" dropdown

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3ed4e096b0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 81089c1f24)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Lucas Gass 2024-03-06 00:32:03 +00:00
parent 28230e0d4b
commit a388b46518

View file

@ -323,7 +323,9 @@
<select name="item_group_id_[% bibitemloo.biblionumber | html %]" id="item_group_id_[% bibitemloo.biblionumber | html %]">
<option value="">Any item group</option>
[% FOREACH g IN bibitemloo.object.item_groups.search({}, { order_by => ['display_order'] }) %]
<option value="[% g.id | html %]">[% g.description | html %]</option>
[% IF g.items.count %]
<option value="[% g.id | html %]">[% g.description | html %]</option>
[% END %]
[% END %]
</select>
</li>