From bugzilla-daemon@bugs.koha-community.org Fri Sep 4 08:01:53 2020
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 26381] New: Koha should provide Koha plugins with a
template to use with Template::Toolkit WRAPPER
Date: Fri, 04 Sep 2020 06:01:52 +0000
Message-ID:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============2225960597602812619=="
--===============2225960597602812619==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=3D26381
Bug ID: 26381
Summary: Koha should provide Koha plugins with a template to
use with Template::Toolkit WRAPPER
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Plugin architecture
Assignee: koha-bugs@lists.koha-community.org
Reporter: dcook@prosentient.com.au
QA Contact: testopia@bugs.koha-community.org
At the moment, Koha plugins have to built their own templates from scratch.=20
I'm proposing that Koha provides a BLOCK or a template file that Koha plugins
can then use with the Template::Toolkit WRAPPER directive to minimize the
amount of boiler plate they have to use.=20
Here is an example of a very simple "plugin_wrapper"
[% BLOCK plugin_wrapper %]
[% INCLUDE 'doc-head-open.inc' %]
Koha: [% name %]
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
[% content %]
[% INCLUDE 'intranet-bottom.inc' %]
[% END %]
Then, in my report-step1.tt file, all I need to include is the following:
[% WRAPPER plugin_wrapper
name =3D 'My Plugin'
breadcrumb =3D 'My Plugin'
%]
Plugin content
[% END %]
I've already tested this a little bit, and it's beautiful.
--=20
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
--===============2225960597602812619==--
From bugzilla-daemon@bugs.koha-community.org Fri Sep 4 08:04:19 2020
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 26381] Koha should provide Koha plugins with a
template to use with Template::Toolkit WRAPPER
Date: Fri, 04 Sep 2020 06:04:18 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============3994727929060320245=="
--===============3994727929060320245==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=3D26381
--- Comment #1 from David Cook ---
This could make it easier to support Koha plugins across multiple versions,
since the different Koha versions would provide their own wrappers.
(I admit that this could maybe create compatibility issues if the Koha plugin
HTML isn't written well or somehow conflicts with the mainstream Koha wrapper=
.)
--=20
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
--===============3994727929060320245==--
From bugzilla-daemon@bugs.koha-community.org Fri Sep 4 08:07:01 2020
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 26381] Koha should provide Koha plugins with a
template to use with Template::Toolkit WRAPPER
Date: Fri, 04 Sep 2020 06:07:00 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============1496706935864419455=="
--===============1496706935864419455==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26381
--- Comment #2 from David Cook ---
I think that I could also be happy with Koha plugin specific wrappers, so long
as they could be reusable within the same plugin.
I need to play with the INCLUDE directive a bit to see whether or not Koha
needs to be patched to add include directories for plugins...
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
--===============1496706935864419455==--
From bugzilla-daemon@bugs.koha-community.org Fri Sep 4 08:21:33 2020
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 26381] Koha should provide Koha plugins with a
template to use with Template::Toolkit WRAPPER
Date: Fri, 04 Sep 2020 06:21:32 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============9208166953099934061=="
--===============9208166953099934061==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26381
--- Comment #3 from David Cook ---
(In reply to David Cook from comment #2)
> I think that I could also be happy with Koha plugin specific wrappers, so
> long as they could be reusable within the same plugin.
>
> I need to play with the INCLUDE directive a bit to see whether or not Koha
> needs to be patched to add include directories for plugins...
Here's a solution:
MyPlugin.pm:
my $template = $self->get_template({ file => 'report-step1.tt' });
my $wrapper = $self->mbf_path('wrapper.tt');
$template->param( plugin_wrapper => $wrapper, );
report-step1.tt:
[% WRAPPER $plugin_wrapper
name = 'My Plugin'
breadcrumb = 'My Plugin'
%]
Plugin content
[% END %]
Excellent!
There's other ways we could do this, but that worked pretty well.
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
--===============9208166953099934061==--
From bugzilla-daemon@bugs.koha-community.org Fri Sep 4 08:21:44 2020
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 26381] Koha should provide Koha plugins with a
template to use with Template::Toolkit WRAPPER
Date: Fri, 04 Sep 2020 06:21:43 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0346835818507199156=="
--===============0346835818507199156==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26381
David Cook changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |In Discussion
Assignee|koha-bugs@lists.koha-commun |dcook@prosentient.com.au
|ity.org |
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
--===============0346835818507199156==--
From bugzilla-daemon@bugs.koha-community.org Fri Sep 4 08:39:48 2020
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 26381] Koha should provide Koha plugins with a
template to use with Template::Toolkit WRAPPER
Date: Fri, 04 Sep 2020 06:39:47 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============8705517562562610681=="
--===============8705517562562610681==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26381
Marcel de Rooy changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |m.de.rooy@rijksmuseum.nl
--
You are receiving this mail because:
You are watching all bug changes.
--===============8705517562562610681==--
From bugzilla-daemon@bugs.koha-community.org Fri Sep 4 08:56:13 2020
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 26381] Koha should provide Koha plugins with a
template to use with Template::Toolkit WRAPPER
Date: Fri, 04 Sep 2020 06:56:12 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============8153739293541122166=="
--===============8153739293541122166==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=3D26381
--- Comment #4 from David Cook ---
Actually, here is a more modern wrapper for a report plugin I think...
[% INCLUDE 'doc-head-open.inc' %]
Koha: [% name %]
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
[% INCLUDE 'intranet-bottom.inc' %]
--=20
You are receiving this mail because:
You are watching all bug changes.
--===============8153739293541122166==--
From bugzilla-daemon@bugs.koha-community.org Mon Sep 14 09:23:40 2020
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 26381] Koha should provide Koha plugins with a
template to use with Template::Toolkit WRAPPER
Date: Mon, 14 Sep 2020 07:23:39 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============7571842279330046935=="
--===============7571842279330046935==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26381
Fridolin SOMERS changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fridolin.somers@biblibre.co
| |m
--
You are receiving this mail because:
You are watching all bug changes.
--===============7571842279330046935==--
From bugzilla-daemon@bugs.koha-community.org Thu Apr 7 13:39:15 2022
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 26381] Koha should provide Koha plugins with a
template to use with Template::Toolkit WRAPPER
Date: Thu, 07 Apr 2022 11:39:14 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============6517952392743748672=="
--===============6517952392743748672==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26381
David Cook changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |DUPLICATE
Status|In Discussion |RESOLVED
--- Comment #5 from David Cook ---
This is really a duplicate of bug 30289.
*** This bug has been marked as a duplicate of bug 30289 ***
--
You are receiving this mail because:
You are watching all bug changes.
--===============6517952392743748672==--