@@ -, +, @@ catalog --- cataloguing/addbiblio.pl | 10 ++- .../mysql/atomicupdate/add_draft_record_batch.sql | 1 + .../prog/en/modules/cataloguing/addbiblio.tt | 10 +++ .../prog/en/modules/cataloguing/addbooks.tt | 4 + .../prog/en/modules/tools/manage-marc-import.tt | 90 +++++++++++++++++++--- tools/batch_records_ajax.pl | 6 +- 6 files changed, 107 insertions(+), 14 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/add_draft_record_batch.sql --- a/cataloguing/addbiblio.pl +++ a/cataloguing/addbiblio.pl @@ -702,7 +702,7 @@ my $fa_barcode = $input->param('barcode'); my $fa_branch = $input->param('branch'); my $fa_stickyduedate = $input->param('stickyduedate'); my $fa_duedatespec = $input->param('duedatespec'); - +my $previewrecord = $input->param('preview'); my $userflags = 'edit_catalogue'; my $changed_framework = $input->param('changed_framework'); @@ -774,6 +774,7 @@ my ( if (($biblionumber) && !($breedingid)){ $record = GetMarcBiblio({ biblionumber => $biblionumber }); } + if ($breedingid) { ( $record, $encoding ) = MARCfindbreeding( $breedingid ) ; } @@ -843,7 +844,12 @@ if ( $op eq "addbiblio" ) { ModBiblio( $record, $biblionumber, $frameworkcode ); } else { - ( $biblionumber, $oldbibitemnum ) = AddBiblio( $record, $frameworkcode ); + if ($previewrecord) { + AddBiblioToBatch(1, 0, $record, 'biblio', int(rand(99999)), 0); + print $input->redirect('/cgi-bin/koha/cataloguing/addbooks.pl'); + } else { + ( $biblionumber, $oldbibitemnum ) = AddBiblio( $record, $frameworkcode ); + } } if ($redirect eq "items" || ($mode ne "popup" && !$is_a_modif && $redirect ne "view" && $redirect ne "just_save")){ if ($frameworkcode eq 'FA'){ --- a/installer/data/mysql/atomicupdate/add_draft_record_batch.sql +++ a/installer/data/mysql/atomicupdate/add_draft_record_batch.sql @@ -0,0 +1, @@ +INSERT INTO import_batches (import_batch_id,record_type,file_name,comments) VALUES (1, 'biblio', 'draft_marc_records.mrc', 'MARC file containing draft MARC records created in the addbiblio.pl file but not saved to the Koha catalog'); --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -85,6 +85,13 @@ return false; }); + $("#previewrecord").click(function(){ + $(".btn-group").removeClass("open"); + document.getElementById('preview').value = 1; + onOption(); + return false; + }); + $("#saveandview").click(function(){ $(".btn-group").removeClass("open"); redirect("view"); @@ -345,6 +352,7 @@ function AreMandatoriesNotOk(){ function Check(){ var StrAlert = AreMandatoriesNotOk(); if( ! StrAlert ){ + document.f.submit(); return true; } else { @@ -467,6 +475,7 @@ function Changefwk() {
# | @@ -284,8 +292,8 @@|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
[% batch_lis.import_batch_id %] | -[% batch_lis.file_name %] | +[% batch_lis.import_batch_id %] | +[% batch_lis.file_name %] | [% batch_lis.comments %] | [% IF ( batch_lis.record_type == 'auth' ) %]Authority[% ELSE %]Bibliographic[% END %] | @@ -307,7 +315,7 @@ | [% batch_lis.upload_timestamp %] | [% batch_lis.num_records %] | -[% batch_lis.num_items %][% IF ( batch_lis.num_items ) %] (Create label batch)[% END %] | +[% batch_lis.num_items %][% IF ( batch_lis.num_items ) %] (Create label batch)[% END %] | [% IF ( batch_lis.can_clean ) %] |
To edit or save these draft records click the 'Edit' link beside the appropriate record.
+# | +Citation | +Status | +Match type | +Match details | +Diff | +Record | +Catalog link | +
---|