@@ -, +, @@
---
.../prog/en/modules/tools/manage-marc-import.tt | 31 ++++++------
tools/batch_records_ajax.pl | 4 +-
tools/manage-marc-import.pl | 53 ++------------------
3 files changed, 23 insertions(+), 65 deletions(-)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt
@@ -28,7 +28,7 @@ $(document).ready(function(){
});
$("#records-table").dataTable({
- "aLengthMenu": [[10, 15, 20, 25, 50, 100], [10, 15, 20, 25, 50, 100]],
+ "aLengthMenu": [[10, 15, 20, 25, 50, 100, -1], [10, 15, 20, 25, 50, 100, _("All")]],
"iDisplayLength" : 20,
"bAutoWidth": false,
"bFilter": false,
@@ -54,7 +54,7 @@ $(document).ready(function(){
},
"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
$('td:eq(1)', nRow).html(
- '' + aData['citation'] + ''
);
@@ -367,19 +367,20 @@ Page
[% END %]
[% END %]
-
-
-
- # |
- Citation |
- Status |
- Match type |
- Match details |
- Record |
-
-
-
-
+[% IF import_batch_id %]
+
+
+
+ # |
+ Citation |
+ Status |
+ Match type |
+ Match details |
+ Record |
+
+
+
+[% END %]
--- a/tools/batch_records_ajax.pl
+++ a/tools/batch_records_ajax.pl
@@ -45,11 +45,13 @@ my $results_per_page = $input->param('iDisplayLength');
my $sorting_column = $sort_columns[ $input->param('iSortCol_0') ];
my $sorting_direction = $input->param('sSortDir_0');
+$results_per_page = undef if ( $results_per_page == -1 );
+
binmode STDOUT, ":encoding(UTF-8)";
print $input->header( -type => 'text/plain', -charset => 'UTF-8' );
my ( $auth_status, $sessionID ) =
- check_cookie_auth( $input->cookie('CGISESSID'), { editcatalogue => '*' } );
+ check_cookie_auth( $input->cookie('CGISESSID'), { tools => 'manage_staged_marc' } );
if ( $auth_status ne "ok" ) {
exit 0;
}
--- a/tools/manage-marc-import.pl
+++ a/tools/manage-marc-import.pl
@@ -351,65 +351,20 @@ sub import_records_list {
my ($template, $import_batch_id, $offset, $results_per_page) = @_;
my $batch = GetImportBatch($import_batch_id);
-# my $records = GetImportRecordsRange($import_batch_id);
-# my @list = ();
-# foreach my $record (@$records) {
-# my $citation = $record->{'title'} || $record->{'authorized_heading'};
-# $citation .= " $record->{'author'}" if $record->{'author'};
-# $citation .= " (" if $record->{'issn'} or $record->{'isbn'};
-# $citation .= $record->{'isbn'} if $record->{'isbn'};
-# $citation .= ", " if $record->{'issn'} and $record->{'isbn'};
-# $citation .= $record->{'issn'} if $record->{'issn'};
-# $citation .= ")" if $record->{'issn'} or $record->{'isbn'};
-#
-# my $match = GetImportRecordMatches($record->{'import_record_id'}, 1);
-# my $match_citation = '';
-# my $match_id;
-# if ($#$match > -1) {
-# if ($match->[0]->{'record_type'} eq 'biblio') {
-# $match_citation .= $match->[0]->{'title'} if defined($match->[0]->{'title'});
-# $match_citation .= ' ' . $match->[0]->{'author'} if defined($match->[0]->{'author'});
-# $match_id = $match->[0]->{'biblionumber'};
-# } elsif ($match->[0]->{'record_type'} eq 'auth') {
-# if (defined($match->[0]->{'authorized_heading'})) {
-# $match_citation .= $match->[0]->{'authorized_heading'};
-# $match_id = $match->[0]->{'candidate_match_id'};
-# }
-# }
-# }
-#
-# push @list,
-# { import_record_id => $record->{'import_record_id'},
-# final_match_id => $record->{'matched_biblionumber'} || $record->{'matched_authid'},
-# citation => $citation,
-# status => $record->{'status'},
-# record_sequence => $record->{'record_sequence'},
-# overlay_status => $record->{'overlay_status'},
-# # Sorry about the match_id being from the "biblionumber" field;
-# # as it turns out, any match id will go in biblionumber
-# match_id => $match_id,
-# match_citation => $match_citation,
-# match_score => $#$match > -1 ? $match->[0]->{'score'} : 0,
-# record_type => $record->{'record_type'},
-# };
-# }
-# my $num_records = $batch->{'num_records'};
-# $template->param(record_list => \@list);
-# add_page_numbers($template, $offset, $results_per_page, $num_records);
-# $template->param(offset => $offset);
-# $template->param(range_top => $offset + $results_per_page - 1);
-# $template->param(num_results => $num_records);
-# $template->param(results_per_page => $results_per_page);
$template->param(import_batch_id => $import_batch_id);
+
my $overlay_action = GetImportBatchOverlayAction($import_batch_id);
$template->param("overlay_action_${overlay_action}" => 1);
$template->param(overlay_action => $overlay_action);
+
my $nomatch_action = GetImportBatchNoMatchAction($import_batch_id);
$template->param("nomatch_action_${nomatch_action}" => 1);
$template->param(nomatch_action => $nomatch_action);
+
my $item_action = GetImportBatchItemAction($import_batch_id);
$template->param("item_action_${item_action}" => 1);
$template->param(item_action => $item_action);
+
batch_info($template, $batch);
}
--