new: [version] show the cerebrate version and link to the release notes

pull/184/head
iglocska 2024-08-29 07:13:42 +02:00
parent dc880b1b39
commit de39176b6a
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
2 changed files with 6 additions and 0 deletions

View File

@ -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');

View File

@ -1,4 +1,7 @@
<div class="d-flex">
<div class="global-search-container d-md-block d-none me-4">
<span><a style="text-decoration: none" class="link-light" href="https://cerebrate-project.org">Cerebrate</a> <a style="text-decoration: none" class="link-light" href="https://github.com/cerebrate-project/cerebrate/releases/tag/v<?= h($cerebrate_version) ?>">v<?= h($cerebrate_version) ?></a></span>
</div>
<div class="global-search-container d-md-block d-none">
<span class="search-input-container">
<input type="text" class="form-control d-inline-block" id="globalSearch" placeholder="<?= __('Search in Cerebrate...') ?>">