Skip to content

Commit

Permalink
new: [version] show the cerebrate version and link to the release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
iglocska committed Aug 29, 2024
1 parent dc880b1 commit de39176
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Controller/AppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ public function beforeFilter(EventInterface $event)
}

$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');
Expand Down
3 changes: 3 additions & 0 deletions templates/element/layouts/header/header-right.php
Original file line number Diff line number Diff line change
@@ -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...') ?>">
Expand Down

0 comments on commit de39176

Please sign in to comment.