From dd65577383382a2cb3b9b77b80a664d0f6cc26d3 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Mon, 26 Feb 2024 16:36:29 +0000 Subject: [PATCH] Bug 36039: New 'datatabase audit' tab in about page Signed-off-by: Martin Renvoize --- about.pl | 6 ++++++ koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/about.pl b/about.pl index 37e400fbb77..f11b7ecd203 100755 --- a/about.pl +++ b/about.pl @@ -906,4 +906,10 @@ if ( $tab eq 'history' ) { } } +if ( $tab eq 'database' ) { + use Koha::Database::Auditor; + my $db_auditor = Koha::Database::Auditor->new( { is_cli => 0 } ); + my $audit_diff = $db_auditor->run; + $template->param( audit_diff => $audit_diff, audit_warning => $db_auditor->get_warning ); +} output_html_with_http_headers $query, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt index 88852a85221..ee8ee334bb2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -41,6 +41,7 @@ [% WRAPPER tab_item linktab = 1 tabname = "translations" bt_active = tab == "translations" %] Translations [% END %] [% WRAPPER tab_item linktab = 1 tabname = "history" bt_active = tab == "history" %] Timeline [% END %] [% WRAPPER tab_item linktab = 1 tabname = "dedications" bt_active = tab == "dedications" %] Dedications [% END %] + [% WRAPPER tab_item linktab = 1 tabname = "database" bt_active = tab == "database" %] Database audit [% END %] [% END %] [% WRAPPER tab_panels %] [% SWITCH tab %] @@ -52,6 +53,7 @@ [% CASE 'translations' %] [% PROCESS translations_panel %] [% CASE 'history' %] [% PROCESS history_panel %] [% CASE 'dedications' %] [% PROCESS dedications_panel %] + [% CASE 'database' %] [% PROCESS database_panel %] [% CASE %] [% PROCESS about_panel %] [% END %] [% END %] @@ -1341,3 +1343,14 @@

[% END # tab=dedications %] [% END %] + +[% BLOCK database_panel %] + [% WRAPPER tab_panel tabname= "database" bt_active = 1 %] +

Database audit

+

Run the following SQL to fix the database:

+ + [% audit_diff | html %] + +

[% audit_warning | html %]

+ [% END # tab=database %] +[% END %] \ No newline at end of file -- 2.44.0