From 54746051d506e6e6c76c77b85d381cae4bf86b89 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 19 Feb 2015 11:56:05 +0100 Subject: [PATCH] DB-Upgrade-Warnung: Einzuspielende Datenbankupgrades optional anzeigen --- SL/User.pm | 6 +++--- locale/de/all | 2 ++ templates/webpages/dbupgrade/warning.html | 20 ++++++++++++++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/SL/User.pm b/SL/User.pm index 42622f8fd..f077eefe8 100644 --- a/SL/User.pm +++ b/SL/User.pm @@ -124,10 +124,10 @@ sub login { $self->create_schema_info_table($form, $dbh); my $dbupdater = SL::DBUpgrade2->new(form => $form)->parse_dbupdate_controls; - my $update_available = $dbupdater->update2_available($dbh); + my @unapplied_scripts = $dbupdater->unapplied_upgrade_scripts($dbh); $dbh->disconnect; - if (!$update_available) { + if (!@unapplied_scripts) { SL::DB::Manager::Employee->update_entries_for_authorized_users; return LOGIN_OK(); } @@ -142,7 +142,7 @@ sub login { $form->{dbupdate} = "db" . $::auth->client->{dbname}; if ($form->{"show_dbupdate_warning"}) { - print $form->parse_html_template("dbupgrade/warning"); + print $form->parse_html_template("dbupgrade/warning", { unapplied_scripts => \@unapplied_scripts }); ::end_of_request(); } diff --git a/locale/de/all b/locale/de/all index 187d18187..6127e1429 100755 --- a/locale/de/all +++ b/locale/de/all @@ -1464,6 +1464,7 @@ $self->{texts} = { 'List of bank collections' => 'Bankeinzugsliste', 'List of bank transfers' => 'Überweisungsliste', 'List of custom variables' => 'Liste der benutzerdefinierten Variablen', + 'List of database upgrades to be applied:' => 'Liste der noch einzuspielenden Datenbankupgrades:', 'List of tax zones' => 'Liste der Steuerzonen', 'List open SEPA exports' => 'Noch nicht ausgeführte SEPA-Exporte anzeigen', 'Load draft' => 'Entwurf laden', @@ -2798,6 +2799,7 @@ $self->{texts} = { 'To Date' => 'Bis', 'To continue please change the taxkey 0 to another value.' => 'Um fortzufahren, ändern Sie bitte den Steuerschlüssel 0 auf einen anderen Wert.', 'To user login' => 'Zum Benutzerlogin', + 'Toggle details' => 'Details anzeigen/verbergen', 'Toggle marker' => 'Markierung umschalten', 'Top' => 'Oben', 'Top (CSS)' => 'Oben (mit CSS)', diff --git a/templates/webpages/dbupgrade/warning.html b/templates/webpages/dbupgrade/warning.html index 3a4ea59c8..02948797a 100644 --- a/templates/webpages/dbupgrade/warning.html +++ b/templates/webpages/dbupgrade/warning.html @@ -14,3 +14,23 @@ + +

+ [% LxERP.t8('Toggle details') %] +

+ + -- 2.20.1