diff --git a/app/Http/Controllers/Dashboard/SettingsController.php b/app/Http/Controllers/Dashboard/SettingsController.php index eff77855..43d9d3db 100644 --- a/app/Http/Controllers/Dashboard/SettingsController.php +++ b/app/Http/Controllers/Dashboard/SettingsController.php @@ -35,6 +35,18 @@ class SettingsController extends Controller 'icon' => 'ion-gear-b', 'active' => false, ], + 'analytics' => [ + 'title' => trans('dashboard.settings.analytics.analytics'), + 'url' => route('dashboard.settings.analytics'), + 'icon' => 'ion-stats-bars', + 'active' => false, + ], + 'localization' => [ + 'title' => trans('dashboard.settings.localization.localization'), + 'url' => route('dashboard.settings.localization'), + 'icon' => 'ion-earth', + 'active' => false, + ], 'security' => [ 'title' => trans('dashboard.settings.security.security'), 'url' => route('dashboard.settings.security'), @@ -76,6 +88,38 @@ class SettingsController extends Controller ->withSubMenu($this->subMenu); } + /** + * Shows the settings analytics view. + * + * @return \Illuminate\View\View + */ + public function showAnalyticsView() + { + $this->subMenu['analytics']['active'] = true; + + Session::flash('redirect_to', $this->subMenu['analytics']['url']); + + return View::make('dashboard.settings.analytics') + ->withPageTitle('Analytics - Dashboard') + ->withSubMenu($this->subMenu); + } + + /** + * Shows the settings localization view. + * + * @return \Illuminate\View\View + */ + public function showLocalizationView() + { + $this->subMenu['localization']['active'] = true; + + Session::flash('redirect_to', $this->subMenu['localization']['url']); + + return View::make('dashboard.settings.localization') + ->withPageTitle('Localization - Dashboard') + ->withSubMenu($this->subMenu); + } + /** * Shows the settings theme view. * diff --git a/app/Http/Routes/DashboardRoutes.php b/app/Http/Routes/DashboardRoutes.php index 6cd756e3..2022a29f 100644 --- a/app/Http/Routes/DashboardRoutes.php +++ b/app/Http/Routes/DashboardRoutes.php @@ -218,6 +218,14 @@ class DashboardRoutes 'as' => 'setup', 'uses' => 'SettingsController@showSetupView', ]); + $router->get('analytics', [ + 'as' => 'analytics', + 'uses' => 'SettingsController@showAnalyticsView', + ]); + $router->get('localization', [ + 'as' => 'localization', + 'uses' => 'SettingsController@showLocalizationView', + ]); $router->get('security', [ 'as' => 'security', 'uses' => 'SettingsController@showSecurityView', diff --git a/app/Providers/ComposerServiceProvider.php b/app/Providers/ComposerServiceProvider.php index a8ee4234..d6e410fd 100644 --- a/app/Providers/ComposerServiceProvider.php +++ b/app/Providers/ComposerServiceProvider.php @@ -36,7 +36,7 @@ class ComposerServiceProvider extends ServiceProvider $factory->composer(['index', 'incident', 'subscribe'], StatusPageComposer::class); $factory->composer(['index', 'incident', 'subscribe', 'dashboard.settings.theme'], ThemeComposer::class); $factory->composer('dashboard.*', DashboardComposer::class); - $factory->composer(['setup', 'dashboard.settings.app-setup'], TimezoneLocaleComposer::class); + $factory->composer(['setup', 'dashboard.settings.localization'], TimezoneLocaleComposer::class); } /** diff --git a/resources/lang/en/dashboard.php b/resources/lang/en/dashboard.php index 5fe4d771..8ff17fa3 100755 --- a/resources/lang/en/dashboard.php +++ b/resources/lang/en/dashboard.php @@ -163,6 +163,12 @@ return [ 'images-only' => 'Only images may be uploaded.', 'too-big' => 'The file you uploaded is too big. Upload an image smaller than :size', ], + 'analytics' => [ + 'analytics' => 'Analytics' + ], + 'localization' => [ + 'localization' => 'Localization' + ], 'security' => [ 'security' => 'Security', 'two-factor' => 'Users without two-factor authentication', diff --git a/resources/views/dashboard/settings/analytics.blade.php b/resources/views/dashboard/settings/analytics.blade.php new file mode 100644 index 00000000..e9d85228 --- /dev/null +++ b/resources/views/dashboard/settings/analytics.blade.php @@ -0,0 +1,66 @@ +@extends('layout.dashboard') + +@section('content') +
+ @if(isset($sub_menu)) + @include('dashboard.partials.sub-sidebar') + @endif +
+
+ + {{ trans('dashboard.settings.localization.localization') }} + +
+
+
+
+ + @include('dashboard.partials.errors') +
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+
+@stop diff --git a/resources/views/dashboard/settings/app-setup.blade.php b/resources/views/dashboard/settings/app-setup.blade.php index 414bd320..7a77bcb6 100644 --- a/resources/views/dashboard/settings/app-setup.blade.php +++ b/resources/views/dashboard/settings/app-setup.blade.php @@ -43,94 +43,6 @@ -
-
-
- - -
-
-
-
-
-
- - -
-
-
-
-
-
- - -
-
-
-
-
-
- - -
-
-
-
-
-
- - -
-
-
-
-
-
- - -
-
-
-
-
-
- - -
-
-
-
-
-
- - -
-
-
@@ -141,28 +53,34 @@
-
- - - +
+
-
- - - +
+
-
- - - +
+
diff --git a/resources/views/dashboard/settings/localization.blade.php b/resources/views/dashboard/settings/localization.blade.php new file mode 100644 index 00000000..2a99a6a7 --- /dev/null +++ b/resources/views/dashboard/settings/localization.blade.php @@ -0,0 +1,91 @@ +@extends('layout.dashboard') + +@section('content') +
+ @if(isset($sub_menu)) + @include('dashboard.partials.sub-sidebar') + @endif +
+
+ + {{ trans('dashboard.settings.localization.localization') }} + +
+
+
+
+ + @include('dashboard.partials.errors') +
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+
+
+@stop