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> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
8efe22b770
commit
3f812dc4d6
|
|
@ -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 %]
|
||||
|
|
|
|||
|
|
@ -314,6 +314,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 %]">
|
||||
|
|
@ -326,7 +340,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 %]"
|
||||
|
|
@ -581,10 +595,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();
|
||||
|
|
|
|||
|
|
@ -274,6 +274,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 )
|
||||
|
|
@ -305,6 +306,7 @@ if ( $query->param('place_reserve') ) {
|
|||
itemnumber => $itemNum,
|
||||
found => undef,
|
||||
itemtype => $itemtype,
|
||||
item_group_id => $item_group_id,
|
||||
}
|
||||
);
|
||||
$failed_holds++ unless $reserve_id;
|
||||
|
|
@ -408,6 +410,7 @@ foreach my $biblioNum (@biblionumbers) {
|
|||
$biblioLoopIter{rank} = $biblioData->{rank};
|
||||
$biblioLoopIter{reservecount} = $biblioData->{reservecount};
|
||||
$biblioLoopIter{already_reserved} = $biblioData->{already_reserved};
|
||||
$biblioLoopIter{object} = $biblio;
|
||||
|
||||
if (!$itemLevelTypes && $biblioData->{itemtype}) {
|
||||
$biblioLoopIter{translated_description} = $itemtypes->{$biblioData->{itemtype}}{translated_description};
|
||||
|
|
@ -565,7 +568,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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue