@section('title')
Indexing Information
@parent
@stop

<section>
  <div class="container">

    <h2 class="h4">Abstracting & Indexing Agencies for Journals</h2>
    <p>The following abstracting & indexing agencies cover Bentham Science Journals:</p>

    <hr>
    <!-- Main -->
    @if (!empty($indexing_list))

    @php
    $currentCategory = null;
    @endphp

    @foreach($indexing_category_list as $category_list)

    @foreach($indexing_list as $key => $value)

    @if($category_list->category_id === $value->agency_category)

    @if($value->agency_category !== $currentCategory)
    @php
    $currentCategory = $value->agency_category;
    @endphp

    <h2 class="h4">{{$category_list->name}}</h2>

    <hr>
    @endif

    <div class="card mb-3">

      <!-- First Drop Down -->
      <div class="card-header bg-siteblue text-white font-weight-bold p-0">
        <a class="text-white d-block p-3" data-toggle="collapse" href="#{{$value->index_id}}" role="button" aria-expanded="false" aria-controls="{{$value->index_id}}">{{$value->title}}<i class="fa fa-plus fa-sm mr-2 float-right mt-1"></i></a>
      </div>
      <!-- Drop Down Data Start -->
      <div class="collapse" id="{{$value->index_id}}">
        <div class="card-body">

          <!-- Journal Name Start -->
          <div class="row m-0">
            @foreach($journal_list as $journal_lists)
            @if ($value->index_id==$journal_lists->index_id)
            <a target="_blank" href="https://www.eurekaselect.com/journal/{{$journal_lists->journal_id}}" class="col-md-6 border-bottom py-2 pl-0"><i class="fa fa-chevron-right fa-sm mr-2"></i>{{$journal_lists->title}}</a>
            @endif
            @endforeach
          </div>
          <!-- Journal Name End -->

          @if (!empty($value->child))
          @foreach ($value->child as $children)
          <div class="card mb-2">
            <!-- Second Drop Down -->
            <div class="card-header bg-siteblue text-white font-weight-bold p-0">
              <a class="text-white d-block py-2 px-3" data-toggle="collapse" href="#{{$children->index_id}}" role="button" aria-expanded="false" aria-controls="{{$children->index_id}}">{{$children->title}}<i class="fa fa-plus fa-sm mr-2 float-right mt-1"></i></a>
            </div>

            <!-- Drop Down Data Start -->
            <div class="collapse" id="{{$children->index_id}}">
              <div class="card-body">

                <!-- Journal Name Start -->
                <div class="row m-0">
                  @foreach($journal_list as $journal_lists)
                  @if ($children->index_id==$journal_lists->index_id)
                  <a target="_blank" href="https://www.eurekaselect.com/journal/{{$journal_lists->journal_id}}" class="col-md-6 border-bottom py-2 pl-0"><i class="fa fa-chevron-right fa-sm mr-2"></i> {{$journal_lists->title}}</a>
                  @endif
                  @endforeach
                </div>
                <!-- Journal Name End -->

                @if (!empty($children->child))
                @foreach ($children->child as $subchildren)
                <div class="card mb-2">
                  <!-- Third Drop Down -->
                  <div class="card-header bg-siteblue text-white font-weight-bold p-0">
                    <a class="text-white d-block py-2 px-3" data-toggle="collapse" href="#{{$subchildren->index_id}}" role="button" aria-expanded="false" aria-controls="{{$subchildren->index_id}}">{{$subchildren->title}}<i class="fa fa-plus fa-sm mr-2 float-right mt-1"></i></a>
              </div>

                  <!-- Drop Down Data Start -->
                  <div class="collapse" id="{{$subchildren->index_id}}">
                    <div class="card-body">

                      <!-- Journal Name Start -->
                      <div class="row m-0">
                        @foreach($journal_list as $journal_lists)
                        @if ($subchildren->index_id==$journal_lists->index_id)
                        <a target="_blank" href="https://www.eurekaselect.com/journal/{{$journal_lists->journal_id}}" class="col-md-6 border-bottom py-2 pl-0"><i class="fa fa-chevron-right fa-sm mr-2"></i> {{$journal_lists->title}}</a>
          @endif
                        @endforeach
        </div>
                      <!-- Journal Name End -->

      </div>
                  </div>
      <!-- Drop Down Data End -->
                  <!-- Third Drop Down End -->
                </div>
                @endforeach
                @endif

              </div>
            </div>
            <!-- Drop Down Data End -->
            <!-- Second Drop Down End -->
          </div>
          @endforeach
          @endif

        </div>
      </div>
      <!-- Drop Down Data End -->
      <!-- First Drop Down End -->
    </div>

    @endif

    @endforeach

    @endforeach

    @endif
    <!-- End Main -->

  </div>

</section>