Bugzilla – Attachment 7269 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]
Patch to fix display
0001-Bug-7318-Fixes-category-display-in-patroncards-Patro.patch (text/plain), 4.02 KB, created by
Garry Collum
on 2012-01-21 19:05:00 UTC
(
hide
)
Description:
Patch to fix display
Filename:
MIME Type:
Creator:
Garry Collum
Created:
2012-01-21 19:05:00 UTC
Size:
4.02 KB
patch
obsolete
>From 24f0a0d888de7291c8cb1c062e97d8a02573535c Mon Sep 17 00:00:00 2001 >From: Garry Collum <gcollum@gmail.com> >Date: Sat, 21 Jan 2012 13:37:19 -0500 >Subject: [PATCH] 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. >--- > .../prog/en/modules/patroncards/members-search.tt | 2 +- > patroncards/members-search.pl | 16 +++++++++++++--- > 2 files changed, 14 insertions(+), 4 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..276814a 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, >@@ -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