Skip to content

A free open source IT asset/license management system

Fixed sticky table on locations

snipe9b71d63f34b4
diff --git a/resources/views/locations/index.blade.php b/resources/views/locations/index.blade.php
index cbcc2ef477..c15c86efb0 100755
--- a/resources/views/locations/index.blade.php
+++ b/resources/views/locations/index.blade.php
@@ -9,29 +9,13 @@
@section('content')
<x-container>
- <x-box>
- @include('partials.locations-bulk-actions')
-
- <table
- data-columns="{{ \App\Presenters\LocationPresenter::dataTableLayout() }}"
- data-cookie-id-table="locationTable"
- data-id-table="locationTable"
- data-toolbar="#locationsBulkEditToolbar"
- data-bulk-button-id="#bulkLocationsEditButton"
- data-bulk-form-id="#locationsBulkForm"
- data-side-pagination="server"
- data-advanced-search="false"
- data-sort-order="asc"
- data-buttons="locationButtons"
- id="locationTable"
- class="table table-striped snipe-table"
- data-url="{{ route('api.locations.index', ['company_id'=>e(request('company_id')), 'status' => e(request('status'))]) }}"
- data-export-options='{
- "fileName": "export-locations-{{ date('Y-m-d') }}",
- "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
- }'>
- </table>
-
+ <x-box name="locations">
+ {{-- Convert hand-rolled <table> to the shared x-table.locations
+ component so sticky-column CSS (snipe-table--sticky-right-1)
+ and use_sticky_css are wired the same way as every other
+ list page. Preserves the company_id / status query-string
+ filtering the index has always supported. --}}
+ <x-table.locations :route="route('api.locations.index', ['company_id' => e(request('company_id')), 'status' => e(request('status'))])" />
</x-box>
</x-container>
@stop