Bugzilla – Attachment 32674 Details for
Bug 11425
Search form for items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 11425: Display location label instead of code
PASSED-QA-Bug-11425-Display-location-label-instead.patch (text/plain), 2.37 KB, created by
Kyle M Hall (khall)
on 2014-10-24 13:58:35 UTC
(
hide
)
Description:
[PASSED QA] Bug 11425: Display location label instead of code
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-10-24 13:58:35 UTC
Size:
2.37 KB
patch
obsolete
>From e1fbbd18cb722d8ef14a485569305b8ea342af4b Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Wed, 23 Jul 2014 10:49:01 +0200 >Subject: [PATCH] [PASSED QA] Bug 11425: Display location label instead of code > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> > >Minor conflicts solved >Last three patches signed >No koha-qa errors. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > catalogue/itemsearch.pl | 17 ++++++++++++++--- > 1 files changed, 14 insertions(+), 3 deletions(-) > >diff --git a/catalogue/itemsearch.pl b/catalogue/itemsearch.pl >index 280f35a..35d1a00 100755 >--- a/catalogue/itemsearch.pl >+++ b/catalogue/itemsearch.pl >@@ -90,6 +90,9 @@ my ($template, $borrowernumber, $cookie) = get_template_and_user({ > my $notforloan_avcode = GetAuthValCode('items.notforloan'); > my $notforloan_values = GetAuthorisedValues($notforloan_avcode); > >+my $location_avcode = GetAuthValCode('items.location'); >+my $location_values = GetAuthorisedValues($location_avcode); >+ > if (scalar keys %params > 0) { > # Parameters given, it's a search > >@@ -193,10 +196,19 @@ if (scalar keys %params > 0) { > $notforloan_map->{$nfl_value->{authorised_value}} = $nfl_value->{lib}; > } > >+ # Get location labels >+ my $location_map = {}; >+ foreach my $loc_value (@$location_values) { >+ $location_map->{$loc_value->{authorised_value}} = $loc_value->{lib}; >+ } >+ > foreach my $item (@$results) { > $item->{biblio} = GetBiblio($item->{biblionumber}); > ($item->{biblioitem}) = GetBiblioItemByBiblioNumber($item->{biblionumber}); > $item->{status} = $notforloan_map->{$item->{notforloan}}; >+ if (defined $item->{location}) { >+ $item->{location} = $location_map->{$item->{location}}; >+ } > } > } > >@@ -236,12 +248,11 @@ if ($format eq 'html') { > label => $branches->{$branchcode}->{branchname}, > }; > } >- my $locations = GetAuthorisedValues('LOC'); > my @locations; >- foreach my $location (@$locations) { >+ foreach my $location (@$location_values) { > push @locations, { > value => $location->{authorised_value}, >- label => $location->{lib}, >+ label => $location->{lib} // $location->{authorised_value}, > }; > } > my @itemtypes = C4::ItemType->all(); >-- >1.7.2.5
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 11425
:
23674
|
23675
|
26334
|
26335
|
26555
|
26556
|
26557
|
27111
|
27112
|
27113
|
27162
|
27975
|
27976
|
27977
|
27978
|
27979
|
29965
|
30195
|
30196
|
30197
|
30198
|
30199
|
30200
|
32304
|
32305
|
32306
|
32307
|
32308
|
32309
|
32669
|
32670
|
32671
|
32672
|
32673
| 32674 |
32675
|
32918
|
32926
|
32947
|
32948