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:
parent
6418322bb1
commit
8138b6dcac
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue