@section('content')
{{Breadcrumb::withLinks($breadcrumbs)}}
{{Form::open(['id' => 'search', 'route' => ['admin.order.index'], 'method' => 'GET', 'secure' => true])}}
{{ControlGroup::generate( Form::label('query', trans('admin.fields.search').":"), Form::text('query', $query ? e($query) : null) )}}
{{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('state', trans('admin.fields.order-state').":")}}
{{Form::checkbox('state[]', 'new', in_array('new', $state), ['class' => 'inline'])}} {{trans('admin.labels.order-state-new')}}
{{Form::checkbox('state[]', 'process', in_array('process', $state), ['class' => 'inline'])}} {{trans('admin.labels.order-state-process')}}
{{Form::checkbox('state[]', 'done', in_array('done', $state), ['class' => 'inline'])}} {{trans('admin.labels.order-state-done')}}
{{Form::checkbox('state[]', 'store', in_array('store', $state), ['class' => 'inline'])}} {{trans('admin.labels.order-state-store')}}
{{Form::checkbox('state[]', 'abort', in_array('abort', $state), ['class' => 'inline'])}} {{trans('admin.labels.order-state-abort')}}
{{Button::dark(trans('admin.buttons.search'))->prependIcon(Icon::search())->submit()}} {{Button::danger(trans('admin.buttons.reset-filter'))->prependIcon(Icon::remove())->reset()}}
{{Form::close()}}
@forelse($orders as $order) @if (Sentry::getUser()->hasAccess('admin.order.edit')) @elseif (Sentry::getUser()->hasAccess('admin.order.show')) @else @endif @empty @endforelse
{{trans('admin.labels.order')}} {{trans('admin.labels.date')}} {{trans('admin.labels.shipment')}} {{trans('admin.labels.price')}} {{trans('admin.labels.state')}} {{trans('admin.labels.paid')}}
{{link_to_route('admin.order.edit', $order->order, [$order->id], ['class' => 'order'])}}{{link_to_route('admin.order.show', $order->order, [$order->id], ['class' => 'order'])}}{{$order->order}}{{date('d.m.Y H:i:s', strtotime($order->created_at))}} {{$order_shipments[$order->order_shipment_id]->title($language->id)}} @if ($order->shipment_number && $order->shipment_date)
{{$order->shipment_number}}
{{$order->shipment_date}} @endif
{{number_format($order->price, 2, ',', ' ')}} € @if ($order->complete) {{trans('admin.labels.order-state-' . $order->state)}} @else {{trans('admin.labels.order-state-' . $order->state . '-incomplete')}} @endif
{{trans('admin.messages.empty-list-of-orders')}}
{{$orders->appends(isset($query) ? array('query' => e($query)) : null)->appends(isset($from) ? array('from' => e($from)) : null)->appends(isset($to) ? array('to' => e($to)) : null)->appends(isset($state) ? array('state' => $state) : null)->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=query]').val(''); $(this).find('input[name=from]').val(''); $(this).find('input[name=to]').val(''); $(this).find('input[name^=state]').prop('checked', true); $(this).submit(); }); @stop