Display the current version in the settings sidebar. Closes #1061

This commit is contained in:
James Brooks
2015-11-04 15:07:58 +00:00
parent f5964bef8e
commit 3b7308dccd
3 changed files with 9 additions and 0 deletions

1
VERSION Normal file
View File

@@ -0,0 +1 @@
2.0.0-RC1

View File

@@ -81,6 +81,12 @@ class SettingsController extends Controller
'icon' => 'ion-paintbucket',
'active' => false,
],
'about' => [
'title' => CACHET_VERSION,
'url' => 'javascript: void(0);',
'icon' => 'ion-flag',
'active' => false,
],
];
View::share([

View File

@@ -28,6 +28,8 @@ class AppServiceProvider extends ServiceProvider
return Dispatcher::simpleMapping($command, 'CachetHQ\Cachet', 'CachetHQ\Cachet\Handlers');
});
define('CACHET_VERSION', trim(file_get_contents($this->app->basePath().'/VERSION')));
Str::macro('canonicalize', function ($url) {
return preg_replace('/([^\/])$/', '$1/', $url);
});