Bug 35483: Restore holds table select to switch item level holds to record level holds

To test:
1. Apply patch
2. Add item level hold to a record/item, make sure patron has no other
   holds on that record
3. Go to /cgi-bin/koha/reserve/request.pl?biblionumber=xxx where xxx is
   the record you placed the hold for
4. Under "Existing holds" table, in "Details" column you should see
   "Only item <barcode>" dropdown
5. Select "Next available" from the dropdown
6. Click Update hold(s)
7. Observe dropdown is gone and cell value has changed from
   "Only item <barcode>" to "Next available"
8. Cancel the hold and add two item level holds for the same patron
9. Under "Existing holds" table, in "Details" column you should see
   "Only item <barcode>", but no select dropdown

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c20f4568ad)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Lari Taskula 2023-12-04 22:51:45 +00:00 committed by Fridolin Somers
parent e20c0919cc
commit 87efb87cf8
1 changed files with 20 additions and 0 deletions

View File

@ -175,6 +175,7 @@
[%- ELSE -%]
[%- IF ( hold.item_level_hold ) -%]
<em>
[%- IF ! hold.change_hold_type_allowed -%]
<span>Only item</span>
<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% hold.biblionumber | uri %]&amp;itemnumber=[% hold.itemnumber | uri %]#item[% hold.itemnumber | uri %]">
[%- IF ( hold.barcodenumber ) -%]
@ -184,6 +185,25 @@
[%- END -%]
<input type="hidden" name="itemnumber" value="[% hold.itemnumber | html %]" />
</a>
[%- ELSE -%]
<select name="change_hold_type_[% hold.reserve_id | html %]">
<option selected="selected" value="">Only item [%- IF ( hold.barcodenumber ) -%]
[%- hold.barcodenumber | html -%]
[%- ELSE -%]
No barcode
[%- END -%]
</option>
<option value="1">Next available</option>
</select>
[%- IF ( hold.barcodenumber ) -%]
<input type="hidden" name="itemnumber" value="[% hold.itemnumber | html %]" />
[%- END -%]
[%- IF hold.itemtype -%]
<span style="display:none">Next available [% ItemTypes.GetDescription( hold.itemtype ) | html %] item</span>
[%- ELSE -%]
<span style="display:none">Next available</span>
[%- END -%]
[%- END -%]
</em>
[%- ELSE -%]
[%- IF hold.itemtype -%]