+++ /dev/null
-package SL::Controller::DebugMenu;
-
-use strict;
-use parent qw(SL::Controller::Base);
-
-# safety
-__PACKAGE__->run_before(sub { die 'not allowed in config' unless $::lx_office_conf{debug}{show_debug_menu}; });
-
-sub action_reload {
- my ($self, %params) = @_;
-
- print $::request->{cgi}->redirect('controller.pl?action=FrameHeader/header');
- exit;
-}
-
-sub action_toggle {
- my ($self, %params) = @_;
-
- $::lxdebug->level_by_name($::form->{level}, !$::lxdebug->level_by_name($::form->{level}));
- print $::request->{cgi}->redirect('controller.pl?action=FrameHeader/header');
- return;
-}
-
-1;
+++ /dev/null
-package SL::Controller::FrameHeader;
-
-use strict;
-use parent qw(SL::Controller::Base);
-
-sub action_header {
- my ($self) = @_;
-
- $::form->use_stylesheet('frame_header/header.css');
- $self->render('menu/header', { partial => 1, no_output => 1 },
- now => DateTime->now_local,
- is_fastcgi => scalar($::dispatcher->interface_type =~ /fastcgi/i),
- is_links => scalar($ENV{HTTP_USER_AGENT} =~ /links/i));
-}
-
-1;
# This does trigger:
$::form->{some_hash} = { something => 'else' };
-=item C<show_debug_menu>
-
-A boolean (C<1> or C<0>). If turned on then certain debug facilities
-are available from the v1 menu. These include e.g.
-
-=over 6
-
-=item *
-
-restarting the FastCGI process by forcefully exiting after the
-request,
-
-=item *
-
-enabling and disabling function tracing,
-
-=item *
-
-enabling and disabling certain debug levels.
-
-=back
-
-Note that these are only useful if kivitendo is running as a FastCGI
-application because otherwise the changes would be lost when the
-process exits in a normal CGI environment.
-
=item C<keep_temp_files>
A boolean (C<1> or C<0>). If turned on then certain temporary files
# default.
watch_form = 0
-# Include menu options for debugging in the HTML menu. Works only in
-# FastCGI mode.
-show_debug_menu = 0
-
# If you want to debug the creation of LaTeX files then set this to 1.
# That way the temporary LaTeX files created during PDF creation are
# not removed and remain in the "users" directory.
[<a href="Javascript:top.history.back();" title="[% 'Go one step back' | $T8 %]">[% 'Back' | $T8 %]</a>]
[<a href="Javascript:top.history.forward();" title="[% 'Go one step forward' | $T8 %]">[% 'Fwd' | $T8 %]</a>]
</span>
-[%- END %]
-[% IF is_fastcgi && LXCONFIG.debug.show_debug_menu %]
- <span class="frame-header-element frame-header-center">
- Debug:
- [<a href='controller.pl?action=DebugMenu/reload'>FCGI Reload</a>]
- [<a href='controller.pl?action=DebugMenu/toggle&level=request_timer'>[% IF LXDEBUG.level_by_name('request_timer') %]<b>Timing</b>[% ELSE %]Timing[% END %]</a>]
- [<a href='controller.pl?action=DebugMenu/toggle&level=trace'>[% IF LXDEBUG.level_by_name('trace') %]<b>Trace</b>[% ELSE %]Trace[% END %]</a>]
- [<a href='controller.pl?action=DebugMenu/toggle&level=query'>[% IF LXDEBUG.level_by_name('query') %]<b>Query</b>[% ELSE %]Query[% END %]</a>]
- [<a href='controller.pl?action=DebugMenu/toggle&level=warn'>[% IF LXDEBUG.level_by_name('warn') %]<b>Warnings</b>[% ELSE %]Warnings[% END %]</a>]
- </span>
[%- END %]
<span class="frame-header-element frame-header-right">
[% 'User' | $T8 %]: