From 6c3e835cb09085479123d0fadfc13d85082f7705 Mon Sep 17 00:00:00 2001 From: Ian Walls Date: Thu, 5 Jan 2012 13:17:53 -0500 Subject: [PATCH] [SIGNED-OFF] Bug 7097: HidePatronName not hiding on issue history HidePatronName wasn't being respected on a titles Checkout History tab. This patch exports the preference to the template (if set), and then toggles the display between patron cardnumber (if 'on') or the name (if 'off') To test: Enable HidePatronName Go to the Checkout History tab of an item that has been checked out before You should see the patron's cardnumber instead of their surname, firstname Signed-off-by: Nicole C. Engard --- catalogue/issuehistory.pl | 4 ++++ .../prog/en/modules/catalogue/issuehistory.tt | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/catalogue/issuehistory.pl b/catalogue/issuehistory.pl index 0d774ea..3fb936e 100755 --- a/catalogue/issuehistory.pl +++ b/catalogue/issuehistory.pl @@ -45,6 +45,10 @@ my $params = $query->Vars; my $biblionumber = $params->{'biblionumber'}; my $itemnumber = $params->{'itemnumber'}; +if (C4::Context->preference("HidePatronName")) { + $template->param(HidePatronName => 1); +} + my ($issues,$biblio,$barcode); if ($itemnumber){ $issues=GetItemIssues($itemnumber); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt index bc2490f..de5db0e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt @@ -34,7 +34,7 @@ [% FOREACH issue IN issues %] [% UNLESS ( loop.odd ) %][% ELSE %][% END %] - [% issue.surname %][% IF ( issue.firstname ) %], [% issue.firstname %][% END %] + [% IF HidePatronName %][% issue.cardnumber %][% ELSE %][% issue.surname %][% IF ( issue.firstname ) %], [% issue.firstname %][% END %][% END %] [% IF ( issue.barcode ) %] [% issue.barcode %] [% ELSE %] -- 1.7.2.3