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.
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 29873200df
)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
79a50e44ce
commit
e3318be458
1 changed files with 19 additions and 1 deletions
|
@ -664,11 +664,12 @@
|
|||
<tr>
|
||||
<th>Hold</th>
|
||||
<th>Item group</th>
|
||||
<th>Holdable items</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
[% FOREACH g IN biblio.object.item_groups.search({}, { order_by => ['display_order'] }) %]
|
||||
[% IF g.items %]
|
||||
[% IF g.items.count %]
|
||||
<tr>
|
||||
<td>
|
||||
<input id="item_group_id_[% g.id | html %]" type="radio" name="item_group_id" value="[% g.id | html %]" />
|
||||
|
@ -676,6 +677,23 @@
|
|||
<td>
|
||||
<label for="item_group_id_[% g.id | html %]">[% g.description | html %]</label>
|
||||
</td>
|
||||
<td>
|
||||
[% FOREACH i IN g.items %]
|
||||
<div><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% i.biblionumber | uri %]#item[% i.itemnumber | uri %]">[% i.barcode | html %]</a></div>
|
||||
[% END %]
|
||||
</td>
|
||||
</tr>
|
||||
[% ELSE %]
|
||||
<tr>
|
||||
<td>
|
||||
<input id="item_group_id_[% g.id | html %]" type="radio" name="item_group_id" value="[% g.id | html %]" disabled="disabled" />
|
||||
</td>
|
||||
<td>
|
||||
<label for="item_group_id_[% g.id | html %]">[% g.description | html %]</label>
|
||||
</td>
|
||||
<td>
|
||||
<div class="error">No holdable items in this item group.</div>
|
||||
</td>
|
||||
</tr>
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
|
Loading…
Reference in a new issue