Bug 40827: Add context to plugin wrapper for report plugins

This patch updates the plugin wrapper to include the reports menu and have the breadcrumbs list reports instead of admin or tools when method="report"

To Test:
1. Install the Kitchen Sink Plugin
2. Navigate to Reports->Report plugins->Run Report.
3. Observe the admin menu shows
4. Apply the patch
5. Repeat step 2
6. Observe the report menu shows and the breadcrumbs are for the report module.
7. Check that the tools and configuration show the appropriate tool/admin context.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 09860c5816)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This commit is contained in:
Lisette Scheer 2025-10-20 17:18:36 +00:00 committed by Baptiste Wojtkowski
parent 10a00918f7
commit ccc5cf627d
No known key found for this signature in database
GPG Key ID: 47A8A13E10BC0D40
1 changed files with 6 additions and 0 deletions

View File

@ -12,6 +12,8 @@
[% t("Plugins") | html %] &rsaquo;
[% IF ( method == 'tool' ) %]
[% t("Tools") | html %]
[% ELSIF (method == 'report' ) %]
[% t("Reports") | html %]
[% ELSE %]
[% t("Administration") | html %]
[% END %] &rsaquo;
@ -30,6 +32,8 @@
[% WRAPPER breadcrumb_item %]
[% IF ( method == 'tool' ) %]
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
[% ELSIF (method == 'report' ) %]
<a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
[% ELSE %]
<a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
[% END %]
@ -55,6 +59,8 @@
<aside>
[% IF ( method == 'tool' ) %]
[% INCLUDE 'tools-menu.inc' %]
[% ELSIF (method == 'report' ) %]
[% INCLUDE 'reports-menu.inc' %]
[% ELSE %]
[% INCLUDE 'admin-menu.inc' %]
[% END %]