Bug 23685: (follow-up) Control ODS exporting
The pref ReportsExportFormatODS should be true for exporting to ODS in Reporting. Test plan: Set pref to false value. Check if option is no longer available on report's Download menu. Manipulate URL with op=export&format=ods. No data expected. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
323863ba14
commit
46506c755d
2 changed files with 4 additions and 2 deletions
|
@ -139,7 +139,9 @@
|
|||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" id="csv" href="/cgi-bin/koha/reports/guided_reports.pl?op=export&format=csv&id=[% id | html %]&reportname=[% name |uri %][% PROCESS params %]">[% PROCESS 'delimiter_text.inc' %]</a></li>
|
||||
<li><a class="dropdown-item" id="tab" href="/cgi-bin/koha/reports/guided_reports.pl?op=export&format=tab&id=[% id | html %]&reportname=[% name |uri %][% PROCESS params %]">Tab separated text</a></li>
|
||||
<li><a class="dropdown-item" id="ods" href="/cgi-bin/koha/reports/guided_reports.pl?op=export&format=ods&id=[% id | html %]&reportname=[% name |uri %][% PROCESS params %]">Open Document Spreadsheet</a></li>
|
||||
[% IF Koha.Preference('ReportsExportFormatODS') %]
|
||||
<li><a class="dropdown-item" id="ods" href="/cgi-bin/koha/reports/guided_reports.pl?op=export&format=ods&id=[% id | html %]&reportname=[% name |uri %][% PROCESS params %]">Open Document Spreadsheet</a></li>
|
||||
[% END %]
|
||||
[% IF processed_notice_title %]
|
||||
<li><a class="dropdown-item" id="template" href="/cgi-bin/koha/reports/guided_reports.pl?op=export&format=template&id=[% id | html %]&template=[% template_id | html %]&reportname=[% name |uri %][% PROCESS params %]">Rendered template ([% processed_notice_title | html %])</a></li>
|
||||
[% END %]
|
||||
|
|
|
@ -663,7 +663,7 @@ elsif ($op eq 'export'){
|
|||
}
|
||||
}
|
||||
}
|
||||
elsif ( $format eq 'ods' ) {
|
||||
elsif ( $format eq 'ods' && C4::Context->preference('ReportsExportFormatODS') ) {
|
||||
$type = 'application/vnd.oasis.opendocument.spreadsheet';
|
||||
my $ods_fh = File::Temp->new( UNLINK => 0 );
|
||||
my $ods_filepath = $ods_fh->filename;
|
||||
|
|
Loading…
Reference in a new issue