@@ -, +, @@ manage-marc-import.pl to ajax DataTable a) Use some form of matching b) Have some records that will match and some that won't c) Have at least 30 records so you can test the pager --- C4/ImportBatch.pm | 11 +- .../prog/en/modules/tools/manage-marc-import.tt | 154 ++++++++++---------- tools/batch_records_ajax.pl | 112 ++++++++++++++ tools/manage-marc-import.pl | 98 ++++++------- 4 files changed, 251 insertions(+), 124 deletions(-) create mode 100755 tools/batch_records_ajax.pl --- a/C4/ImportBatch.pm +++ a/C4/ImportBatch.pm @@ -990,9 +990,15 @@ starting at the given offset. =cut sub GetImportRecordsRange { - my ($batch_id, $offset, $results_per_group, $status) = @_; + my ( $batch_id, $offset, $results_per_group, $status, $parameters ) = @_; my $dbh = C4::Context->dbh; + + my $order_by = + $dbh->quote_identifier( $parameters->{order_by} || 'import_record_id' ); + my $order_by_direction = + uc( $parameters->{order_by_direction} ) eq 'DESC' ? 'DESC' : 'ASC'; + my $query = "SELECT title, author, isbn, issn, authorized_heading, import_records.import_record_id, record_sequence, status, overlay_status, matched_biblionumber, matched_authid, record_type @@ -1006,7 +1012,8 @@ sub GetImportRecordsRange { $query .= " AND status=?"; push(@params,$status); } - $query.=" ORDER BY import_record_id"; + + $query.=" ORDER BY $order_by $order_by_direction"; if($results_per_group){ $query .= " LIMIT ?"; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt @@ -1,31 +1,16 @@ -[% BLOCK final_match_link %] - [% IF ( record.record_type == 'biblio' ) %] - [% record.final_match_id %] - [% ELSIF ( record.record_type == 'auth' ) %] - [% record.final_match_id %] - [% END %] -[% END %] -[% BLOCK match_link %] - [% IF ( record_lis.match_id ) %] - - - [% IF ( record.record_type == 'biblio' ) %] - Matches biblio [% record_lis.match_id %] (score = [% record_lis.match_score %]): [% record_lis.match_citation %] - [% ELSIF ( record.record_type == 'auth' ) %] - Matches authority [% record_lis.match_id %] (score = [% record_lis.match_score %]): [% record_lis.match_citation %] - [% END %] - - [% END %] -[% END %] [% INCLUDE 'doc-head-open.inc' %] Koha › Tools › Manage staged MARC records [% IF ( import_batch_id ) %] › Batch [% import_batch_id %] [% END %] -[% INCLUDE 'greybox.inc' %] [% INCLUDE 'doc-head-close.inc' %] + + + +[% INCLUDE 'datatables-strings.inc' %] +