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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc (+3 lines)
Lines 134-139 Link Here
134
                    <li><a id="csv" href="/cgi-bin/koha/reports/guided_reports.pl?reports=1&phase=Export&amp;format=csv&amp;report_id=[% id | html %]&amp;reportname=[% name |uri %][% PROCESS params %]">[% PROCESS 'delimiter_text.inc' %]</a></li>
134
                    <li><a id="csv" href="/cgi-bin/koha/reports/guided_reports.pl?reports=1&phase=Export&amp;format=csv&amp;report_id=[% id | html %]&amp;reportname=[% name |uri %][% PROCESS params %]">[% PROCESS 'delimiter_text.inc' %]</a></li>
135
                    <li><a id="tab" href="/cgi-bin/koha/reports/guided_reports.pl?reports=1&phase=Export&amp;format=tab&amp;report_id=[% id | html %]&amp;reportname=[% name |uri %][% PROCESS params %]">Tab separated text</a></li>
135
                    <li><a id="tab" href="/cgi-bin/koha/reports/guided_reports.pl?reports=1&phase=Export&amp;format=tab&amp;report_id=[% id | html %]&amp;reportname=[% name |uri %][% PROCESS params %]">Tab separated text</a></li>
136
                    <li><a id="ods" href="/cgi-bin/koha/reports/guided_reports.pl?reports=1&phase=Export&amp;format=ods&amp;report_id=[% id | html %]&amp;reportname=[% name |uri %][% PROCESS params %]">Open Document Spreadsheet</a></li>
136
                    <li><a id="ods" href="/cgi-bin/koha/reports/guided_reports.pl?reports=1&phase=Export&amp;format=ods&amp;report_id=[% id | html %]&amp;reportname=[% name |uri %][% PROCESS params %]">Open Document Spreadsheet</a></li>
137
                    [% IF processed_notice_title %]
138
                    <li><a id="template" href="/cgi-bin/koha/reports/guided_reports.pl?reports=1&phase=Export&amp;format=template&amp;report_id=[% id | html %]&amp;template=[% template_id | html %]&amp;reportname=[% name |uri %][% PROCESS params %]">Download as <i>[% processed_notice_title | html %]</i></a></li>
139
                    [% END %]
137
                    [% IF (results.json) %]
140
                    [% IF (results.json) %]
138
                        <li><a id="download-chart" href="#">Chart (.svg)</a></li>
141
                        <li><a id="download-chart" href="#">Chart (.svg)</a></li>
139
                    [% END %]
142
                    [% END %]
(-)a/reports/guided_reports.pl (-2 / +9 lines)
Lines 882-888 elsif ($phase eq 'Run this report'){ Link Here
882
                    my ( $sth2, $errors2 ) = execute_query( { sql => $sql, report_id => $report_id } );
882
                    my ( $sth2, $errors2 ) = execute_query( { sql => $sql, report_id => $report_id } );
883
                    my $data = $sth2->fetchall_arrayref({});
883
                    my $data = $sth2->fetchall_arrayref({});
884
                    my $notice_rendered = process_tt( $notice_template->content, { data => $data, report_id => $report_id } );
884
                    my $notice_rendered = process_tt( $notice_template->content, { data => $data, report_id => $report_id } );
885
                    $template->param( processed_notice => $notice_rendered );
885
                    my $title_rendered = process_tt( $notice_template->title, { data => $data, report_id => $report_id } );
886
                    $template->param( template_id => $template_id, processed_notice => $notice_rendered, processed_notice_title => $title_rendered );
886
                }
887
                }
887
888
888
                $template->param(
889
                $template->param(
Lines 981-986 elsif ($phase eq 'Export'){ Link Here
981
                $content .= $_ while <$ods_fh>;
982
                $content .= $_ while <$ods_fh>;
982
                unlink $ods_filepath;
983
                unlink $ods_filepath;
983
            }
984
            }
985
            elsif ( $format eq 'template' ) {
986
                my $template_id = $input->param('template');
987
                my $notice_template = Koha::Notice::Templates->find($template_id);
988
                my $data = $sth->fetchall_arrayref({});
989
                $content = process_tt( $notice_template->content, { data => $data, report_id => $report_id, for_download => 1 } );
990
                $reportfilename = process_tt( $notice_template->title, { data => $data, report_id => $report_id } );
991
            }
984
        }
992
        }
985
        print $input->header(
993
        print $input->header(
986
            -type => $type,
994
            -type => $type,
987
- 

Return to bug 34456