X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=members%2Freadingrec.pl;h=c4a823781568baaff9ac5d797611829a373eb762;hb=28646dd55007003300b8c76262c25ab96e04871e;hp=e7586a0debe4b020eb530538f064f046e1d59574;hpb=d1cea14fae6525b7478548aa19108871395e198d;p=koha.git diff --git a/members/readingrec.pl b/members/readingrec.pl index e7586a0deb..c4a8237815 100755 --- a/members/readingrec.pl +++ b/members/readingrec.pl @@ -32,6 +32,7 @@ use C4::Branch; use List::MoreUtils qw/any/; use C4::Dates qw/format_date/; +use C4::Members::Attributes qw(GetBorrowerAttributes); my $input = CGI->new; @@ -96,12 +97,21 @@ if (! $limit){ my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'}); $template->param( picture => 1 ) if $picture; +if (C4::Context->preference('ExtendedPatronAttributes')) { + my $attributes = GetBorrowerAttributes($borrowernumber); + $template->param( + ExtendedPatronAttributes => 1, + extendedattributes => $attributes + ); +} + $template->param( readingrecordview => 1, biblionumber => $data->{'biblionumber'}, title => $data->{'title'}, initials => $data->{'initials'}, surname => $data->{'surname'}, + othernames => $data->{'othernames'}, borrowernumber => $borrowernumber, limit => $limit, firstname => $data->{'firstname'}, @@ -122,7 +132,9 @@ $template->param( is_child => ($data->{'category_type'} eq 'C'), branchname => GetBranchName($data->{'branchcode'}), showfulllink => (scalar @loop_reading > 50), - loop_reading => \@loop_reading); + loop_reading => \@loop_reading, + activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''), +); output_html_with_http_headers $input, $cookie, $template->output;