From bb6ce70399a4d505305bb20218bb45c6142693a1 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Thu, 16 Nov 2023 10:01:16 +0000 Subject: [PATCH] Bug 35331: (QA follow-up): Patron ILL history With the previous patches applied and successfull test plans, access the users ILL history page, visit: /cgi-bin/koha/members/ill-requests.pl?borrowernumber=51 Notice you get an error. Apply this patch, and try again, notice the error is gone and the custom plugin action is also in the patron's ILL history table Signed-off-by: David Nind Signed-off-by: Kyle M Hall Signed-off-by: Katrin Fischer --- .../intranet-tmpl/prog/en/modules/members/ill-requests.tt | 2 ++ members/ill-requests.pl | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/ill-requests.tt index e8792dd5f7..006db259af 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/ill-requests.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/ill-requests.tt @@ -69,6 +69,8 @@ var prefilters = '[% prefilters | html %]'; // Set column settings var table_settings = [% TablesSettings.GetTableSettings( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) | $raw %]; + + var ill_table_actions = [% table_actions | $raw %]; [% INCLUDE 'ill-list-table-strings.inc' %] [% Asset.js("js/ill-list-table.js") | $raw %] diff --git a/members/ill-requests.pl b/members/ill-requests.pl index f2b23844c0..d4573fabf3 100755 --- a/members/ill-requests.pl +++ b/members/ill-requests.pl @@ -22,6 +22,7 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); +use JSON qw( encode_json ); use Koha::Patrons; my $input = CGI->new; @@ -42,9 +43,10 @@ my $patron = Koha::Patrons->find( $borrowernumber ); output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } ); $template->param( - prefilters => "borrowernumber=$borrowernumber", - patron => $patron, - illview => 1, + prefilters => "borrowernumber=$borrowernumber", + patron => $patron, + illview => 1, + table_actions => encode_json( Koha::Illrequest->get_staff_table_actions ), ); output_html_with_http_headers $input, $cookie, $template->output; -- 2.39.5