From 5098148f111b3dd6cfa7187b329d29b82a6d2f12 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 1 Apr 2015 13:28:20 +0200 Subject: [PATCH] Bug 9067: Hide item related strings when importing staged authority records On importing authority records, the items related string should not be displayed. Test plan: 1/ Import an authority record 2/ Confirm the item related string are not displayed. 3/ Before this script, the record_type param was lost just after importing the records. Now you should see "Processing authority records" of "Processing bibliographic records" in the "MARC staging results" 4/ Revert the import and check there is not item related strings. No behavior should exist on importing bibliographic records. Signed-off-by: Mark Tompsett Signed-off-by: Katrin Fischer --- .../prog/en/modules/tools/manage-marc-import.tt | 18 ++++++++++++------ .../prog/en/modules/tools/stage-marc-import.tt | 4 +++- tools/stage-marc-import.pl | 3 ++- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt index 0b10962..67cf116 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt @@ -306,7 +306,8 @@ $(document).ready(function(){ [% END %] [% END %] - + + [% IF ( record_type == 'biblio' ) %]
  • [% IF ( can_commit ) %] @@ -326,6 +327,7 @@ $(document).ready(function(){ [% END %] [% END %]
  • + [% END %] [% IF ( can_commit ) %]
    [% END %] @@ -373,17 +375,21 @@ $(document).ready(function(){ Number of records added[% num_added %] Number of records updated[% num_updated %] Number of records ignored[% num_ignored %] - Number of items added[% num_items_added %] - Number of items replaced[% num_items_replaced %] - Number of items ignored because of duplicate barcode[% num_items_errored %] + [% IF ( record_type == 'biblio' ) %] + Number of items added[% num_items_added %] + Number of items replaced[% num_items_replaced %] + Number of items ignored because of duplicate barcode[% num_items_errored %] + [ % END %] [% END %] [% IF ( did_revert ) %]
    Success: Import reversed
    - - + [% IF ( record_type == 'biblio' ) %] + + + [% END %]
    Number of records deleted[% num_deleted %]
    Number of items deleted[% num_items_deleted %]
    Number of records not deleted due to items on loan[% num_errors %]
    Number of items deleted[% num_items_deleted %]
    Number of records not deleted due to items on loan[% num_errors %]
    Number of records changed back[% num_reverted %]
    Number of records ignored[% num_ignored %]
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt index 50d7517..dea732a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt @@ -66,7 +66,9 @@ function CheckForm(f) {
  • Did not check for matches with existing records in catalog
  • [% END %] [% END %] -
  • [% num_items %] item records found and staged
  • + [% IF record_type == 'biblio' %] +
  • [% num_items %] item records found and staged
  • + [% END %] [% IF ( label_batch ) %]
  • New label batch created: # [% label_batch %]
  • [% END %] diff --git a/tools/stage-marc-import.pl b/tools/stage-marc-import.pl index 2f4812f..c39b6ff 100755 --- a/tools/stage-marc-import.pl +++ b/tools/stage-marc-import.pl @@ -73,7 +73,8 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( $template->param( SCRIPT_NAME => $ENV{'SCRIPT_NAME'}, - uploadmarc => $fileID + uploadmarc => $fileID, + record_type => $record_type, ); my %cookies = parse CGI::Cookie($cookie); -- 2.1.4