From f6d0955a30c28bd540c29bf5603de3da4c2e666b 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 --- .../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 cea915d595..8843022f0f 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 @@ -68,6 +68,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.30.2