@@ -, +, @@ creation when framework has no items field --- cataloguing/addbiblio.pl | 5 +++-- .../intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) --- a/cataloguing/addbiblio.pl +++ a/cataloguing/addbiblio.pl @@ -51,7 +51,7 @@ if ( C4::Context->preference('marcflavour') eq 'UNIMARC' ) { MARC::File::XML->default_record_format('UNIMARC'); } -our($tagslib,$authorised_values_sth,$is_a_modif,$usedTagsLib,$mandatory_z3950); +our($tagslib,$authorised_values_sth,$is_a_modif,$usedTagsLib,$mandatory_z3950,$itemtag,$itemsubfield); =head1 FUNCTIONS @@ -500,7 +500,6 @@ sub build_tabs { my @tab_data; # all tags to display my $max_num_tab=-1; - my ( $itemtag, $itemsubfield ) = GetMarcFromKohaField( "items.itemnumber" ); foreach my $used ( @$usedTagsLib ){ push @tab_data,$used->{tagfield} if not $seen{$used->{tagfield}}; @@ -772,6 +771,7 @@ $template->param( $tagslib = &GetMarcStructure( 1, $frameworkcode ); $usedTagsLib = &GetUsedMarcStructure( $frameworkcode ); $mandatory_z3950 = GetMandatoryFieldZ3950($frameworkcode); +( $itemtag, $itemsubfield ) = GetMarcFromKohaField( "items.itemnumber" ); # -- Global my $record = -1; @@ -981,6 +981,7 @@ if ( $record ne '-1' ) { $template->param( popup => $mode, frameworkcode => $frameworkcode, + framework_has_items => $tagslib->{$itemtag} ? 1 : 0, itemtype => $frameworkcode, borrowernumber => $loggedinuser, tab => scalar $input->param('tab') --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -785,7 +785,7 @@ function PopupMARCFieldDoc(field) { [% END %]
- [% IF CAN_user_editcatalogue_edit_items or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ) %] + [% IF ( CAN_user_editcatalogue_edit_items or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ) ) and framework_has_items %] [% IF (circborrowernumber) %][%# fast cataloging must lead to items %]
Save
--