diff --git a/app/Composers/AppComposer.php b/app/Composers/AppComposer.php index 70ffeb1e..e413a1c6 100644 --- a/app/Composers/AppComposer.php +++ b/app/Composers/AppComposer.php @@ -39,6 +39,8 @@ class AppComposer $view->withAppLocale(Config::get('setting.app_locale')); $view->withAppStylesheet(Config::get('setting.stylesheet')); $view->withAppUrl(Config::get('app.url')); + $view->withAppHeader(Config::get('setting.header')); + $view->withAppFooter(Config::get('setting.footer')); $view->withAppName($name = Config::get('setting.app_name')); $view->withShowSupport($support = Config::get('setting.show_support')); diff --git a/app/Http/Controllers/Dashboard/SettingsController.php b/app/Http/Controllers/Dashboard/SettingsController.php index e5e5766b..f822ca8c 100644 --- a/app/Http/Controllers/Dashboard/SettingsController.php +++ b/app/Http/Controllers/Dashboard/SettingsController.php @@ -56,6 +56,12 @@ class SettingsController extends Controller 'icon' => 'ion-paintbucket', 'active' => false, ], + 'customization' => [ + 'title' => trans('dashboard.settings.customization.customization'), + 'url' => route('dashboard.settings.customization'), + 'icon' => 'ion-wand', + 'active' => false, + ], 'localization' => [ 'title' => trans('dashboard.settings.localization.localization'), 'url' => route('dashboard.settings.localization'), @@ -137,6 +143,22 @@ class SettingsController extends Controller ->withSubMenu($this->subMenu); } + /** + * Shows the settings customization view. + * + * @return \Illuminate\View\View + */ + public function showCustomizationView() + { + $this->subMenu['customization']['active'] = true; + + Session::flash('redirect_to', $this->subMenu['customization']['url']); + + return View::make('dashboard.settings.customization') + ->withPageTitle(trans('dashboard.settings.customization.customization').' - '.trans('dashboard.dashboard')) + ->withSubMenu($this->subMenu); + } + /** * Shows the settings theme view. * diff --git a/app/Http/Routes/DashboardRoutes.php b/app/Http/Routes/DashboardRoutes.php index b0be8c40..d6e81f4f 100644 --- a/app/Http/Routes/DashboardRoutes.php +++ b/app/Http/Routes/DashboardRoutes.php @@ -207,6 +207,10 @@ class DashboardRoutes 'as' => 'stylesheet', 'uses' => 'SettingsController@showStylesheetView', ]); + $router->get('customization', [ + 'as' => 'customization', + 'uses' => 'SettingsController@showCustomizationView', + ]); $router->post('/', 'SettingsController@postSettings'); }); diff --git a/resources/lang/en/dashboard.php b/resources/lang/en/dashboard.php index b20ed8ab..34b4a160 100755 --- a/resources/lang/en/dashboard.php +++ b/resources/lang/en/dashboard.php @@ -199,6 +199,11 @@ return [ 'localization' => [ 'localization' => 'Localization', ], + 'customization' => [ + 'customization' => 'Customization', + 'header' => 'Custom Header HTML', + 'footer' => 'Custom Footer HTML', + ], 'security' => [ 'security' => 'Security', 'two-factor' => 'Users without two-factor authentication', diff --git a/resources/views/dashboard/settings/customization.blade.php b/resources/views/dashboard/settings/customization.blade.php new file mode 100644 index 00000000..7d5277c9 --- /dev/null +++ b/resources/views/dashboard/settings/customization.blade.php @@ -0,0 +1,51 @@ +@extends('layout.dashboard') + +@section('content') +
+ @if(isset($sub_menu)) + @include('dashboard.partials.sub-sidebar') + @endif +
+
+ + {{ trans('dashboard.settings.customization.customization') }} + +
+
+
+
+ + @include('dashboard.partials.errors') +
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+
+
+@stop diff --git a/resources/views/partials/banner.blade.php b/resources/views/partials/banner.blade.php index 9200361b..dc284cde 100644 --- a/resources/views/partials/banner.blade.php +++ b/resources/views/partials/banner.blade.php @@ -1,3 +1,6 @@ +@if($app_header) +{!! $app_header !!} +@else @if($app_banner)
@@ -13,3 +16,4 @@
@endif +@endif diff --git a/resources/views/partials/footer.blade.php b/resources/views/partials/footer.blade.php index bf0df995..220f68ba 100644 --- a/resources/views/partials/footer.blade.php +++ b/resources/views/partials/footer.blade.php @@ -1,3 +1,6 @@ +@if($app_footer) +{!! $app_footer !!} +@else +@endif @include("partials.analytics")