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