Bug 42190: Add "Back to normal view"

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2026-04-03 14:22:55 +02:00 committed by Lucas Gass
parent 934e5429f4
commit 040e17a608
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
3 changed files with 11 additions and 7 deletions

View File

@ -179,9 +179,13 @@
[% END %]
</div>
<div class="btn-group">
<a class="btn btn-default fetch_dt_data" href="/cgi-bin/koha/reports/guided_reports.pl?id=[% id | html %]&amp;op=run&amp;reportname=[% name |uri %][% PROCESS params %]&amp;limit=100000&amp;dt=1"
><i class="fa fa-table"></i> Open in DataTables</a
>
[% IF open_in_dt %]
<a class="btn btn-default" href="/cgi-bin/koha/reports/guided_reports.pl?id=[% id | html %]&amp;op=run&amp;reportname=[% name |uri %][% PROCESS params %]"><i class="fa fa-table"></i> Back to the normal view</a>
[% ELSE %]
<a class="btn btn-default" href="/cgi-bin/koha/reports/guided_reports.pl?id=[% id | html %]&amp;op=run&amp;reportname=[% name |uri %][% PROCESS params %]&amp;limit=100000&amp;open_in_dt=1"
><i class="fa fa-table"></i> Open in DataTables</a
>
[% END %]
</div>
[% END %]
[% END %]

View File

@ -1814,7 +1814,7 @@
const tables = [% To.json(tables || []) | $raw %];
const open_in_dt = [% dt ? 1 : 0 | html %];
const open_in_dt = [% open_in_dt ? 1 : 0 | html %];
const execute = [% execute ? 1 : 0 | html %];
</script>
<script nonce="[% Koha.CSPNonce | $raw %]">

View File

@ -795,9 +795,9 @@ if ( $op eq 'run' ) {
}
$template->param(
'limit' => $limit,
'id' => $report_id,
dt => scalar $input->param('dt'),
limit => $limit,
id => $report_id,
open_in_dt => scalar $input->param('open_in_dt'),
);
my ( $sql, $original_sql, $type, $name, $notes );