Skip to content

Commit de39176

Browse files
committed
new: [version] show the cerebrate version and link to the release notes
1 parent dc880b1 commit de39176

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/Controller/AppController.php

+3
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ public function beforeFilter(EventInterface $event)
145145
}
146146

147147
$this->ACL->checkAccess();
148+
$version = file_get_contents(ROOT . DS . 'src' . DS . 'VERSION.json');
149+
$version = json_decode($version, true)['version'];
150+
$this->set('cerebrate_version', $version);
148151
if (!$this->ParamHandler->isRest()) {
149152
$this->set('ajax', $this->request->is('ajax'));
150153
$this->request->getParam('prefix');

templates/element/layouts/header/header-right.php

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
<div class="d-flex">
2+
<div class="global-search-container d-md-block d-none me-4">
3+
<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>
4+
</div>
25
<div class="global-search-container d-md-block d-none">
36
<span class="search-input-container">
47
<input type="text" class="form-control d-inline-block" id="globalSearch" placeholder="<?= __('Search in Cerebrate...') ?>">

0 commit comments

Comments
 (0)