mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
API-ify the managed locations tab in user view
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
50b841d54d
commit
0383938536
|
@ -1015,23 +1015,36 @@
|
|||
</div><!-- /.tab-pane -->
|
||||
|
||||
<div class="tab-pane" id="managed">
|
||||
<div class="table-responsive">
|
||||
<table class="table display table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-8">{{ trans('general.name') }}</th>
|
||||
<th class="col-md-4">{{ trans('general.date') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user->managedLocations as $location)
|
||||
<tr>
|
||||
<td>{!! $location->present()->nameUrl() !!}</td>
|
||||
<td>{{ $location->created_at }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@include('partials.locations-bulk-actions')
|
||||
|
||||
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\LocationPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="locationTable"
|
||||
data-click-to-select="true"
|
||||
data-pagination="true"
|
||||
data-id-table="locationTable"
|
||||
data-toolbar="#locationsBulkEditToolbar"
|
||||
data-bulk-button-id="#bulkLocationsEditButton"
|
||||
data-bulk-form-id="#locationsBulkForm"
|
||||
data-search="true"
|
||||
data-show-footer="true"
|
||||
data-side-pagination="server"
|
||||
data-show-columns="true"
|
||||
data-show-fullscreen="true"
|
||||
data-show-export="true"
|
||||
data-show-refresh="true"
|
||||
data-sort-order="asc"
|
||||
id="locationTable"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{ route('api.locations.index', ['manager_id' => $user->id]) }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-locations-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div><!-- /consumables-tab -->
|
||||
</div><!-- /.tab-content -->
|
||||
|
|
Loading…
Reference in a new issue