From f20acba9593e6808874c3e3f320e5868e187bca1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= Date: Sun, 16 Nov 2014 22:52:31 +0100 Subject: [PATCH] Bug 8096 - card number twice on patron search This patch removes double patron card numbers from patron search results. To test: Search patrons See card number 12345 in first column and in second column like Testman, John (12345) Apply patch Patron card number no longer dispays in second colum Further testing: Search for other places in intranet where patron-title.inc is used (git grep 'patron-title.inc') The card number still should display at the other places. Signed-off-by: Chris http://bugs.koha-community.org/show_bug.cgi?id=8096 Signed-off-by: Chris --- koha-tmpl/intranet-tmpl/prog/en/includes/patron-title.inc | 8 ++++++-- .../prog/en/modules/members/tables/members_results.tt | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-title.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-title.inc index 3a3b90c..88b0f3f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-title.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-title.inc @@ -8,7 +8,9 @@ [%- borrower.firstname %] [% IF borrower.othernames %] ([% borrower.othernames %]) [% END %] [% borrower.surname %] [%- END -%] [%- END -%] - ([% borrower.cardnumber %]) + [% IF ( borrower.cardnumber ) %] + ([% borrower.cardnumber %]) + [% END %] [%- ELSIF ( borrowernumber ) %] [%- IF category_type == 'I' %] [%- surname %] [% IF othernames %] ([% othernames %]) [% END %] @@ -19,5 +21,7 @@ [%- firstname %] [% IF othernames %] ([% othernames %]) [% END %] [% surname %] [%- END %] [%- END -%] - ([% cardnumber -%]) + [% IF ( cardnumber ) %] + ([% cardnumber %]) + [% END %] [%- END -%] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt index e519289..00b02af 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt @@ -13,7 +13,7 @@ "dt_cardnumber": "[% data.cardnumber %]", "dt_name": - "[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = data.firstname surname = data.surname othernames = data.othernames cardnumber = data.cardnumber invert_name = 1%]
[% IF ( data.streetnumber ) %][% data.streetnumber %] [% END %][% IF ( data.streettype ) %][% AuthorisedValues.GetByCode( 'ROADTYPE', data.streettype ) %] [% END %][% data.address %][% IF ( data.address2 ) %]
[% data.address2 %][% END %][% IF ( data.city || data.state || data.zipcode || data.country) %]
[% END %][% IF ( data.city ) %][% data.city %][% IF ( data.state ) %],[% END %][% END %][% IF ( data.state ) %] [% data.state %][% END %] [% IF ( data.zipcode ) %] [% data.zipcode %][% END %][% IF ( data.country ) %], [% data.country %][% END %][% IF data.email %]
Email: [% data.email %][% END %]
", + "[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = data.firstname surname = data.surname othernames = data.othernames invert_name = 1%]
[% IF ( data.streetnumber ) %][% data.streetnumber %] [% END %][% IF ( data.streettype ) %][% AuthorisedValues.GetByCode( 'ROADTYPE', data.streettype ) %] [% END %][% data.address %][% IF ( data.address2 ) %]
[% data.address2 %][% END %][% IF ( data.city || data.state || data.zipcode || data.country) %]
[% END %][% IF ( data.city ) %][% data.city %][% IF ( data.state ) %],[% END %][% END %][% IF ( data.state ) %] [% data.state %][% END %] [% IF ( data.zipcode ) %] [% data.zipcode %][% END %][% IF ( data.country ) %], [% data.country %][% END %][% IF data.email %]
Email: [% data.email %][% END %]
", "dt_category": "[% data.category_description |html %] ([% data.category_type |html %])", "dt_branch": -- 1.7.10.4