Bugzilla – Attachment 91523 Details for
Bug 23050
Add hook to add a tab in intranet biblio details page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23050: Plugin hook to add tabs in intranet biblio details page
Bug-23050-Plugin-hook-to-add-tabs-in-intranet-bibl.patch (text/plain), 2.57 KB, created by
Julian Maurice
on 2019-07-15 12:52:04 UTC
(
hide
)
Description:
Bug 23050: Plugin hook to add tabs in intranet biblio details page
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2019-07-15 12:52:04 UTC
Size:
2.57 KB
patch
obsolete
>From fc37c25f9630e98c6661b125fc82b9b837a40d13 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Wed, 5 Jun 2019 16:26:34 +0200 >Subject: [PATCH] Bug 23050: Plugin hook to add tabs in intranet biblio details > page > >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> >--- > catalogue/detail.pl | 17 ++++++++++++++++- > .../prog/en/modules/catalogue/detail.tt | 9 +++++++++ > 2 files changed, 25 insertions(+), 1 deletion(-) > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index b7e4d6eced..4767ed4896 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -69,8 +69,23 @@ if ( C4::Context->preference('UseKohaPlugins') && > 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, > ); > } > >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 a963b84804..2a19423543 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -169,6 +169,9 @@ > [% 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 %] >@@ -698,6 +701,12 @@ > </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;"> >-- >2.20.1
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 23050
:
90337
|
90348
|
91523
|
91524
|
91525
|
93222
|
95004
|
95005
|
95006
|
95007
|
95013
|
95406