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>
This commit is contained in:
Lucas Gass 2024-03-06 00:32:03 +00:00 committed by Katrin Fischer
parent 29873200df
commit 3ed4e096b0
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -320,7 +320,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>