Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use bootstrap pagination templates #662

Merged
merged 2 commits into from
Jan 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 24 additions & 12 deletions src/WebServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
use Illuminate\Auth\Events\Login as LoginEvent;
use Illuminate\Auth\Events\Logout as LogoutEvent;
use Illuminate\Foundation\AliasLoader;
use Illuminate\Pagination\Paginator;
use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Facades\Validator;
Expand Down Expand Up @@ -124,6 +125,9 @@ public function boot(Router $router)

// Configure API
$this->configure_api();

// Configure pagination settings
$this->configure_pagination();
}

/**
Expand All @@ -144,28 +148,28 @@ private function add_publications()
$this->publishes([
__DIR__ . '/resources/css' => public_path('web/css'),
__DIR__ . '/resources/img' => public_path('web/img'),
__DIR__ . '/resources/js' => public_path('web/js'),
__DIR__ . '/resources/js' => public_path('web/js'),
__DIR__ . '/resources/fonts' => public_path('web/fonts'),

// Bootstrap pulled from packagist
base_path('vendor/twbs/bootstrap/dist/css/bootstrap.min.css') => public_path('web/css/bootstrap.min.css'),
base_path('vendor/twbs/bootstrap/dist/css/bootstrap.min.css') => public_path('web/css/bootstrap.min.css'),
base_path('vendor/almasaeed2010/adminlte/plugins/bootstrap/js/bootstrap.bundle.min.js') => public_path('web/js/bootstrap.bundle.min.js'),

// Datatables pulled from packagist
base_path('vendor/datatables.net/datatables.net/js/jquery.dataTables.min.js') => public_path('web/js/jquery.dataTables.min.js'),
base_path('vendor/datatables.net/datatables.net/js/jquery.dataTables.min.js') => public_path('web/js/jquery.dataTables.min.js'),
base_path('vendor/datatables.net/datatables.net-bs4/css/dataTables.bootstrap4.min.css') => public_path('web/css/dataTables.bootstrap4.min.css'),
base_path('vendor/datatables.net/datatables.net-bs4/js/dataTables.bootstrap4.min.js') => public_path('web/js/dataTables.bootstrap4.min.js'),
base_path('vendor/datatables.net/datatables.net-buttons/js/dataTables.buttons.min.js') => public_path('web/js/dataTables.buttons.min.js'),
base_path('vendor/datatables.net/datatables.net-buttons-bs4/css/buttons.bootstrap4.min.css') => public_path('web/css/buttons.bootstrap4.min.css'),
base_path('vendor/datatables.net/datatables.net-buttons-bs4/js/buttons.bootstrap4.min.js') => public_path('web/js/buttons.bootstrap4.min.js'),
base_path('vendor/datatables.net/datatables.net-bs4/js/dataTables.bootstrap4.min.js') => public_path('web/js/dataTables.bootstrap4.min.js'),
base_path('vendor/datatables.net/datatables.net-buttons/js/dataTables.buttons.min.js') => public_path('web/js/dataTables.buttons.min.js'),
base_path('vendor/datatables.net/datatables.net-buttons-bs4/css/buttons.bootstrap4.min.css') => public_path('web/css/buttons.bootstrap4.min.css'),
base_path('vendor/datatables.net/datatables.net-buttons-bs4/js/buttons.bootstrap4.min.js') => public_path('web/js/buttons.bootstrap4.min.js'),

// AdminLTE pulled from packagist
base_path('vendor/almasaeed2010/adminlte/dist/css/adminlte.min.css') => public_path('web/css/adminlte.min.css'),
base_path('vendor/almasaeed2010/adminlte/dist/js/adminlte.min.js') => public_path('web/js/adminlte.min.js'),
base_path('vendor/almasaeed2010/adminlte/dist/js/adminlte.min.js') => public_path('web/js/adminlte.min.js'),

// Font Awesome pulled from packagist
base_path('vendor/components/font-awesome/css/all.min.css') => public_path('web/css/all.min.css'),
base_path('vendor/components/font-awesome/webfonts') => public_path('web/webfonts'),
base_path('vendor/components/font-awesome/webfonts') => public_path('web/webfonts'),
], ['public', 'seat']);

// publish horizon override for queues setup
Expand All @@ -183,6 +187,14 @@ private function add_views()
$this->loadViewsFrom(__DIR__ . '/resources/views', 'web');
}

/**
* Configure illuminate/pagination to use bootstrap 4 since the new default is tailwind
* See https://laravel.com/docs/10.x/pagination#using-bootstrap.
*/
private function configure_pagination(): void {
Paginator::useBootstrapFour();
}

/**
* Add the view composers. This allows us
* to make data available in views without
Expand Down Expand Up @@ -506,10 +518,10 @@ private function register_settings()
// Default Scopes asked for SSO Authentication
Seat::define('sso_scopes', [
[
'id' => 0,
'name' => 'default',
'id' => 0,
'name' => 'default',
'default' => true,
'scopes' => [
'scopes' => [
'publicData',
'esi-alliances.read_contacts.v1',
'esi-assets.read_assets.v1',
Expand Down
Loading