Bugzilla – Attachment 76021 Details for
Bug 18322
Add facets for ccode to zebra
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18322: (followup) Use authorized value labels
Bug-18322-followup-Use-authorized-value-labels.patch (text/plain), 1.51 KB, created by
Martin Renvoize (ashimema)
on 2018-06-13 09:31:08 UTC
(
hide
)
Description:
Bug 18322: (followup) Use authorized value labels
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2018-06-13 09:31:08 UTC
Size:
1.51 KB
patch
obsolete
>From 869abe0a782e6c21c6a3c182d8ba91b933b20cce Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 13 Jun 2018 10:29:54 +0100 >Subject: [PATCH] Bug 18322: (followup) Use authorized value labels > >Rather than using the raw ccode's use the labels as defined in the >authorized values. >--- > C4/Search.pm | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/C4/Search.pm b/C4/Search.pm >index 10973e3aba..27207206e0 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -586,6 +586,13 @@ sub getRecords { > my $av = Koha::AuthorisedValues->search({ category => 'LOC', authorised_value => $one_facet }); > $facet_label_value = $av->count ? $av->next->opac_description : ''; > } >+ >+ # also, if it's a collection code, use the name instead of the code >+ if ( $link_value =~ /ccode/ ) { >+ # TODO Retrieve all authorised values at once, instead of 1 query per entry >+ my $av = Koha::AuthorisedValues->search({ category => 'CCODE', authorised_value => $one_facet }); >+ $facet_label_value = $av->count ? $av->next->opac_description : ''; >+ } > > # but we're down with the whole label being in the link's title. > push @this_facets_array, >-- >2.14.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18322
:
61581
|
61597
|
61612
|
61643
|
61657
|
67823
|
75997
|
76007
|
76008
|
76009
|
76021
|
76023
|
76024
|
76025
|
76026