From fe26ca7b2fa080dad57b017546e702f7c2d57f1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Fromme?= Date: Tue, 14 Jul 2020 17:37:48 +0200 Subject: [PATCH] Display timestamp of latest bpn xml update in backend --- .../ep_products/Classes/Controller/BackendController.php | 9 ++++++++- .../Resources/Private/Templates/Backend/Index.html | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/public/typo3conf/ext/ep_products/Classes/Controller/BackendController.php b/public/typo3conf/ext/ep_products/Classes/Controller/BackendController.php index e49bea12..17072f6a 100644 --- a/public/typo3conf/ext/ep_products/Classes/Controller/BackendController.php +++ b/public/typo3conf/ext/ep_products/Classes/Controller/BackendController.php @@ -91,7 +91,14 @@ class BackendController extends ActionController } public function indexAction() - {} + { + $updatedTimestampPath = GeneralUtility::getFileAbsFileName('fileadmin/xmlexport/.lastupdate'); + if ($updatedTimestampPath && file_exists($updatedTimestampPath)) { + $updatedTimestamp = file_get_contents($updatedTimestampPath); + } + + $this->view->assign('updatedTimestamp', $updatedTimestamp); + } public function importProductsAction() { diff --git a/public/typo3conf/ext/ep_products/Resources/Private/Templates/Backend/Index.html b/public/typo3conf/ext/ep_products/Resources/Private/Templates/Backend/Index.html index 56444728..c5b4538c 100644 --- a/public/typo3conf/ext/ep_products/Resources/Private/Templates/Backend/Index.html +++ b/public/typo3conf/ext/ep_products/Resources/Private/Templates/Backend/Index.html @@ -7,6 +7,9 @@

E&P Funktionen

+

+ Letzter XML Abruf aus BusPro: {f:if(condition: updatedTimestamp, then: updatedTimestamp, else: '-')} +