From 7d477f0c811d995501ffa0b57d1c9e5d878a3067 Mon Sep 17 00:00:00 2001 From: Timothy Alexis Vass Date: Fri, 13 Nov 2020 09:47:32 +0000 Subject: [PATCH] Bug 9565: Deleting a biblio should alert/fail if there are existent subscriptions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently Koha will delete a biblio record if there are existent serial subscriptions. This patch will prevent deleting the biblio until attached subscriptions are removed. To test: 1) Add a subscription to a biblio, or check a biblio which has one attached already. 2) Remove all items if there are any. 3) Apply patch. 4) Confirm that the 'Delete record' item is disabled in the list. 5) Sign off. Sponsored by: Lunds Universitetsbibliotek Signed-off-by: Séverine QUEUNE --- koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc index 4d07b26..7413fbd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc @@ -69,6 +69,8 @@ CAN_user_serials_create_subscription ) %] [% IF CAN_user_editcatalogue_edit_catalogue or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ) %] [% IF ( count ) %]
  • Delete record
  • + [% ELSIF ( biblio.subscriptions.count ) %] +
  • Delete record
  • [% ELSE %]
  • Delete record
  • [% END %] -- 2.1.4