From deeb40cd48e3f49f358bd4851ec19a9c17b08f91 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Thu, 14 Jun 2018 20:27:42 +0100 Subject: [PATCH] Move errors partial out of dashboard dir to prevent DashboardComposer running --- .../views/dashboard/components/add.blade.php | 2 +- .../views/dashboard/components/edit.blade.php | 2 +- .../dashboard/components/groups/add.blade.php | 2 +- .../dashboard/components/groups/edit.blade.php | 2 +- .../dashboard/components/groups/index.blade.php | 2 +- .../views/dashboard/components/index.blade.php | 2 +- resources/views/dashboard/incidents/add.blade.php | 2 +- .../views/dashboard/incidents/edit.blade.php | 2 +- .../views/dashboard/incidents/index.blade.php | 2 +- .../dashboard/incidents/updates/add.blade.php | 2 +- .../dashboard/incidents/updates/edit.blade.php | 2 +- .../dashboard/incidents/updates/index.blade.php | 2 +- .../views/dashboard/maintenance/add.blade.php | 2 +- .../views/dashboard/maintenance/edit.blade.php | 2 +- .../views/dashboard/maintenance/index.blade.php | 2 +- resources/views/dashboard/metrics/add.blade.php | 2 +- resources/views/dashboard/metrics/edit.blade.php | 2 +- resources/views/dashboard/metrics/index.blade.php | 2 +- .../views/dashboard/partials/errors.blade.php | 15 --------------- .../views/dashboard/settings/analytics.blade.php | 2 +- .../views/dashboard/settings/app-setup.blade.php | 2 +- .../dashboard/settings/customization.blade.php | 2 +- .../dashboard/settings/localization.blade.php | 2 +- resources/views/dashboard/settings/mail.blade.php | 2 +- .../views/dashboard/settings/security.blade.php | 2 +- .../views/dashboard/settings/stylesheet.blade.php | 2 +- .../views/dashboard/settings/theme.blade.php | 2 +- .../views/dashboard/subscribers/add.blade.php | 2 +- resources/views/dashboard/team/add.blade.php | 2 +- resources/views/dashboard/team/edit.blade.php | 2 +- resources/views/dashboard/team/invite.blade.php | 2 +- resources/views/dashboard/templates/add.blade.php | 2 +- .../views/dashboard/templates/index.blade.php | 2 +- resources/views/dashboard/user/index.blade.php | 2 +- resources/views/index.blade.php | 8 +++++++- .../_error.blade.php => partials/error.blade.php} | 0 resources/views/partials/errors.blade.php | 15 +++++++++++++++ .../views/partials/modules/messages.blade.php | 2 +- resources/views/signup.blade.php | 2 +- resources/views/subscribe/manage.blade.php | 2 +- resources/views/subscribe/subscribe.blade.php | 2 +- 41 files changed, 59 insertions(+), 53 deletions(-) delete mode 100644 resources/views/dashboard/partials/errors.blade.php rename resources/views/{dashboard/partials/_error.blade.php => partials/error.blade.php} (100%) create mode 100644 resources/views/partials/errors.blade.php diff --git a/resources/views/dashboard/components/add.blade.php b/resources/views/dashboard/components/add.blade.php index d423a080..da0efe07 100644 --- a/resources/views/dashboard/components/add.blade.php +++ b/resources/views/dashboard/components/add.blade.php @@ -13,7 +13,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors')
diff --git a/resources/views/dashboard/components/edit.blade.php b/resources/views/dashboard/components/edit.blade.php index e3e671f0..7acc83af 100644 --- a/resources/views/dashboard/components/edit.blade.php +++ b/resources/views/dashboard/components/edit.blade.php @@ -13,7 +13,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors')
diff --git a/resources/views/dashboard/components/groups/add.blade.php b/resources/views/dashboard/components/groups/add.blade.php index 238d400c..836e11d9 100644 --- a/resources/views/dashboard/components/groups/add.blade.php +++ b/resources/views/dashboard/components/groups/add.blade.php @@ -13,7 +13,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors')
diff --git a/resources/views/dashboard/components/groups/edit.blade.php b/resources/views/dashboard/components/groups/edit.blade.php index 84f92289..1aef2dc6 100644 --- a/resources/views/dashboard/components/groups/edit.blade.php +++ b/resources/views/dashboard/components/groups/edit.blade.php @@ -13,7 +13,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors')
diff --git a/resources/views/dashboard/components/groups/index.blade.php b/resources/views/dashboard/components/groups/index.blade.php index b76e5b7a..eda19c4f 100644 --- a/resources/views/dashboard/components/groups/index.blade.php +++ b/resources/views/dashboard/components/groups/index.blade.php @@ -13,7 +13,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors')
@forelse($groups as $group) diff --git a/resources/views/dashboard/components/index.blade.php b/resources/views/dashboard/components/index.blade.php index 1615102a..28789507 100644 --- a/resources/views/dashboard/components/index.blade.php +++ b/resources/views/dashboard/components/index.blade.php @@ -13,7 +13,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors')
@forelse($components as $component) diff --git a/resources/views/dashboard/incidents/add.blade.php b/resources/views/dashboard/incidents/add.blade.php index eb758484..d5080728 100644 --- a/resources/views/dashboard/incidents/add.blade.php +++ b/resources/views/dashboard/incidents/add.blade.php @@ -18,7 +18,7 @@ {{ trans('forms.incidents.notify_disabled') }}
@endif - @include('dashboard.partials.errors') + @include('partials.errors') diff --git a/resources/views/dashboard/incidents/edit.blade.php b/resources/views/dashboard/incidents/edit.blade.php index 6cb199f4..f06b5a80 100644 --- a/resources/views/dashboard/incidents/edit.blade.php +++ b/resources/views/dashboard/incidents/edit.blade.php @@ -18,7 +18,7 @@ {{ trans('forms.incidents.notify_disabled') }}
@endif - @include('dashboard.partials.errors') + @include('partials.errors')
diff --git a/resources/views/dashboard/incidents/index.blade.php b/resources/views/dashboard/incidents/index.blade.php index 0f49b862..9123db5a 100644 --- a/resources/views/dashboard/incidents/index.blade.php +++ b/resources/views/dashboard/incidents/index.blade.php @@ -15,7 +15,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors')

{!! trans_choice('dashboard.incidents.logged', $incidents->count(), ['count' => $incidents->count()]) !!}

diff --git a/resources/views/dashboard/incidents/updates/add.blade.php b/resources/views/dashboard/incidents/updates/add.blade.php index 3783018d..0a815f24 100644 --- a/resources/views/dashboard/incidents/updates/add.blade.php +++ b/resources/views/dashboard/incidents/updates/add.blade.php @@ -18,7 +18,7 @@ {{ trans('forms.incidents.notify_disabled') }}
@endif - @include('dashboard.partials.errors') + @include('partials.errors')
diff --git a/resources/views/dashboard/incidents/updates/edit.blade.php b/resources/views/dashboard/incidents/updates/edit.blade.php index 5df75656..c3604202 100644 --- a/resources/views/dashboard/incidents/updates/edit.blade.php +++ b/resources/views/dashboard/incidents/updates/edit.blade.php @@ -18,7 +18,7 @@ {{ trans('forms.incidents.notify_disabled') }}
@endif - @include('dashboard.partials.errors') + @include('partials.errors')
diff --git a/resources/views/dashboard/incidents/updates/index.blade.php b/resources/views/dashboard/incidents/updates/index.blade.php index cbc58b34..bf48c918 100644 --- a/resources/views/dashboard/incidents/updates/index.blade.php +++ b/resources/views/dashboard/incidents/updates/index.blade.php @@ -19,7 +19,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors')
@foreach($incident->updates as $update) diff --git a/resources/views/dashboard/maintenance/add.blade.php b/resources/views/dashboard/maintenance/add.blade.php index ea1cf9b2..378ad2ce 100644 --- a/resources/views/dashboard/maintenance/add.blade.php +++ b/resources/views/dashboard/maintenance/add.blade.php @@ -13,7 +13,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors')
diff --git a/resources/views/dashboard/maintenance/edit.blade.php b/resources/views/dashboard/maintenance/edit.blade.php index 93fa1ea0..104bfbd7 100644 --- a/resources/views/dashboard/maintenance/edit.blade.php +++ b/resources/views/dashboard/maintenance/edit.blade.php @@ -13,7 +13,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors') diff --git a/resources/views/dashboard/maintenance/index.blade.php b/resources/views/dashboard/maintenance/index.blade.php index 549e4640..b1cb9e78 100644 --- a/resources/views/dashboard/maintenance/index.blade.php +++ b/resources/views/dashboard/maintenance/index.blade.php @@ -15,7 +15,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors')

{!! trans_choice('dashboard.schedule.logged', $schedule->count(), ['count' => $schedule->count()]) !!}

diff --git a/resources/views/dashboard/metrics/add.blade.php b/resources/views/dashboard/metrics/add.blade.php index 4f5a0ca1..29e18949 100644 --- a/resources/views/dashboard/metrics/add.blade.php +++ b/resources/views/dashboard/metrics/add.blade.php @@ -13,7 +13,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors')
diff --git a/resources/views/dashboard/metrics/edit.blade.php b/resources/views/dashboard/metrics/edit.blade.php index 40bff2d6..4485e4f6 100644 --- a/resources/views/dashboard/metrics/edit.blade.php +++ b/resources/views/dashboard/metrics/edit.blade.php @@ -13,7 +13,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors')
diff --git a/resources/views/dashboard/metrics/index.blade.php b/resources/views/dashboard/metrics/index.blade.php index a4c2ef8b..1d05d85c 100644 --- a/resources/views/dashboard/metrics/index.blade.php +++ b/resources/views/dashboard/metrics/index.blade.php @@ -16,7 +16,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors')
@forelse($metrics as $metric)
diff --git a/resources/views/dashboard/partials/errors.blade.php b/resources/views/dashboard/partials/errors.blade.php deleted file mode 100644 index a046ab7f..00000000 --- a/resources/views/dashboard/partials/errors.blade.php +++ /dev/null @@ -1,15 +0,0 @@ -@if ($errors->any()) -@include('dashboard.partials._error', ['level' => 'danger', 'title' => Session::get('title'), 'message' => $errors->all(':message')]) -@endif - -@if ($message = Session::get('success')) -@include('dashboard.partials._error', ['level' => 'success', 'title' => Session::get('title'), 'message' => $message]) -@endif - -@if ($message = Session::get('warning')) -@include('dashboard.partials._error', ['level' => 'warning', 'title' => Session::get('title'), 'message' => $message]) -@endif - -@if ($message = Session::get('info')) -@include('dashboard.partials._error', ['level' => 'info', 'title' => Session::get('title'), 'message' => $message]) -@endif diff --git a/resources/views/dashboard/settings/analytics.blade.php b/resources/views/dashboard/settings/analytics.blade.php index 22029618..084dca12 100644 --- a/resources/views/dashboard/settings/analytics.blade.php +++ b/resources/views/dashboard/settings/analytics.blade.php @@ -13,7 +13,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors')
diff --git a/resources/views/dashboard/settings/app-setup.blade.php b/resources/views/dashboard/settings/app-setup.blade.php index 6c15a1b1..d6c6f237 100644 --- a/resources/views/dashboard/settings/app-setup.blade.php +++ b/resources/views/dashboard/settings/app-setup.blade.php @@ -13,7 +13,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors')
diff --git a/resources/views/dashboard/settings/customization.blade.php b/resources/views/dashboard/settings/customization.blade.php index 4272f6f3..b3c6116b 100644 --- a/resources/views/dashboard/settings/customization.blade.php +++ b/resources/views/dashboard/settings/customization.blade.php @@ -13,7 +13,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors')
diff --git a/resources/views/dashboard/settings/localization.blade.php b/resources/views/dashboard/settings/localization.blade.php index 8219de19..005505a6 100644 --- a/resources/views/dashboard/settings/localization.blade.php +++ b/resources/views/dashboard/settings/localization.blade.php @@ -13,7 +13,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors')
diff --git a/resources/views/dashboard/settings/mail.blade.php b/resources/views/dashboard/settings/mail.blade.php index 0156667a..c34edb5d 100644 --- a/resources/views/dashboard/settings/mail.blade.php +++ b/resources/views/dashboard/settings/mail.blade.php @@ -13,7 +13,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors')
diff --git a/resources/views/dashboard/settings/security.blade.php b/resources/views/dashboard/settings/security.blade.php index c0cb81c1..a53c468f 100644 --- a/resources/views/dashboard/settings/security.blade.php +++ b/resources/views/dashboard/settings/security.blade.php @@ -13,7 +13,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors')
diff --git a/resources/views/dashboard/settings/stylesheet.blade.php b/resources/views/dashboard/settings/stylesheet.blade.php index 33df0451..6cedc54b 100644 --- a/resources/views/dashboard/settings/stylesheet.blade.php +++ b/resources/views/dashboard/settings/stylesheet.blade.php @@ -13,7 +13,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors')
diff --git a/resources/views/dashboard/settings/theme.blade.php b/resources/views/dashboard/settings/theme.blade.php index 951eb3dc..6618bfc2 100644 --- a/resources/views/dashboard/settings/theme.blade.php +++ b/resources/views/dashboard/settings/theme.blade.php @@ -13,7 +13,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors')
diff --git a/resources/views/dashboard/subscribers/add.blade.php b/resources/views/dashboard/subscribers/add.blade.php index b0d1c009..dd15f7c2 100644 --- a/resources/views/dashboard/subscribers/add.blade.php +++ b/resources/views/dashboard/subscribers/add.blade.php @@ -12,7 +12,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors')
diff --git a/resources/views/dashboard/team/add.blade.php b/resources/views/dashboard/team/add.blade.php index 78be34c1..cdbab7a5 100644 --- a/resources/views/dashboard/team/add.blade.php +++ b/resources/views/dashboard/team/add.blade.php @@ -12,7 +12,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors')
diff --git a/resources/views/dashboard/team/edit.blade.php b/resources/views/dashboard/team/edit.blade.php index 6b352041..313129d7 100644 --- a/resources/views/dashboard/team/edit.blade.php +++ b/resources/views/dashboard/team/edit.blade.php @@ -12,7 +12,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors')
diff --git a/resources/views/dashboard/team/invite.blade.php b/resources/views/dashboard/team/invite.blade.php index d63f7378..5178c8c1 100644 --- a/resources/views/dashboard/team/invite.blade.php +++ b/resources/views/dashboard/team/invite.blade.php @@ -13,7 +13,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors')
diff --git a/resources/views/dashboard/templates/add.blade.php b/resources/views/dashboard/templates/add.blade.php index 603a6c25..1ce15817 100644 --- a/resources/views/dashboard/templates/add.blade.php +++ b/resources/views/dashboard/templates/add.blade.php @@ -33,7 +33,7 @@ window.addEventListener("DOMContentLoaded", function(e) {
- @include('dashboard.partials.errors') + @include('partials.errors')
diff --git a/resources/views/dashboard/templates/index.blade.php b/resources/views/dashboard/templates/index.blade.php index 2f780c29..7339ac50 100644 --- a/resources/views/dashboard/templates/index.blade.php +++ b/resources/views/dashboard/templates/index.blade.php @@ -15,7 +15,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors')
@forelse($incident_templates as $template)
diff --git a/resources/views/dashboard/user/index.blade.php b/resources/views/dashboard/user/index.blade.php index 02440577..f0e18ae3 100644 --- a/resources/views/dashboard/user/index.blade.php +++ b/resources/views/dashboard/user/index.blade.php @@ -12,7 +12,7 @@
- @include('dashboard.partials.errors') + @include('partials.errors') {!! csrf_field() !!}
diff --git a/resources/views/index.blade.php b/resources/views/index.blade.php index 07742bb4..00561e2d 100644 --- a/resources/views/index.blade.php +++ b/resources/views/index.blade.php @@ -1,7 +1,13 @@ @extends('layout.master') @section('content') -@modules +@include('partials.modules.messages') +@include('partials.modules.status') +@include('partials.modules.components') +@include('partials.modules.metrics') +@include('partials.modules.stickied') +@include('partials.modules.scheduled') +@include('partials.modules.timeline') @stop @section('bottom-content') diff --git a/resources/views/dashboard/partials/_error.blade.php b/resources/views/partials/error.blade.php similarity index 100% rename from resources/views/dashboard/partials/_error.blade.php rename to resources/views/partials/error.blade.php diff --git a/resources/views/partials/errors.blade.php b/resources/views/partials/errors.blade.php new file mode 100644 index 00000000..01aaae2b --- /dev/null +++ b/resources/views/partials/errors.blade.php @@ -0,0 +1,15 @@ +@if ($errors->any()) +@include('partials.error', ['level' => 'danger', 'title' => Session::get('title'), 'message' => $errors->all(':message')]) +@endif + +@if ($message = Session::get('success')) +@include('partials.error', ['level' => 'success', 'title' => Session::get('title'), 'message' => $message]) +@endif + +@if ($message = Session::get('warning')) +@include('partials.error', ['level' => 'warning', 'title' => Session::get('title'), 'message' => $message]) +@endif + +@if ($message = Session::get('info')) +@include('partials.error', ['level' => 'info', 'title' => Session::get('title'), 'message' => $message]) +@endif diff --git a/resources/views/partials/modules/messages.blade.php b/resources/views/partials/modules/messages.blade.php index 145dbb7f..4ef1d9b3 100644 --- a/resources/views/partials/modules/messages.blade.php +++ b/resources/views/partials/modules/messages.blade.php @@ -1,3 +1,3 @@
- @include('dashboard.partials.errors') + @include('partials.errors')
diff --git a/resources/views/signup.blade.php b/resources/views/signup.blade.php index 654c8914..acbfc65f 100644 --- a/resources/views/signup.blade.php +++ b/resources/views/signup.blade.php @@ -21,7 +21,7 @@
@endif -@include('dashboard.partials.errors') +@include('partials.errors')
diff --git a/resources/views/subscribe/manage.blade.php b/resources/views/subscribe/manage.blade.php index 7492664d..8ef21d59 100644 --- a/resources/views/subscribe/manage.blade.php +++ b/resources/views/subscribe/manage.blade.php @@ -8,7 +8,7 @@
-@include('dashboard.partials.errors') +@include('partials.errors')
diff --git a/resources/views/subscribe/subscribe.blade.php b/resources/views/subscribe/subscribe.blade.php index fc7a1e8f..bec3e12e 100644 --- a/resources/views/subscribe/subscribe.blade.php +++ b/resources/views/subscribe/subscribe.blade.php @@ -11,7 +11,7 @@
-@include('dashboard.partials.errors') +@include('partials.errors')