From 1dcc368df176e70503e694048384927d8e2397ab 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=utf8 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 Signed-off-by: Fridolin Somers --- 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 e194411af5..1f352ab3ae 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.20.1