View | Details | Raw Unified | Return to bug 10558
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt (-14 / +16 lines)
Lines 28-34 $(document).ready(function(){ Link Here
28
  });
28
  });
29
29
30
  $("#records-table").dataTable({
30
  $("#records-table").dataTable({
31
      "aLengthMenu": [[10, 15, 20, 25, 50, 100], [10, 15, 20, 25, 50, 100]],
31
      "aLengthMenu": [[10, 15, 20, 25, 50, 100, -1], [10, 15, 20, 25, 50, 100, _("All")]],
32
      "iDisplayLength" : 20,
32
      "iDisplayLength" : 20,
33
      "bAutoWidth": false,
33
      "bAutoWidth": false,
34
      "bFilter": false,
34
      "bFilter": false,
Lines 54-60 $(document).ready(function(){ Link Here
54
      },
54
      },
55
      "fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
55
      "fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
56
        $('td:eq(1)', nRow).html(
56
        $('td:eq(1)', nRow).html(
57
            '<a href="javascript:void()" onclick="show_marc('
57
            '<a href="javascript:void(0)" onclick="show_marc('
58
            + aData['import_record_id']
58
            + aData['import_record_id']
59
            + ')">' + aData['citation'] + '</a>'
59
            + ')">' + aData['citation'] + '</a>'
60
        );
60
        );
Lines 411-428 Page Link Here
411
  [% END %]
411
  [% END %]
412
[% END %]
412
[% END %]
413
413
414
<table id="records-table">
414
[% IF import_batch_id %]
415
    <thead>
415
    <table id="records-table">
416
        <tr>
416
        <thead>
417
            <th>#</th>
417
            <tr>
418
            <th>Citation</th>
418
                <th>#</th>
419
            <th>Status</th>
419
                <th>Citation</th>
420
            <th>Match type</th>
420
                <th>Status</th>
421
            <th>Match details</th>
421
                <th>Match type</th>
422
            <th>Record</th>
422
                <th>Match details</th>
423
        </tr>
423
                <th>Record</th>
424
    </thead>
424
            </tr>
425
</table>
425
        </thead>
426
    </table>
427
[% END %]
426
428
427
</div>
429
</div>
428
</div>
430
</div>
(-)a/tools/batch_records_ajax.pl (-1 / +3 lines)
Lines 45-55 my $results_per_page = $input->param('iDisplayLength'); Link Here
45
my $sorting_column    = $sort_columns[ $input->param('iSortCol_0') ];
45
my $sorting_column    = $sort_columns[ $input->param('iSortCol_0') ];
46
my $sorting_direction = $input->param('sSortDir_0');
46
my $sorting_direction = $input->param('sSortDir_0');
47
47
48
$results_per_page = undef if ( $results_per_page == -1 );
49
48
binmode STDOUT, ":encoding(UTF-8)";
50
binmode STDOUT, ":encoding(UTF-8)";
49
print $input->header( -type => 'text/plain', -charset => 'UTF-8' );
51
print $input->header( -type => 'text/plain', -charset => 'UTF-8' );
50
52
51
my ( $auth_status, $sessionID ) =
53
my ( $auth_status, $sessionID ) =
52
  check_cookie_auth( $input->cookie('CGISESSID'), { editcatalogue => '*' } );
54
  check_cookie_auth( $input->cookie('CGISESSID'), { tools => 'manage_staged_marc' } );
53
if ( $auth_status ne "ok" ) {
55
if ( $auth_status ne "ok" ) {
54
    exit 0;
56
    exit 0;
55
}
57
}
(-)a/tools/manage-marc-import.pl (-50 / +4 lines)
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
- 

Return to bug 10558