diff --git a/controllers/BaseController.php b/controllers/BaseController.php index 1be5a153..ca65c5b7 100644 --- a/controllers/BaseController.php +++ b/controllers/BaseController.php @@ -13,7 +13,9 @@ class BaseController $this->Database = $databaseService->GetDbConnection(); $applicationService = new ApplicationService(); - $container->view->set('version', $applicationService->GetInstalledVersion()); + $versionInfo = $applicationService->GetInstalledVersion(); + $container->view->set('version', $versionInfo->Version); + $container->view->set('releaseDate', $versionInfo->ReleaseDate); $localizationService = new LocalizationService(CULTURE); $container->view->set('localizationStrings', $localizationService->GetCurrentCultureLocalizations()); diff --git a/localization/de.php b/localization/de.php index ab3b43d8..4237002d 100644 --- a/localization/de.php +++ b/localization/de.php @@ -161,5 +161,6 @@ return array( '#1 batteries are due to be charged within the next #2 days' => '#1 Batterien müssen in den nächsten #2 Tagen geladen werden', '#1 batteries are overdue to be charged' => '#1 Batterien sind überfällig', '#1 habits are due to be done within the next #2 days' => '#1 Gewohnheiten stehen in den nächsten #2 Tagen an', - '#1 habits are overdue to be done' => '#1 Gewohnheiten sind überfällig' + '#1 habits are overdue to be done' => '#1 Gewohnheiten sind überfällig', + 'Released on' => 'Veröffentlicht am' ); diff --git a/services/ApplicationService.php b/services/ApplicationService.php index 224d07ed..3be2e60f 100644 --- a/services/ApplicationService.php +++ b/services/ApplicationService.php @@ -13,14 +13,11 @@ class ApplicationService extends BaseService } private $InstalledVersion; - /** - * @return string - */ public function GetInstalledVersion() { if ($this->InstalledVersion == null) { - $this->InstalledVersion = preg_replace("/\r|\n/", '', file_get_contents(__DIR__ . '/../version.txt')); + $this->InstalledVersion = json_decode(file_get_contents(__DIR__ . '/../version.json')); } return $this->InstalledVersion; diff --git a/version.json b/version.json new file mode 100644 index 00000000..3a8d70f8 --- /dev/null +++ b/version.json @@ -0,0 +1,4 @@ +{ + "Version": "1.10.0", + "ReleaseDate": "2018-05-12" +} diff --git a/version.txt b/version.txt deleted file mode 100644 index 8fdcf386..00000000 --- a/version.txt +++ /dev/null @@ -1 +0,0 @@ -1.9.2 diff --git a/views/layout/default.blade.php b/views/layout/default.blade.php index f541776b..dd2ae991 100644 --- a/views/layout/default.blade.php +++ b/views/layout/default.blade.php @@ -86,14 +86,13 @@