[Bug 27114] New: Use Template Toolkit plugin for Koha plugins hook 'intranet_catalog_biblio_tab'
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 Bug ID: 27114 Summary: Use Template Toolkit plugin for Koha plugins hook 'intranet_catalog_biblio_tab' Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Plugin architecture Assignee: koha-bugs@lists.koha-community.org Reporter: fridolin.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org Koha plugins hook 'intranet_catalog_biblio_tab' is for a template, it will be better it uses Template Toolkit plugin like intranet_js, ... -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |23050 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23050 [Bug 23050] Add hook to add a tab in intranet biblio details page -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |fridolin.somers@biblibre.co |ity.org |m Status|NEW |ASSIGNED -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 --- Comment #1 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 114054 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114054&action=edit Bug 27114: Use Template Toolkit plugin for Koha plugins hook 'intranet_catalog_biblio_tab' Koha plugins hook 'intranet_catalog_biblio_tab' is for a template, it will be better it uses Template Toolkit plugin like intranet_js, ... It will allow using it in other places like MARC details page for example. Test plan uses a plugin from git.biblibre.com because this hook is not yet in KitchenSink. Test plan : 1) Enable Koha plugins 2) Download and install the latest version of this plugin https://git.biblibre.com/biblibre/koha-plugin-intranet-detail-hook 3) Browse to catalogue/detail.pl for a record 4) Note you see two new tabs with content -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alex.arnaud@biblibre.com, | |matthias.meusburger@biblibr | |e.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |27120 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27120 [Bug 27120] Sent biblio to Koha plugins hook 'intranet_catalog_biblio_tab' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #2 from David Cook <dcook@prosentient.com.au> --- Can you explain why it would be better to do this in a Template::Toolkit plugin rather than doing it in the Perl script? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 --- Comment #3 from Fridolin Somers <fridolin.somers@biblibre.com> --- (In reply to David Cook from comment #2)
Can you explain why it would be better to do this in a Template::Toolkit plugin rather than doing it in the Perl script?
It will be easier to add it in other places, like MARC details page for example. Hooks intranet/opac_js/header are already in this TT plugin. Maybe easier to include in test suite ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 --- Comment #4 from David Cook <dcook@prosentient.com.au> --- Hmm ok. I think I was opposed to this idea yesterday, but for some reason I seem in favour of it today heh. Since it's not modifying any existing data in detail.pl, I suppose there's no reason why it shouldn't just be handled in detail.tt, since it's really just updating the view. And then Bug 27120 makes sense too. In fact... I recently did a local customization that probably could've been done as a plugin, if Bug 27120 were pushed. (Actually, it was an OPAC one... so not relevant here, so having an OPAC equivalent would be good after all...) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=26890 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 Michal Denar <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |black23@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114054|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 117995 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117995&action=edit Bug 27114: Use Template Toolkit plugin for Koha plugins hook 'intranet_catalog_biblio_tab' Koha plugins hook 'intranet_catalog_biblio_tab' is for a template, it will be better it uses Template Toolkit plugin like intranet_js, ... It will allow using it in other places like MARC details page for example. Test plan uses a plugin from git.biblibre.com because this hook is not yet in KitchenSink. Test plan : 1) Enable Koha plugins 2) Download and install the latest version of this plugin https://git.biblibre.com/biblibre/koha-plugin-intranet-detail-hook 3) Browse to catalogue/detail.pl for a record 4) Note you see two new tabs with content Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 117996 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117996&action=edit Bug 27114: (QA follow-up) Add missing POD -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Needs Signoff |Signed Off --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- This works well and makes allot of sense to me.. Signing off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Comment on attachment 117995 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117995 Bug 27114: Use Template Toolkit plugin for Koha plugins hook 'intranet_catalog_biblio_tab' Review of attachment 117995: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=27114&attachment=117995) ----------------------------------------------------------------- This is a breaking change.. I think.. We'll need to advertise that in the release notes to prompt plugin authors to update their plugins. ::: Koha/Template/Plugin/KohaPlugins.pm @@ +166,5 @@
+ try { + my @newtabs = $plugin->intranet_catalog_biblio_tab(); + foreach my $newtab (@newtabs) { + # Add a unique HTML id + my $html_id = 'tab-'. $plugin->{class} . '-' . $newtab->title;
The addition of $plugin->{class} here could cause problems for existing plugins.. we will need to make sure any in the wild are updated. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 --- Comment #9 from Fridolin Somers <fridolin.somers@biblibre.com> --- Indeed, but are they known use of this hook ? We should add plugins usage (and there hooks) to HEA :D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117995|0 |1 is obsolete| | Attachment #117996|0 |1 is obsolete| | --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 119429 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119429&action=edit Bug 27114: Use Template Toolkit plugin for Koha plugins hook 'intranet_catalog_biblio_tab' Koha plugins hook 'intranet_catalog_biblio_tab' is for a template, it will be better it uses Template Toolkit plugin like intranet_js, ... It will allow using it in other places like MARC details page for example. Test plan uses a plugin from git.biblibre.com because this hook is not yet in KitchenSink. Test plan : 1) Enable Koha plugins 2) Download and install the latest version of this plugin https://git.biblibre.com/biblibre/koha-plugin-intranet-detail-hook 3) Browse to catalogue/detail.pl for a record 4) Note you see two new tabs with content Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 --- Comment #11 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 119430 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119430&action=edit Bug 27114: (QA follow-up) Add missing POD Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Martin Renvoize from comment #8)
Comment on attachment 117995 [details] [review] Bug 27114: Use Template Toolkit plugin for Koha plugins hook 'intranet_catalog_biblio_tab'
Review of attachment 117995 [details] [review]: -----------------------------------------------------------------
This is a breaking change.. I think.. We'll need to advertise that in the release notes to prompt plugin authors to update their plugins.
::: Koha/Template/Plugin/KohaPlugins.pm @@ +166,5 @@
+ try { + my @newtabs = $plugin->intranet_catalog_biblio_tab(); + foreach my $newtab (@newtabs) { + # Add a unique HTML id + my $html_id = 'tab-'. $plugin->{class} . '-' . $newtab->title;
The addition of $plugin->{class} here could cause problems for existing plugins.. we will need to make sure any in the wild are updated.
Why do we add this change exactly? To prevent collision? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 --- Comment #13 from Fridolin Somers <fridolin.somers@biblibre.com> --- (In reply to Jonathan Druart from comment #12)
The addition of $plugin->{class} here could cause problems for existing plugins.. we will need to make sure any in the wild are updated.
Why do we add this change exactly? To prevent collision? Indeed. Two plugins may add a tab with same title. But this may be very rare. We can remove this if it causes problems.
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |ASSIGNED --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Release notes needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|release-notes-needed | Text to go in the| |Koha plugins hook release notes| |'intranet_catalog_biblio_ta | |b' now uses Template | |Toolkit plugin (like hook | |'intranet_js', ...). | |It | |makes it easy to use it in | |other places (like MARC | |details page for example). Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 21.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|21.05.00 |21.05.00,20.11.06 released in| | --- Comment #16 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable CC| |andrew@bywatersolutions.com Version(s)|21.05.00,20.11.06 |21.05.00,20.11.06,20.05.12 released in| | --- Comment #17 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 20.05.x for 20.05.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27114 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED CC| |victor@tuxayo.net --- Comment #18 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org