@extends('admin.layouts.container')

@section('content')
<form>
<div class="side-title">
    <div class="row">
        <div class="col-lg-6">
            <h3>{{ $title }}</h3>
        </div>
        <div class="col-lg-6 valign">
            <div class="edit-buttons text-right w-100">
                <a href="{{ route ('sliders.destroyAll') }}" data-method="delete" class="butn statusButns status_1 tableAction btn disabled bg-warning"> <span>{{ __('dashboard.sendToTrash') }}</span></a>
                <a href="#" class="butn statusButns status_1 showArchive bg-primary"> <span> {{ __('dashboard.displayTrash') }} </span></a>

                <a href="{{ route ('sliders.destroyAll') }}" data-method="delete" class="butn statusButns status_0 tableAction btn disabled bg-danger force"> <span> {{ __('dashboard.delete') }} </span></a>
                <a href="{{ route ('sliders.restoreAll') }}" data-method="put" class="butn statusButns status_0 tableAction btn disabled bg-info"> <span> {{ __('dashboard.restore') }} </span></a>
                <a href="#" class="butn statusButns status_0 showActive bg-primary"> <span> {{ __('dashboard.displayActive') }} </span></a>
            </div>
        </div>
    </div>
</div>


    <ul class="nav nav-tabs" id="myTab" role="tablist">
        <li class="nav-item" role="presentation">
            <button class="nav-link active" id="home-tab" data-toggle="tab" data-target="#sliders" type="button" role="tab" aria-controls="home" aria-selected="true">{{__('sliders.head')}}</button>
        </li>
        <li class="nav-item" role="presentation">
            <a href="{{route('sliders.bannerIndex')}}" class="nav-link">{{__('sliders.banners')}}</a>
        </li>
    </ul>
    <div class="tab-content" id="myTabContent">
        {{-- Sliders tab --}}
        <div class="tab-pane fade show active" id="sliders" role="tabpanel" aria-labelledby="sliders-tab">
            <table class="table table-hover table-bordered">
                <thead>
                <tr>
                    <th scope="col">
                        <div class="custom-control custom-checkbox">
                            <input type="checkbox" class="custom-control-input" id="selectall" name="example1">
                            <label class="custom-control-label" for="selectall"> </label>
                        </div>
                    </th>
                    <th scope="col">{{ __('sliders.title') }}</th>
                    <th scope="col">{{ __('sliders.description') }}</th>
                    <th scope="col">{{ __('sliders.show_in') }}</th>
                    {{--            <th scope="col">{{ __('sliders.status') }}</th>--}}
                    <th scope="col" colspan="2">{{ __('dashboard.created_at') }}</th>
                    <th scope="col">{{ __('dashboard.processes') }}</th>
                </tr>
                </thead>

                <tbody class="response">
                <tr class="search_filter_form">
                    <th scope="row"></th>
                    <th scope="row">
                        <input type="text" name="title" value="{{ $request->title ?? '' }}" class="form-control" placeholder="">
                    </th>
                    <th scope="row">
                        <input type="text" name="description" value="{{ $request->description ?? '' }}" class="form-control" placeholder="">
                    </th>
                    <th scope="row">
                        <select name="show_in" class="form-control">
                            <option value=""> {{__('sliders.show_in') }}</option>
                            <option value="home">{{__('sliders.home')}}</option>
                            <option value="contact">{{__('sliders.contact')}}</option>
{{--                            <option value="products">{{__('sliders.products')}}</option>--}}
{{--                            <option value="about">{{__('sliders.about')}}</option>--}}
                        </select>
                    </th>
                    {{--            <th scope="row">--}}
                    {{--                <select name="slider_status" class="form-control">--}}
                    {{--                    <option value=""> {{__('sliders.status') }}</option>--}}
                    {{--                    <option value="active">{{__('sliders.active')}}</option>--}}
                    {{--                    <option value="not_active">{{__('sliders.not_active')}}</option>--}}
                    {{--                </select>--}}
                    {{--            </th>--}}
                    <td>
                        <input type="text" placeholder="{{ __('dashboard.date_from') }}" name="date_from" value="{{ $request->date_from ?? '' }}" class="date_from form-control">
                    </td>
                    <td>
                        <input type="text" placeholder="{{ __('dashboard.date_to') }}" name="date_to" value="{{ $request->date_to ?? '' }}" class="date_to form-control">
                    </td>
                    <th scope="col"><button type="button" class="butn color small search"><span><i class="fas fa-search"></i></span></button></th>
                </tr>
                </tbody>


            </table>
        </div>
    </div>
<!-- ------------ data table ------------- -->

<!-- ------------ sidemenu links ------------- -->
</form>
@endsection



<script>
/**
 * Importat to handle ajax requests for filters, deletes, trash and any proccess done on the table's data
 */
var dataTable={
    route: '{{ route("sliders.grid") }}'
};

</script>
@section('inner_js')
    <script>
        /**
         * Set local storage articleGallery key to null
         * it means add new photo success
         */
        $(document).ready(function () {
            localStorage.setItem('articleGallery', 'null');
            localStorage.setItem('oldArticleStorage', 'null')
        })
    </script>
@endsection
