Bugzilla – Attachment 48785 Details for
Bug 16000
Duplicate a report from the New Reports button
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16000 - Duplicate a report from the New Reports button
Bug-16000---Duplicate-a-report-from-the-New-Report.patch (text/plain), 7.73 KB, created by
Owen Leonard
on 2016-03-08 14:03:17 UTC
(
hide
)
Description:
Bug 16000 - Duplicate a report from the New Reports button
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2016-03-08 14:03:17 UTC
Size:
7.73 KB
patch
obsolete
>From c8c083ae0c75946044afb2a09059967dc7f3c420 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 31 Dec 2015 10:54:55 -0500 >Subject: [PATCH] Bug 16000 - Duplicate a report from the New Reports button >Content-Type: text/plain; charset="utf-8" > >This patch creates a combined edit/duplicate/delete toolbar menu option >similar to the one on the bibliographic detail page. Also added is the >"Schedule" link which was previously only available from the main list >of saved reports. Also added is some deletion confirmation JavaScript >for deletions initiated from the toolbar. > >To test, apply the patch and go to Reports -> Saved reports. > >- Click "Show" in the menu for any saved report. The toolbar which > appears on this page should show the new menu items. >- Confirm the behavior of all the buttons. >- As you check the behavior of the button actions, check that the > toolbar is shown and hidden appropriately for each action. >- Confirm that the toolbar is correctly shown or hidden when building a > guided report. >- Confirm that the "Schedule" button is shown or hidden according to the > logged-in user's "schedule_tasks" permission. >- Confirm that clicking the "Delete" menu option triggers a JS > confirmation. >--- > .../prog/en/includes/reports-toolbar.inc | 44 ++++++++++++++-------- > .../en/modules/reports/guided_reports_start.tt | 18 ++++++++- > 2 files changed, 45 insertions(+), 17 deletions(-) > >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 b7fa555..613da7d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc >@@ -1,7 +1,7 @@ > <div id="toolbar" class="btn-toolbar"> > [% IF ( CAN_user_reports_create_reports ) %] > <div class="btn-group"> >- <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> New report <span class="caret"></span></button> >+ <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="fa fa-fw fa-plus"></i> New report <span class="caret"></span></button> > <ul class="dropdown-menu"> > <li id="newmenuc"><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">New guided report</a> </li> > <li id="newsql"><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create%20report%20from%20SQL">New SQL report</a> </li> >@@ -9,29 +9,43 @@ > </div> > [% END %] > >- [% IF ( showsql || execute || editsql || save_successful ) %] >- [% UNLESS ( editsql ) # Do not show edit button on edit page %] >- [% IF ( CAN_user_reports_create_reports ) %] >- <div class="btn-group"> >- <a id="editreport" class="btn btn-small" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&phase=Edit%20SQL"> >- <i class="fa fa-pencil"></i> Edit >- </a> >- </div> >- [% END %] >- [% END %] >+ [% IF ( showsql || execute || save_successful ) %] > > [% 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> >+ <button data-toggle="dropdown" class="btn btn-small dropdown-toggle"><i class="fa fa-pencil"></i> Edit <span class="caret"></span></button> >+ <ul class="dropdown-menu"> >+ <li> >+ <a id="editreport" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&phase=Edit%20SQL"> >+ <i class="fa fa-fw fa-pencil"></i> Edit >+ </a> >+ </li> >+ <li> >+ <a id="duplicatereport" href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create report from SQL&sql=[% sql |uri %]&reportname=[% reportname |uri %]&notes=[% notes |uri %]"><i class="fa fa-fw fa-copy"></i> Duplicate</a> >+ </li> >+ <li> >+ <a id="deletereport" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&phase=Delete%20Saved"><i class="fa fa-fw fa-trash"></i> Delete</a> >+ </li> >+ </ul> >+ </div> >+ [% END %] >+ >+ [% IF ( CAN_user_tools_schedule_tasks ) %] >+ <div class="btn-group"> >+ <a id="schedulereport" class="btn btn-small" href="/cgi-bin/koha/tools/scheduler.pl?id=[% id %]"><i class="fa fa-clock-o"></i> Schedule</a> >+ </div> >+ [% END %] >+ >+ [% IF ( save_successful ) %] >+ <div class="btn-group"> >+ <a id="showreport" class="btn btn-small" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&phase=Show%20SQL"><i class="fa fa-fw fa-search"></i> Show</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"> >- <i class="fa fa-play"></i> Run report >+ <i class="fa fa-fw fa-play"></i> Run report > </a> > </div> > [% END %] >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 1655d92..ecd44cc 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 >@@ -167,6 +167,15 @@ $(document).ready(function(){ > } > }); > >+ $("#deletereport").on("click",function(){ >+ $(".btn-group").removeClass("open"); >+ if(confirm(_("Are you sure you want to delete this saved report?"))){ >+ return true; >+ } else { >+ return false; >+ } >+ }); >+ > [% IF (create || editsql || save) %] > $("#select_group").change(function() { > if($(this).attr('checked')) { >@@ -230,7 +239,9 @@ $(document).ready(function(){ > [% ELSIF ( showsql ) %]› <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Saved reports</a> › SQL view > [% ELSIF ( editsql ) %]› <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Saved reports</a> › Edit SQL report > [% ELSIF ( execute ) %]› <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Saved reports</a> › <em>[% name %]</em> Report >-[% ELSIF ( build1 || build2 || build3 || build4 || build5 || build6 ) %]› <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">Build a report</a> >+[% ELSIF ( build1 || build2 || build3 || build4 || build5 || build6 ) %] >+ [% guided = 1 %] >+ › <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">Build a report</a> > [% IF ( build1 ) %]› Step 1 of 6: Choose a module > [% ELSIF ( build2 ) %]› Step 2 of 6: Pick a report type > [% ELSIF ( build3 ) %]› Step 3 of 6: Select columns for display >@@ -245,7 +256,10 @@ $(document).ready(function(){ > <div id="bd"> > <div id="yui-main"> > <div class="yui-b"> >- [% INCLUDE "reports-toolbar.inc" %] >+ >+ [% UNLESS ( editsql || create || enter_params || guided || save ) %] >+ [% INCLUDE "reports-toolbar.inc" %] >+ [% END %] > > [% IF ( start ) %] > <h2>Guided reports</h2> >-- >2.1.4
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 16000
:
48785
|
48829
|
49229
|
49247
|
49276
|
49277
|
49541
|
49542
|
49543
|
49544