From 404a11a9a504c6bb498f95e20003462cf536ffdc Mon Sep 17 00:00:00 2001 From: Magnus Enger Date: Tue, 8 Dec 2015 20:45:39 +0100 Subject: [PATCH] Bug 15321 - Add delete report link to Show, Edit and Run screens Currently, if you are editing or viewing the results of running a report and you decide you want to delete it, you have to go back to the list of saved reports to do so. This patch adds a "Delete" link in some convenient places. To test: - Apply the patch - Make sure you have at least one saved report - Make sure you have the create_reports permission - Go to the Show, Edit and Run screens and verify the Delete link is present and functional, including the JavaScript confirmation dialogue - Change to a user without the create_reports permission and check that the Delete link is not displayed on the Show, Edit and Run screens - Sign ye off merrily! Version 2: This version makes sure the JavaScript confirmation is shown before an actual delete is carried out. Signed-off-by: Heather Braum Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- .../intranet-tmpl/prog/en/includes/reports-toolbar.inc | 8 ++++++++ .../prog/en/modules/reports/guided_reports_start.tt | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc index 9933d3c3c3..b7fa5559b9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc @@ -20,6 +20,14 @@ [% END %] [% END %] + [% IF ( CAN_user_reports_create_reports ) %] + + [% END %] + [% UNLESS ( errors ) # Unless there are errors saving a report %]