From 186ea7e8c37e02a0713dc7b712c0896dd94a0be4 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Mon, 7 Mar 2016 11:58:10 +0000 Subject: [PATCH 1/2] Updated dependencies --- composer.lock | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/composer.lock b/composer.lock index 10e93dc8..bb6dd3cc 100644 --- a/composer.lock +++ b/composer.lock @@ -1982,16 +1982,16 @@ }, { "name": "mccool/laravel-auto-presenter", - "version": "v4.2.1", + "version": "4.2.1", "source": { "type": "git", "url": "https://github.com/laravel-auto-presenter/laravel-auto-presenter.git", - "reference": "48649d3f98e369c2e0922ef37190dd15812a292a" + "reference": "c385b113696dfc564869c54f5c4baba5e116a3be" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/laravel-auto-presenter/laravel-auto-presenter/zipball/c385b113696dfc564869c54f5c4baba5e116a3be", - "reference": "48649d3f98e369c2e0922ef37190dd15812a292a", + "reference": "c385b113696dfc564869c54f5c4baba5e116a3be", "shasum": "" }, "require": { @@ -2040,20 +2040,20 @@ "lpm", "presenter" ], - "time": "2016-01-24 11:06:03" + "time": "2016-01-30 14:04:34" }, { "name": "monolog/monolog", - "version": "1.17.2", + "version": "1.18.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "bee7f0dc9c3e0b69a6039697533dca1e845c8c24" + "reference": "e19b764b5c855580e8ffa7e615f72c10fd2f99cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/bee7f0dc9c3e0b69a6039697533dca1e845c8c24", - "reference": "bee7f0dc9c3e0b69a6039697533dca1e845c8c24", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/e19b764b5c855580e8ffa7e615f72c10fd2f99cc", + "reference": "e19b764b5c855580e8ffa7e615f72c10fd2f99cc", "shasum": "" }, "require": { @@ -2082,6 +2082,7 @@ "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", "ext-mongo": "Allow sending log messages to a MongoDB server", "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", "php-console/php-console": "Allow sending log messages to Google Chrome", "raven/raven": "Allow sending log messages to a Sentry server", "rollbar/rollbar": "Allow sending log messages to Rollbar", @@ -2091,7 +2092,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.16.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -2117,7 +2118,7 @@ "logging", "psr-3" ], - "time": "2015-10-14 12:51:02" + "time": "2016-03-01 18:00:40" }, { "name": "mtdowling/cron-expression", @@ -3848,7 +3849,7 @@ ], "authors": [ { - "name": "Francois Zaninotto" + "name": "François Zaninotto" } ], "description": "Faker is a PHP library that generates fake data for you.", From 5fa698f5b73b810e571e2a963e78de2b6518b88c Mon Sep 17 00:00:00 2001 From: James Brooks Date: Tue, 8 Mar 2016 15:00:29 +0000 Subject: [PATCH 2/2] Custom headers and footers! Closes #1594 --- app/Composers/AppComposer.php | 2 + .../Dashboard/SettingsController.php | 22 ++++++++ app/Http/Routes/DashboardRoutes.php | 4 ++ resources/lang/en/dashboard.php | 5 ++ .../settings/customization.blade.php | 51 +++++++++++++++++++ resources/views/partials/banner.blade.php | 4 ++ resources/views/partials/footer.blade.php | 4 ++ 7 files changed, 92 insertions(+) create mode 100644 resources/views/dashboard/settings/customization.blade.php 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")