Fix for bug 1738, opac-reserve now blocks reserving not for loan items
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
parent
39b9859c70
commit
9678cfc38d
|
|
@ -80,14 +80,16 @@
|
|||
<!-- /TMPL_LOOP -->
|
||||
</select>
|
||||
</p>
|
||||
<!-- TMPL_IF NAME="forloan" -->
|
||||
<p> <label for="requestany">Place a hold on the next available copy </label>
|
||||
<input type="checkbox" id="requestany" name="request" checked="checked" value="Any" />
|
||||
</p>
|
||||
|
||||
<input type="hidden" name="biblioitem" value="<!-- TMPL_VAR NAME="biblioitemnumber" -->" />
|
||||
<input type="submit" value="Place Hold" />
|
||||
<input type="hidden" name="all" value="1"/></p>
|
||||
<input type="hidden" name="place_reserve" value="1"/>
|
||||
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_LOOP name="bibitemloop" -->
|
||||
|
||||
<!-- TMPL_UNLESS NAME="item-level_itypes" -->
|
||||
|
|
|
|||
|
|
@ -151,6 +151,7 @@ my %itemtypes;
|
|||
my @duedates;
|
||||
#die @items;
|
||||
my %itemhash;
|
||||
my $forloan;
|
||||
foreach my $itm (@items) {
|
||||
push @duedates, { date_due => format_date( $itm->{'date_due'} ) }
|
||||
if defined $itm->{'date_due'};
|
||||
|
|
@ -175,6 +176,9 @@ foreach my $itm (@items) {
|
|||
}
|
||||
}
|
||||
$itemhash{$itm->{'itemnumber'}}=$itm;
|
||||
if (!$itm->{'notforloan'} && !$itm->{'itemnotforloan'}){
|
||||
$forloan=1;
|
||||
}
|
||||
}
|
||||
|
||||
$template->param( ITEMS => \@duedates );
|
||||
|
|
@ -424,6 +428,7 @@ foreach my $biblioitemnumber (@biblioitemnumbers) {
|
|||
|
||||
# display infos
|
||||
$template->param(
|
||||
forloan => $forloan,
|
||||
bibitemloop => \@bibitemloop,
|
||||
);
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
|
|
|||
Loading…
Reference in New Issue