From 1aa191210a37382f7c658f789362e24a7f1fb2a5 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Thu, 16 Mar 2017 19:54:31 -0400 Subject: [PATCH] closes #344 --- CHANGELOG.md | 1 + app/Http/Controllers/Base/IndexController.php | 2 +- config/pterodactyl.php | 14 ++++++++++++++ resources/themes/pterodactyl/base/index.blade.php | 5 +++++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6de40f1b..e655bbe97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines. * Fixes potential bug with invalid CIDR notation (ex: `192.168.1.1/z`) when adding allocations that could cause over 4 million records to be created at once. * `[pre.4]` — Fixes bug preventing server updates from occurring by the system due to undefined `Auth::user()` in the event listener. * `[pre.4]` — Fixes `Server::byUuid()` caching to actually clear the cache for *all* users, rather than the logged in user by using cache tags. +* `[pre.4]` — Fixes server listing on frontend not displaying a page selector when more than 10 servers exist. ### Added * Ability to assign multiple allocations at once when creating a new server. diff --git a/app/Http/Controllers/Base/IndexController.php b/app/Http/Controllers/Base/IndexController.php index f6abf4ea4..5b6fab3a7 100644 --- a/app/Http/Controllers/Base/IndexController.php +++ b/app/Http/Controllers/Base/IndexController.php @@ -47,7 +47,7 @@ class IndexController extends Controller public function getIndex(Request $request) { return view('base.index', [ - 'servers' => $request->user()->serverAccessCollection(10), + 'servers' => $request->user()->serverAccessCollection(config('pterodactyl.paginate.frontend.servers')), ]); } diff --git a/config/pterodactyl.php b/config/pterodactyl.php index 30ea7ef97..77a946adb 100644 --- a/config/pterodactyl.php +++ b/config/pterodactyl.php @@ -16,4 +16,18 @@ return [ 'author' => env('SERVICE_AUTHOR'), ], + /* + |-------------------------------------------------------------------------- + | Pagination + |-------------------------------------------------------------------------- + | + | Certain pagination result counts can be configured here and will take + | effect globally. + */ + 'paginate' => [ + 'frontend' => [ + 'servers' => 15, + ], + ], + ]; diff --git a/resources/themes/pterodactyl/base/index.blade.php b/resources/themes/pterodactyl/base/index.blade.php index 71efda93f..8ce413888 100644 --- a/resources/themes/pterodactyl/base/index.blade.php +++ b/resources/themes/pterodactyl/base/index.blade.php @@ -78,6 +78,11 @@ + @if($servers->hasPages()) + + @endif