Bugzilla – Attachment 45518 Details for
Bug 15321
Add delete report option to Show, Edit and Run screens
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15321 - Add delete report link to Show, Edit and Run screens
Bug-15321---Add-delete-report-link-to-Show-Edit-an.patch (text/plain), 2.97 KB, created by
Jonathan Druart
on 2015-12-09 09:11:55 UTC
(
hide
)
Description:
Bug 15321 - Add delete report link to Show, Edit and Run screens
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-12-09 09:11:55 UTC
Size:
2.97 KB
patch
obsolete
>From ab1bfe42d332055576ab0735e1ea8160eaaefc97 Mon Sep 17 00:00:00 2001 >From: Magnus Enger <magnus@libriotech.no> >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 <hbraum@nekls.org> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc | 8 ++++++++ > .../intranet-tmpl/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 9933d3c..b7fa555 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 ) %] >+ <div class="btn-group"> >+ <a class="confirmdelete btn btn-small" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&phase=Delete%20Saved"> >+ <i class="fa fa-remove"></i> Delete >+ </a> >+ </div> >+ [% END %] >+ > [% UNLESS ( errors ) # Unless there are errors saving a report %] > <div class="btn-group"> > <a id="runreport" class="btn btn-small" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&phase=Run%20this%20report"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >index 933e850..76c752e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >@@ -157,7 +157,7 @@ $(document).ready(function(){ > $(this).select(); > }); > [% END %] >-[% IF ( saved1 ) %] >+[% IF ( saved1 || showsql || execute || editsql || save_successful ) %] > $(".confirmdelete").click(function(){ > $(this).parents('tr').attr("class","warn"); > if(confirm(_("Are you sure you want to delete this saved report?"))){ >-- >2.1.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15321
:
45509
|
45513
| 45518 |
45519
|
45520