From f8c55c054ba24dbc3ea7d748a081eafbf9f6a89e Mon Sep 17 00:00:00 2001 From: Aleisha Amohia 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 @@ //
- Or enter a list of record numbers + Or enter a list of recordauthority numbers
  1. - +
@@ -238,22 +244,40 @@ $(document).ready(function() {
- + [% IF ( recordtype == "biblio" ) %] + + [% ELSE %] + + [% END %] Cancel
[% 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 %] -

New batch record deletion

+ New batch record deletion [% 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 [% message.biblionumber %] has successfully been modified. [% ELSIF message.code == 'authority_modified' %] - Bibliographic record [% message.authid %] has successfully been modified. + Authority record [% message.authid %] 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() {
- Or enter a list of record numbers + Or enter a list of recordauthority numbers
  1. - +
@@ -306,7 +312,11 @@ $(document).ready(function() {
- + [% IF ( recordtype == "biblio" ) %] + + [% ELSE %] + + [% END %] Cancel @@ -323,7 +333,13 @@ $(document).ready(function() { [% END %] [% ELSIF view == 'report' %] [% IF report.total_records == report.total_success %] -
All records have successfully been modified! New batch record modification
+
+ [% IF ( recordtype == "biblio" ) %] + All records have successfully been modified! + [% ELSE %] + All authorities have successfully been modified! + [% END %] + New batch record modification
[% ELSE %]
[% report.total_success %] / [% report.total_records %] records have successfully been modified. Some errors occurred. New batch record modification
[% 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