From e42c9fafdcbb4697b9ff251ec6bbda9d103445f1 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 Signed-off-by: JesseM --- 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 37e400fbb7..f11b7ecd20 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 88852a8522..ee8ee334bb 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.39.2