From c78c927695fdcb0dfa060f9dba2fc2933eb57b8b Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 18 Aug 2016 11:04:38 -0400 Subject: [PATCH] Bug 17147 [Revised] Streamline messages following batch record modification This patch changes the display of informational messages during and after the batch record modification process. Instead of showing a separate dialog for each record modified, messages are now grouped into one dialog. To test, apply the patch and clear your browser cache if necessary. You must have at least one MARC modification template defined. - Go to Tools -> Batch record modification. - Submit a list of biblionumbers which contains at least one number which doesn't exist in your database. - Confirm that warning and success messages are grouped instead of showing in separate dialogs. - Submit a list of biblionumbers using a MARC modification template which contains no actions. Confirm that the resulting error message is correctly formatted. Revision formats the error messages without the unordered list, which was giving them padding which didn't look correct inside a dialog. Signed-off-by: Aleisha Amohia Edit for QA: Removed obsolete changes to CSS. Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- .../intranet-tmpl/prog/css/staff-global.css | 12 ++- .../tools/batch_record_modification.tt | 85 +++++++++++-------- 2 files changed, 59 insertions(+), 38 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/css/staff-global.css index de0e492d68..52ee8d47b6 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/css/staff-global.css @@ -808,12 +808,17 @@ fieldset.rows .inputnote { } /* Font Awesome icon */ -.error i { +i.success { + color: green; +} + +/* Font Awesome icon */ +i.error { color: #CC0000; } /* Font Awesome icon */ -.warn i { +i.warn { color: orange; } @@ -1067,7 +1072,8 @@ div.alert strong { border : 1px inset #999999; } -.approve i.fa { +.approve i.fa, +.success i.fa { color: green; } 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 ac2a4f22c4..e5dad6c91c 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 @@ -91,35 +91,42 @@ $(document).ready(function() {

Batch record modification

- [% FOREACH message IN messages %] - [% IF message.type == 'success' %] -
- [% ELSIF message.type == 'warning' %] -
- [% ELSIF message.type == 'error' %] -
- [% END %] - [% biblio.title %] - [% IF message.code == 'no_action_defined_for_the_template' %] - The selected template (id=[% message.mmtid%]) does not exist or no action is defined. - [% ELSIF message.code == 'biblio_not_exists' %] - The biblionumber [% message.biblionumber %] does not exist in the database. - [% ELSIF message.code == 'authority_not_exists' %] - The authority id [% message.authid %] does not exist in the database. - [% ELSIF message.code == 'biblio_not_modified' %] - The biblio [% message.biblionumber %] has not been modified. An error occurred on modifying it. - [% ELSIF message.code == 'authority_not_modified' %] - The authority [% message.authid %] has not been modified. An error occurred on modifying it. - [% ELSIF message.code == 'biblio_modified' %] - The biblio [% message.biblionumber %] has successfully been modified. - [% ELSIF message.code == 'authority_modified' %] - The authority [% message.authid %] has successfully been modified. - [% END %] - [% IF message.error %] - (The error was: [% message.error%], see the Koha logfile for more information). + + [% IF ( messages ) %] +
+ + [% FOREACH message IN messages %] + [% IF message.type == 'success' %] +
+ [% ELSIF message.type == 'warning' %] +
+ [% ELSIF message.type == 'error' %] +
+ [% END %] + [% IF message.code == 'no_action_defined_for_the_template' %] + The selected template (id=[% message.mmtid%]) does not exist or no action is defined. + [% ELSIF message.code == 'biblio_not_exists' %] + Bibliographic record [% message.biblionumber %] does not exist in the database. + [% ELSIF message.code == 'authority_not_exists' %] + Authority record [% message.authid %] does not exist in the database. + [% ELSIF message.code == 'biblio_not_modified' %] + Bibliographic record [% message.biblionumber %] has not been modified. An error occurred on modifying it. + [% ELSIF message.code == 'authority_not_modified' %] + Authority record [% message.authid %] has not been modified. An error occurred on modifying it. + [% 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. + [% END %] + [% IF message.error %] + (The error was: [% message.error%]. See the Koha logfile for more information). + [% END %] +
+ [% END %] + +
[% END %] -
- [% END %] + [% IF view == 'form' %]
@@ -259,24 +266,32 @@ $(document).ready(function() {
[% ELSE %] - There is no record ids defined. +
+ No records were modified. New batch record modification +
[% END %] [% ELSIF view == 'report' %] [% IF report.total_records == report.total_success %] - All records have successfully been modified! +
+ All records have successfully been modified! New batch record modification +
[% ELSE %] - [% report.total_success %] / [% report.total_records %] records have successfully been modified. - Some errors occurred. +
+ [% report.total_success %] / [% report.total_records %] records have successfully been modified. Some errors occurred. New batch record modification +
[% END %] -

New batch record modification

[% ELSIF view == 'errors' %] [% FOR error IN errors %] [% IF error == 'no_template_defined' %] - No MARC modification template is defined. You have to create at least one template for using this tool. +
+ No MARC modification template is defined. You have to create at least one template for using this tool. +
[% END %] [% END %] [% ELSE %] - No action defined for the template. +
+ No action defined for the template. +
[% END %]
-- 2.39.5