From 1a2084ea04429387201c274720ced7566b1d4fed 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" No behavior should exist on importing bibliographic records. --- .../intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt | 4 +++- koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt | 4 +++- tools/stage-marc-import.pl | 7 +++++-- 3 files changed, 11 insertions(+), 4 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..d053d00 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 %] 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 500e6cd..f37ceab 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; -- 2.1.0