@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 ('newsletters.create')}}" class="butn  btn bg-primary"><span><i class="fa fa-envelope"></i> {{ __('newsletters.new') }}</span></a>
            </div>
        </div>
    </div>
</div>

<!-- ------------ data table ------------- -->
<table class="table table-hover table-bordered">
    <thead>
        <tr>
            <th scope="col">{{ __('newsletters.email') }}</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">
                <input type="text" name="send_to" value="{{ $request->send_to ?? '' }}" class="form-control" placeholder="">
            </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>
<!-- ------------ 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("newsletters.mailsListGrid") }}'
}
</script>

