<div class="container">
    <div class="row">
        <div class="col-md-8 col-xl-9">

            <div class="row list">
      @if(count($jms_journal) > 0)


        @foreach ($jms_journal as $journals)
            @php
                $ejournal = App\Models\Journal::GetJournalByJMSCode($journals->subtitle);
            @endphp    
                    <div class="col-md-4 col-xl-3">

                        <div class="item bigbox-hvr-slow d-block p-2">

                           

                              <a href="/call-for-papers-detail/{{strtolower($journals->subtitle)}}/journal">

                        @if(isset($ejournal->image_file_name))

                        <img class="img-fluid mb-1 w-100" alt="{{$journals->title}}" src="{{'/images/bentham/'.$ejournal->image_file_name}}"/>
                                @else

                                <img class="img-fluid w-100 mb-1" alt="profile pic" src="https://via.placeholder.com/95x125">

                                @endif

                                </a>
                               
                                    <a href="/call-for-papers-detail/{{strtolower($journals->subtitle)}}/journal" class="btn btn-info btn-sm d-block mb-1">Call for Papers</a>
                                <a href="https://bentham.manuscriptpoint.com/submit/Htproposal/journal/{{ $journals->subtitle }}" class="btn btn-dark btn-sm d-block">Edit a Thematic Issue</a>
                               

                        </div>

                    </div>

                   

                @endforeach

                

                <div class="col-md-12 d-inline-flex list-pagination">{{ $jms_journal->appends(request()->input())->links() }}</div>

              @else
              <div class="alert alert-danger w-100 text-center" role="alert">No Record Found</div>

              @endif

                    </div>
                </div>

                <div class="col-md-4 col-xl-3">
                
                    <div class="card text-white bg-secondary">
                <div class="card-header">
                    <h5 class="m-0">Find a Journal</h5> 
                </div>
                <div class="card-body">
                    <form  action="{{route('callforpapers')}}" enctype="multipart/form-data" method="post">
                     @csrf   
                     <div class="mb-2">
                        <select class="form-control d-block mb-1 select2" id="by-journal" name="by_journal">
                            <option selected="true" disabled="disabled" hidden >Select Journal</option>
                            @foreach ($jms_all_journal as $journals)                            
                                <option value="{{ $journals->subtitle }}" @if(old('by_journal') == $journals->subtitle) {{ 'selected' }} @endif>{{ $journals->title }}</option>
                            @endforeach
                        </select>
                     </div>
                     <div class="mb-2">
                        <select class="form-control d-block mb-1 select2" id="by-subject" name="by_subject">
                            <option selected="true" disabled="disabled" hidden >Select Subject</option>
                            @foreach ($subject as $key => $value)
                            <option value="{{$key}}" @if (old("subject_id")){{ (in_array($key, old("subject_id")) ? "selected":"") }} @elseif(isset($journalsubject) and in_array($key, $journalsubject)) selected @endif>{{$value}}</option>
                            @endforeach
                        </select>
                     </div>
                    <hr class="my-2">
                    <button name="btnjournalsearch" type="submit" class="btn btn-info w-100" value="true">
                        Search <i class="fas fa-search float-right mt-1"></i>
                    </button>
              
            </form>


                </div>
            </div>

        </div>

    </div>

</div>
