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;
-
- try {
- @biblio_tabs = $tab_plugin->intranet_catalog_biblio_tab();
- foreach my $tab (@biblio_tabs) {
- my $tab_id = 'tab-' . $tab->title;
- $tab_id =~ s/[^0-9A-Za-z]+/-/g;
- $tab->id( $tab_id );
- push @tabs, $tab,
- }
- }
- catch {
- warn "Error calling 'intranet_catalog_biblio_tab' on the " . $tab_plugin->{class} . "plugin ($_)";
- };
- }
-
$template->param(
plugins => \@plugins,
- tabs => \@tabs,
);
}
eval { $biblio->metadata->record };
$template->param( decoding_error => $@ );
-if($query->cookie("holdfor")){
+if($query->cookie("holdfor")){
my $holdfor_patron = Koha::Patrons->find( $query->cookie("holdfor") );
- $template->param(
- # FIXME Should pass the patron object
- holdfor => $query->cookie("holdfor"),
- holdfor_surname => $holdfor_patron->surname,
- holdfor_firstname => $holdfor_patron->firstname,
- holdfor_cardnumber => $holdfor_patron->cardnumber,
- );
+ if ( $holdfor_patron ) {
+ $template->param(
+ # FIXME Should pass the patron object
+ holdfor => $query->cookie("holdfor"),
+ holdfor_surname => $holdfor_patron->surname,
+ holdfor_firstname => $holdfor_patron->firstname,
+ holdfor_cardnumber => $holdfor_patron->cardnumber,
+ );
+ }
}
if($query->cookie("searchToOrder")){
normalized_isbn => $isbn,
);
-my $marcnotesarray = GetMarcNotes( $record, $marcflavour );
+my $marcnotesarray = $biblio->get_marc_notes({ marcflavour => $marcflavour });
my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search->unblessed } };