Bugzilla – Attachment 60368 Details for
Bug 18133
Batch record modification/deletion is not optimised for authorities
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18133: Batch record modification/deletion optimisation for authorities
Bug-18133-Batch-record-modificationdeletion-optimi.patch (text/plain), 10.25 KB, created by
Aleisha Amohia
on 2017-02-16 22:05:36 UTC
(
hide
)
Description:
Bug 18133: Batch record modification/deletion optimisation for authorities
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2017-02-16 22:05:36 UTC
Size:
10.25 KB
patch
obsolete
>From f8c55c054ba24dbc3ea7d748a081eafbf9f6a89e Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Thu, 16 Feb 2017 22:03:15 +0000 >Subject: [PATCH] Bug 18133: Batch record modification/deletion optimisation > for authorities > >This patch just adds some wording changes so the interface is nicer and >clearer when working with authorities. > >To test: >1) Apply 12759 then 18127 >2) Go through process of batch modification for authorities >3) Confirm that the wording changes are appropriate >4) Go through process of batch deletion for authorities >5) Confirm that the wording changes are appropriate > >Sponsored-by: Catalyst IT >--- > .../prog/en/modules/tools/batch_delete_records.tt | 44 +++++++++++++++++----- > .../en/modules/tools/batch_record_modification.tt | 26 ++++++++++--- > tools/batch_delete_records.pl | 1 + > tools/batch_record_modification.pl | 1 + > 4 files changed, 57 insertions(+), 15 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt >index a9fafbd..fda6319 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt >@@ -9,10 +9,16 @@ > //<![CDATA[ > var MSG_CANNOT_BE_DELETED = _("This record cannot be deleted, at least one item is currently checked out."); > $(document).ready(function() { >+ $(".bib_specific").show(); >+ $(".auth_specific").hide(); > $("input[type='radio']").click(function(){ > if ($(this).attr('id') == 'authority_type') { >+ $(".auth_specific").show(); >+ $(".bib_specific").hide(); > $("#shelves").hide(); > } else if ($(this).attr('id') == 'biblio_type') { >+ $(".bib_specific").show(); >+ $(".auth_specific").hide(); > $("#shelves").show(); > } > }); >@@ -157,10 +163,10 @@ $(document).ready(function() { > </ol> > </fieldset> > <fieldset class="rows"> >- <legend>Or enter a list of record numbers</legend> >+ <legend>Or enter a list of <span class="bib_specific">record</span><span class="auth_specific">authority</span> numbers</legend> > <ol> > <li> >- <label for="recordnumber_list">Record number list (one per line): </label> >+ <label for="recordnumber_list"><span class="bib_specific">Record</span><span class="auth_specific">Authority</span> number list (one per line): </label> > <textarea rows="10" cols="30" id="recordnumber_list" name="recordnumber_list"></textarea> > </li> > </ol> >@@ -238,22 +244,40 @@ $(document).ready(function() { > <fieldset class="action"> > <input type="hidden" name="op" value="delete" /> > <input type="hidden" name="recordtype" value="[% recordtype %]" /> >- <input type="submit" value="Delete selected records" class="button" /> >+ [% IF ( recordtype == "biblio" ) %] >+ <input type="submit" value="Delete selected records" class="button"> >+ [% ELSE %] >+ <input type="submit" value="Delete selected authorities" class="button"> >+ [% END %] > <a class="cancel" href="/cgi-bin/koha/tools/batch_delete_records.pl">Cancel</a> > </fieldset> > </form> > [% ELSE %] >- There are no record ids defined. >+ [% IF ( recordtype == "biblio" ) %] >+ There are no record numbers defined. >+ [% ELSE %] >+ There are no authority numbers defined. >+ [% END %] > [% END %] > [% ELSIF op == 'report' %] >- [% IF report.total_records == report.total_success %] >- All records have been deleted successfully! >- [% ELSIF report.total_success == 0 %] >- No record has been deleted. An error occurred. >+ [% IF ( recordtype == "biblio" ) %] >+ [% IF report.total_records == report.total_success %] >+ All records have been deleted successfully! >+ [% ELSIF report.total_success == 0 %] >+ No record has been deleted. An error occurred. >+ [% ELSE %] >+ [% report.total_success %] / [% report.total_records %] records have been deleted successfully but some errors occurred. >+ [% END %] > [% ELSE %] >- [% report.total_success %] / [% report.total_records %] records have been deleted successfully but some errors occurred. >+ [% IF report.total_records == report.total_success %] >+ All authorities have been deleted successfully! >+ [% ELSIF report.total_success == 0 %] >+ No authority has been deleted. An error occurred. >+ [% ELSE %] >+ [% report.total_success %] / [% report.total_records %] authorities have been deleted successfully but some errors occurred. >+ [% END %] > [% END %] >- <p><a href="/cgi-bin/koha/tools/batch_delete_records.pl" title="New batch record deletion">New batch record deletion</a></p> >+ <a href="/cgi-bin/koha/tools/batch_delete_records.pl" title="New batch record deletion">New batch record deletion</a> > [% ELSE %] > No action defined for the template. > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt >index eeff87f..a3a5901 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt >@@ -13,10 +13,16 @@ function Dopop(link) { > } > > $(document).ready(function() { >+ $(".bib_specific").show(); >+ $(".auth_specific").hide(); > $("input[type='radio']").click(function(){ > if ($(this).attr('id') == 'authority_type') { >+ $(".bib_specific").hide(); >+ $(".auth_specific").show(); > $("#shelves").hide(); > } else if ($(this).attr('id') == 'biblio_type') { >+ $(".bib_specific").show(); >+ $(".auth_specific").hide(); > $("#shelves").show(); > } > }); >@@ -148,7 +154,7 @@ $(document).ready(function() { > [% ELSIF message.code == 'biblio_modified' %] > Bibliographic record <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% message.biblionumber %]">[% message.biblionumber %]</a> has successfully been modified. > [% ELSIF message.code == 'authority_modified' %] >- Bibliographic record <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% message.authid %]">[% message.authid %]</a> has successfully been modified. >+ Authority record <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% message.authid %]">[% message.authid %]</a> has successfully been modified. > [% END %] > [% IF message.error %] > (The error was: [% message.error%]. See the Koha logfile for more information). >@@ -190,10 +196,10 @@ $(document).ready(function() { > </ol> > </fieldset> > <fieldset class="rows"> >- <legend>Or enter a list of record numbers</legend> >+ <legend>Or enter a list of <span class="bib_specific">record</span><span class="auth_specific">authority</span> numbers</legend> > <ol> > <li> >- <label for="recordnumber_list">Record number list (one per line): </label> >+ <label for="recordnumber_list"><span class="bib_specific">Record</span><span class="auth_specific">Authority</span> number list (one per line): </label> > <textarea rows="10" cols="30" id="recordnumber_list" name="recordnumber_list"></textarea> > </li> > </ol> >@@ -306,7 +312,11 @@ $(document).ready(function() { > <fieldset class="action"> > <input type="hidden" name="op" value="modify" /> > <input type="hidden" name="recordtype" value="[% recordtype %]" /> >- <input type="button" id="mainformsubmit" value="Modify selected records" class="button" /> >+ [% IF ( recordtype == "biblio" ) %] >+ <input type="button" id="mainformsubmit" value="Modify selected records" class="button" /> >+ [% ELSE %] >+ <input type="button" id="mainformsubmit" value="Modify selected authorities" class="button" /> >+ [% END %] > <input type="hidden" name="runinbackground" id="runinbackground" value="" /> > <input type="hidden" name="completedJobID" id="completedJobID" value="" /> > <a class="cancel" href="/cgi-bin/koha/tools/batch_record_modification.pl">Cancel</a> >@@ -323,7 +333,13 @@ $(document).ready(function() { > [% END %] > [% ELSIF view == 'report' %] > [% IF report.total_records == report.total_success %] >- <div class="dialog message">All records have successfully been modified! <span id="auth_next_steps"><a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a></span></div> >+ <div class="dialog message"> >+ [% IF ( recordtype == "biblio" ) %] >+ All records have successfully been modified! >+ [% ELSE %] >+ All authorities have successfully been modified! >+ [% END %] >+ <span id="auth_next_steps"><a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a></span></div> > [% ELSE %] > <div class="dialog message">[% report.total_success %] / [% report.total_records %] records have successfully been modified. Some errors occurred. <span id="auth_next_steps"><a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a></span></div> > [% END %] >diff --git a/tools/batch_delete_records.pl b/tools/batch_delete_records.pl >index a979112..10b0722 100755 >--- a/tools/batch_delete_records.pl >+++ b/tools/batch_delete_records.pl >@@ -117,6 +117,7 @@ if ( $op eq 'form' ) { > $template->param( > records => \@records, > op => 'list', >+ recordtype => $recordtype, > ); > } elsif ( $op eq 'delete' ) { > # We want to delete selected records! >diff --git a/tools/batch_record_modification.pl b/tools/batch_record_modification.pl >index 05667a6..d7e546e 100755 >--- a/tools/batch_record_modification.pl >+++ b/tools/batch_record_modification.pl >@@ -157,6 +157,7 @@ if ( $op eq 'form' ) { > } > } > $template->param( >+ recordtype => $recordtype, > records => \@records, > mmtid => $mmtid, > view => 'list', >-- >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 18133
: 60368