Added allowborrow to the template parameters to check if a borrower can borrow books or not according to the "borrow" flag.

This commit is contained in:
plugz 2003-07-01 11:22:48 +00:00
parent d293d820c1
commit a0de7c08fd

View file

@ -202,7 +202,11 @@ my $todaysissues='';
my $previssues=''; my $previssues='';
my @realtodayissues; my @realtodayissues;
my @realprevissues; my @realprevissues;
my $allowborrow;
my $hash;
if ($borrower) { if ($borrower) {
($borrower, $flags,$hash) = getpatroninformation(\%env,$borrowernumber,0);
$allowborrow= $hash->{'borrow'};
my @todaysissues; my @todaysissues;
my @previousissues; my @previousissues;
my $issueslist = getissues($borrower); my $issueslist = getissues($borrower);
@ -229,7 +233,7 @@ if ($borrower) {
$book->{'dd'}=$dd; $book->{'dd'}=$dd;
$book->{'tcolor'}=$tcolor; $book->{'tcolor'}=$tcolor;
push @realtodayissues,$book push @realtodayissues,$book
} }
# FIXME - For small and private libraries, it'd be nice if this # FIXME - For small and private libraries, it'd be nice if this
# table included a "Return" link next to each book, so that you # table included a "Return" link next to each book, so that you
# don't have to remember the book's bar code and type it in on the # don't have to remember the book's bar code and type it in on the
@ -295,6 +299,7 @@ $template->param(
printer => $printer, printer => $printer,
branchname => $branches->{$branch}->{'branchname'}, branchname => $branches->{$branch}->{'branchname'},
printername => $printers->{$printer}->{'printername'}, printername => $printers->{$printer}->{'printername'},
allowborrow =>$allowborrow,
#question form #question form
question => $question, question => $question,