<div class="portlet box success">
    <div class="portlet-title">
        <div class="caption">
            <i class="livicon" data-name="responsive" data-size="16" data-loop="true" data-c="#fff" data-hc="white"></i>
            Approved Request List
        </div>
    </div>

    <div class="portlet-body table-responsive">

        <form action="{{  URL::to('admin/editor_role/approve_list') }}" method="Get" enctype="multipart/form-data">
            @csrf
            <div class="form-group">
                <div class="input-group mb-5">
                    <input type="text" name="email" autocomplete="off" class="form-control" placeholder="Enter Email" value="{{$param['email']}}">
                    <span class="input-group-btn">
                        <button class="btn btn-info m-r-5" type="submit"><span class="glyphicon glyphicon-search"> Search</span></button>
                        <a href="{{  URL::to('admin/editor_role/approve_list') }}" class="btn btn-default">
                            <span class="glyphicon glyphicon-repeat"></span>&nbsp;Reset</a>
                    </span>
                </div>
            </div>
        </form>

        <table class="table table-striped table-bordered">
            <thead>
                <tr>
                    <th>Name</th>
                    <th>Email</th>
                    <th>Verification Request Type</th>
                    <th>Comment</th>
                    <th>Request Status</th>
                    <th>Added by</th>
                    <th>Approve Date</th>
                    <th>Approve by</th>
                </tr>
            </thead>
            <tbody>
                @if (count($approve_editors_list) > 0)
                @foreach ($approve_editors_list as $editor)
                <tr>
                    <td>@if(!empty($editor->full_name))
                        {{$editor->full_name}}
                        @else
                        {{$editor->fname.' '.$editor->mname.' '.$editor->lname}}
                        @endif
                    </td>
                    <td>@if(!empty($editor->editor_email))
                        {{$editor->editor_email}}
                        @else
                        {{$editor->email}}
                        @endif
                    </td>
                    <td>@if($editor->verification_comment == "Edit Editor")
                        {{"Request to"}} <b>CHANGE Editor Information</b>
                        @elseif($editor->verification_comment == "Delete Editor")
                        {{"Request to"}} <b>DELETE Editor</b>
                        @elseif($editor->verification_comment == "Editor Status Active")
                        {{"Change Editor Status"}} <b>(Currently BLOCK)</b>
                        @elseif($editor->verification_comment == "Editor Status Block")
                        {{"Change Editor Status"}} <b>(Currently ACTIVE)</b>
                        @elseif($editor->ebm_verification_comment == "Add Editor Role")
                        {{"Request to"}} <b>ADD New Editor Role</b>
                        @elseif($editor->ebm_verification_comment == "Delete Editor Role")
                        {{"Request to"}} <b>DELETE Editor Role</b>
                        @elseif($editor->ebm_verification_comment == "Edit Editor Role")
                        {{"Request to"}} <b>CHANGE Editor Role Information</b>
                        @endif
                    </td>
                    <td>
                        @if($editor->ebm_verification_comment == "Add Editor Role" || $editor->ebm_verification_comment == "Delete Editor Role" || $editor->ebm_verification_comment == "Edit Editor Role")
                        {{$editor->ebm_comment}}
                        @else
                        {{$editor->editor_comment}}
                        @endif
                    </td>
                    <td>@if($editor->verification_status == "approve")
                        <span class="label label-success m-t-10 d-block m-r-15 m-l-15">{{"Approve"}}</span>
                        @elseif(!empty($editor->ebm_verification_status == "approve"))
                        <span class="label label-success m-t-10 d-block m-r-15 m-l-15">{{"Approve"}}</span>
                        @endif
                    </td>
                    <td>
                        @if($editor->ebm_verification_comment == "Add Editor Role" || $editor->ebm_verification_comment == "Delete Editor Role" || $editor->ebm_verification_comment == "Edit Editor Role")
                        {{$editor->ebm_add_user}}
                        @else
                        {{$editor->editor_add_user}}
                        @endif
                    </td>
                    <td>
                        @if($editor->ebm_verification_comment == "Add Editor Role" || $editor->ebm_verification_comment == "Delete Editor Role" || $editor->ebm_verification_comment == "Edit Editor Role")
                        {{date('d-m-Y', strtotime($editor->ebm_updated_on))}}
                        @else
                        {{date('d-m-Y', strtotime($editor->updated_on))}}
                        @endif
                    </td>
                    <td>
                        @if($editor->ebm_verification_comment == "Add Editor Role" || $editor->ebm_verification_comment == "Delete Editor Role" || $editor->ebm_verification_comment == "Edit Editor Role")
                        {{$editor->ebm_updated_by}}
                        @else
                        {{$editor->editor_updated_by}}
                        @endif
                    </td>
                </tr>
                @endforeach
                @else
                <tr>
                    <td colspan="8">
                        <center>Empty</center>
                    </td>
                </tr>
                @endif
            </tbody>
        </table>
        @if (count($approve_editors_list) > 0)
        <center>{{ $approve_editors_list->appends(request()->input())->links() }}</center>
        @endif
    </div>
</div>