Bugzilla – Attachment 727 Details for
Bug 2553
alphabetize dropdown menus
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for drop-downs in Acquisitions pages
0015-Bug-2553-Fixes-drop-down-alphabetization-in-acquisi.patch (text/plain), 2.95 KB, created by
Chris Cormack
on 2009-07-18 00:22:00 UTC
(
hide
)
Description:
Patch for drop-downs in Acquisitions pages
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2009-07-18 00:22:00 UTC
Size:
2.95 KB
patch
obsolete
>From 2c8a09b26b2e168c9aade896ce47daf2803dfefa Mon Sep 17 00:00:00 2001 >From: Garry Collum <gcollum@gmail.com> >Date: Fri, 17 Jul 2009 20:18:55 -0400 >Subject: [PATCH] Bug 2553: Fixes drop-down alphabetization in acquisitions - New order and Receive order. >Content-Type: text/plain; charset="utf-8" > >Fixes alphabetization of library dropdown in New Order, and the shelf location, item type, and collection code in the Receive Items pages. This patch takes care of Joann's original purpose of creating the bug enhancement. >--- > acqui/neworderempty.pl | 4 ++-- > acqui/orderreceive.pl | 6 +++--- > 2 files changed, 5 insertions(+), 5 deletions(-) > >diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl >index df23586..ac4a934 100755 >--- a/acqui/neworderempty.pl >+++ b/acqui/neworderempty.pl >@@ -145,7 +145,7 @@ for ( my $i = 0 ; $i < $count ; $i++ ) { > my $itemtypes = GetItemTypes; > > my @itemtypesloop; >-foreach my $thisitemtype (sort keys %$itemtypes) { >+foreach my $thisitemtype (sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'}} keys %$itemtypes) { > push @itemtypesloop, { itemtype => $itemtypes->{$thisitemtype}->{'itemtype'} , desc => $itemtypes->{$thisitemtype}->{'description'} } ; > } > >@@ -156,7 +156,7 @@ my $onlymine=C4::Context->preference('IndependantBranches') && > C4::Context->userenv->{branch}; > my $branches = GetBranches($onlymine); > my @branchloop; >-foreach my $thisbranch ( sort keys %$branches ) { >+foreach my $thisbranch ( sort {$branches->{$a}->{'branchname'} cmp $branches->{$b}->{'branchname'}} keys %$branches ) { > my %row = ( > value => $thisbranch, > branchname => $branches->{$thisbranch}->{'branchname'}, >diff --git a/acqui/orderreceive.pl b/acqui/orderreceive.pl >index c13eda3..caabc93 100755 >--- a/acqui/orderreceive.pl >+++ b/acqui/orderreceive.pl >@@ -104,7 +104,7 @@ if ( $count == 1 ) { > > my (@itemtypesloop,@locationloop,@ccodeloop); > my $itemtypes = GetItemTypes; >- foreach my $thisitemtype (sort keys %$itemtypes) { >+ foreach my $thisitemtype (sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'}} keys %$itemtypes) { > push @itemtypesloop, { > value => $thisitemtype, > description => $itemtypes->{$thisitemtype}->{'description'}, >@@ -112,14 +112,14 @@ if ( $count == 1 ) { > }; > } > my $locs = GetKohaAuthorisedValues( 'items.location' ); >- foreach my $thisloc (sort keys %$locs) { >+ foreach my $thisloc (sort {$locs->{$a} cmp $locs->{$b}} keys %$locs) { > push @locationloop, { > value => $thisloc, > description => $locs->{$thisloc}, > }; > } > my $ccodes = GetKohaAuthorisedValues( 'items.ccode' ); >- foreach my $thisccode (sort keys %$ccodes) { >+ foreach my $thisccode (sort {$ccodes->{$a} cmp $ccodes->{$b}} keys %$ccodes) { > push @ccodeloop, { > value => $thisccode, > description => $ccodes->{$thisccode}, >-- >1.5.6.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 2553
:
721
|
722
|
723
|
724
|
725
|
726
|
727
|
728
|
729
|
730
|
731
|
732
|
733
|
11788
|
11789