From 4846789c9086638274290df6c3c61716a8583032 Mon Sep 17 00:00:00 2001
From: Owen Leonard
Date: Tue, 28 Oct 2014 10:07:22 -0400
Subject: [PATCH] [PASSED QA] Bug 12403 [Follow-up] Batch record deletion
This follow-up makes several changes to language and markup with one
change in behavior:
- Updated permission description to avoid the use of the term "biblio"
- Updated batch delete template to avoid the use of the term
"biblio" and to improve clarity.
- Replaced instances of terms "issue" and "reserve" with "checkout" and
"hold" respectively.
- On bibliographic record batch delete, wrap biblionumber in .
- On bibliographic record batch delete, show subtitle via Keywords to
MARC mapping.
- On bibliographic record batch delete, respect BiblioDefaultView system
preference.
- In the staff client cart, move batch delete link from "Action" menu
to text link below (alongside "add to list" and "place hold"). The
buttons are actions which affect the whole Cart. The links are actions
which can be applied to selected items. I think this change makes it
more consistent with the kind of operation being performed.
To test:
- Submit a batch of bibliographic records and confirm that the
list of titles shows subtitle data as defined in Keywords to MARC
mapping. Confirm also that the title links respect your
BiblioDefaultView system preference.
- Perform a catalog search, select several titles, and add them to the
Cart. Open the Cart and test the "Batch delete" link with and without
titles selected. Test as a user who lacks batch biblio delete
permission and confirm that the link does not appear.
Signed-off-by: Bernardo Gonzalez Kriegel
Work as described, no koha-qa errors
I love the rewording, we always translated 'biblio' as 'bibliographic record',
it makes a lot of sense.
Tested using direct input of biblionumber or cart, subtitle display shows
correctly, link respect preference, user without permission cant acces the
tool or links.
Signed-off-by: Katrin Fischer
---
.../data/mysql/de-DE/mandatory/userpermissions.sql | 2 +-
.../data/mysql/en/mandatory/userpermissions.sql | 2 +-
.../data/mysql/es-ES/mandatory/userpermissions.sql | 2 +-
.../mysql/fr-FR/1-Obligatoire/userpermissions.sql | 2 +-
.../data/mysql/it-IT/necessari/userpermissions.sql | 2 +-
.../mysql/nb-NO/1-Obligatorisk/userpermissions.sql | 2 +-
.../data/mysql/pl-PL/mandatory/userpermissions.sql | 2 +-
.../ru-RU/mandatory/permissions_and_user_flags.sql | 2 +-
.../uk-UA/mandatory/permissions_and_user_flags.sql | 2 +-
installer/data/mysql/updatedatabase.pl | 4 +--
.../intranet-tmpl/prog/en/modules/basket/basket.tt | 34 ++++++++++++++----
.../prog/en/modules/tools/batch_delete_records.tt | 40 +++++++++++-----------
.../prog/en/modules/tools/tools-home.tt | 2 +-
tools/batch_delete_records.pl | 2 ++
14 files changed, 62 insertions(+), 38 deletions(-)
diff --git a/installer/data/mysql/de-DE/mandatory/userpermissions.sql b/installer/data/mysql/de-DE/mandatory/userpermissions.sql
index 534fbdf..59e6bab 100644
--- a/installer/data/mysql/de-DE/mandatory/userpermissions.sql
+++ b/installer/data/mysql/de-DE/mandatory/userpermissions.sql
@@ -50,7 +50,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES
(13, 'upload_local_cover_images', 'Eigene Coverbilder hochladen'),
(13, 'manage_patron_lists', 'Benutzerlisten anlegen, bearbeiten und löschen'),
(13, 'marc_modification_templates', 'Templates für MARC-Modifikationen verwalten'),
- (13, 'records_batchdel', 'Perform batch deletion of records (biblios or authorities)'),
+ (13, 'records_batchdel', 'Perform batch deletion of records (bibliographic or authority)'),
(15, 'check_expiration', 'Ablauf eines Abonnements prüfen'),
(15, 'claim_serials', 'Fehlende Hefte reklamieren'),
(15, 'create_subscription', 'Neue Abonnements anlegen'),
diff --git a/installer/data/mysql/en/mandatory/userpermissions.sql b/installer/data/mysql/en/mandatory/userpermissions.sql
index 5817499..f8e3e9d 100644
--- a/installer/data/mysql/en/mandatory/userpermissions.sql
+++ b/installer/data/mysql/en/mandatory/userpermissions.sql
@@ -50,7 +50,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES
(13, 'upload_local_cover_images', 'Upload local cover images'),
(13, 'manage_patron_lists', 'Add, edit and delete patron lists and their contents'),
(13, 'marc_modification_templates', 'Manage marc modification templates'),
- (13, 'records_batchdel', 'Perform batch deletion of records (biblios or authorities)'),
+ (13, 'records_batchdel', 'Perform batch deletion of records (bibliographic or authority)'),
(15, 'check_expiration', 'Check the expiration of a serial'),
(15, 'claim_serials', 'Claim missing serials'),
(15, 'create_subscription', 'Create a new subscription'),
diff --git a/installer/data/mysql/es-ES/mandatory/userpermissions.sql b/installer/data/mysql/es-ES/mandatory/userpermissions.sql
index efc1d68..8b7cc26 100644
--- a/installer/data/mysql/es-ES/mandatory/userpermissions.sql
+++ b/installer/data/mysql/es-ES/mandatory/userpermissions.sql
@@ -50,7 +50,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES
(13, 'upload_local_cover_images', 'Upload local cover images'),
(13, 'manage_patron_lists', 'Add, edit and delete patron lists and their contents'),
(13, 'marc_modification_templates', 'Manage marc modification templates'),
- (13, 'records_batchdel', 'Perform batch deletion of records (biblios or authorities)'),
+ (13, 'records_batchdel', 'Perform batch deletion of records (bibliographic or authority)'),
(15, 'check_expiration', 'Check the expiration of a serial'),
(15, 'claim_serials', 'Claim missing serials'),
(15, 'create_subscription', 'Create a new subscription'),
diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql b/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql
index 5aa224b..b70438a 100644
--- a/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql
+++ b/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql
@@ -50,7 +50,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES
(13, 'items_batchdel', 'Supprimer les exemplaires par lot'),
(13, 'upload_local_cover_images', 'Téléchargement des images de couverture'),
(13, 'manage_patron_lists', 'Add, edit and delete patron lists and their contents'),
- (13, 'records_batchdel', 'Perform batch deletion of records (biblios or authorities)'),
+ (13, 'records_batchdel', 'Perform batch deletion of records (bibliographic or authority)'),
(15, 'check_expiration', 'Contrôler l''expiration d''un périodique'),
(15, 'claim_serials', 'Réclamer les périodiques manquants'),
(15, 'create_subscription', 'Créer de nouveaux abonnements'),
diff --git a/installer/data/mysql/it-IT/necessari/userpermissions.sql b/installer/data/mysql/it-IT/necessari/userpermissions.sql
index cb745e7..3ad8ff7 100644
--- a/installer/data/mysql/it-IT/necessari/userpermissions.sql
+++ b/installer/data/mysql/it-IT/necessari/userpermissions.sql
@@ -50,7 +50,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES
(13, 'upload_local_cover_images', 'Carica copertine in locale'),
(13, 'manage_patron_lists', 'Aggiungi, modifica e cancella le liste utenti e i loro contenuti'),
(13, 'marc_modification_templates', 'Gestisci le modifiche sulle griglie di catalogazione MARC'),
- (13, 'records_batchdel', 'Perform batch deletion of records (biblios or authorities)'),
+ (13, 'records_batchdel', 'Perform batch deletion of records (bibliographic or authority)'),
(15, 'check_expiration', 'Controlla la scadenza di una risora in continuazione'),
(15, 'claim_serials', 'Richiedi i fascicoli non arrivati'),
(15, 'create_subscription', 'Crea un nuovo abbonamento'),
diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql
index 1b49fee..bcc1175 100644
--- a/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql
+++ b/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql
@@ -70,7 +70,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES
(13, 'upload_local_cover_images', 'Laste opp lokale omslagsbilder'),
(13, 'manage_patron_lists', 'Add, edit and delete patron lists and their contents'),
(13, 'marc_modification_templates', 'Manage marc modification templates'),
- (13, 'records_batchdel', 'Perform batch deletion of records (biblios or authorities)'),
+ (13, 'records_batchdel', 'Perform batch deletion of records (bibliographic or authority)'),
(15, 'check_expiration', 'Sjekke utløpsdato for et periodikum'),
(15, 'claim_serials', 'Purre manglende tidsskrifthefter'),
(15, 'create_subscription', 'Opprette abonnementer'),
diff --git a/installer/data/mysql/pl-PL/mandatory/userpermissions.sql b/installer/data/mysql/pl-PL/mandatory/userpermissions.sql
index aed4822..caf1db8 100644
--- a/installer/data/mysql/pl-PL/mandatory/userpermissions.sql
+++ b/installer/data/mysql/pl-PL/mandatory/userpermissions.sql
@@ -51,7 +51,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES
(13, 'rotating_collections', 'Manage rotating collections'),
(13, 'upload_local_cover_images', 'Upload local cover images'),
(13, 'manage_patron_lists', 'Add, edit and delete patron lists and their contents'),
- (13, 'records_batchdel', 'Perform batch deletion of records (biblios or authorities)'),
+ (13, 'records_batchdel', 'Perform batch deletion of records (bibliographic or authority)'),
(15, 'check_expiration', 'Check the expiration of a serial'),
(15, 'claim_serials', 'Claim missing serials'),
(15, 'create_subscription', 'Create a new subscription'),
diff --git a/installer/data/mysql/ru-RU/mandatory/permissions_and_user_flags.sql b/installer/data/mysql/ru-RU/mandatory/permissions_and_user_flags.sql
index 8286e98..9b9839d 100644
--- a/installer/data/mysql/ru-RU/mandatory/permissions_and_user_flags.sql
+++ b/installer/data/mysql/ru-RU/mandatory/permissions_and_user_flags.sql
@@ -76,7 +76,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES
(13, 'upload_local_cover_images', 'Upload local cover images'),
(13, 'manage_patron_lists', 'Add, edit and delete patron lists and their contents'),
(13, 'marc_modification_templates', 'Manage marc modification templates'),
- (13, 'records_batchdel', 'Perform batch deletion of records (biblios or authorities)'),
+ (13, 'records_batchdel', 'Perform batch deletion of records (bibliographic or authority)'),
(15, 'check_expiration', 'Check the expiration of a serial'),
(15, 'claim_serials', 'Claim missing serials'),
(15, 'create_subscription', 'Create a new subscription'),
diff --git a/installer/data/mysql/uk-UA/mandatory/permissions_and_user_flags.sql b/installer/data/mysql/uk-UA/mandatory/permissions_and_user_flags.sql
index 19d6d17..40d741f 100644
--- a/installer/data/mysql/uk-UA/mandatory/permissions_and_user_flags.sql
+++ b/installer/data/mysql/uk-UA/mandatory/permissions_and_user_flags.sql
@@ -76,7 +76,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES
(13, 'upload_local_cover_images', 'Upload local cover images'),
(13, 'manage_patron_lists', 'Add, edit and delete patron lists and their contents'),
(13, 'marc_modification_templates', 'Manage marc modification templates'),
- (13, 'records_batchdel', 'Perform batch deletion of records (biblios or authorities)'),
+ (13, 'records_batchdel', 'Perform batch deletion of records (bibliographic or authority)'),
(15, 'check_expiration', 'Check the expiration of a serial'),
(15, 'claim_serials', 'Claim missing serials'),
(15, 'create_subscription', 'Create a new subscription'),
diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index 65dfd03..542d73a 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -8896,9 +8896,9 @@ $DBversion = "3.15.00.XXX";
if ( CheckVersion($DBversion) ) {
$dbh->do(q|
INSERT INTO permissions (module_bit, code, description) VALUES
- (13, 'records_batchdel', 'Perform batch deletion of records (biblios or authorities)')
+ (13, 'records_batchdel', 'Perform batch deletion of records (bibliographic or authority)')
|);
- print "Upgrade to $DBversion done (Bug 12403: Add permission tools_records_batchdel)\n";
+ print "Upgrade to $DBversion done (Bug 12403: Add permission tools_records_batchdelitem)\n";
SetVersion($DBversion);
}
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt
index 60fd2e4..39a2a07 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt
@@ -40,7 +40,27 @@ function placeHold () {
window.opener.location = newloc;
window.close();
}
+[% IF CAN_user_tools_records_batchdel %]
+function batchDelete(){
+ var checkedItems = $("input:checkbox:checked");
+ if ($(checkedItems).size() == 0) {
+ alert(MSG_NO_RECORD_SELECTED);
+ return false;
+ }
+ var newloc;
+
+ var bibs = "";
+ $(checkedItems).each(function() {
+ var bib = $(this).val();
+ bibs += bib + "/";
+ });
+
+ newloc = "/cgi-bin/koha/tools/batch_delete_records.pl?op=list&type=biblio&bib_list=" + bibs;
+ window.opener.location = newloc;
+ window.close();
+}
+[% END %]
$(document).ready(function(){
$("#items-popover").popover();
$("#CheckAll").click(function(){
@@ -101,12 +121,6 @@ function placeHold () {
[% END %]
-
Print
Empty and close
Hide window
@@ -126,6 +140,10 @@ function placeHold () {
| Place hold
[% END %]
+[% IF CAN_user_tools_records_batchdel %]
+ | Batch delete
+[% END %]
+
[% END %]