From aac43adb0147bbad1166d0af0028e6124122c135 Mon Sep 17 00:00:00 2001 From: Ian Walls Date: Thu, 5 Jan 2012 13:17:53 -0500 Subject: [PATCH] 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 Signed-off-by: Paul Poulain (cherry picked from commit 5fde4694298b96639b935423f873c133e5cef3ef) Signed-off-by: Chris Nighswonger --- catalogue/issuehistory.pl | 4 ++++ .../intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/catalogue/issuehistory.pl b/catalogue/issuehistory.pl index 0d774eac18..3fb936ec36 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 bc2490fd7e..de5db0e0a3 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 %] -- 2.39.5