Bug 16388: Move option to download report into reports toolbar
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> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
This commit is contained in:
parent
5ba5f9e0c5
commit
e7ac7abf16
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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 %]
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue