Bug 16388: Use existing 'execute' parameter instead of creating a new one

An existing 'execute' parameter is already passed to the template when
we need to display the 'Download' button, so let's use it instead of
creating a new one.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2016-05-13 15:28:50 +01:00 committed by Brendan Gallagher
parent e7ac7abf16
commit c2f53bd039
2 changed files with 2 additions and 3 deletions

View file

@ -9,7 +9,7 @@
</div>
[% END %]
[% IF ( showsql || execute || editsql || save_successful || runreport ) %]
[% IF ( showsql || execute || editsql || save_successful ) %]
[% IF ( CAN_user_reports_create_reports ) %]
[% UNLESS ( editsql ) # Do not show edit button on edit page %]
<div class="btn-group">
@ -46,7 +46,7 @@
</div>
[% END %]
[% IF ( runreport ) %]
[% IF ( execute ) %]
<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">

View file

@ -787,7 +787,6 @@ elsif ($phase eq 'Run this report'){
$url = join('&amp;sql_params=', $url, map { URI::Escape::uri_escape_utf8($_) } @sql_params);
}
$template->param(
'runreport' => 1,
'results' => \@rows,
'sql' => $sql,
'id' => $report_id,