added multi-select filters everywhere
This commit is contained in:
@ -15,10 +15,10 @@
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
{!! Form::open(['route' => 'items.index', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<div id="items" class="pull-left box-filter">
|
||||
<span class="title-filter hidden-xs">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::select('category', $categories, request('category'), ['class' => 'form-control input-filter input-sm']) !!}
|
||||
{!! Form::select('categories[]', $categories, request('categories'), ['id' => 'filter-categories', 'class' => 'form-control input-filter input-lg', 'multiple' => 'multiple']) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
@ -98,3 +98,13 @@
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("#filter-categories").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.categories', 1)]) }}"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
Reference in New Issue
Block a user