From 713eba48044f2b745b06c5a18ddfd968d59adcf4 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 Signed-off-by: Frank Hansen Signed-off-by: Jonathan Druart --- 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 e194411af5d..1f352ab3ae2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc @@ -72,6 +72,8 @@ [% 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.25.1