Test Plan:
1) Enable 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: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
my @plugins = Koha::Plugins->new()->GetPlugins({
method => 'intranet_catalog_biblio_enhancements_toolbar_button'
});
+
+ my @tab_plugins = Koha::Plugins->new()->GetPlugins({
+ method => 'intranet_catalog_biblio_tab',
+ });
+ my @tabs;
+ foreach my $tab_plugin (@tab_plugins) {
+ my @biblio_tabs = $tab_plugin->intranet_catalog_biblio_tab();
+ foreach my $tab (@biblio_tabs) {
+ $tab->{id} = $tab->{title};
+ $tab->{id} =~ s/[^\w]+/-/g;
+ push @tabs, $tab,
+ }
+ }
+
$template->param(
- plugins => \@plugins
+ plugins => \@plugins,
+ tabs => \@tabs,
);
}
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
<li class="NovelistSelect" style="display:none;"><a href="#NovelistSelect">NoveList Select</a></li>
[% END %]
+[% FOREACH tab IN tabs %]
+ <li><a href="#[% tab.id %]">[% tab.title %]</a></li>
+[% END %]
</ul>
[% items_table_block_iter = 0 %]
</div>
[% END %]
+[% FOREACH tab IN tabs %]
+ <div id="[% tab.id | html %]">
+ [% tab.content | $raw %]
+ </div>
+[% END %]
+
</div><!-- /bibliodetails -->
<div id="export" style="margin-top: 1em;">