@@ -, +, @@
- a new pl/tt files tools/batch_delete_records
- a new permission: tools > records_batchdel
- using the basket: do a search, add some biblio to your basket, open
the basket and click on the "Action" button > "Delete"
- generating a list from a report
- biblios with issues cannot be deleted (checkbox disabled and line in
red).
- information is correct.
- sort functions work on each columns.
- the items, reserves and issues values are correct.
- reserves, items and biblio have successful been deleted.
- if an error occurs, the tool display an error message.
- authorities are display with the summary.
- the count usage (used in X biblios) is correct.
- The authorities have successful been deleted.
- if an error occurs, the tool display an error message.
---
.../intranet-tmpl/prog/en/includes/tools-menu.inc | 3 +
.../intranet-tmpl/prog/en/modules/basket/basket.tt | 6 +
.../prog/en/modules/tools/batch_delete_records.tt | 236 +++++++++++++++++++++
.../prog/en/modules/tools/tools-home.tt | 7 +-
tools/batch_delete_records.pl | 231 ++++++++++++++++++++
5 files changed, 482 insertions(+), 1 deletion(-)
create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt
create mode 100755 tools/batch_delete_records.pl
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc
+++ a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc
@@ -56,6 +56,9 @@
[% IF ( CAN_user_tools_items_batchmod ) %]
+ [% FOREACH message IN messages %]
+ [% IF message.type == 'success' %]
+
+ [% ELSIF message.type == 'warning' %]
+
+ [% ELSIF message.type == 'error' %]
+
+ [% END %]
+ [% IF 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 == 'item_issued' %]
+ At least one item issued for the biblio [% message.biblionumber %].
+ [% ELSIF message.code == 'reserve_not_cancelled' %]
+ The biblio [% message.biblionumber %] has not been deleted. A reserve (reserve_id [% message.reserve_id %]) caused an error on cancel.
+ [% ELSIF message.code == 'item_not_deleted' %]
+ The biblio [% message.biblionumber %] has not been deleted. An item (itemnumber [% message.itemnumber %]) caused an error on delete.
+ [% ELSIF message.code == 'biblio_not_deleted' %]
+ The biblio [% message.biblionumber %] has not been deleted. An error occurred on deleting it.
+ [% ELSIF message.code == 'authority_not_deleted' %]
+ The authority [% message.authid %] has not been deleted. An error occurred on deleting it.
+ [% ELSIF message.code == 'biblio_deleted' %]
+ The biblio [% message.biblionumber %] has successfully been deleted.
+ [% ELSIF message.code == 'authority_deleted' %]
+ The authority [% message.authid %] has successfully been deleted.
+ [% END %]
+ [% IF message.error %]
+ (The error was: [% message.error%], see the Koha logfile for more information).
+ [% END %]
+
+ [% END %]
+ [% IF op == 'form' %]
+
+ [% ELSIF op == 'list' %]
+ [% IF records %]
+ [% IF recordtype == 'biblio' %]
+
+
+ [% ELSE %]
+ There is no record ids defined.
+ [% END %]
+ [% ELSIF op == 'report' %]
+ [% IF report.total_records == report.total_success %]
+ All records have successfully been deleted!
+ [% ELSIF report.total_success == 0 %]
+ No record has been deleted, some errors occurred.
+ [% ELSE %]
+ [% report.total_success %] / [% report.total_records %] records have successfully been deleted but some errors occurred.
+ [% END %]
+