View | Details | Raw Unified | Return to bug 16388
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc (-1 / +24 lines)
Lines 9-15 Link Here
9
        </div>
9
        </div>
10
    [% END %]
10
    [% END %]
11
11
12
    [% IF ( showsql || execute || editsql || save_successful ) %]
12
    [% IF ( showsql || execute || editsql || save_successful || runreport ) %]
13
        [% IF ( CAN_user_reports_create_reports ) %]
13
        [% IF ( CAN_user_reports_create_reports ) %]
14
            [% UNLESS ( editsql ) # Do not show edit button on edit page %]
14
            [% UNLESS ( editsql ) # Do not show edit button on edit page %]
15
                <div class="btn-group">
15
                <div class="btn-group">
Lines 45-50 Link Here
45
                </a>
45
                </a>
46
            </div>
46
            </div>
47
        [% END %]
47
        [% END %]
48
49
        [% IF ( runreport ) %]
50
            <div class="btn-group">
51
                <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
52
                    <fieldset class="action">
53
                        <div class="btn-group">
54
                            <select name="format" id="format">
55
                                <option value="csv">Comma separated text</option>
56
                                <option value="tab">Tab separated text</option>
57
                                <option value="ods">Open Document Spreadsheet</option>
58
                            </select>
59
                        </div>
60
                        <div class="btn-group">
61
                            <input type="hidden" name="sql" value="[% sql |html %]" />
62
                            <input type="hidden" name="phase" value="Export" />
63
                            <button type="submit" name="submit" class="btn btn-small"><i class="fa fa-upload"></i> Download</button>
64
                        </div>
65
                    </fieldset>
66
                    <input type="hidden" name="reportname" value="[% name %]" />
67
                </form>
68
            </div>
69
        [% END %]
70
48
    [% END %]
71
    [% END %]
49
</div>
72
</div>
50
73
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (-13 lines)
Lines 827-845 canned reports and writing custom SQL reports.</p> Link Here
827
</tr>
827
</tr>
828
[% END %]
828
[% END %]
829
</table>
829
</table>
830
<form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
831
<fieldset class="action">
832
<label for="format">Download the report: </label>
833
<select name="format" id="format">
834
<option value="csv">Comma separated text</option>
835
<option value="tab">Tab separated text</option>
836
<option value="ods">Open Document Spreadsheet</option>
837
</select>
838
<input type="hidden" name="sql" value="[% sql |html %]" />
839
<input type="hidden" name="phase" value="Export" />
840
<input type="submit" name="submit" value="Download" /></fieldset>
841
<input type="hidden" name="reportname" value="[% name %]" />
842
</form>
843
[% END %]
830
[% END %]
844
[% END %]
831
[% END %]
845
832
(-)a/reports/guided_reports.pl (-1 / +1 lines)
Lines 787-792 elsif ($phase eq 'Run this report'){ Link Here
787
                $url = join('&amp;sql_params=', $url, map { URI::Escape::uri_escape_utf8($_) } @sql_params);
787
                $url = join('&amp;sql_params=', $url, map { URI::Escape::uri_escape_utf8($_) } @sql_params);
788
            }
788
            }
789
            $template->param(
789
            $template->param(
790
                'runreport' => 1,
790
                'results' => \@rows,
791
                'results' => \@rows,
791
                'sql'     => $sql,
792
                'sql'     => $sql,
792
                'id'      => $report_id,
793
                'id'      => $report_id,
793
- 

Return to bug 16388