Bugzilla – Attachment 51456 Details for
Bug 16388
Move option to download report into reports toolbar
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 16388: Move option to download report into reports toolbar
SIGNED-OFF-Bug-16388-Move-option-to-download-repor.patch (text/plain), 4.22 KB, created by
Owen Leonard
on 2016-05-12 12:04:53 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 16388: Move option to download report into reports toolbar
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2016-05-12 12:04:53 UTC
Size:
4.22 KB
patch
obsolete
>From 71b35103c884c1381d96a38f72d18dc58f31ce82 Mon Sep 17 00:00:00 2001 >From: Aleisha <aleishaamohia@hotmail.com> >Date: Fri, 29 Apr 2016 02:47:06 +0000 >Subject: [PATCH] [SIGNED-OFF] Bug 16388: Move option to download report into > reports toolbar >Content-Type: text/plain; charset="utf-8" > >To test: > >1) Create a new SQL report or edit a report >2) Ensure that the download option does NOT show in the toolbar >3) Save and run the report >4) Confirm that download option DOES show in toolbar as a dropdown with > the 3 options (csv, tab and ods) >5) Confirm that downloading all 3 file types works as expected > >Sponsored-by: Catalyst IT >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > .../intranet-tmpl/prog/en/includes/reports-toolbar.inc | 14 +++++++++++++- > .../prog/en/modules/reports/guided_reports_start.tt | 13 ------------- > reports/guided_reports.pl | 1 + > 3 files changed, 14 insertions(+), 14 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 fef1166..a24fcb9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc >@@ -9,7 +9,7 @@ > </div> > [% END %] > >- [% IF ( showsql || execute || editsql || save_successful ) %] >+ [% IF ( showsql || execute || editsql || save_successful || runreport ) %] > [% IF ( CAN_user_reports_create_reports ) %] > [% UNLESS ( editsql ) # Do not show edit button on edit page %] > <div class="btn-group"> >@@ -45,6 +45,18 @@ > </a> > </div> > [% END %] >+ >+ [% IF ( runreport ) %] >+ <div class="btn-group"> >+ <button class="btn btn-small dropdown-toggle" data-toggle="dropdown" id="format"><i class="fa fa-upload"></i> Download <span class="caret"></span></button> >+ <ul class="dropdown-menu"> >+ <li><a id="csv" href="/cgi-bin/koha/reports/guided_reports.pl?reports=1&phase=Export&format=csv&sql=[% sql |uri %]&reportname=[% name |uri %]">Comma separated text</a></li> >+ <li><a id="tab" href="/cgi-bin/koha/reports/guided_reports.pl?reports=1&phase=Export&format=tab&sql=[% sql |uri %]&reportname=[% name |uri %]">Tab separated text</a></li> >+ <li><a id="ods" href="/cgi-bin/koha/reports/guided_reports.pl?reports=1&phase=Export&format=ods&sql=[% sql |uri %]&reportname=[% name |uri %]">Open Document Spreadsheet</a></li> >+ </ul> >+ </div> >+ [% END %] >+ > [% END %] > </div> > >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 066df5f..b01d579 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 >@@ -841,19 +841,6 @@ canned reports and writing custom SQL reports.</p> > </tr> > [% END %] > </table> >-<form action="/cgi-bin/koha/reports/guided_reports.pl" method="post"> >-<fieldset class="action"> >-<label for="format">Download the report: </label> >-<select name="format" id="format"> >-<option value="csv">Comma separated text</option> >-<option value="tab">Tab separated text</option> >-<option value="ods">Open Document Spreadsheet</option> >-</select> >-<input type="hidden" name="sql" value="[% sql |html %]" /> >-<input type="hidden" name="phase" value="Export" /> >-<input type="submit" name="submit" value="Download" /></fieldset> >-<input type="hidden" name="reportname" value="[% name %]" /> >-</form> > [% END %] > [% END %] > >diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl >index 75040f4..8fa0811 100755 >--- a/reports/guided_reports.pl >+++ b/reports/guided_reports.pl >@@ -787,6 +787,7 @@ elsif ($phase eq 'Run this report'){ > $url = join('&sql_params=', $url, map { URI::Escape::uri_escape_utf8($_) } @sql_params); > } > $template->param( >+ 'runreport' => 1, > 'results' => \@rows, > 'sql' => $sql, > 'id' => $report_id, >-- >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 16388
:
50977
|
50990
|
51450
|
51456
|
51473
|
51474