Bugzilla – Attachment 32309 Details for
Bug 11425
Search form for items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11425: Display location label instead of code
Bug-11425-Display-location-label-instead-of-code.patch (text/plain), 2.30 KB, created by
Chris Cormack
on 2014-10-14 13:37:00 UTC
(
hide
)
Description:
Bug 11425: Display location label instead of code
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2014-10-14 13:37:00 UTC
Size:
2.30 KB
patch
obsolete
>From 078fea0968c3ecf1d64ef87ba43437ff97a88d76 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] 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. >--- > catalogue/itemsearch.pl | 17 ++++++++++++++--- > 1 file 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.9.1
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