Bugzilla – Attachment 114062 Details for
Bug 27120
Send biblio to Koha plugins hook 'intranet_catalog_biblio_tab'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27120: Send biblio to Koha plugins hook 'intranet_catalog_biblio_tab'
Bug-27120-Send-biblio-to-Koha-plugins-hook-intrane.patch (text/plain), 2.42 KB, created by
Fridolin Somers
on 2020-12-01 08:31:09 UTC
(
hide
)
Description:
Bug 27120: Send biblio to Koha plugins hook 'intranet_catalog_biblio_tab'
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2020-12-01 08:31:09 UTC
Size:
2.42 KB
patch
obsolete
>From 7d15b2cdd722c5f00b4bd2e0efdd3ca8efd66a92 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Tue, 1 Dec 2020 09:27:01 +0100 >Subject: [PATCH] Bug 27120: Send biblio to Koha plugins hook > 'intranet_catalog_biblio_tab' > >Koha plugins hook 'intranet_catalog_biblio_tab' should have the datas of the current biblio record. >Koha::Biblio is aleady in template, send it with hooks call. > >This will be very usefull to be able to fetch external datas >(wikipedia, youtube, ...) depending on current biblio record. > >Test plan : >1) Enable Koha plugins >2) Install plugin attached to this bug >3) Go to staff interface on a biblio record details page >4) Check you see tab 1 containing 'Tab for record {title}' >5) Check you see tab 2 containing 'Tab for record {isbn}' >--- > Koha/Template/Plugin/KohaPlugins.pm | 4 ++-- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/Koha/Template/Plugin/KohaPlugins.pm b/Koha/Template/Plugin/KohaPlugins.pm >index 157d6bca0b..2bcc94bab3 100644 >--- a/Koha/Template/Plugin/KohaPlugins.pm >+++ b/Koha/Template/Plugin/KohaPlugins.pm >@@ -148,7 +148,7 @@ sub get_plugins_intranet_js { > } > > sub get_plugins_intranet_catalog_biblio_tab { >- >+ my ( $self, $params ) = @_; > my $tabs = []; > > return $tabs unless C4::Context->config("enable_plugins"); >@@ -164,7 +164,7 @@ sub get_plugins_intranet_catalog_biblio_tab { > > foreach my $plugin (@plugins) { > try { >- my @newtabs = $plugin->intranet_catalog_biblio_tab(); >+ my @newtabs = $plugin->intranet_catalog_biblio_tab($params); > foreach my $newtab (@newtabs) { > # Add a unique HTML id > my $html_id = 'tab-'. $plugin->{class} . '-' . $newtab->title; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index abc5cf7dd6..64efc83df4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -31,7 +31,7 @@ > [% END %] > [% END %] > >-[% SET plugins_intranet_catalog_biblio_tabs = KohaPlugins.get_plugins_intranet_catalog_biblio_tab %] >+[% SET plugins_intranet_catalog_biblio_tabs = KohaPlugins.get_plugins_intranet_catalog_biblio_tab({ biblio => biblio }) %] > > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] >-- >2.29.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27120
:
114061
|
114062
|
118085
|
118086
|
119096
|
119098
|
119734
|
119735