Bugzilla – Attachment 30799 Details for
Bug 11876
Add a diff view to staged MARC records
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 11876 - Diff column is now displayed.
SIGNED-OFF-Bug-11876---Diff-column-is-now-displaye.patch (text/plain), 6.21 KB, created by
Owen Leonard
on 2014-08-14 19:18:16 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 11876 - Diff column is now displayed.
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2014-08-14 19:18:16 UTC
Size:
6.21 KB
patch
obsolete
>From be33e064bb37de4dd0cfe85295e3fdcb24372744 Mon Sep 17 00:00:00 2001 >From: mbeaulieu <mbeaulieu@inlibro.com> >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 <oleonard@myacpl.org> > >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'] + '</a>') > ); > } >- >- $('td:eq(5)', nRow).html( >+ if (aData['diff_url']){ >+ $('td:eq(5)', nRow).html( >+ '<a rel="gb_page_center[960,600]" href="'+aData['diff_url']+'">View</a>' >+ ); >+ } >+ $('td:eq(6)', nRow).html( > '<a target="_blank" href="' + record_details_url > + aData['matched'] + '">' + aData['matched'] + '</a>' > ); >@@ -475,100 +480,13 @@ Page > <th>Status</th> > <th>Match type</th> > <th>Match details</th> >+ <th><abbr title="Differences between the original biblio and the imported" lang="en">Diff</abbr></th> > <th>Record</th> > </tr> > </thead> > </table> > [% END %] > >-[% IF ( record_list ) %] >- [% IF ( pages ) %] >-<div class="pages"> >-Page >- [% FOREACH page IN pages %] >- [% IF ( page.current_page ) %] >- <span class="current">[% page.page_number %]</span> >- [% ELSE %] >- <a class="nav" href="[% page.script_name %]?import_batch_id=[% import_batch_id %]&offset=[% page.offset %]">[% page.page_number %]</a> >- [% END %] >- [% END %] >-</div> >- [% END %] >-<table> >- <tr> >- <th>#</th> >- <th>Citation</th> >- <th>Status</th> >- <th>Match?</th> >- <th>Record</th> >- <th><abbr title="Differences between the original biblio and the imported" lang="en">Diff</abbr></th> >- >- </tr> >- [% FOREACH record_lis IN record_list %] >- [% UNLESS ( loop.odd ) %]<tr data-id="[% record_lis.import_record_id %]" class="highlight">[% ELSE %]<tr data-id="[% record_lis.import_record_id %]">[% END %] >- <td>[% record_lis.record_sequence %]</td> >- <td><a class="citation" href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% record_lis.import_record_id %]" rel="gb_page_center[600,500]">[% record_lis.citation %]</a></td> >- <td> >- [% 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 %] >- </td> >- <td> >- [% 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 %] >- </td> >- <td>[% IF ( record_lis.final_match_id ) %] >- [% PROCESS final_match_link record=record_lis %] >- [% END %] >- </td> >- [% IF ( record_lis.match_id ) %] >- <td> >- <a rel="gb_page_center[960,600]" href="/cgi-bin/koha/catalogue/showdiffmarc.pl?importid=[% record_lis.import_record_id %]&id=[% record_lis.match_id %]">View</a> >- </td> >- [% ELSE %] >- <td> </td> >- [% END %] >- </tr> >- [% PROCESS match_link record=record_lis %] >- [% END %] >-</table> >- [% IF ( pages ) %] >-<div class="pages"> >-Page >- [% FOREACH page IN pages %] >- [% IF ( page.current_page ) %] >- <span class="current">[% page.page_number %]</span> >- [% ELSE %] >- <a class="nav" href="[% page.script_name %]?import_batch_id=[% import_batch_id %]&offset=[% page.offset %]">[% page.page_number %]</a> >- [% END %] >- [% END %] >-</div> >- [% END %] >-[% ELSE %] >- [% IF ( batch_info ) %] >- <div class="dialog alert">There are no records in this batch to import. >- <a href="/cgi-bin/koha/tools/manage-marc-import.pl">Manage staged MARC records</a>.</div> >- >- [% END %] >-[% END %] >- > </div> > </div> > <div class="yui-b"> >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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11876
:
25743
|
30590
|
30591
|
30787
|
30797
|
30798
|
30799
|
30800
|
31835
|
31847
|
31871
|
31872
|
31873
|
31874
|
32987
|
32995
|
33052
|
33053
|
33054
|
33055
|
33056