From d3d1b881353cc8cd6aeb04d23fb505ef110d279c Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Tue, 17 Jan 2017 20:28:47 -0500 Subject: [PATCH] Add 404 and 403 error pages --- resources/lang/en/base.php | 12 +++ .../themes/pterodactyl/errors/403.blade.php | 45 +++++++++++ .../themes/pterodactyl/errors/404.blade.php | 45 +++++++++++ .../pterodactyl/layouts/error.blade.php | 74 +++++++++++++++++++ 4 files changed, 176 insertions(+) create mode 100644 resources/themes/pterodactyl/errors/403.blade.php create mode 100644 resources/themes/pterodactyl/errors/404.blade.php create mode 100644 resources/themes/pterodactyl/layouts/error.blade.php diff --git a/resources/lang/en/base.php b/resources/lang/en/base.php index 954b3b34b..6a45710d5 100644 --- a/resources/lang/en/base.php +++ b/resources/lang/en/base.php @@ -2,6 +2,18 @@ return [ 'validation_error' => 'There was an error with one or more fields in the request.', + 'errors' => [ + 'return' => 'Return to Previous Page', + 'home' => 'Go Home', + '403' => [ + 'header' => 'Forbidden', + 'desc' => 'You do not have permission to access this resource on this server.', + ], + '404' => [ + 'header' => 'File Not Found', + 'desc' => 'We were unable to locate the requested resource on the server.', + ], + ], 'index' => [ 'header' => 'Your Servers', 'header_sub' => 'Servers you own and have access to.', diff --git a/resources/themes/pterodactyl/errors/403.blade.php b/resources/themes/pterodactyl/errors/403.blade.php new file mode 100644 index 000000000..f46e14751 --- /dev/null +++ b/resources/themes/pterodactyl/errors/403.blade.php @@ -0,0 +1,45 @@ +{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} + +{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} +{{-- of this software and associated documentation files (the "Software"), to deal --}} +{{-- in the Software without restriction, including without limitation the rights --}} +{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} +{{-- copies of the Software, and to permit persons to whom the Software is --}} +{{-- furnished to do so, subject to the following conditions: --}} + +{{-- The above copyright notice and this permission notice shall be included in all --}} +{{-- copies or substantial portions of the Software. --}} + +{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} +{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} +{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} +{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} +{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} +{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} +{{-- SOFTWARE. --}} +@extends('layouts.error') + +@section('title') + @lang('base.errors.403.header') +@endsection + +@section('content-header') +@endsection + +@section('content') + +
+
+
+
+

403

+

@lang('base.errors.403.desc')

+
+ +
+
+
+@endsection diff --git a/resources/themes/pterodactyl/errors/404.blade.php b/resources/themes/pterodactyl/errors/404.blade.php new file mode 100644 index 000000000..9979502e0 --- /dev/null +++ b/resources/themes/pterodactyl/errors/404.blade.php @@ -0,0 +1,45 @@ +{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} + +{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} +{{-- of this software and associated documentation files (the "Software"), to deal --}} +{{-- in the Software without restriction, including without limitation the rights --}} +{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} +{{-- copies of the Software, and to permit persons to whom the Software is --}} +{{-- furnished to do so, subject to the following conditions: --}} + +{{-- The above copyright notice and this permission notice shall be included in all --}} +{{-- copies or substantial portions of the Software. --}} + +{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} +{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} +{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} +{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} +{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} +{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} +{{-- SOFTWARE. --}} +@extends('layouts.error') + +@section('title') + @lang('base.errors.404.header') +@endsection + +@section('content-header') +@endsection + +@section('content') + +
+
+
+
+

404

+

@lang('base.errors.404.desc')

+
+ +
+
+
+@endsection diff --git a/resources/themes/pterodactyl/layouts/error.blade.php b/resources/themes/pterodactyl/layouts/error.blade.php new file mode 100644 index 000000000..58e67f22a --- /dev/null +++ b/resources/themes/pterodactyl/layouts/error.blade.php @@ -0,0 +1,74 @@ +{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} + +{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} +{{-- of this software and associated documentation files (the "Software"), to deal --}} +{{-- in the Software without restriction, including without limitation the rights --}} +{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} +{{-- copies of the Software, and to permit persons to whom the Software is --}} +{{-- furnished to do so, subject to the following conditions: --}} + +{{-- The above copyright notice and this permission notice shall be included in all --}} +{{-- copies or substantial portions of the Software. --}} + +{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} +{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} +{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} +{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} +{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} +{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} +{{-- SOFTWARE. --}} + + + + + + {{ Settings::get('company', 'Pterodactyl') }} - @yield('title') + + + @section('scripts') + {!! Theme::css('vendor/bootstrap/bootstrap.min.css') !!} + {!! Theme::css('vendor/adminlte/admin.min.css') !!} + {!! Theme::css('vendor/adminlte/colors/skin-blue.min.css') !!} + {!! Theme::css('vendor/sweetalert/sweetalert.min.css') !!} + {!! Theme::css('css/pterodactyl.css') !!} + + + + + @show + + +
+
+ + +
+
+
+ @yield('content-header') +
+
+ @yield('content') +
+
+ +
+ @section('footer-scripts') + {!! Theme::js('js/laroute.js') !!} + {!! Theme::js('js/vendor/jquery/jquery.min.js') !!} + {!! Theme::js('vendor/bootstrap/bootstrap.min.js') !!} + {!! Theme::js('vendor/slimscroll/jquery.slimscroll.min.js') !!} + {!! Theme::js('vendor/adminlte/app.min.js') !!} + @show + +