From be33e064bb37de4dd0cfe85295e3fdcb24372744 Mon Sep 17 00:00:00 2001 From: mbeaulieu Date: Thu, 14 Aug 2014 09:27:08 -0400 Subject: [PATCH] [SIGNED-OFF] Bug 11876 - Diff column is now displayed. Content-Type: text/plain; charset="utf-8" If a match is found, a 'View' link appears in the Diff column. Old patch was not implementing datatables, and therefore was not compatible with this version of Koha. modified: koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt modified: tools/batch_records_ajax.pl Signed-off-by: Owen Leonard These patches have some issues but I'm going to submit a follow-up which I think will address them all and offer some improvements as well. --- .../prog/en/modules/tools/manage-marc-import.tt | 100 ++------------------ tools/batch_records_ajax.pl | 1 + 2 files changed, 10 insertions(+), 91 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt index f2b3c26..ded1d22 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt @@ -66,7 +66,8 @@ $(document).ready(function(){ { "mDataProp": "status" }, { "mDataProp": "overlay_status" }, { "mDataProp": "match_citation" }, - { "mDataProp": "matched" }, + { "mDataProp": "diff_url" }, + { "mDataProp": "matched" } ], "fnServerData": function ( sSource, aoData, fnCallback ) { aoData.push( { "name": "import_batch_id", "value": [% import_batch_id %] } ); @@ -122,8 +123,12 @@ $(document).ready(function(){ + aData['match_id'] + '">' + aData['match_citation'] + '') ); } - - $('td:eq(5)', nRow).html( + if (aData['diff_url']){ + $('td:eq(5)', nRow).html( + 'View' + ); + } + $('td:eq(6)', nRow).html( '' + aData['matched'] + '' ); @@ -475,100 +480,13 @@ Page Status Match type Match details + Diff Record [% END %] -[% IF ( record_list ) %] - [% IF ( pages ) %] -
-Page - [% FOREACH page IN pages %] - [% IF ( page.current_page ) %] - [% page.page_number %] - [% ELSE %] - [% page.page_number %] - [% END %] - [% END %] -
- [% END %] - - - - - - - - - - - [% FOREACH record_lis IN record_list %] - [% UNLESS ( loop.odd ) %][% ELSE %][% END %] - - - - - - [% IF ( record_lis.match_id ) %] - - [% ELSE %] - - [% END %] - - [% PROCESS match_link record=record_lis %] - [% END %] -
#CitationStatusMatch?RecordDiff
[% record_lis.record_sequence %][% record_lis.citation %] - [% IF ( record_lis.status == 'imported' ) %] - Imported - [% ELSIF ( record_lis.status == 'ignored' ) %] - Ignored - [% ELSIF ( record_lis.status == 'reverted' ) %] - Reverted - [% ELSIF ( record_lis.status == 'staged' ) %] - Staged - [% ELSIF ( record_lis.status == 'error' ) %] - Error - [% ELSE %] - [% record_lis.status %] - [% END %] - - [% IF ( record_lis.overlay_status == 'no_match' ) %] - No match - [% ELSIF ( record_lis.overlay_status == 'match_applied' ) %] - Match applied - [% ELSIF ( record_lis.overlay_status == 'auto_match' ) %] - Match found - [% ELSE %] - [% record_lis.overlay_status %] - [% END %] - [% IF ( record_lis.final_match_id ) %] - [% PROCESS final_match_link record=record_lis %] - [% END %] - - View -  
- [% IF ( pages ) %] -
-Page - [% FOREACH page IN pages %] - [% IF ( page.current_page ) %] - [% page.page_number %] - [% ELSE %] - [% page.page_number %] - [% END %] - [% END %] -
- [% END %] -[% ELSE %] - [% IF ( batch_info ) %] -
There are no records in this batch to import. - Manage staged MARC records.
- - [% END %] -[% END %] -
diff --git a/tools/batch_records_ajax.pl b/tools/batch_records_ajax.pl index bc0fe82..400358a 100755 --- a/tools/batch_records_ajax.pl +++ b/tools/batch_records_ajax.pl @@ -107,6 +107,7 @@ foreach my $record (@$records) { || q{}, score => $#$match > -1 ? $match->[0]->{'score'} : 0, match_id => $match_id, + diff_url => $match_id ? "/cgi-bin/koha/catalogue/showdiffmarc.pl?importid=$record->{import_record_id}&id=$match_id" : undef }; } -- 1.7.9.5