From db29c04b0f8dc50b2277bc6b1e9ae8dc67b5a0c2 Mon Sep 17 00:00:00 2001 From: Christian Fasching Date: Tue, 18 Jun 2024 11:19:09 +0200 Subject: [PATCH] [Improvement]: Consider & showing Platform Version when installed (#568) --- public/js/pimcore/helpers.js | 10 ++++++++-- public/js/pimcore/startup.js | 1 + src/Controller/Admin/IndexController.php | 2 ++ templates/admin/index/index.html.twig | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/public/js/pimcore/helpers.js b/public/js/pimcore/helpers.js index 58df6a399e..0391379402 100644 --- a/public/js/pimcore/helpers.js +++ b/public/js/pimcore/helpers.js @@ -2483,8 +2483,14 @@ pimcore.helpers.showAbout = function () { var html = '
'; html += '

'; - html += '
Version: ' + pimcore.settings.version + ''; - html += '
Git Hash: ' + pimcore.settings.build + ''; + + if(pimcore.settings.platform_version) { + html += '
Platform Version: ' + pimcore.settings.platform_version + ''; + } else { + html += '
Core Version: ' + pimcore.settings.version + ''; + } + + html += '

© by pimcore GmbH (pimcore.com)'; html += '

License | '; html += 'Contact'; diff --git a/public/js/pimcore/startup.js b/public/js/pimcore/startup.js index 87e2107629..c2df2747d3 100644 --- a/public/js/pimcore/startup.js +++ b/public/js/pimcore/startup.js @@ -584,6 +584,7 @@ Ext.onReady(function () { data.append('id', pimcore.settings.instanceId); data.append('revision', pimcore.settings.build); data.append('version', pimcore.settings.version); + data.append('platform_version', pimcore.settings.platform_version); data.append('debug', pimcore.settings.debug); data.append('devmode', pimcore.settings.devmode); data.append('environment', pimcore.settings.environment); diff --git a/src/Controller/Admin/IndexController.php b/src/Controller/Admin/IndexController.php index 73055b34b7..dc3c4b3e1c 100644 --- a/src/Controller/Admin/IndexController.php +++ b/src/Controller/Admin/IndexController.php @@ -146,6 +146,7 @@ public function statisticsAction(Request $request, Connection $db, KernelInterfa 'pimcore_major_version' => Version::getMajorVersion(), 'pimcore_version' => Version::getVersion(), 'pimcore_hash' => Version::getRevision(), + 'pimcore_platform_version' => Version::getPlatformVersion(), 'php_version' => PHP_VERSION, 'mysql_version' => $mysqlVersion, 'bundles' => array_keys($kernel->getBundles()), @@ -215,6 +216,7 @@ protected function buildPimcoreSettings( 'instanceId' => $this->getInstanceId(), 'version' => Version::getVersion(), 'build' => Version::getRevision(), + 'platform_version' => Version::getPlatformVersion(), 'debug' => \Pimcore::inDebugMode(), 'devmode' => \Pimcore::inDevMode(), 'disableMinifyJs' => \Pimcore::disableMinifyJs(), diff --git a/templates/admin/index/index.html.twig b/templates/admin/index/index.html.twig index c791d0ec1f..e318b139ac 100644 --- a/templates/admin/index/index.html.twig +++ b/templates/admin/index/index.html.twig @@ -147,7 +147,7 @@ {% endblock %} -
+
BE RESPECTFUL AND HONOR OUR WORK FOR FREE & OPEN SOURCE SOFTWARE BY NOT REMOVING OUR LOGO. WE OFFER YOU THE POSSIBILITY TO ADDITIONALLY ADD YOUR OWN LOGO IN PIMCORE'S SYSTEM SETTINGS. THANK YOU!