|
Lines 545-562
sub getRecords {
Link Here
|
| 545 |
if ( $link_value =~ /location/ ) { |
545 |
if ( $link_value =~ /location/ ) { |
| 546 |
|
546 |
|
| 547 |
# TODO Retrieve all authorised values at once, instead of 1 query per entry |
547 |
# TODO Retrieve all authorised values at once, instead of 1 query per entry |
| 548 |
my $av = |
548 |
$facet_label_value = Koha::AuthorisedValues->find_description( |
| 549 |
Koha::AuthorisedValues->search( { category => 'LOC', authorised_value => $one_facet } ); |
549 |
{ category => 'LOC', authorised_value => $one_facet, opac => 1, default_to_blank => 1 } |
| 550 |
$facet_label_value = $av->count ? $av->next->opac_description : ''; |
550 |
); |
| 551 |
} |
551 |
} |
| 552 |
|
552 |
|
| 553 |
# also, if it's a collection code, use the name instead of the code |
553 |
# also, if it's a collection code, use the name instead of the code |
| 554 |
if ( $link_value =~ /ccode/ ) { |
554 |
if ( $link_value =~ /ccode/ ) { |
| 555 |
|
555 |
|
| 556 |
# TODO Retrieve all authorised values at once, instead of 1 query per entry |
556 |
# TODO Retrieve all authorised values at once, instead of 1 query per entry |
| 557 |
my $av = Koha::AuthorisedValues->search( |
557 |
$facet_label_value = Koha::AuthorisedValues->find_description( |
| 558 |
{ category => 'CCODE', authorised_value => $one_facet } ); |
558 |
{ |
| 559 |
$facet_label_value = $av->count ? $av->next->opac_description : ''; |
559 |
category => 'CCODE', authorised_value => $one_facet, opac => 1, |
|
|
560 |
default_to_blank => 1 |
| 561 |
} |
| 562 |
); |
| 560 |
} |
563 |
} |
| 561 |
|
564 |
|
| 562 |
# but we're down with the whole label being in the link's title. |
565 |
# but we're down with the whole label being in the link's title. |