Dan Brown

Added bookstack version in settings

Gets the app version via git. Closes #99
...@@ -15,7 +15,14 @@ class SettingController extends Controller ...@@ -15,7 +15,14 @@ class SettingController extends Controller
15 { 15 {
16 $this->checkPermission('settings-manage'); 16 $this->checkPermission('settings-manage');
17 $this->setPageTitle('Settings'); 17 $this->setPageTitle('Settings');
18 - return view('settings/index'); 18 +
19 + // Get application version
20 + $version = false;
21 + if (function_exists('exec')) {
22 + $version = exec('git describe --always --tags ');
23 + }
24 +
25 + return view('settings/index', ['version' => $version]);
19 } 26 }
20 27
21 /** 28 /**
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
4 4
5 @include('settings/navbar', ['selected' => 'settings']) 5 @include('settings/navbar', ['selected' => 'settings'])
6 6
7 -<div class="container small"> 7 +<div class="container small settings-container">
8 8
9 <h1>Settings</h1> 9 <h1>Settings</h1>
10 10
11 - <form action="/settings" method="POST"> 11 + <form action="/settings" method="POST" ng-cloak>
12 {!! csrf_field() !!} 12 {!! csrf_field() !!}
13 13
14 <h3>App Settings</h3> 14 <h3>App Settings</h3>
...@@ -94,6 +94,9 @@ ...@@ -94,6 +94,9 @@
94 <hr class="margin-top"> 94 <hr class="margin-top">
95 95
96 <div class="form-group"> 96 <div class="form-group">
97 + <span class="float right muted">
98 + BookStack @if(strpos($version, 'v') !== 0) version @endif {{ $version }}
99 + </span>
97 <button type="submit" class="button pos">Save Settings</button> 100 <button type="submit" class="button pos">Save Settings</button>
98 </div> 101 </div>
99 </form> 102 </form>
......