Bugzilla – Attachment 50990 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]
Bug 16388: Move option to download report into reports toolbar
Bug-16388-Move-option-to-download-report-into-repo.patch (text/plain), 4.41 KB, created by
Marc Véron
on 2016-04-29 13:09:15 UTC
(
hide
)
Description:
Bug 16388: Move option to download report into reports toolbar
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2016-04-29 13:09:15 UTC
Size:
4.41 KB
patch
obsolete
>From 8c58d3c60d0dae85763816f6e31a1a0745d489b3 Mon Sep 17 00:00:00 2001 >From: Aleisha <aleishaamohia@hotmail.com> >Date: Fri, 29 Apr 2016 02:47:06 +0000 >Subject: [PATCH] Bug 16388: Move option to download report into reports > toolbar >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >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 >5) Confirm that downloading all 3 file types works as expected > >Sponsored-by: Catalyst IT > >Signed-off-by: Marc Véron <veron@veron.ch> >--- > .../prog/en/includes/reports-toolbar.inc | 25 +++++++++++++++++++- > .../en/modules/reports/guided_reports_start.tt | 13 ---------- > reports/guided_reports.pl | 1 + > 3 files changed, 25 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..f96895d 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,29 @@ > </a> > </div> > [% END %] >+ >+ [% IF ( runreport ) %] >+ <div class="btn-group"> >+ <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post"> >+ <fieldset class="action"> >+ <div class="btn-group"> >+ <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> >+ </div> >+ <div class="btn-group"> >+ <input type="hidden" name="sql" value="[% sql |html %]" /> >+ <input type="hidden" name="phase" value="Export" /> >+ <button type="submit" name="submit" class="btn btn-small"><i class="fa fa-upload"></i> Download</button> >+ </div> >+ </fieldset> >+ <input type="hidden" name="reportname" value="[% name %]" /> >+ </form> >+ </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 bbc539b..6afd477 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 >@@ -840,19 +840,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, >-- >1.7.10.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