<span class="date-format to" data-biblionumber="[% bibitemloo.biblionumber %]">[% INCLUDE 'date-format.inc' %]</span>
</li>
- [% UNLESS ( multi_hold ) %]
- [% IF Koha.Preference('AllowHoldItemTypeSelection') %]
- <li>
- <label for="itemtype">Request specific item type:</label>
- <select name="itemtype" size="1" id="itemtype">
- <option value="">Any item type</option>
- [%- FOREACH itemtype IN available_itemtypes %]
- <option value="[% itemtype %]">[% ItemTypes.GetDescription( itemtype ) %]</option>
- [%- END %]
- </select>
- </li>
- [% END %]
+ [% IF Koha.Preference('AllowHoldItemTypeSelection') %]
+ [% itemtypes = [] %]
+ [% FOREACH item IN bibitemloo.itemLoop %]
+ [% itemtypes.push( item.itype ) %]
+ [%- END %]
+ <li>
+ <label for="itemtype">Request specific item type:</label>
+ <select name="itemtype" size="1" id="itemtype">
+ <option value="">Any item type</option>
+ [% FOREACH i IN itemtypes.unique.sort %]
+ <option value="[% i %]">[% ItemTypes.GetDescription( i ) %]</option>
+ [%- END %]
+ </select>
+ </li>
[% END %]
[% IF ( OpacHoldNotes ) %]
#
my $notforloan_label_of = get_notforloan_label_of();
-my @available_itemtypes;
my $biblioLoop = [];
my $numBibsAvailable = 0;
my $itemdata_enumchron = 0;
$itemLoopIter->{copynumber} = $itemInfo->{copynumber};
if ($itemLevelTypes) {
$itemLoopIter->{translated_description} = $itemInfo->{translated_description};
+ $itemLoopIter->{itype} = $itemInfo->{itype};
$itemLoopIter->{imageurl} = $itemInfo->{imageurl};
}
$itemLoopIter->{available} = 1;
$numCopiesOPACAvailable++;
$biblioLoopIter{force_hold} = 1 if $hold_allowed eq 'F';
- push( @available_itemtypes, $itemInfo->{itype} );
}
$numCopiesAvailable++;
}
$anyholdable = 1 if $biblioLoopIter{holdable};
}
-@available_itemtypes = uniq( @available_itemtypes );
-$template->param( available_itemtypes => \@available_itemtypes );
if ( $numBibsAvailable == 0 || $anyholdable == 0) {
$template->param( none_available => 1 );