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>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3e4d37b031)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ab6e421152)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
This commit is contained in:
parent
c68e2b74fc
commit
b3d900e7ff
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,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' %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue