From de39176b6abb09c75dd64004a550960507a70f2f Mon Sep 17 00:00:00 2001 From: iglocska Date: Thu, 29 Aug 2024 07:13:42 +0200 Subject: [PATCH] new: [version] show the cerebrate version and link to the release notes --- src/Controller/AppController.php | 3 +++ templates/element/layouts/header/header-right.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/Controller/AppController.php b/src/Controller/AppController.php index 334f923..28df320 100644 --- a/src/Controller/AppController.php +++ b/src/Controller/AppController.php @@ -145,6 +145,9 @@ class AppController extends Controller } $this->ACL->checkAccess(); + $version = file_get_contents(ROOT . DS . 'src' . DS . 'VERSION.json'); + $version = json_decode($version, true)['version']; + $this->set('cerebrate_version', $version); if (!$this->ParamHandler->isRest()) { $this->set('ajax', $this->request->is('ajax')); $this->request->getParam('prefix'); diff --git a/templates/element/layouts/header/header-right.php b/templates/element/layouts/header/header-right.php index 92686c6..34a83d1 100644 --- a/templates/element/layouts/header/header-right.php +++ b/templates/element/layouts/header/header-right.php @@ -1,4 +1,7 @@
+
+ Cerebrate v +