From 65a0d638609580a472e30676ef768c441122eea8 Mon Sep 17 00:00:00 2001 From: David Cook Date: Wed, 19 Jul 2023 05:35:35 +0000 Subject: [PATCH] Bug 34307: Update plugin template to match master conventions This change uses WRAPPER to build the breadcrumbs and updates the plugin template to follow some other master conventions like differentiating between Administration and Tools for plugins. Test plan: 0. Apply patch 1. Upload koha-plugin-test-wrapper 2. Enable the plugin 3. Click "Actions" and click "Run tool" 4. Note how the plugin page looks like a perfect Koha Tools page 5. Note that the plugin only contains 6 lines of template code to achieve this effect Signed-off-by: David Nind Signed-off-by: Victor Grousset/tuxayo Signed-off-by: Tomas Cohen Arazi (cherry picked from commit e8a48054354613f96565a22c610145b0e946fc02) Signed-off-by: Fridolin Somers --- .../en/includes/wrapper-staff-tool-plugin.inc | 60 ++++++++++++------- 1 file changed, 38 insertions(+), 22 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/wrapper-staff-tool-plugin.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/wrapper-staff-tool-plugin.inc index 0543393ccb..f6aab0b3ef 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/wrapper-staff-tool-plugin.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/wrapper-staff-tool-plugin.inc @@ -1,32 +1,44 @@ [% USE raw %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] -[% IF ( plugin_title ) %][% plugin_title | html %] › [% END %]Plugins › Tools › Koha +[% IF ( ! method ) %] +[% method = 'tool'; %] +[% END %] + + [% IF ( plugin_title ) %][% plugin_title | html %] › [% END %] + Plugins › + [% IF ( method == 'tool' ) %] + Tools + [% ELSE %] + Administration + [% END %] + › Koha + [% INCLUDE 'doc-head-close.inc' %] - -[% INCLUDE 'header.inc' %] -[% INCLUDE 'prefs-admin-search.inc' %] + +[% WRAPPER 'header.inc' %] + [% INCLUDE 'prefs-admin-search.inc' %] +[% END %] - + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + [% IF ( plugin_title ) %][% plugin_title | html %][% ELSE %]Plugin[% END %] + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
@@ -38,7 +50,11 @@
-- 2.39.5