Bugzilla – Attachment 119734 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.59 KB, created by
Kyle M Hall (khall)
on 2021-04-16 13:37:53 UTC
(
hide
)
Description:
Bug 27120: Send biblio to Koha plugins hook 'intranet_catalog_biblio_tab'
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2021-04-16 13:37:53 UTC
Size:
2.59 KB
patch
obsolete
>From 57bcec29e0ea629d5a2bc32976f3184ccc631ec2 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}' > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > 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 5fe3a21b1e..b75d36c437 100644 >--- a/Koha/Template/Plugin/KohaPlugins.pm >+++ b/Koha/Template/Plugin/KohaPlugins.pm >@@ -160,7 +160,7 @@ method to output to the list of extra cataloguing tabs on intranet pages. > =cut > > sub get_plugins_intranet_catalog_biblio_tab { >- >+ my ( $self, $params ) = @_; > my $tabs = []; > > return $tabs unless C4::Context->config("enable_plugins"); >@@ -176,7 +176,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 56e5fd7448..728f35db7d 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.24.3 (Apple Git-128)
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