diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm index 95f61b3de4..bfaf284bdd 100644 --- a/Koha/Illrequest.pm +++ b/Koha/Illrequest.pm @@ -2003,7 +2003,6 @@ sub strings_map { return $strings; } - =head3 get_op_param_deprecation my $op = Koha::Illrequest->check_url_param_deprecation($params); @@ -2062,6 +2061,36 @@ sub get_op_param_deprecation { return $op; } +=head3 get_staff_table_actions + + my $ill_table_actions = $self->get_staff_table_actions; + +Returns the table actions available in the Staff ILL list table +A total join of core static actions with custom actions provided by +installed plugins that implement the ill_table_actions hook + +=cut + +sub get_staff_table_actions { + my ( $self, $params ) = @_; + + my $ill_table_actions = [ + { + button_class => 'btn btn-default btn-sm', + button_link => '/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id=', + append_column_data_to_link => 1, + button_link_translatable_text => 'ill_manage', + } + ]; + + my @plugin_responses = Koha::Plugins->call('ill_table_actions'); + for my $plugin_variables (@plugin_responses) { + push( @{$ill_table_actions}, $plugin_variables ); + } + + return $ill_table_actions; +} + =head3 _type =cut diff --git a/ill/ill-requests.pl b/ill/ill-requests.pl index 2c70d1ca06..9087825a0d 100755 --- a/ill/ill-requests.pl +++ b/ill/ill-requests.pl @@ -409,6 +409,7 @@ if ( $backends_available ) { } } + $template->param( table_actions => encode_json( Koha::Illrequest->get_staff_table_actions ) ) } elsif ( $op eq "cud-save_comment" ) { my $comment = Koha::Illcomment->new({ illrequest_id => scalar $params->{illrequest_id}, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt index e7b2f20e59..1ae4f9b2cf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt @@ -56,6 +56,9 @@