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

(-)a/C4/ImportBatch.pm (+20 lines)
Lines 58-63 BEGIN { Link Here
58
    GetStagedWebserviceBatches
58
    GetStagedWebserviceBatches
59
    GetImportBatchRangeDesc
59
    GetImportBatchRangeDesc
60
    GetNumberOfNonZ3950ImportBatches
60
    GetNumberOfNonZ3950ImportBatches
61
    GetImportBiblios
61
    GetImportRecordsRange
62
    GetImportRecordsRange
62
	GetItemNumbersFromImportBatch
63
	GetItemNumbersFromImportBatch
63
    
64
    
Lines 1017-1022 sub GetNumberOfNonZ3950ImportBatches { Link Here
1017
    return $count;
1018
    return $count;
1018
}
1019
}
1019
1020
1021
=head2 GetImportBiblios
1022
1023
  my $results = GetImportBiblios($importid);
1024
1025
=cut
1026
1027
sub GetImportBiblios {
1028
    my ($import_record_id) = @_;
1029
1030
    my $dbh = C4::Context->dbh;
1031
    my $query = "SELECT * FROM import_biblios WHERE import_record_id = ?";
1032
    my $sth = $dbh->prepare_cached($query);
1033
    $sth->execute($import_record_id);
1034
    my $results = $sth->fetchall_arrayref({});
1035
    $sth->finish();
1036
    return $results;
1037
1038
}
1039
1020
=head2 GetImportRecordsRange
1040
=head2 GetImportRecordsRange
1021
1041
1022
  my $results = GetImportRecordsRange($batch_id, $offset, $results_per_group);
1042
  my $results = GetImportRecordsRange($batch_id, $offset, $results_per_group);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt (-3 / +36 lines)
Lines 1-3 Link Here
1
[% BLOCK final_match_link %]
2
    [% IF ( record.record_type == 'biblio' ) %]
3
        <a target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% record.final_match_id %]">[% record.final_match_id %]</a>
4
    [% ELSIF ( record.record_type == 'auth' ) %]
5
        <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% record.final_match_id %]">[% record.final_match_id %]</a>
6
    [% END %]
7
[% END %]
8
[% BLOCK match_link %]
9
    [% IF ( record_lis.match_id ) %]
10
        <tr>
11
            <td />
12
            [% IF ( record.record_type == 'biblio' ) %]
13
                <td class="highlight" colspan="5">Matches biblio [% record_lis.match_id %] (score = [% record_lis.match_score %]): <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% record_lis.match_id %]">[% record_lis.match_citation %]</a></td>
14
            [% ELSIF ( record.record_type == 'auth' ) %]
15
                <td class="highlight" colspan="5">Matches authority [% record_lis.match_id %] (score = [% record_lis.match_score %]): <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% record_lis.match_id %]">[% record_lis.match_citation %]</a> |
16
        <a href="/cgi-bin/koha/authorities/merge.pl?mergereference=breeding&authid=[% record_lis.match_id %]&authid=[% record_lis.import_record_id %]">Merge</a>
17
                </td>
18
            [% END %]
19
        </tr>
20
    [% ELSIF ( record.record_type == 'auth') %]
21
        <tr data-authid="[% record_lis.import_record_id %]">
22
            <td />
23
            <td class="highlight" colspan="4"><a href="#" class="merge_auth">Search for a record to merge in a new window</a></td>
24
        </tr>
25
    [% END %]
26
[% END %]
27
1
[% INCLUDE 'doc-head-open.inc' %]
28
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Tools &rsaquo; Manage staged MARC records
29
<title>Koha &rsaquo; Tools &rsaquo; Manage staged MARC records
3
[% IF ( import_batch_id ) %]
30
[% IF ( import_batch_id ) %]
Lines 39-45 $(document).ready(function(){ Link Here
39
              { "mDataProp": "status" },
66
              { "mDataProp": "status" },
40
              { "mDataProp": "overlay_status" },
67
              { "mDataProp": "overlay_status" },
41
              { "mDataProp": "match_citation" },
68
              { "mDataProp": "match_citation" },
42
              { "mDataProp": "matched" },
69
              { "mDataProp": "diff_url" },
70
              { "mDataProp": "matched" }
43
          ],
71
          ],
44
          "fnServerData": function ( sSource, aoData, fnCallback ) {
72
          "fnServerData": function ( sSource, aoData, fnCallback ) {
45
              aoData.push( { "name": "import_batch_id", "value": [% import_batch_id %] } );
73
              aoData.push( { "name": "import_batch_id", "value": [% import_batch_id %] } );
Lines 95-102 $(document).ready(function(){ Link Here
95
                    + aData['match_id'] + '">' + aData['match_citation'] + '</a>')
123
                    + aData['match_id'] + '">' + aData['match_citation'] + '</a>')
96
                );
124
                );
97
            }
125
            }
98
126
            if (aData['diff_url']){
99
            $('td:eq(5)', nRow).html(
127
                $('td:eq(5)', nRow).html(
128
                    '<a rel="gb_page_center[960,600]" href="'+aData['diff_url']+'">View</a>'
129
                );
130
            }
131
            $('td:eq(6)', nRow).html(
100
                '<a target="_blank" href="' + record_details_url
132
                '<a target="_blank" href="' + record_details_url
101
                    + aData['matched'] + '">' + aData['matched'] + '</a>'
133
                    + aData['matched'] + '">' + aData['matched'] + '</a>'
102
            );
134
            );
Lines 448-453 Page Link Here
448
                <th>Status</th>
480
                <th>Status</th>
449
                <th>Match type</th>
481
                <th>Match type</th>
450
                <th>Match details</th>
482
                <th>Match details</th>
483
                <th><abbr title="Differences between the original biblio and the imported" lang="en">Diff</abbr></th>
451
                <th>Record</th>
484
                <th>Record</th>
452
            </tr>
485
            </tr>
453
        </thead>
486
        </thead>
(-)a/tools/batch_records_ajax.pl (-1 / +1 lines)
Lines 107-112 foreach my $record (@$records) { Link Here
107
          || q{},
107
          || q{},
108
        score => $#$match > -1 ? $match->[0]->{'score'} : 0,
108
        score => $#$match > -1 ? $match->[0]->{'score'} : 0,
109
        match_id => $match_id,
109
        match_id => $match_id,
110
        diff_url => $match_id ? "/cgi-bin/koha/tools/showdiffmarc.pl?importid=$record->{import_record_id}&id=$match_id" : undef
110
      };
111
      };
111
}
112
}
112
113
113
- 

Return to bug 11876