157157
158158
159159 <div class =" tab-content" >
160+ @can (' view' , \App \Models \User:: class )
161+ <div id =" users" @class ([' tab-pane' ,' active' => $location -> users -> count () > 0 ] ) >
162+ @endcan
163+ <h2 class =" box-title" >{{ trans (' general.users' ) } } </h2 >
164+ @include (' partials.users-bulk-actions' )
165+ <table
166+ data-columns =" {{ \App \Presenters \UserPresenter:: dataTableLayout () } }"
167+ data-cookie-id-table =" usersTable"
168+ data-pagination =" true"
169+ data-id-table =" usersTable"
170+ data-search =" true"
171+ data-side-pagination =" server"
172+ data-show-columns =" true"
173+ data-show-export =" true"
174+ data-show-refresh =" true"
175+ data-sort-order =" asc"
176+ data-toolbar =" #userBulkEditToolbar"
177+ data-bulk-button-id =" #bulkUserEditButton"
178+ data-bulk-form-id =" #usersBulkForm"
179+ data-click-to-select =" true"
180+ id =" usersTable"
181+ class =" table table-striped snipe-table"
182+ data-url =" {{ route (' api.users.index' , [' location_id' => $location -> id ])} }"
183+ data-export-options =' {
184+ "fileName": "export-locations-{{ str_slug ($location -> name ) } } -users-{{ date (' Y-m-d' ) } } ",
185+ "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
186+ }' >
187+ </table >
188+ </div ><!-- /.tab-pane -->
189+ <div id =" assets" @class ([' tab-pane' , ' active' => $location -> users -> count () == 0 ] ) >
160190
161- <div class =" tab-pane active" id =" assets" >
162191 <h2 class =" box-title" >{{ trans (' admin/locations/message.current_location' ) } } </h2 >
163192
164- <div class =" table table-responsive" >
165193 @include (' partials.asset-bulk-actions' )
166194 <table
167195 data-columns =" {{ \App \Presenters \AssetPresenter:: dataTableLayout () } }"
@@ -186,50 +214,13 @@ class="table table-striped snipe-table"
186214 "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
187215 }' >
188216 </table >
189-
190- </div ><!-- /.table-responsive -->
191217 </div ><!-- /.tab-pane -->
192218
193-
194-
195- <div class =" tab-pane" id =" users" >
196- <h2 class =" box-title" >{{ trans (' general.users' ) } } </h2 >
197- <div class =" table table-responsive" >
198- @include (' partials.users-bulk-actions' )
199- <table
200- data-columns =" {{ \App \Presenters \UserPresenter:: dataTableLayout () } }"
201- data-cookie-id-table =" usersTable"
202- data-pagination =" true"
203- data-id-table =" usersTable"
204- data-search =" true"
205- data-side-pagination =" server"
206- data-show-columns =" true"
207- data-show-export =" true"
208- data-show-refresh =" true"
209- data-sort-order =" asc"
210- data-toolbar =" #userBulkEditToolbar"
211- data-bulk-button-id =" #bulkUserEditButton"
212- data-bulk-form-id =" #usersBulkForm"
213- data-click-to-select =" true"
214- id =" usersTable"
215- class =" table table-striped snipe-table"
216- data-url =" {{ route (' api.users.index' , [' location_id' => $location -> id ])} }"
217- data-export-options =' {
218- "fileName": "export-locations-{{ str_slug ($location -> name ) } } -users-{{ date (' Y-m-d' ) } } ",
219- "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
220- }' >
221-
222- </table >
223- </div ><!-- /.table-responsive -->
224- </div ><!-- /.tab-pane -->
225-
226-
227219 <div class =" tab-pane" id =" assets_assigned" >
228220 <h2 class =" box-title" >
229221 {{ trans (' admin/locations/message.assigned_assets' ) } }
230222 </h2 >
231223
232- <div class =" table table-responsive" >
233224 @include (' partials.asset-bulk-actions' , [' id_divname' => ' AssignedAssetsBulkEditToolbar' , ' id_formname' => ' assignedAssetsBulkForm' , ' id_button' => ' AssignedbulkAssetEditButton' ] )
234225 <table
235226 data-columns =" {{ \App \Presenters \AssetPresenter:: dataTableLayout () } }"
@@ -254,14 +245,11 @@ class="table table-striped snipe-table"
254245 "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
255246 }' >
256247 </table >
257-
258- </div ><!-- /.table-responsive -->
259248 </div ><!-- /.tab-pane -->
260249
261250 <div class =" tab-pane" id =" rtd_assets" >
262251 <h2 class =" box-title" >{{ trans (' admin/hardware/form.default_location' ) } } </h2 >
263252
264- <div class =" table table-responsive" >
265253 @include (' partials.asset-bulk-actions' , [' id_divname' => ' RTDassetsBulkEditToolbar' , ' id_formname' => ' RTDassets' , ' id_button' => ' RTDbulkAssetEditButton' ] )
266254 <table
267255 data-columns =" {{ \App \Presenters \AssetPresenter:: dataTableLayout () } }"
@@ -286,15 +274,12 @@ class="table table-striped snipe-table"
286274 "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
287275 }' >
288276 </table >
289-
290- </div ><!-- /.table-responsive -->
291277 </div ><!-- /.tab-pane -->
292278
293279
294280
295281 <div class =" tab-pane" id =" accessories" >
296282 <h2 class =" box-title" >{{ trans (' general.accessories' ) } } </h2 >
297- <div class =" table table-responsive" >
298283 <table
299284 data-columns =" {{ \App \Presenters \AccessoryPresenter:: dataTableLayout () } }"
300285 data-cookie-id-table =" accessoriesListingTable"
@@ -314,13 +299,9 @@ class="table table-striped snipe-table"
314299 "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
315300 }' >
316301 </table >
317- </div ><!-- /.table-responsive -->
318302 </div ><!-- /.tab-pane -->
319303
320304 <div class =" tab-pane" id =" accessories_assigned" >
321-
322- <div class =" table table-responsive" >
323-
324305 <h2 class =" box-title" style =" float :left " >
325306 {{ trans (' general.accessories_assigned' ) } }
326307 </h2 >
@@ -345,15 +326,11 @@ class="table table-striped snipe-table"
345326 "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
346327 }' >
347328 </table >
348-
349- </div ><!-- /.table-responsive -->
350329 </div ><!-- /.tab-pane -->
351330
352331
353332 <div class =" tab-pane" id =" consumables" >
354333 <h2 class =" box-title" >{{ trans (' general.consumables' ) } } </h2 >
355-
356- <div class =" table table-responsive" >
357334 <table
358335 data-columns =" {{ \App \Presenters \ConsumablePresenter:: dataTableLayout () } }"
359336 data-cookie-id-table =" consumablesListingTable"
@@ -373,14 +350,10 @@ class="table table-striped snipe-table"
373350 "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
374351 }' >
375352 </table >
376-
377- </div ><!-- /.table-responsive -->
378353 </div ><!-- /.tab-pane -->
379354
380355 <div class =" tab-pane" id =" components" >
381356 <h2 class =" box-title" >{{ trans (' general.components' ) } } </h2 >
382- <div class =" table table-responsive" >
383-
384357 <table
385358 data-columns =" {{ \App \Presenters \ComponentPresenter:: dataTableLayout () } }"
386359 data-cookie-id-table =" componentsTable"
@@ -399,9 +372,7 @@ class="table table-striped snipe-table"
399372 "fileName": "export-locations-{{ str_slug ($location -> name ) } } -components-{{ date (' Y-m-d' ) } } ",
400373 "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
401374 }' >
402-
403375 </table >
404- </div ><!-- /.table-responsive -->
405376 </div ><!-- /.tab-pane -->
406377
407378 <div class =" tab-pane" id =" history" >
0 commit comments