Gets the app version via git. Closes #99
{
$this->checkPermission('settings-manage');
$this->setPageTitle('Settings');
- return view('settings/index');
+
+ // Get application version
+ $version = false;
+ if (function_exists('exec')) {
+ $version = exec('git describe --always --tags ');
+ }
+
+ return view('settings/index', ['version' => $version]);
}
/**
@include('settings/navbar', ['selected' => 'settings'])
-<div class="container small">
+<div class="container small settings-container">
<h1>Settings</h1>
- <form action="/settings" method="POST">
+ <form action="/settings" method="POST" ng-cloak>
{!! csrf_field() !!}
<h3>App Settings</h3>
<hr class="margin-top">
<div class="form-group">
+ <span class="float right muted">
+ BookStack @if(strpos($version, 'v') !== 0) version @endif {{ $version }}
+ </span>
<button type="submit" class="button pos">Save Settings</button>
</div>
</form>