diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/showdiffmarc.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/showdiffmarc.tt
index 2d33c84092..93edb3982b 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/showdiffmarc.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/showdiffmarc.tt
@@ -1,50 +1,55 @@
[% INCLUDE 'doc-head-open.inc' %]
-
-
-
Original
- [% IF ( ERROR_FORMATTED1 ) %]
-
The biblionumber [% BIBLIONUMBER %] doesn't match to any record.
- [% ELSE %]
-
[% BIBLIOTITLE %]
-
[% MARC_FORMATTED1 %]
- [% END %]
-
-
-
Imported
- [% IF ( ERROR_FORMATTED2 ) %]
-
The importid [% IMPORTID %] doesn't match to any record.
- [% ELSE %]
-
[% IMPORTTITLE %]
-
[% MARC_FORMATTED2 %]
- [% END %]
-
+[% INCLUDE 'header.inc' %]
+
+
+
+
+
+
Original
+ [% IF ( ERROR_FORMATTED1 ) %]
+
+
The biblionumber [% BIBLIONUMBER %] doesn't match any existing record.
+
+ [% ELSE %]
+
[% BIBLIOTITLE %]
+
[% MARC_FORMATTED1 %]
+ [% END %]
+
+
+
Imported
+ [% IF ( ERROR_FORMATTED2 ) %]
+
+
The import id number [% IMPORTID %] doesn't match any existing record.
+
+ [% ELSE %]
+
[% IMPORTTITLE %]
+
[% MARC_FORMATTED2 %]
+ [% END %]
+
+
+
+
Return to staged MARC batch [% batchid %]
[% INCLUDE 'intranet-bottom.inc' %]
diff --git a/tools/batch_records_ajax.pl b/tools/batch_records_ajax.pl
index 57d7bc0ba3..e3dec8384a 100755
--- a/tools/batch_records_ajax.pl
+++ b/tools/batch_records_ajax.pl
@@ -107,7 +107,7 @@ foreach my $record (@$records) {
|| q{},
score => $#$match > -1 ? $match->[0]->{'score'} : 0,
match_id => $match_id,
- diff_url => $match_id ? "/cgi-bin/koha/tools/showdiffmarc.pl?importid=$record->{import_record_id}&id=$match_id" : undef
+ diff_url => $match_id ? "/cgi-bin/koha/tools/showdiffmarc.pl?batchid=$import_batch_id&importid=$record->{import_record_id}&id=$match_id" : undef
};
}
diff --git a/tools/showdiffmarc.pl b/tools/showdiffmarc.pl
index e0e0f7c15b..3b12795b8c 100755
--- a/tools/showdiffmarc.pl
+++ b/tools/showdiffmarc.pl
@@ -8,7 +8,7 @@
#
# Koha is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
+# Foundation; either version 3 of the License, or (at your option) any later
# version.
#
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
@@ -40,6 +40,7 @@ use XML::LibXML;
my $input = new CGI;
my $biblionumber = $input->param('id');
my $importid = $input->param('importid');
+my $batchid = $input->param('batchid');
if ( $biblionumber and $importid ) {
@@ -56,7 +57,7 @@ if ( $biblionumber and $importid ) {
query => $input,
type => "intranet",
authnotrequired => 0,
- flagsrequired => { catalogue => 1 },
+ flagsrequired => { tools => 'manage_staged_marc' },
debug => 1,
}
);
@@ -82,7 +83,7 @@ if ( $biblionumber and $importid ) {
}
- $template->param( SCRIPT_NAME => $ENV{'SCRIPT_NAME'},
+ $template->param( SCRIPT_NAME => $ENV{'SCRIPT_NAME'},
BIBLIONUMBER => $biblionumber,
IMPORTID => $importid,
BIBLIOTITLE => $biblioTitle,
@@ -90,7 +91,8 @@ if ( $biblionumber and $importid ) {
MARC_FORMATTED1 => $formatted1,
MARC_FORMATTED2 => $formatted2,
ERROR_FORMATTED1 => $errorFormatted1,
- ERROR_FORMATTED2 => $errorFormatted2
+ ERROR_FORMATTED2 => $errorFormatted2,
+ batchid => $batchid
);
output_html_with_http_headers $input, $cookie, $template->output;