Bugzilla – Attachment 722 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 Most-Circulated Items
0010-Bug-2553-Fixes-the-alphabetization-of-the-drop-down.patch (text/plain), 2.90 KB, created by
Chris Cormack
on 2009-07-16 20:45:00 UTC
(
hide
)
Description:
Patch for Most-Circulated Items
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2009-07-16 20:45:00 UTC
Size:
2.90 KB
patch
obsolete
>From 4db83cc89febb0556ecfee1c510400ea8c0b02d5 Mon Sep 17 00:00:00 2001 >From: Garry Collum <gcollum@gmail.com> >Date: Thu, 16 Jul 2009 16:46:22 -0400 >Subject: [PATCH] Bug 2553: Fixes the alphabetization of the drop-down lists for the Most-Circulated items report. >Content-Type: text/plain; charset="utf-8" > >This patch alphabetizes the descriptions that appear in the Library, Item type, and patron category drop-down lists of the Most-Circulated Items report form. >--- > reports/cat_issues_top.pl | 25 +++++-------------------- > 1 files changed, 5 insertions(+), 20 deletions(-) > >diff --git a/reports/cat_issues_top.pl b/reports/cat_issues_top.pl >index f134b9a..12c8884 100755 >--- a/reports/cat_issues_top.pl >+++ b/reports/cat_issues_top.pl >@@ -129,26 +129,13 @@ if ($do_it) { > -multiple => 0 ); > > my $CGIsepChoice=GetDelimiterChoices; >- #branch >- my $branches = GetBranches; >- my @branchloop; >- foreach my $thisbranch (keys %$branches) { >-# my $selected = 1 if $thisbranch eq $branch; >- my %row =(value => $thisbranch, >-# selected => $selected, >- branchname => $branches->{$thisbranch}->{'branchname'}, >- ); >- push @branchloop, \%row; >- } > > #doctype > my $itemtypes = GetItemTypes; > my @itemtypeloop; >- foreach my $thisitemtype (keys %$itemtypes) { >-# my $selected = 1 if $thisbranch eq $branch; >+ foreach my $thisitemtype ( sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'}} keys %$itemtypes) { > my %row =(value => $thisitemtype, >-# selected => $selected, >- description => $itemtypes->{$thisitemtype}->{'description'}, >+ description => $itemtypes->{$thisitemtype}->{'description'}, > ); > push @itemtypeloop, \%row; > } >@@ -156,11 +143,9 @@ if ($do_it) { > #borcat > my ($codes,$labels) = GetborCatFromCatType(undef,undef); > my @borcatloop; >- foreach my $thisborcat (sort keys %$labels) { >-# my $selected = 1 if $thisbranch eq $branch; >+ foreach my $thisborcat (sort {$labels->{$a} cmp $labels->{$b}} keys %$labels) { > my %row =(value => $thisborcat, >-# selected => $selected, >- description => $labels->{$thisborcat}, >+ description => $labels->{$thisborcat}, > ); > push @borcatloop, \%row; > } >@@ -170,7 +155,7 @@ if ($do_it) { > $template->param( > CGIextChoice => $CGIextChoice, > CGIsepChoice => $CGIsepChoice, >- branchloop =>\@branchloop, >+ branchloop => GetBranchesLoop(C4::Context->userenv->{'branch'}), > itemtypeloop =>\@itemtypeloop, > borcatloop =>\@borcatloop, > ); >-- >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