@if($pages=='susbscribed_content' && !isset($request->id))
<div class="col-md-8 mt-xs-5">
    <nav aria-label="breadcrumb">
      <ol class="breadcrumb bg-transparent m-0 justify-content-end">
        <li class="breadcrumb-item"><a href="/home">Home</a></li>
        <li class="breadcrumb-item active" aria-current="page">User List</li>
      </ol>
    </nav>
    <h2 class="h4 p-3 bg-dark text-white">
    
    @if(isset($member_admin) && $member_admin == true) 
       Contents Subscribed by the User
    @else
       Contents Subscribed
    @endif   
    </h2>
    <div class="card bigbox-hvr-slow mt-4">
        <div class="card-body">
          <div class="table-responsive">

                    <table class="table table-striped table-bordered" id="article_table">
                        <thead>
                            <tr>
                                <th>S.#</th>
								<th>User Name</th>
                                <th>Institution / Organization</th>
                                <th>Content</th>
                            </tr>
                        </thead>
                        <tbody>
                            @if (!empty($user_consortia_counter))
                            @if(!$user_consortia_counter->isEmpty())
							@php $cnt =$user_consortia_counter->perPage() * ($user_consortia_counter->currentPage() - 1); @endphp
                            @foreach($user_consortia_counter as $key => $value)
                            <tr>
                                <td>{{++$cnt}}</td>
                               <td>{{ $value->display_name }}</td>
                                <td>{{ $value->organization_name }}  
                                    @if(isset($value->access_type_on) && ($value->access_type_on == "journal_volume" || $value->access_type_on == "article" ))
                                        (Journal Access)
                                    @elseif(isset($value->access_type_on) && ($value->access_type_on == "ebook_volume" || $value->access_type_on == "chapter"))
                                    (ebook Access)
                                    @endif
                                            
                                </td>
                                <td>
                                    <a href="/home/susbscribed_content/{{ $value->user_access_id }}" class="nac-link" > <i class="fas fa-chart-area"></i> View </a>
                                </td>
                            </tr>
                            @endforeach
                            @else
                            <tr>
                                <td colspan="3">
                                    <center>Empty</center>
                                </td>
                            </tr>
                            @endif
							@endif
                        </tbody>
                    </table>
                    @if (!empty($user_consortia_counter))
                    <center>{{ $user_consortia_counter->appends(request()->input())->links() }}</center>
                    @endif
        </div>
      </div>
    </div>
</div>
@elseif($pages=='susbscribed_content' && isset($request->id))
<div class="col-md-8 mt-xs-5">
    <nav aria-label="breadcrumb">
      <ol class="breadcrumb bg-transparent m-0 justify-content-end">
        <li class="breadcrumb-item"><a href="/home">Home</a></li>
        <li class="breadcrumb-item"><a href="/home/susbscribed_content">User List</a></li>
        <li class="breadcrumb-item active" aria-current="page">Subscribed Content</li>
      </ol>
    </nav>
    <h2 class="h4 p-3 bg-dark text-white">
        Subscribed Content of {{$user->organization_name}}
    </h2>
    <div class="card bigbox-hvr-slow mt-4">
        <div class="card-body">
          <div class="table-responsive">

                    <table class="table table-striped table-bordered" id="article_table">
                        <thead>
                            <tr>
                                <th width="10%">S.#</th>
                                <th width="50%" class="text-center">
                                 @if(isset($accessdata) && ($accessdata->access_type_on == "journal_volume" || $accessdata->access_type_on == "article"))   
                                    Journal
                                 @elseif(isset($accessdata) && ($accessdata->access_type_on == "ebook_volume" || $accessdata->access_type_on == "chapter"))   
                                 eBook
                                 @endif
                                 </th>
                                <th width="40%" class="text-center">Volume(s)</th>
                                <!--th width="10%">Epub</th-->

                            </tr>
                        </thead>
                        <tbody>
                            @if (!empty($subscribed_content))
                            @php $a=1; @endphp
                            @foreach($subscribed_content as $key => $value)
                            <tr>
                                <td>{{ $a }}</td>
                                <td>
                                    @if($value->access_type_on == "ebook_volume" || $value->access_type_on == "chapter")
                                    <a href="/ebook_volume/{{ $value->ebook_volume_id }}" target="_blank"> {{ $value->title }} </a>
                                    @else
                                    <a href="/journal/{{ $value->journal_id }}" target="_blank"> {{ $value->title }} </a>
                                    @endif
                                </td>
                                <td align="justify">{!! $value->volumeYear !!}</td>
                                <!--td>@if($value->track==1) Yes @else -- @endif</td-->

                            </tr>
                            @php $a++ @endphp
                            @endforeach
                            @else
                            <tr>
                                <td colspan="3">
                                    <center>No Record Found</center>
                                </td>
                            </tr>
                            @endif
                        </tbody>
                    </table>
                    @if (!empty($subscribed_content))
                    <center>{{ $subscribed_content->appends(request()->input())->links() }}</center>
                    @endif
        </div>
      </div>
    </div>
</div>
@endif
