@section('content')
{{Breadcrumb::withLinks($breadcrumbs)}}
{{Navigation::links($tabs)->withAttributes(['role' => 'tablist'])}}
{{Form::open(['id' => 'search', 'route' => 'admin.payment.index', 'method' => 'POST', 'secure' => true])}}
{{ControlGroup::generate( Form::label('from', trans('admin.fields.date-from').":"), InputGroup::withContents(Form::text('from', $from ? date('d.m.Y', strtotime(e($from))) : '')) )}}
{{ControlGroup::generate( Form::label('to', trans('admin.fields.date-to').":"), InputGroup::withContents(Form::text('to', $to ? date('d.m.Y', strtotime(e($to))) : '')) )}}
{{Form::label('status', trans('admin.fields.payment-status').":")}}
@if ($tab == 'ecard' || $tab == 'epay') @foreach($statuses as $value)
{{Form::checkbox('status[]', $value, in_array($value, $status), ['class' => 'inline'])}} {{trans('admin.statuses.' . $value)}}
@endforeach @endif @foreach($types as $value)
{{Form::checkbox('type[]', $value, in_array($value, $type), ['class' => 'inline'])}} {{trans('admin.labels.' . $value)}}
@endforeach
{{Form::hidden('tab', $tab)}} {{Button::dark(trans('admin.buttons.search'))->prependIcon(Icon::search())->submit()}} {{Button::danger(trans('admin.buttons.reset-filter'))->prependIcon(Icon::remove())->reset()}}
{{Button::info(trans('admin.buttons.export'))->prependIcon(Icon::save())->submit()->withAttributes(['formaction' => route('admin.payment.export'), 'class' => 'pull-right'])}}
{{Form::close()}}
@if ($tab == 'other') @endif @if ($tab == 'ecard') @endif @forelse($payments[$tab] as $payment) @include('admin.payment.' . $tab . '.row') @empty @endforelse
{{trans('admin.labels.order')}} {{trans('admin.labels.date')}}{{trans('admin.labels.type')}}{{trans('admin.labels.amount')}} {{trans('admin.labels.state')}}{{trans('admin.labels.show')}}
{{trans('admin.messages.empty-list-of-payments')}}
{{$payments[$tab]->appends(['tab' => $tab, 'from' => $from, 'to' => $to, 'status' => $status])->links()}}
@stop @section('scripts') $('form .input-daterange').datepicker({ format: "dd.mm.yyyy", weekStart: 1, language: "sk", keyboardNavigation: false, autoclose: true, todayHighlight: true }); $('form#search').on('reset', function (event) { $(this).find('input[name=from]').val(''); $(this).find('input[name=to]').val(''); $(this).find('input[name^=status]').prop('checked', true); $(this).submit(); }); @stop