mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 21:54:14 -08:00
54 lines
2.3 KiB
PHP
54 lines
2.3 KiB
PHP
|
{{-- This Will load our default bootstrap-table settings on any table with a class of "snipe-table" and export it to the passed 'exportFile' name --}}
|
||
|
<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
|
||
|
<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
|
||
|
<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js?v=1') }}"></script>
|
||
|
<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js?v=1') }}"></script>
|
||
|
<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
|
||
|
<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
|
||
|
<script src="{{ asset('assets/js/extensions/multiple-sort/bootstrap-table-multiple-sort.js') }}"></script>
|
||
|
<script>
|
||
|
$('.snipe-table').bootstrapTable({
|
||
|
classes: 'table table-responsive table-no-bordered',
|
||
|
undefinedText: '',
|
||
|
iconsPrefix: 'fa',
|
||
|
showRefresh: true,
|
||
|
@if ($search)
|
||
|
search: true,
|
||
|
@endif
|
||
|
pageSize: {{ $snipeSettings->per_page }},
|
||
|
pagination: true,
|
||
|
sidePagination: 'server',
|
||
|
sortable: true,
|
||
|
cookie: true,
|
||
|
cookieExpire: '2y',
|
||
|
mobileResponsive: true,
|
||
|
@if (isset($multiSort))
|
||
|
showMultiSort: true,
|
||
|
@endif
|
||
|
showExport: true,
|
||
|
showColumns: true,
|
||
|
exportDataType: 'all',
|
||
|
exportTypes: ['csv', 'excel', 'txt','json', 'xml'],
|
||
|
exportOptions: {
|
||
|
fileName: '{{ $exportFile . "-" }}' + (new Date()).toISOString().slice(0,10),
|
||
|
},
|
||
|
maintainSelected: true,
|
||
|
paginationFirstText: "{{ trans('general.first') }}",
|
||
|
paginationLastText: "{{ trans('general.last') }}",
|
||
|
paginationPreText: "{{ trans('general.previous') }}",
|
||
|
paginationNextText: "{{ trans('general.next') }}",
|
||
|
pageList: ['10','25','50','100','150','200'],
|
||
|
icons: {
|
||
|
paginationSwitchDown: 'fa-caret-square-o-down',
|
||
|
paginationSwitchUp: 'fa-caret-square-o-up',
|
||
|
columns: 'fa-columns',
|
||
|
@if( isset($multiSort))
|
||
|
sort: 'fa fa-sort-amount-desc',
|
||
|
plus: 'fa fa-plus',
|
||
|
minus: 'fa fa-minus',
|
||
|
@endif
|
||
|
refresh: 'fa-refresh'
|
||
|
},
|
||
|
|
||
|
});
|
||
|
</script>
|