From 322152a1528475cd9074465b7a8081ce47510a80 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 --- .../prog/en/modules/tools/manage-marc-import.tt | 18 ++++++++++++------ .../prog/en/modules/tools/stage-marc-import.tt | 4 +++- tools/stage-marc-import.pl | 7 +++++-- 3 files changed, 20 insertions(+), 9 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 b9b17f5..25d11ed 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 af1cdc3..897a5ca 100755 --- a/tools/stage-marc-import.pl +++ b/tools/stage-marc-import.pl @@ -67,8 +67,11 @@ my ($template, $loggedinuser, $cookie) debug => 1, }); -$template->param(SCRIPT_NAME => $ENV{'SCRIPT_NAME'}, - uploadmarc => $fileID); +$template->param( + SCRIPT_NAME => $ENV{'SCRIPT_NAME'}, + uploadmarc => $fileID, + record_type => $record_type, +); my %cookies = parse CGI::Cookie($cookie); my $sessionID = $cookies{'CGISESSID'}->value; -- 1.9.1