patron attributes - OPAC display

If ExtendedPatronAttributes is ON, any patron attributes
whose type is marked as displayble in the OPAC are now
displayed in the 'my details' page in the OPAC (assuming
that the patron is logged in).  These appear in the
'Library Use' section.

Currently, it is not possible for a patron to suggest
changes to any of their extended attributes using
opac-userupdate.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Galen Charlton 2008-05-12 08:32:54 -05:00 committed by Joshua Ferraro
parent 6418322bb1
commit 8138b6dcac
1 changed files with 9 additions and 0 deletions

View File

@ -29,6 +29,7 @@ use C4::Circulation;
use C4::Output;
use C4::Dates qw/format_date/;
use C4::Members;
use C4::Members::Attributes;
use C4::Branch;
my $query = new CGI;
@ -120,6 +121,14 @@ $borr->{'expiry'} = format_date( $borr->{'expiry'} );
$borr->{'dateofbirth'} = format_date( $borr->{'dateofbirth'} );
$borr->{'ethnicity'} = fixEthnicity( $borr->{'ethnicity'} );
if (C4::Context->preference('ExtendedPatronAttributes')) {
my $attributes = C4::Members::Attributes::GetBorrowerAttributes($borrowernumber, 'opac');
if (scalar(@$attributes) > 0) {
$borr->{ExtendedPatronAttributes} = 1;
$borr->{patron_attributes} = $attributes;
}
}
my @bordat;
$bordat[0] = $borr;