]> git.koha-community.org Git - koha.git/commit
Bug 35070: Add plugin hook template_include_paths
authorJulian Maurice <julian.maurice@biblibre.com>
Wed, 18 Oct 2023 14:24:52 +0000 (16:24 +0200)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 12 Jan 2024 22:16:25 +0000 (22:16 +0000)
commit49c5392ae6c27bac09730138c4a66d38771e8e62
tree4a1a755e3dc607e9d4d6e4823533f5f4b7e3bded
parent27464fbe39fc4e89022ebb373c91969d40d3b883
Bug 35070: Add plugin hook template_include_paths

It allows to add paths to Template::Toolkit's INCLUDE_PATH option

http://template-toolkit.org/docs/manual/Config.html#section_INCLUDE_PATH

Test plan:
1. Install the modified kitchen sink plugin:

    git clone --branch template-include-paths \
    https://github.com/jajm/dev-koha-plugin-kitchen-sink.git

2. Run misc/devel/install_plugins.pl
3. Restart memcached and koha
4. Go to Administration -> Manage Plugins
5. Run the KitchenSink plugin's tool
6. Click on "Schedule greeting"
7. Go to Administration -> Manage jobs
8. If you don't see any jobs, uncheck "Current jobs only"
9. You should see a job of type "Unknown job type
   'plugin_kitchensink_greeter". Click on the "View" button
10. Under the Report section you should see "This is the report block"
11. Under the Detailed messages section you should see "This is the
    detail block"
12. Open the browser console, you should see a message "This is the js
    block"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5047e0761cbb975c262c96cf395e6d6285fdb3c1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fe5b461cbf127916ae9b2c1c0577541ff4d7e29f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
C4/Templates.pm
t/db_dependent/Koha/Plugins/TemplateIncludePathHook.t [new file with mode: 0644]
t/lib/plugins/Koha/Plugin/Test.pm
t/lib/plugins/Koha/Plugin/Test/inc/test.inc [new file with mode: 0644]