Bugzilla – Attachment 157323 Details for
Bug 35070
Koha plugins implementing "background_jobs" hook can't provide view template
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35070: Proof of concept
Bug-35070-Proof-of-concept.patch (text/plain), 1.27 KB, created by
Julian Maurice
on 2023-10-18 14:28:33 UTC
(
hide
)
Description:
Bug 35070: Proof of concept
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2023-10-18 14:28:33 UTC
Size:
1.27 KB
patch
obsolete
>From e5ae0bf51a9e9b130e665e1cdc9eac86cb56af94 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Wed, 18 Oct 2023 16:24:52 +0200 >Subject: [PATCH] Bug 35070: Proof of concept > >Add the following methods to your plugin > > sub template_include_paths { > my ($self) = @_; > > return [ > $self->mbf_path('inc'), > ] > } > >Then create a file >Koha/Plugin/YourPlugin/inc/background_jobs/plugin_NAMESPACE_JOBTYPE.inc >with 3 TT BLOCKs: "process", "report" and "js" >--- > C4/Templates.pm | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/C4/Templates.pm b/C4/Templates.pm >index dd54a6e3f4..ea10a6bd20 100644 >--- a/C4/Templates.pm >+++ b/C4/Templates.pm >@@ -61,6 +61,11 @@ sub new { > push @includes, "$htdocs/$_/$lang/includes"; > push @includes, "$htdocs/$_/en/includes" unless $lang eq 'en'; > } >+ >+ my @plugins_include_paths = Koha::Plugins->call( 'template_include_paths', >+ { interface => $interface, lang => $lang } ); >+ push @includes, map { $_ ? @$_ : () } @plugins_include_paths; >+ > # Do not use template cache if script is called from commandline > my $use_template_cache = C4::Context->config('template_cache_dir') && defined $ENV{GATEWAY_INTERFACE}; > my $template = Template->new( >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35070
:
157323
|
159205
|
159248
|
159901
|
159902
|
159938
|
160378
|
160565