|
Lines 351-415
sub import_records_list {
Link Here
|
| 351 |
my ($template, $import_batch_id, $offset, $results_per_page) = @_; |
351 |
my ($template, $import_batch_id, $offset, $results_per_page) = @_; |
| 352 |
|
352 |
|
| 353 |
my $batch = GetImportBatch($import_batch_id); |
353 |
my $batch = GetImportBatch($import_batch_id); |
| 354 |
# my $records = GetImportRecordsRange($import_batch_id); |
|
|
| 355 |
# my @list = (); |
| 356 |
# foreach my $record (@$records) { |
| 357 |
# my $citation = $record->{'title'} || $record->{'authorized_heading'}; |
| 358 |
# $citation .= " $record->{'author'}" if $record->{'author'}; |
| 359 |
# $citation .= " (" if $record->{'issn'} or $record->{'isbn'}; |
| 360 |
# $citation .= $record->{'isbn'} if $record->{'isbn'}; |
| 361 |
# $citation .= ", " if $record->{'issn'} and $record->{'isbn'}; |
| 362 |
# $citation .= $record->{'issn'} if $record->{'issn'}; |
| 363 |
# $citation .= ")" if $record->{'issn'} or $record->{'isbn'}; |
| 364 |
# |
| 365 |
# my $match = GetImportRecordMatches($record->{'import_record_id'}, 1); |
| 366 |
# my $match_citation = ''; |
| 367 |
# my $match_id; |
| 368 |
# if ($#$match > -1) { |
| 369 |
# if ($match->[0]->{'record_type'} eq 'biblio') { |
| 370 |
# $match_citation .= $match->[0]->{'title'} if defined($match->[0]->{'title'}); |
| 371 |
# $match_citation .= ' ' . $match->[0]->{'author'} if defined($match->[0]->{'author'}); |
| 372 |
# $match_id = $match->[0]->{'biblionumber'}; |
| 373 |
# } elsif ($match->[0]->{'record_type'} eq 'auth') { |
| 374 |
# if (defined($match->[0]->{'authorized_heading'})) { |
| 375 |
# $match_citation .= $match->[0]->{'authorized_heading'}; |
| 376 |
# $match_id = $match->[0]->{'candidate_match_id'}; |
| 377 |
# } |
| 378 |
# } |
| 379 |
# } |
| 380 |
# |
| 381 |
# push @list, |
| 382 |
# { import_record_id => $record->{'import_record_id'}, |
| 383 |
# final_match_id => $record->{'matched_biblionumber'} || $record->{'matched_authid'}, |
| 384 |
# citation => $citation, |
| 385 |
# status => $record->{'status'}, |
| 386 |
# record_sequence => $record->{'record_sequence'}, |
| 387 |
# overlay_status => $record->{'overlay_status'}, |
| 388 |
# # Sorry about the match_id being from the "biblionumber" field; |
| 389 |
# # as it turns out, any match id will go in biblionumber |
| 390 |
# match_id => $match_id, |
| 391 |
# match_citation => $match_citation, |
| 392 |
# match_score => $#$match > -1 ? $match->[0]->{'score'} : 0, |
| 393 |
# record_type => $record->{'record_type'}, |
| 394 |
# }; |
| 395 |
# } |
| 396 |
# my $num_records = $batch->{'num_records'}; |
| 397 |
# $template->param(record_list => \@list); |
| 398 |
# add_page_numbers($template, $offset, $results_per_page, $num_records); |
| 399 |
# $template->param(offset => $offset); |
| 400 |
# $template->param(range_top => $offset + $results_per_page - 1); |
| 401 |
# $template->param(num_results => $num_records); |
| 402 |
# $template->param(results_per_page => $results_per_page); |
| 403 |
$template->param(import_batch_id => $import_batch_id); |
354 |
$template->param(import_batch_id => $import_batch_id); |
|
|
355 |
|
| 404 |
my $overlay_action = GetImportBatchOverlayAction($import_batch_id); |
356 |
my $overlay_action = GetImportBatchOverlayAction($import_batch_id); |
| 405 |
$template->param("overlay_action_${overlay_action}" => 1); |
357 |
$template->param("overlay_action_${overlay_action}" => 1); |
| 406 |
$template->param(overlay_action => $overlay_action); |
358 |
$template->param(overlay_action => $overlay_action); |
|
|
359 |
|
| 407 |
my $nomatch_action = GetImportBatchNoMatchAction($import_batch_id); |
360 |
my $nomatch_action = GetImportBatchNoMatchAction($import_batch_id); |
| 408 |
$template->param("nomatch_action_${nomatch_action}" => 1); |
361 |
$template->param("nomatch_action_${nomatch_action}" => 1); |
| 409 |
$template->param(nomatch_action => $nomatch_action); |
362 |
$template->param(nomatch_action => $nomatch_action); |
|
|
363 |
|
| 410 |
my $item_action = GetImportBatchItemAction($import_batch_id); |
364 |
my $item_action = GetImportBatchItemAction($import_batch_id); |
| 411 |
$template->param("item_action_${item_action}" => 1); |
365 |
$template->param("item_action_${item_action}" => 1); |
| 412 |
$template->param(item_action => $item_action); |
366 |
$template->param(item_action => $item_action); |
|
|
367 |
|
| 413 |
batch_info($template, $batch); |
368 |
batch_info($template, $batch); |
| 414 |
|
369 |
|
| 415 |
} |
370 |
} |
| 416 |
- |
|
|