View | Details | Raw Unified | Return to bug 21280
Collapse All | Expand All

(-)a/Koha/MarcEditor.pm (-5 / +5 lines)
Lines 71-84 sub new { Link Here
71
71
72
=head3 build_tabs
72
=head3 build_tabs
73
73
74
    $editor->build_tabs($template, $record, $encoding);
74
    my @tabs = $editor->build_tabs($record, $encoding);
75
75
76
Builds tab data in the template
76
Builds tab data for the template
77
77
78
=cut
78
=cut
79
79
80
sub build_tabs {
80
sub build_tabs {
81
    my ( $self, $template, $record, $encoding ) = @_;
81
    my ( $self, $record, $encoding ) = @_;
82
82
83
    # fill arrays
83
    # fill arrays
84
    my @loop_data = ();
84
    my @loop_data = ();
Lines 90-96 sub build_tabs { Link Here
90
    my %seen;
90
    my %seen;
91
    my @tab_data; # all tags to display
91
    my @tab_data; # all tags to display
92
    my $max_num_tab=-1;
92
    my $max_num_tab=-1;
93
    my ( $itemtag, $itemsubfield ) = GetMarcFromKohaField( "items.itemnumber" );
93
    my ( $itemtag, $itemsubfield ) = C4::Biblio::GetMarcFromKohaField( "items.itemnumber" );
94
94
95
    if (defined $self->{used_tags}) {
95
    if (defined $self->{used_tags}) {
96
        foreach my $used ( @{$self->{used_tags}} ) {
96
        foreach my $used ( @{$self->{used_tags}} ) {
Lines 287-293 sub build_tabs { Link Here
287
            };
287
            };
288
        }
288
        }
289
    }
289
    }
290
    $template->param( BIG_LOOP => \@BIG_LOOP );
290
    return \@BIG_LOOP;
291
}
291
}
292
292
293
=head2 Internal methods
293
=head2 Internal methods
(-)a/authorities/authorities.pl (-2 / +2 lines)
Lines 176-182 if ($op eq "add") { Link Here
176
        exit;
176
        exit;
177
    } else {
177
    } else {
178
    # it may be a duplicate, warn the user and do nothing
178
    # it may be a duplicate, warn the user and do nothing
179
        $editor->build_tabs($template, $record, $encoding);
179
        $template->param( BIG_LOOP => $editor->build_tabs($record, $encoding) );
180
        $template->param(authid =>$authid,
180
        $template->param(authid =>$authid,
181
                        duplicateauthid     => $duplicateauthid,
181
                        duplicateauthid     => $duplicateauthid,
182
                        duplicateauthvalue  => $duplicateauthvalue->{'authorized'}->[0]->{'heading'},
182
                        duplicateauthvalue  => $duplicateauthvalue->{'authorized'}->[0]->{'heading'},
Lines 196-202 if ($op eq "duplicate") Link Here
196
        {
196
        {
197
                $authid = "";
197
                $authid = "";
198
        }
198
        }
199
        $editor->build_tabs ($template, $record, $encoding);
199
        $template->param( BIG_LOOP => $editor->build_tabs($record, $encoding) );
200
        $template->param(oldauthtypetagfield=>$oldauthtypetagfield, oldauthtypetagsubfield=>$oldauthtypetagsubfield,
200
        $template->param(oldauthtypetagfield=>$oldauthtypetagfield, oldauthtypetagsubfield=>$oldauthtypetagsubfield,
201
                        oldauthnumtagfield=>$oldauthnumtagfield, oldauthnumtagsubfield=>$oldauthnumtagsubfield,
201
                        oldauthnumtagfield=>$oldauthnumtagfield, oldauthnumtagsubfield=>$oldauthnumtagsubfield,
202
                        authid                      => $authid , authtypecode=>$authtypecode,	);
202
                        authid                      => $authid , authtypecode=>$authtypecode,	);
(-)a/cataloguing/addbiblio.pl (-3 / +2 lines)
Lines 408-414 if ( $op eq "addbiblio" ) { Link Here
408
        }
408
        }
409
    } else {
409
    } else {
410
    # it may be a duplicate, warn the user and do nothing
410
    # it may be a duplicate, warn the user and do nothing
411
        $editor->build_tabs($template, $record, $encoding);
411
        $template->param( BIG_LOOP => $editor->build_tabs($record, $encoding) );
412
        $template->param(
412
        $template->param(
413
            biblionumber             => $biblionumber,
413
            biblionumber             => $biblionumber,
414
            biblioitemnumber         => $biblioitemnumber,
414
            biblioitemnumber         => $biblioitemnumber,
Lines 455-461 elsif ( $op eq "delete" ) { Link Here
455
            $record = $urecord;
455
            $record = $urecord;
456
        };
456
        };
457
    }
457
    }
458
    $editor->build_tabs( $template, $record, $encoding );
458
    $template->param( BIG_LOOP => $editor->build_tabs( $record, $encoding ) );
459
    $template->param(
459
    $template->param(
460
        biblionumber             => $biblionumber,
460
        biblionumber             => $biblionumber,
461
        biblionumbertagfield        => $biblionumbertagfield,
461
        biblionumbertagfield        => $biblionumbertagfield,
462
- 

Return to bug 21280