@if($pages=='manuscript-list')
<div class="container-fluid">
    <div class="page-title">
        <div class="row">
            <div class="col-md-6 col-sm-12">
                <h3 class="fw-bolder">Institute Manuscript</h3>
            </div>
        </div>
    </div>
</div>
<!-- Container-fluid starts-->
<div class="container-fluid">
    <div class="row">
        <div class="col-sm-12">
            <div class="card">
                <div class="card-body">
                    <div class="d-flex align-items-center justify-content-end mb-3">
                        <div class="col-12 col-md-5 d-flex align-items-center justify-content-end">
                            <label class="mb-0 mr-2">Search:</label>
                            <form class="w-100" action="/member/manuscript-list" method="post" enctype="multipart/form-data">
                                @csrf
                                <div class="input-group">
                                    <input type="text" class="form-control" placeholder="Search by Reference..." name="reference_number" value="{{$param['reference_number']}}">
                                    <input type="text" class="form-control" name="institute_id" value="{{Crypt::encrypt($param['institute_id'])}}" hidden>
                                    <div class="input-group-prepend">
                                        <button class="input-group-text" type="submit" role="button" id="basic-addon1" name="search" value="search">
                                            <i data-feather="search"></i>
                                        </button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                    <div class="table-responsive">
                        <table class="memberTable" cellspacing="0" cellpadding="0">
                            <tr>
                                <th>Reference No.</th>
                                <th>Submitted Date</th>
                                <th>Title</th>
                                <th>Article type</th>
                                <th>Principal Author</th>
                                <th>Action</th>
                            </tr>
                            @if(count($institute_manuscript)>0)
                            @foreach($institute_manuscript as $manuscript)
                            <tr>
                                <td>{{$manuscript->reference_number}}</td>
                                <td>{{gmdate("d-m-Y", $manuscript->date_submitted)}}</td>
                                <td>{{$manuscript->title}}</td>
                                <td>{{$manuscript->article_type_name}}</td>
                                <td>{{$manuscript->PrincipalAuthor}}</td>
                                <td><a type="button" class="btn btn-pill btn-primary btn-air-primary" style="background-color:#EC6608 !important;box-shadow: 0px 4px 15px rgba(236, 102, 8, 0.2) !important; border-color: #EC6608 !important;" href="/member/detail-manuscript/{{Crypt::encrypt($manuscript->manuscript_id)}}">Details</a></td>
                            </tr>
                            @endforeach
                            @else
                            <tr>
                                <td colspan="6" class="text-center">No Record</td>
                            </tr>
                            @endif
                        </table>
						@if (count($institute_manuscript) > 0)
                        <div class="member_portal_paggination">{{ $institute_manuscript->appends(request()->input())->links() }}</div>
                        @endif
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@else
<div class="container-fluid">
    <div class="page-title">
        <div class="row">
            <div class="col-md-6 col-sm-12">
                <h3 class="fw-bolder">Society Manuscript</h3>
            </div>
        </div>
    </div>
</div>
<!-- Container-fluid starts-->
<div class="container-fluid">
    <div class="row">
        <div class="col-sm-12">
            <div class="card">
                <div class="card-body">
                    <div class="d-flex align-items-center justify-content-end mb-3">
                        <div class="col-12 col-md-5 d-flex align-items-center justify-content-end">
                            <label class="mb-0 mr-2">Search:</label>
                            <form class="w-100" action="/member/society-manuscript-list" method="post" enctype="multipart/form-data">
                                @csrf
                                <div class="input-group">
                                    <input type="text" class="form-control" placeholder="Search by Reference..." name="reference_number" value="{{$param['reference_number']}}">
                                    <input type="text" class="form-control" name="society_id" value="{{Crypt::encrypt($param['society_id'])}}" hidden>
                                    <div class="input-group-prepend">
                                        <button class="input-group-text" type="submit" role="button" id="basic-addon1" name="search" value="search">
                                            <i data-feather="search"></i>
                                        </button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                    <div class="table-responsive">
                        <table class="memberTable" cellspacing="0" cellpadding="0">
                            <tr>
                                <th>Reference No.</th>
                                <th>Submitted Date</th>
                                <th>Title</th>
                                <th>Article type</th>
                                <th>Principal Author</th>
                                <th>Action</th>
                            </tr>
                            @if(count($society_manuscript)>0)
                            @foreach($society_manuscript as $manuscript)
                            <tr>
                                <td>{{$manuscript->reference_number}}</td>
                                <td>{{gmdate("d-m-Y", $manuscript->date_submitted)}}</td>
                                <td>{{$manuscript->title}}</td>
                                <td>{{$manuscript->article_type_name}}</td>
                                <td>{{$manuscript->PrincipalAuthor}}</td>
                                <td><a type="button" class="btn btn-pill btn-primary btn-air-primary" style="background-color:#EC6608 !important;box-shadow: 0px 4px 15px rgba(236, 102, 8, 0.2) !important; border-color: #EC6608 !important;" href="/member/detail-manuscript/{{Crypt::encrypt($manuscript->manuscript_id)}}">Details</a></td>
                            </tr>
                            @endforeach
                            @else
                            <tr>
                                <td colspan="6" class="text-center">No Record</td>
                            </tr>
                            @endif
                        </table>
						@if (count($society_manuscript) > 0)
                        <div class="member_portal_paggination">{{ $society_manuscript->appends(request()->input())->links() }}</div>
                        @endif
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@endif