From 249736a67f7ed0e2130c620e10bcbc01b14b1829 Mon Sep 17 00:00:00 2001 From: Josef Moravec Date: Fri, 16 Feb 2018 11:00:25 +0000 Subject: [PATCH] Bug 18789: (QA follow-up) Fix viewlog when accessed via circulation Test plan: Go to any patron and then to Modification log of this patron -- without patch you will not see the left side menu and patron information -- with patch menu and patron information is here, and should be fully working (links) Signed-off-by: Josef Moravec Signed-off-by: Jonathan Druart --- .../intranet-tmpl/prog/en/modules/tools/viewlog.tt | 2 +- tools/viewlog.pl | 13 +++---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt index 02238440b4..93932e7016 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt @@ -274,7 +274,7 @@
- [% IF ( menu ) %] + [% IF ( circulation ) %] [% INCLUDE 'circ-menu.inc' %] [% ELSE %] [% IF ( CATALOGUING ) %] diff --git a/tools/viewlog.pl b/tools/viewlog.pl index 54082dff98..e9e9f423ef 100755 --- a/tools/viewlog.pl +++ b/tools/viewlog.pl @@ -70,7 +70,6 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( if ( $src eq 'circ' ) { # if we were called from circulation, use the circulation menu and get data to populate it -fbcit - use C4::Members; use C4::Members::Attributes qw(GetBorrowerAttributes); my $borrowernumber = $object; my $patron = Koha::Patrons->find( $borrowernumber ); @@ -78,23 +77,17 @@ if ( $src eq 'circ' ) { print $input->redirect("/cgi-bin/koha/circ/circulation.pl?borrowernumber=$borrowernumber"); exit; } - $template->param( picture => 1 ) if $patron->image; - my $data = $patron->unblessed; - if ( C4::Context->preference('ExtendedPatronAttributes') ) { - my $attributes = GetBorrowerAttributes( $data->{'borrowernumber'} ); + my $attributes = GetBorrowerAttributes( $borrowernumber ); $template->param( ExtendedPatronAttributes => 1, extendedattributes => $attributes ); } - $template->param(%$data); - $template->param( - menu => 1, - borrowernumber => $borrowernumber, - categoryname => $patron->category->description, + patron => $patron, + circulation => 1, ); } -- 2.39.5