From 9cd5c461ba9556b2da3db71303930b6e41aa1dba Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 20 Dec 2017 11:13:20 +0100 Subject: [PATCH] Versionsnummer nach Login wieder anzeigen MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Templates, die von alten Controllern über `$::form->parse_html_template` ausgegeben haben, verfügen nicht über ein `FORM`-Objekt (siehe `Form::prepare_html_template`). Also die Version außerhalb des Templates via `$::form->read_version` auslesen und ans Template übergeben. --- bin/mozilla/login.pl | 2 +- templates/webpages/login/company_logo.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/mozilla/login.pl b/bin/mozilla/login.pl index a8305cfcc..0121b933a 100644 --- a/bin/mozilla/login.pl +++ b/bin/mozilla/login.pl @@ -60,7 +60,7 @@ sub company_logo { # create the logo screen $form->header() unless $form->{noheader}; - print $form->parse_html_template('login/company_logo'); + print $form->parse_html_template('login/company_logo', { version => $::form->read_version }); $main::lxdebug->leave_sub(); } diff --git a/templates/webpages/login/company_logo.html b/templates/webpages/login/company_logo.html index 95c6eca5f..bfb40167a 100644 --- a/templates/webpages/login/company_logo.html +++ b/templates/webpages/login/company_logo.html @@ -9,7 +9,7 @@
- + [%- IF git_head %]

[%- LxERP.t8("Git revision: #1, #2 #3", git_head.hash.substr(0, 7), git_head.author_date.to_kivitendo, git_head.author_date.strftime('%H:%M:%S %Z')) %]

-- 2.20.1