Lines 1227-1264
$template->param(
Link Here
|
1227 |
'OpacLocationBranchToDisplay' => C4::Context->preference('OpacLocationBranchToDisplay'), |
1227 |
'OpacLocationBranchToDisplay' => C4::Context->preference('OpacLocationBranchToDisplay'), |
1228 |
); |
1228 |
); |
1229 |
|
1229 |
|
1230 |
if ( C4::Context->preference('OPACAuthorIdentifiers') ) { |
1230 |
if ( C4::Context->preference('OPACAuthorIdentifiersAndInformation') ) { |
1231 |
my @author_identifiers; |
|
|
1232 |
for my $author ( @{ $biblio->get_marc_authors } ) { |
1233 |
my $authid = $author->{authoritylink}; |
1234 |
my $authority = Koha::Authorities->find($authid); |
1235 |
next unless $authority; |
1236 |
my $identifiers = $authority->get_identifiers; |
1237 |
next unless $identifiers && @$identifiers; |
1238 |
my ($name) = |
1239 |
map { $_->{value} } |
1240 |
grep { $_->{code} eq 'a' ? $_ : () } |
1241 |
@{ $author->{MARCAUTHOR_SUBFIELDS_LOOP} }; |
1242 |
push @author_identifiers, |
1243 |
{ authid => $authid, name => $name, identifiers => $identifiers }; |
1244 |
} |
1245 |
$template->param( author_identifiers => \@author_identifiers ); |
1246 |
} |
1247 |
|
1248 |
if ( C4::Context->preference('OPACAuthorInformation') ) { |
1249 |
my @author_information; |
1231 |
my @author_information; |
1250 |
for my $author ( @{ $biblio->get_marc_authors } ) { |
1232 |
for my $author ( @{ $biblio->get_marc_authors } ) { |
1251 |
my $authid = $author->{authoritylink}; |
1233 |
my $authid = $author->{authoritylink}; |
1252 |
my $authority = Koha::Authorities->find($authid); |
1234 |
my $authority = Koha::Authorities->find($authid); |
1253 |
next unless $authority; |
1235 |
next unless $authority; |
1254 |
my $information = $authority->get_information; |
1236 |
my $information = $authority->get_identifiers_and_information; |
1255 |
next unless $information; |
1237 |
next unless $information; |
1256 |
my ($name) = |
1238 |
my ($name) = |
1257 |
map { $_->{value} } |
1239 |
map { $_->{value} } |
1258 |
grep { $_->{code} eq 'a' ? $_ : () } |
1240 |
grep { $_->{code} eq 'a' ? $_ : () } |
1259 |
@{ $author->{MARCAUTHOR_SUBFIELDS_LOOP} }; |
1241 |
@{ $author->{MARCAUTHOR_SUBFIELDS_LOOP} }; |
1260 |
push @author_information, |
1242 |
push @author_information, |
1261 |
{ authid => $authid, name => $name, information => $information }; |
1243 |
{ authid => $authid, name => $name, information => $information}; |
1262 |
} |
1244 |
} |
1263 |
$template->param( author_information => \@author_information ); |
1245 |
$template->param( author_information => \@author_information ); |
1264 |
} |
1246 |
} |