Bugzilla – Attachment 138226 Details for
Bug 24860
Add ability to place item group level holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24860: Add ability to select an item group when placing a hold - OPAC
Bug-24860-Add-ability-to-select-an-item-group-when.patch (text/plain), 6.97 KB, created by
Kyle M Hall (khall)
on 2022-07-28 18:21:33 UTC
(
hide
)
Description:
Bug 24860: Add ability to select an item group when placing a hold - OPAC
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2022-07-28 18:21:33 UTC
Size:
6.97 KB
patch
obsolete
>From 2376f19d7baf2376288483c82a7cb79a1fa020b1 Mon Sep 17 00:00:00 2001 >From: Kyle Hall <kyle@bywatersolutions.com> >Date: Thu, 9 Jun 2022 14:06:45 -0400 >Subject: [PATCH] Bug 24860: Add ability to select an item group when placing a > hold - OPAC > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> > >Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us> >--- > .../bootstrap/en/includes/holds-table.inc | 3 +++ > .../bootstrap/en/modules/opac-reserve.tt | 24 +++++++++++++++++-- > opac/opac-reserve.pl | 5 ++++ > 3 files changed, 30 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc >index d3c84c93b77..6d253ee96d2 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc >@@ -56,6 +56,9 @@ > </strong> > [% END %] > [% HOLD.biblio.author | html %] >+ [% IF HOLD.item_group_id %] >+ <p>Next available item from item group: <strong>[% HOLD.item_group.description | html %]</strong></p> >+ [% END %] > [% IF HOLD.item_level_hold %] > <p class="hint">Item on hold: [% HOLD.item.barcode | html %]</p> > [% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >index e16095740e0..e90534c9f2c 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >@@ -305,6 +305,20 @@ > </li> > [% END %] > >+ [% UNLESS bibitemloo.forced_hold_level && ( bibitemloo.forced_hold_level == 'item' || bibitemloo.forced_hold_level == 'record' ) %] >+ [% IF bibitemloo.object.item_groups %] >+ <li> >+ <label for="itemtype">Request specific item group:</label> >+ <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> >+ [% END %] >+ </select> >+ </li> >+ [% END %] >+ [% END %] >+ > [% IF ( OpacHoldNotes ) %] > <li> > <div class="notesrow" id="notesrow_[% bibitemloo.biblionumber | html %]"> >@@ -320,7 +334,7 @@ > [% IF bibitemloo.itemholdable %] > <!-- ITEM HOLDS --> > <li class="lradio place_on_type" style="display:none;"> >- [% IF NOT bibitemloo.force_hold %] >+ [% UNLESS bibitemloo.forced_hold_level == 'item' || bibitemloo.forced_hold_level == 'item_group' %] > <label class="radio inline" for="reqany_[% bibitemloo.biblionumber | html %]">Next available item</label> > <input type="radio" name="reqtype_[% bibitemloo.biblionumber | html %]" > id="reqany_[% bibitemloo.biblionumber | html %]" >@@ -590,10 +604,16 @@ > var select_specific = $("#reqspecific_"+biblioNum).is(":checked"); > // If the checkbox is checked AND we want a specific item, we display the items block > if ( $(checkbox).is(":checked") && select_specific ) { >+ if ( $(`#item_group_id_${biblioNum}`).length ) { >+ $(`#item_group_id_${biblioNum}`).val("").attr('disabled', 'disabled'); >+ } > $(newCopiesRowId).show(); > } else { >+ if ( $(`#item_group_id_${biblioNum}`).length ) { >+ $(`#item_group_id_${biblioNum}`).removeAttr('disabled'); >+ } > $(newCopiesRowId).hide(); >- } >+ } > }; > > $("#place_on_hdr").show(); >diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl >index cd71a6af293..d98691cbe59 100755 >--- a/opac/opac-reserve.pl >+++ b/opac/opac-reserve.pl >@@ -290,6 +290,7 @@ if ( $query->param('place_reserve') ) { > $itemNum = undef; > } > my $notes = $query->param('notes_'.$biblioNum)||''; >+ my $item_group_id = $query->param("item_group_id_$biblioNum") || undef; > > if ( $maxreserves > && $reserve_cnt >= $maxreserves ) >@@ -321,6 +322,7 @@ if ( $query->param('place_reserve') ) { > itemnumber => $itemNum, > found => $found, > itemtype => $itemtype, >+ item_group_id => $item_group_id, > } > ); > $failed_holds++ unless $reserve_id; >@@ -442,6 +444,7 @@ foreach my $biblioNum (@biblionumbers) { > $biblioLoopIter{reservecount} = $biblioData->{reservecount}; > $biblioLoopIter{already_reserved} = $biblioData->{already_reserved}; > $biblioLoopIter{reqholdnotes}=0; #TODO: For future use >+ $biblioLoopIter{object} = $biblio; > > if (!$itemLevelTypes && $biblioData->{itemtype}) { > $biblioLoopIter{translated_description} = $itemtypes->{$biblioData->{itemtype}}{translated_description}; >@@ -668,7 +671,9 @@ foreach my $biblioNum (@biblionumbers) { > )->forced_hold_level(); > if ($forced_hold_level) { > $biblioLoopIter{force_hold} = 1 if $forced_hold_level eq 'item'; >+ $biblioLoopIter{force_hold} = 0 if $forced_hold_level eq 'item_group'; > $biblioLoopIter{itemholdable} = 0 if $forced_hold_level eq 'record'; >+ $biblioLoopIter{itemholdable} = 0 if $forced_hold_level eq 'item_group'; > $biblioLoopIter{forced_hold_level} = $forced_hold_level; > } > >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24860
:
100644
|
100645
|
100646
|
100647
|
100648
|
100649
|
100650
|
100651
|
101744
|
101745
|
101746
|
101747
|
101748
|
101749
|
101750
|
101751
|
101827
|
101828
|
101829
|
101830
|
101831
|
101832
|
101833
|
101834
|
101835
|
102230
|
102231
|
102232
|
102233
|
102234
|
102235
|
102236
|
102237
|
102238
|
102239
|
102240
|
102241
|
102242
|
102243
|
102244
|
102245
|
102246
|
102247
|
106589
|
106590
|
106591
|
106592
|
106593
|
106594
|
106595
|
106596
|
106597
|
106682
|
106683
|
106684
|
106685
|
106686
|
106687
|
106688
|
106689
|
106690
|
106742
|
106743
|
106744
|
106745
|
106746
|
106747
|
106748
|
106749
|
106750
|
108458
|
108459
|
108460
|
108461
|
108462
|
108463
|
108464
|
108465
|
108466
|
109097
|
109098
|
109099
|
109100
|
109101
|
109102
|
109103
|
109104
|
109105
|
109171
|
109172
|
109173
|
109174
|
109175
|
109176
|
109177
|
109178
|
109179
|
113616
|
113617
|
113618
|
113619
|
113620
|
113621
|
113622
|
113623
|
113624
|
135922
|
135923
|
135924
|
135925
|
135926
|
135927
|
135928
|
135929
|
135930
|
138221
|
138222
|
138224
|
138225
|
138226
|
138227
|
138228
|
138229
|
138230
|
141214
|
141215
|
141735
|
141736
|
141737
|
141738
|
141739
|
141740
|
141741
|
141742
|
141743
|
141744
|
141745
|
141746
|
141747
|
141748
|
141749
|
141750
|
142413
|
142414
|
142415
|
142416
|
142417
|
142418
|
142419
|
142420
|
142421
|
142422
|
142423
|
142424
|
142425
|
142426
|
142427
|
142428
|
142429
|
142430
|
142827
|
142955
|
142956
|
142957
|
142958
|
142959
|
142960
|
142961
|
142962
|
142963
|
142964
|
142965
|
142966
|
142967
|
142968
|
142969
|
142970
|
142971
|
142972
|
142973
|
142974
|
142975
|
142992
|
142993
|
142994
|
142995
|
142996
|
142997
|
142998
|
142999
|
143000
|
143001
|
143002
|
143003
|
143004
|
143005
|
143006
|
143007
|
143008
|
143009
|
143010
|
143011