Override the Paginators defaultSimpleView (#3652)
Credit to @dzava. Fixes #3355.
This commit is contained in:
parent
ec2a0d5fb0
commit
a539a36b30
|
|
@ -24,6 +24,7 @@ use System\Classes\CombineAssets;
|
|||
use Backend\Classes\WidgetManager;
|
||||
use October\Rain\Support\ModuleServiceProvider;
|
||||
use October\Rain\Router\Helper as RouterHelper;
|
||||
use Illuminate\Pagination\Paginator;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class ServiceProvider extends ModuleServiceProvider
|
||||
|
|
@ -87,6 +88,8 @@ class ServiceProvider extends ModuleServiceProvider
|
|||
Schema::defaultStringLength(191);
|
||||
}
|
||||
|
||||
Paginator::defaultSimpleView('system::pagination.simple-default');
|
||||
|
||||
/*
|
||||
* Boot plugins
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -317,4 +317,8 @@ return [
|
|||
'invalid_path' => "Ορίστηκε μη έγκυρη διαδρομή αρχείου : ':path'.",
|
||||
'folder_size_items' => 'αντικείμενο(α)',
|
||||
],
|
||||
'pagination' => [
|
||||
'previous' => 'Προηγούμενη',
|
||||
'next' => 'Επόμενη',
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -447,4 +447,8 @@ return [
|
|||
'invalid_path' => "Invalid file path specified: ':path'.",
|
||||
'folder_size_items' => 'item(s)',
|
||||
],
|
||||
'pagination' => [
|
||||
'previous' => 'Previous',
|
||||
'next' => 'Next',
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
@if ($paginator->hasPages())
|
||||
<ul class="pagination">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="disabled"><span>{!! Lang::get('system::lang.pagination.previous') !!}</span></li>
|
||||
@else
|
||||
<li><a href="{{ $paginator->previousPageUrl() }}"
|
||||
rel="prev">{!! Lang::get('system::lang.pagination.previous') !!}</a></li>
|
||||
@endif
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<li><a href="{{ $paginator->nextPageUrl() }}" rel="next">{!! Lang::get('system::lang.pagination.next') !!}</a>
|
||||
</li>
|
||||
@else
|
||||
<li class="disabled"><span>{!! Lang::get('system::lang.pagination.next') !!}</span></li>
|
||||
@endif
|
||||
</ul>
|
||||
@endif
|
||||
|
||||
Loading…
Reference in New Issue