From 417caae58901f831e5d771c3ca96361ff188ce26 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 20 Mar 2024 12:07:18 +0000 Subject: [PATCH 1/6] Added translation Signed-off-by: snipe --- app/Presenters/UserPresenter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Presenters/UserPresenter.php b/app/Presenters/UserPresenter.php index 211057c54854..f023569f9e3c 100644 --- a/app/Presenters/UserPresenter.php +++ b/app/Presenters/UserPresenter.php @@ -38,7 +38,7 @@ public static function dataTableLayout() 'searchable' => false, 'sortable' => false, 'switchable' => true, - 'title' => 'Avatar', + 'title' => trans('general.importer.avatar'), 'visible' => false, 'formatter' => 'imageFormatter', ], From 0d124bb5a1a04a30517deebf99a71f716dff7008 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 20 Mar 2024 12:08:35 +0000 Subject: [PATCH 2/6] Fixed indent Signed-off-by: snipe --- resources/views/partials/bootstrap-table.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.php index 95f2785b613e..a7a4666f93f6 100644 --- a/resources/views/partials/bootstrap-table.blade.php +++ b/resources/views/partials/bootstrap-table.blade.php @@ -85,7 +85,7 @@ classes: 'table table-responsive table-no-bordered', export: 'fa-download', clearSearch: 'fa-times' }, - exportOptions: export_options, + exportOptions: export_options, exportTypes: ['xlsx', 'excel', 'csv', 'pdf','json', 'xml', 'txt', 'sql', 'doc' ], onLoadSuccess: function () { $('[data-tooltip="true"]').tooltip(); // Needed to attach tooltips after ajax call From 278a25c63b8fdfa50934b1c720d6cd053b8bf35e Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 20 Mar 2024 12:14:41 +0000 Subject: [PATCH 3/6] Added toggle all to column selector Signed-off-by: snipe --- app/Presenters/AssetPresenter.php | 1 + app/Presenters/LocationPresenter.php | 1 + app/Presenters/UserPresenter.php | 2 +- resources/views/hardware/index.blade.php | 1 + resources/views/locations/index.blade.php | 1 + resources/views/users/index.blade.php | 1 + 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/Presenters/AssetPresenter.php b/app/Presenters/AssetPresenter.php index dd88b07fdef4..711a3424c58d 100644 --- a/app/Presenters/AssetPresenter.php +++ b/app/Presenters/AssetPresenter.php @@ -55,6 +55,7 @@ public static function dataTableLayout() 'field' => 'asset_tag', 'searchable' => true, 'sortable' => true, + 'switchable' => false, 'title' => trans('admin/hardware/table.asset_tag'), 'visible' => true, 'formatter' => 'hardwareLinkFormatter', diff --git a/app/Presenters/LocationPresenter.php b/app/Presenters/LocationPresenter.php index 6a9bc0b56868..56d710ac969e 100644 --- a/app/Presenters/LocationPresenter.php +++ b/app/Presenters/LocationPresenter.php @@ -31,6 +31,7 @@ public static function dataTableLayout() 'field' => 'name', 'searchable' => true, 'sortable' => true, + 'switchable' => false, 'title' => trans('admin/locations/table.name'), 'visible' => true, 'formatter' => 'locationsLinkFormatter', diff --git a/app/Presenters/UserPresenter.php b/app/Presenters/UserPresenter.php index f023569f9e3c..4726205c72ed 100644 --- a/app/Presenters/UserPresenter.php +++ b/app/Presenters/UserPresenter.php @@ -175,7 +175,7 @@ public static function dataTableLayout() 'field' => 'username', 'searchable' => true, 'sortable' => true, - 'switchable' => true, + 'switchable' => false, 'title' => trans('admin/users/table.username'), 'visible' => true, 'formatter' => 'usersLinkFormatter', diff --git a/resources/views/hardware/index.blade.php b/resources/views/hardware/index.blade.php index d30a1c012a85..ffc2668d404b 100755 --- a/resources/views/hardware/index.blade.php +++ b/resources/views/hardware/index.blade.php @@ -75,6 +75,7 @@ data-search="true" data-side-pagination="server" data-show-columns="true" + data-show-columns-toggle-all="true" data-show-export="true" data-show-footer="true" data-show-refresh="true" diff --git a/resources/views/locations/index.blade.php b/resources/views/locations/index.blade.php index 2d020cb0262e..c21ad47fe8f0 100755 --- a/resources/views/locations/index.blade.php +++ b/resources/views/locations/index.blade.php @@ -35,6 +35,7 @@ data-show-footer="true" data-side-pagination="server" data-show-columns="true" + data-show-columns-toggle-all="true" data-show-fullscreen="true" data-show-export="true" data-show-refresh="true" diff --git a/resources/views/users/index.blade.php b/resources/views/users/index.blade.php index 91b9a2a318cb..306722f87f95 100755 --- a/resources/views/users/index.blade.php +++ b/resources/views/users/index.blade.php @@ -44,6 +44,7 @@ Date: Wed, 20 Mar 2024 21:24:59 +0000 Subject: [PATCH 4/6] Fixed locale, added showColumnsToggleAll and minimumCountColumns Signed-off-by: snipe --- resources/views/partials/bootstrap-table.blade.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.php index a7a4666f93f6..b4f47c6a3cb9 100644 --- a/resources/views/partials/bootstrap-table.blade.php +++ b/resources/views/partials/bootstrap-table.blade.php @@ -46,12 +46,14 @@ classes: 'table table-responsive table-no-bordered', stickyHeader: true, stickyHeaderOffsetLeft: parseInt($('body').css('padding-left'), 10), stickyHeaderOffsetRight: parseInt($('body').css('padding-right'), 10), - locale: locale, + locale: '{{ app()->getLocale() }}', undefinedText: '', iconsPrefix: 'fa', cookieStorage: '{{ config('session.bs_table_storage') }}', cookie: true, cookieExpire: '2y', + showColumnsToggleAll: true, + minimumCountColumns: 2, mobileResponsive: true, maintainSelected: true, trimOnSearch: false, From 1f586d3102da96a1990e125ca20df1621c38fda1 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 20 Mar 2024 21:25:16 +0000 Subject: [PATCH 5/6] Removed data-show-columns-toggle-all data attribute Signed-off-by: snipe --- resources/views/hardware/index.blade.php | 1 - resources/views/locations/index.blade.php | 1 - resources/views/users/index.blade.php | 1 - 3 files changed, 3 deletions(-) diff --git a/resources/views/hardware/index.blade.php b/resources/views/hardware/index.blade.php index ffc2668d404b..d30a1c012a85 100755 --- a/resources/views/hardware/index.blade.php +++ b/resources/views/hardware/index.blade.php @@ -75,7 +75,6 @@ data-search="true" data-side-pagination="server" data-show-columns="true" - data-show-columns-toggle-all="true" data-show-export="true" data-show-footer="true" data-show-refresh="true" diff --git a/resources/views/locations/index.blade.php b/resources/views/locations/index.blade.php index c21ad47fe8f0..2d020cb0262e 100755 --- a/resources/views/locations/index.blade.php +++ b/resources/views/locations/index.blade.php @@ -35,7 +35,6 @@ data-show-footer="true" data-side-pagination="server" data-show-columns="true" - data-show-columns-toggle-all="true" data-show-fullscreen="true" data-show-export="true" data-show-refresh="true" diff --git a/resources/views/users/index.blade.php b/resources/views/users/index.blade.php index 306722f87f95..91b9a2a318cb 100755 --- a/resources/views/users/index.blade.php +++ b/resources/views/users/index.blade.php @@ -44,7 +44,6 @@
Date: Wed, 20 Mar 2024 21:25:50 +0000 Subject: [PATCH 6/6] Set names and actions to switchable = false Signed-off-by: snipe --- app/Presenters/AccessoryPresenter.php | 1 + app/Presenters/AssetMaintenancesPresenter.php | 1 + app/Presenters/AssetModelPresenter.php | 1 + app/Presenters/AssetPresenter.php | 2 +- app/Presenters/CategoryPresenter.php | 1 + app/Presenters/CompanyPresenter.php | 2 +- app/Presenters/ComponentPresenter.php | 2 +- app/Presenters/ConsumablePresenter.php | 1 + app/Presenters/DepreciationPresenter.php | 1 + app/Presenters/DepreciationReportPresenter.php | 1 + app/Presenters/LicensePresenter.php | 5 +++-- app/Presenters/ManufacturerPresenter.php | 1 + 12 files changed, 14 insertions(+), 5 deletions(-) diff --git a/app/Presenters/AccessoryPresenter.php b/app/Presenters/AccessoryPresenter.php index cc4f9badfc47..fd6122cab757 100644 --- a/app/Presenters/AccessoryPresenter.php +++ b/app/Presenters/AccessoryPresenter.php @@ -41,6 +41,7 @@ public static function dataTableLayout() 'field' => 'name', 'searchable' => true, 'sortable' => true, + 'switchable' => false, 'title' => trans('general.name'), 'formatter' => 'accessoriesLinkFormatter', ], [ diff --git a/app/Presenters/AssetMaintenancesPresenter.php b/app/Presenters/AssetMaintenancesPresenter.php index 5f9694b44ca8..3908720dc3da 100644 --- a/app/Presenters/AssetMaintenancesPresenter.php +++ b/app/Presenters/AssetMaintenancesPresenter.php @@ -85,6 +85,7 @@ public static function dataTableLayout() 'field' => 'title', 'searchable' => true, 'sortable' => true, + 'switchable' => false, 'title' => trans('admin/asset_maintenances/form.title'), ], [ 'field' => 'start_date', diff --git a/app/Presenters/AssetModelPresenter.php b/app/Presenters/AssetModelPresenter.php index 85a0fa58ec9b..da93092b91fd 100644 --- a/app/Presenters/AssetModelPresenter.php +++ b/app/Presenters/AssetModelPresenter.php @@ -35,6 +35,7 @@ public static function dataTableLayout() 'field' => 'name', 'searchable' => true, 'sortable' => true, + 'switchable' => false, 'visible' => true, 'title' => trans('general.name'), 'formatter' => 'modelsLinkFormatter', diff --git a/app/Presenters/AssetPresenter.php b/app/Presenters/AssetPresenter.php index 711a3424c58d..5f900a6a83ff 100644 --- a/app/Presenters/AssetPresenter.php +++ b/app/Presenters/AssetPresenter.php @@ -317,7 +317,7 @@ public static function dataTableLayout() 'field' => 'checkincheckout', 'searchable' => false, 'sortable' => false, - 'switchable' => true, + 'switchable' => false, 'title' => trans('general.checkin').'/'.trans('general.checkout'), 'visible' => true, 'formatter' => 'hardwareInOutFormatter', diff --git a/app/Presenters/CategoryPresenter.php b/app/Presenters/CategoryPresenter.php index e9276a3417df..fbf431637cf1 100644 --- a/app/Presenters/CategoryPresenter.php +++ b/app/Presenters/CategoryPresenter.php @@ -25,6 +25,7 @@ public static function dataTableLayout() 'field' => 'name', 'searchable' => true, 'sortable' => true, + 'switchable' => false, 'title' => trans('general.name'), 'visible' => true, 'formatter' => 'categoriesLinkFormatter', diff --git a/app/Presenters/CompanyPresenter.php b/app/Presenters/CompanyPresenter.php index ec2e7cfc5a79..7603191fc15e 100644 --- a/app/Presenters/CompanyPresenter.php +++ b/app/Presenters/CompanyPresenter.php @@ -25,7 +25,7 @@ public static function dataTableLayout() 'field' => 'name', 'searchable' => true, 'sortable' => true, - 'switchable' => true, + 'switchable' => false, 'title' => trans('admin/companies/table.name'), 'visible' => true, 'formatter' => 'companiesLinkFormatter', diff --git a/app/Presenters/ComponentPresenter.php b/app/Presenters/ComponentPresenter.php index c7468911a112..d142d7abc245 100644 --- a/app/Presenters/ComponentPresenter.php +++ b/app/Presenters/ComponentPresenter.php @@ -126,7 +126,7 @@ public static function dataTableLayout() 'field' => 'checkincheckout', 'searchable' => false, 'sortable' => false, - 'switchable' => true, + 'switchable' => false, 'title' => trans('general.checkin').'/'.trans('general.checkout'), 'visible' => true, 'formatter' => 'componentsInOutFormatter', diff --git a/app/Presenters/ConsumablePresenter.php b/app/Presenters/ConsumablePresenter.php index abb599de4f3b..d3e73de1cfd4 100644 --- a/app/Presenters/ConsumablePresenter.php +++ b/app/Presenters/ConsumablePresenter.php @@ -35,6 +35,7 @@ public static function dataTableLayout() 'field' => 'name', 'searchable' => true, 'sortable' => true, + 'switchable' => false, 'title' => trans('general.name'), 'visible' => true, 'formatter' => 'consumablesLinkFormatter', diff --git a/app/Presenters/DepreciationPresenter.php b/app/Presenters/DepreciationPresenter.php index 2a293a46ffba..9df1fe13222a 100644 --- a/app/Presenters/DepreciationPresenter.php +++ b/app/Presenters/DepreciationPresenter.php @@ -25,6 +25,7 @@ public static function dataTableLayout() 'field' => 'name', 'searchable' => true, 'sortable' => true, + 'switchable' => false, 'title' => trans('general.name'), 'visible' => true, 'formatter' => 'depreciationsLinkFormatter', diff --git a/app/Presenters/DepreciationReportPresenter.php b/app/Presenters/DepreciationReportPresenter.php index ea8834237287..50a8b73b541f 100644 --- a/app/Presenters/DepreciationReportPresenter.php +++ b/app/Presenters/DepreciationReportPresenter.php @@ -34,6 +34,7 @@ public static function dataTableLayout() "field" => "name", "searchable" => true, "sortable" => true, + 'switchable' => false, "title" => trans('admin/hardware/form.name'), "visible" => false, ], [ diff --git a/app/Presenters/LicensePresenter.php b/app/Presenters/LicensePresenter.php index c5c898266428..8ca8e120f27a 100644 --- a/app/Presenters/LicensePresenter.php +++ b/app/Presenters/LicensePresenter.php @@ -33,6 +33,7 @@ public static function dataTableLayout() 'field' => 'name', 'searchable' => true, 'sortable' => true, + 'switchable' => false, 'title' => trans('general.name'), 'formatter' => 'licensesLinkFormatter', ], [ @@ -186,7 +187,7 @@ public static function dataTableLayout() 'field' => 'checkincheckout', 'searchable' => false, 'sortable' => false, - 'switchable' => true, + 'switchable' => false, 'title' => trans('general.checkin').'/'.trans('general.checkout'), 'visible' => true, 'formatter' => 'licensesInOutFormatter', @@ -280,7 +281,7 @@ public static function dataTableLayoutSeats() 'field' => 'checkincheckout', 'searchable' => false, 'sortable' => false, - 'switchable' => true, + 'switchable' => false, 'title' => trans('general.checkin').'/'.trans('general.checkout'), 'visible' => true, 'formatter' => 'licenseSeatInOutFormatter', diff --git a/app/Presenters/ManufacturerPresenter.php b/app/Presenters/ManufacturerPresenter.php index ad6b5443bfd9..3e36cbcde030 100644 --- a/app/Presenters/ManufacturerPresenter.php +++ b/app/Presenters/ManufacturerPresenter.php @@ -27,6 +27,7 @@ public static function dataTableLayout() 'field' => 'name', 'searchable' => true, 'sortable' => true, + 'switchable' => false, 'title' => trans('admin/manufacturers/table.name'), 'visible' => true, 'formatter' => 'manufacturersLinkFormatter',