[Koha-patches] [PATCH] patch for feature 2952 - 2nd attempt.
Mason James
mason.loves.sushi at gmail.com
Tue Feb 10 00:21:42 CET 2009
---
C4/ImportBatch.pm | 8 +----
.../prog/en/modules/tools/manage-marc-import.tmpl | 5 +++
tools/manage-marc-import.pl | 38 ++++++++++---------
3 files changed, 26 insertions(+), 25 deletions(-)
diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm
index 9187818..69bfdee 100644
--- a/C4/ImportBatch.pm
+++ b/C4/ImportBatch.pm
@@ -257,12 +257,6 @@ sub BatchStageMarcRecords {
my $parse_items = shift;
my $leave_as_staging = shift;
-
-warn '22222222222222222222222';
-
-### @_;
-
-
# optional callback to monitor status
# of job
@@ -824,7 +818,7 @@ sub GetImportBibliosRange {
my $dbh = C4::Context->dbh;
my $sth = $dbh->prepare_cached("SELECT title, author, isbn, issn, import_record_id, record_sequence,
- status, overlay_status
+ matched_biblionumber, status, overlay_status
FROM import_records
JOIN import_biblios USING (import_record_id)
WHERE import_batch_id = ?
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tmpl
index 4387d21..924acbf 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tmpl
@@ -242,6 +242,7 @@ Page
<th>Citation</th>
<th>Status</th>
<th>Match?</th>
+ <th>Bib</th>
</tr>
<!-- TMPL_LOOP name="biblio_list" -->
<tr>
@@ -249,6 +250,10 @@ Page
<td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=<!-- TMPL_VAR name='import_record_id' -->" rel="gb_page_center[600,500]"><!-- TMPL_VAR name="citation"--></a></td>
<td><!-- TMPL_VAR name="status"--></td>
<td><!-- TMPL_VAR name="overlay_status"--></td>
+
+ <td align="center"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR name='final_match_biblionumber' -->"><!-- TMPL_VAR name="final_match_biblionumber"--></a></td>
+
+
</tr>
<!-- TMPL_IF name="match_biblionumber" -->
<tr>
diff --git a/tools/manage-marc-import.pl b/tools/manage-marc-import.pl
index 97ac568..d878c2b 100755
--- a/tools/manage-marc-import.pl
+++ b/tools/manage-marc-import.pl
@@ -172,17 +172,18 @@ sub import_batches_list {
my @list = ();
foreach my $batch (@$batches) {
- push @list, {
- import_batch_id => $batch->{'import_batch_id'},
- num_biblios => $batch->{'num_biblios'},
- num_items => $batch->{'num_items'},
- upload_timestamp => $batch->{'upload_timestamp'},
- import_status => $batch->{'import_status'},
- file_name => $batch->{'file_name'},
- comments => $batch->{'comments'}
+ push @list,
+ { import_batch_id => $batch->{'import_batch_id'},
+ num_biblios => $batch->{'num_biblios'},
+ num_items => $batch->{'num_items'},
+ upload_timestamp => $batch->{'upload_timestamp'},
+ import_status => $batch->{'import_status'},
+ file_name => $batch->{'file_name'},
+ comments => $batch->{'comments'}
};
}
$template->param(batch_list => \@list);
+
my $num_batches = GetNumberOfNonZ3950ImportBatches();
add_page_numbers($template, $offset, $results_per_page, $num_batches);
$template->param(offset => $offset);
@@ -324,16 +325,17 @@ sub import_biblios_list {
$citation .= $biblio->{'issn'} if $biblio->{'issn'};
$citation .= ")" if $biblio->{'issn'} or $biblio->{'isbn'};
my $match = GetImportRecordMatches($biblio->{'import_record_id'}, 1);
- push @list, {
- import_record_id => $biblio->{'import_record_id'},
- citation => $citation,
- status => $biblio->{'status'},
- record_sequence => $biblio->{'record_sequence'},
- overlay_status => $biblio->{'overlay_status'},
- match_biblionumber => $#$match > -1 ? $match->[0]->{'biblionumber'} : 0,
- match_citation => $#$match > -1 ? $match->[0]->{'title'} . ' ' . $match->[0]->{'author'} : '',
- match_score => $#$match > -1 ? $match->[0]->{'score'} : 0,
- };
+ push @list,
+ { import_record_id => $biblio->{'import_record_id'},
+ final_match_biblionumber => $biblio->{'matched_biblionumber'},
+ citation => $citation,
+ status => $biblio->{'status'},
+ record_sequence => $biblio->{'record_sequence'},
+ overlay_status => $biblio->{'overlay_status'},
+ match_biblionumber => $#$match > -1 ? $match->[0]->{'biblionumber'} : 0,
+ match_citation => $#$match > -1 ? $match->[0]->{'title'} . ' ' . $match->[0]->{'author'} : '',
+ match_score => $#$match > -1 ? $match->[0]->{'score'} : 0,
+ };
}
my $num_biblios = $batch->{'num_biblios'};
$template->param(biblio_list => \@list);
--
1.5.6.5
More information about the Koha-patches
mailing list