Bugzilla – Attachment 7672 Details for
Bug 7318
Filtering Patron Card Creator by Category Code Does Nothing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[Signed Off] Bug 7318: Fixes category display in patroncards Patron Search results.
Signed-Off-Bug-7318-Fixes-category-display-in-patr.patch (text/plain), 4.53 KB, created by
Liz Rea
on 2012-02-16 02:27:21 UTC
(
hide
)
Description:
[Signed Off] Bug 7318: Fixes category display in patroncards Patron Search results.
Filename:
MIME Type:
Creator:
Liz Rea
Created:
2012-02-16 02:27:21 UTC
Size:
4.53 KB
patch
obsolete
>From 36d80c4007dfee8544137df8761cd8e797fbd18e Mon Sep 17 00:00:00 2001 >From: Garry Collum <gcollum@gmail.com> >Date: Sat, 21 Jan 2012 13:37:19 -0500 >Subject: [PATCH] [Signed Off] Bug 7318: Fixes category display in patroncards > Patron Search results. >Content-Type: text/plain; charset="utf-8" > >Category description and type were not being sent to the template. This patch fixes that issue, which also fixes the display. The display was showing 'Category Description (category type)'. It now displays 'Category Description (category code) to be consistent with the search label. > >This patch also assigns an empty string to $member to get rid of some 'uninitialized' errors in the logs. > >Signed-off-by: Liz Rea <wizzyrea@gmail.com> >Confirm this patch fixes the display issue. >Passes prove xt >--- > .../prog/en/modules/patroncards/members-search.tt | 2 +- > patroncards/members-search.pl | 18 ++++++++++++++---- > 2 files changed, 15 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/members-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/members-search.tt >index 4d651b7..cbd1db5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/members-search.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/members-search.tt >@@ -114,7 +114,7 @@ function add_item(borrowernum,batch_id,type_id){ > <td> <input type="checkbox" name="borrowernumber" id="patron[% resultsloo.borrowernumber %]" value="[% resultsloo.borrowernumber %]" /> </td> > <td>[% resultsloo.cardnumber %]</td> > <td style="white-space: nowrap;"><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resultsloo.borrowernumber %]">[% resultsloo.surname %], [% resultsloo.firstname %]</a> <br /> [% resultsloo.address %][% IF ( resultsloo.address2 ) %]<br />[% resultsloo.address2 %][% END %][% IF ( resultsloo.city ) %]<br />[% resultsloo.city %][% END %]</td> >- <td>[% resultsloo.category_description %] ([% resultsloo.category_type %])</td> >+ <td>[% resultsloo.category_description %] ([% resultsloo.categorycode %])</td> > <td>[% resultsloo.branchcode %]</td> > <td>[% resultsloo.dateexpiry %]</td> > <td>[% resultsloo.borrowernotes %]</td> >diff --git a/patroncards/members-search.pl b/patroncards/members-search.pl >index dfa0462..6c27095 100755 >--- a/patroncards/members-search.pl >+++ b/patroncards/members-search.pl >@@ -33,9 +33,20 @@ my $batch_id = $cgi->param('batch_id') || 0; > my $startfrom = $cgi->param('startfrom')||1; > my $resultsperpage = $cgi->param('resultsperpage')||C4::Context->preference("PatronsPerPage")||20; > my $category = $cgi->param('category') || undef; >-my $member = $cgi->param('member') || undef; >+my $member = $cgi->param('member') || ''; > my $orderby = $cgi->param('orderby') || undef; > >+my @categories=C4::Category->all; >+my %categories_display; >+ >+foreach my $category (@categories) { >+ my $hash={ >+ category_description=>$$category{description}, >+ category_type=>$$category{category_type} >+ }; >+ $categories_display{$$category{categorycode}} = $hash; >+} >+ > my ($template, $loggedinuser, $cookie) = get_template_and_user({ > template_name => "patroncards/members-search.tmpl", > query => $cgi, >@@ -49,7 +60,7 @@ $member =~ s/,//g; #remove any commas from search string > $member =~ s/\*/%/g; > > if ($member || $category) { >- my $results = $category ? Search({''=>$member, category_type=>$category}, $orderby) >+ my $results = $category ? Search({''=>$member, categorycode=>$category}, $orderby) > : Search($member, $orderby); > my $count = $results ? @$results : 0; > >@@ -60,13 +71,12 @@ if ($member || $category) { > my ($od,$issue,$fines) = GetMemberIssuesAndFines($results->[$i]{'borrowernumber'}); > my %row = ( > count => $i + 1, >+ %{$categories_display{$results->[$i]{categorycode}}}, > borrowernumber => $results->[$i]{'borrowernumber'}, > cardnumber => $results->[$i]{'cardnumber'}, > surname => $results->[$i]{'surname'}, > firstname => $results->[$i]{'firstname'}, > categorycode => $results->[$i]{'categorycode'}, >- category_type => $results->[$i]{'category_type'}, >- category_description => $results->[$i]{'description'}, > address => $results->[$i]{'address'}, > address2 => $results->[$i]{'address2'}, > city => $results->[$i]{'city'}, >-- >1.7.5.4
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 7318
:
6570
|
7269
|
7670
|
7672
|
7751