Bugzilla – Attachment 74961 Details for
Bug 20678
Save draft records without committing them to the catalogue
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20678 - Fixed update of number of records in draft batch file
Bug-20678---Fixed-update-of-number-of-records-in-d.patch (text/plain), 9.93 KB, created by
Alex Buckley
on 2018-05-02 01:31:22 UTC
(
hide
)
Description:
Bug 20678 - Fixed update of number of records in draft batch file
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2018-05-02 01:31:22 UTC
Size:
9.93 KB
patch
obsolete
>From 1564196575ff879a7800ffd713e02f43f9176022 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Mon, 30 Apr 2018 04:15:34 +0000 >Subject: [PATCH] Bug 20678 - Fixed update of number of records in draft batch > file > >Also added icons onto the 'View draft records' in addbooks.tt and >draftrecords.tt > >Test plan: >1. Go to Cataloging->View draft records and notice the count of the >number of returned draft records in the top left hand corner of the >datatable containing draft records is accurate. > >2. Also notice that on the addbooks.pl and draftrecords.pl the 'View >draft records' button has a eye icon on it > >Sponsored-By: Toi Ohomai Institute of Technology >--- > cataloguing/addbiblio.pl | 2 +- > .../prog/en/modules/cataloguing/addbooks.tt | 4 +- > .../prog/en/modules/cataloguing/draftrecords.tt | 147 +++++++++++++++++++++ > 3 files changed, 150 insertions(+), 3 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/draftrecords.tt > >diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl >index 6d49db1..bf5eeb7 100755 >--- a/cataloguing/addbiblio.pl >+++ b/cataloguing/addbiblio.pl >@@ -845,7 +845,7 @@ if ( $op eq "addbiblio" ) { > } > else { > if ($previewrecord) { >- AddBiblioToBatch(1, 0, $record, 'biblio', int(rand(99999)), 0); >+ AddBiblioToBatch(1, 0, $record, 'biblio', int(rand(99999)), 1); > print $input->redirect('/cgi-bin/koha/cataloguing/addbooks.pl'); > } else { > if ($breedingid) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >index 1708241..e4c1efc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >@@ -44,7 +44,7 @@ > </ul> > </div> > [% END %] >- <a class="btn btn-default btn-sm" href="/cgi-bin/koha/cataloguing/draftrecords.pl">View Draft records</a></button> >+ <a class="btn btn-default btn-sm" href="/cgi-bin/koha/cataloguing/draftrecords.pl"><i class="fa fa-eye" aria-hidden="true"></i> View draft records</a></button> > [% IF ( total ) %] > <div class="btn-group"><button type="submit" class="btn btn-default btn-sm merge-items"><i class="fa fa-compress"></i> Merge selected</button></div> > [% END %] >@@ -143,7 +143,7 @@ > </table> > </div> > [% ELSE %] >- [% IF ( (query) && !(drafts_only) ) %] >+ [% IF ((query) && !(drafts_only)) %] > [% IF ( error ) %]<div class="dialog alert">[% END %]<b>No results found</b> > [% IF ( error ) %] > Error: <span class="error">[% error %]</span></div> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/draftrecords.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/draftrecords.tt >new file mode 100644 >index 0000000..559039a >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/draftrecords.tt >@@ -0,0 +1,147 @@ >+[% SET footerjs = 1 %] >+[% INCLUDE 'doc-head-open.inc' %] >+<title>Koha › Cataloging › Draft records</title> >+[% INCLUDE 'doc-head-close.inc' %] >+[% INCLUDE 'browser-strings.inc' %] >+<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" /> >+<style type="text/css"> >+ #jobpanel,#jobstatus,#jobfailed { display : none; } >+ span.change-status { font-style:italic; color:#666; display:none; } >+</style> >+</head> >+<body class="cat"> >+ >+[% INCLUDE 'header.inc' %] >+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloguing</a> › View draft records</div> >+ >+<div id="doc" class="yui-t2"> >+ <div id="bd"> >+ <div id="yui-main"> >+ [% IF ( CAN_user_editcatalogue_edit_catalogue ) %] >+ <div id="toolbar" class="btn-toolbar"> >+ [% IF Koha.Preference( 'EnableAdvancedCatalogingEditor' ) == 1 %] >+ <a id="useadvanced" href="/cgi-bin/koha/cataloguing/editor.pl" class="btn btn-default btn-sm"><i class="fa fa-pencil"></i> Advanced editor</a> >+ [% END %] >+ <div class="btn-group"> >+ <button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> New record <span class="caret"></span></button> >+ <ul class="dropdown-menu"> >+ <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=">Default framework</a></li> >+ [% FOREACH framework IN frameworks %] >+ <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=[% framework.frameworkcode %]">[% framework.frameworktext %]</a></li> >+ [% END %] >+ </ul> >+ </div> >+ [% IF servers.count > 0 %] >+ <div class="btn-group"> >+ <button class="btn btn-default btn-sm" id="z3950search"><i class="fa fa-search"></i> New from Z39.50/SRU</button> >+ <button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"> >+ <span class="caret"></span> >+ </button> >+ <ul class="dropdown-menu"> >+ <li id="" class="z3950searchFw"><a href="#">Default framework</a></li> >+ [% FOREACH framework IN frameworks %] >+ <li id="[% framework.frameworkcode %]" class="z3950searchFw"><a href="#">[% framework.frameworktext %]</a></li> >+ [% END %] >+ </ul> >+ </div> >+ [% END %] >+ <a class="btn btn-default btn-sm" href="/cgi-bin/koha/cataloguing/draftrecords.pl"><i class="fa fa-eye" aria-hidden="true"></i> View draft records</a></button> >+ [% IF ( total ) %] >+ <div class="btn-group"><button type="submit" class="btn btn-default btn-sm merge-items"><i class="fa fa-compress"></i> Merge selected</button></div> >+ [% END %] >+ </div> >+ [% END %] >+ >+ <h1>View draft records</h1> >+ <div id="draftrecords"> >+ <p> To edit or save these draft records click the 'Edit' link beside the appropriate record. </p> >+ <form action="/cgi-bin/koha/cataloguing/draftrecords.pl" method="post"> >+ <input type="hidden" name="op" id="delete_all_drafts" value='delete_all'/> >+ <button type="submit">Delete all drafts from reservoir</button> >+ </form> >+ <table id="records-table"> >+ <thead> >+ <tr> >+ <th>#</th> >+ <th>Citation</th> >+ <th>Status</th> >+ <th>Edit record</th> >+ <th>Delete record</th> >+ </tr> >+ </thead> >+ </table> >+ </div> >+ </div> >+ </div> >+</div> >+ >+</body> >+ >+[% MACRO jsinclude BLOCK %] >+<script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script> >+<script type="text/javascript" src="[% interface %]/[% theme %]/js/background-job-progressbar_[% KOHA_VERSION %].js"></script> >+[% INCLUDE 'datatables.inc' %] >+<script type="text/javascript"> >+ $(document).ready(function(){ >+ $("#records-table").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "bSort": true, >+ "order": [0, "desc"], >+ "bAutoWidth": false, >+ "bFilter": false, >+ "bProcessing": true, >+ "bServerSide": true, >+ "sAjaxSource": 'batch_records_ajax.pl', >+ "sPaginationType": "full_numbers", >+ "sDom": '<"top pager"iflp>rt<"bottom pager"flp><"clear">', >+ "aoColumns": [ >+ { "mDataProp": "import_record_id" }, >+ { "mDataProp": "citation" }, >+ { "mDataProp": "status" }, >+ { "mDataProp": "catalog_link" }, >+ { "mDataProp": "delete_link" } >+ ], >+ "fnServerData": function ( sSource, aoData, fnCallback ) { >+ aoData.push( { "name": "import_batch_id", "value": 1 } ); >+ $.ajax({ >+ 'dataType': 'json', >+ 'type': 'POST', >+ 'url': sSource, >+ 'data': aoData, >+ 'success': function(json){ >+ fnCallback(json); >+ } >+ }); >+ }, >+ "fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { >+ [% IF ( record_type == 'auth' ) %] >+ var record_details_url = "/cgi-bin/koha/authorities/detail.pl?authid="; >+ [% ELSE %] >+ var record_details_url = "/cgi-bin/koha/catalogue/detail.pl?biblionumber="; >+ [% END %] >+ >+ $('td:eq(1)', nRow).html( >+ '<a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=' + aData['import_record_id'] + '&viewas=html" class="previewMARC">' + aData['citation'] + '</a>' >+ ); >+ >+ $('td:eq(2)', nRow).html( >+ aData['status'] == 'staged' ? _("Draft") : >+ aData['status'] >+ ); >+ >+ if (aData['catalog_link']){ >+ $('td:eq(3)', nRow).html( >+ '<a href="' + aData['catalog_link'] + '">' + "Edit" + '</a>' >+ ); >+ } >+ if (aData['delete_link']){ >+ $('td:eq(4)', nRow).html( >+ '<a href="' + aData['delete_link'] + '">' + "Delete" + '</a>' >+ ); >+ } >+ }, >+ })); >+ }); >+</script> >+[% END %] >+ >+[% INCLUDE 'intranet-bottom.inc' %] >-- >2.1.4
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 20678
:
74922
|
74928
|
74929
|
74960
|
74961
|
74962
|
75192
|
75193
|
78021
|
78920
|
92248
|
107454
|
107472