my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});
$template->param( picture => 1 ) if $picture;
-my $attributes = GetBorrowerAttributes($borrowernumber);
+
+if (C4::Context->preference('ExtendedPatronAttributes')) {
+ my $attributes = GetBorrowerAttributes($borrowernumber);
+ $template->param(
+ ExtendedPatronAttributes => 1,
+ extendedattributes => $attributes
+ );
+}
$template->param(
readingrecordview => 1,
title => $data->{'title'},
initials => $data->{'initials'},
surname => $data->{'surname'},
+ othernames => $data->{'othernames'},
borrowernumber => $borrowernumber,
limit => $limit,
firstname => $data->{'firstname'},
branchname => GetBranchName($data->{'branchcode'}),
showfulllink => (scalar @loop_reading > 50),
loop_reading => \@loop_reading,
- extendedattributes => $attributes,
+ activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
);
output_html_with_http_headers $input, $cookie, $template->output;