@extends('layouts.app')
@section('title')
Mark List
@parent
@stop
@section('content')

<main id="issue">
  
   <section>
     <div class="container">
      <div class="row">
        <div class="col-md-12 listing">
          
          <h3>Mark List <small>(Article/chapter)</small></h3>
          <hr>

          @if (Session::has('message'))
          <div class="alert alert-danger alert-dismissible fade show" data-auto-dismiss="5000" role="alert">
          <b>Attention!</b>{{ Session::get('message') }}         
             <button type="button" class="close" data-dismiss="alert" aria-label="Close">
              <span aria-hidden="true">&times;</span>
            </button>
          </div>
          @endif

          @foreach($mark_list as $row)
         <div class="card bigbox-hvr-slow">
          <div class="card-body"> 
          @if($row->article_title)                   
            <h4 class="card-title"><a href ="{{url('article')}}/{{$row->article_id}}">Article: {!! $row->article_title !!}</a></h4>
            <p>Volume: {{$row->vname}}, Issue: {{$row->iname}}</p>
            <p>Journal: {!!$row->jname!!}</p>

          @elseif($row->chapter_title)
                         
            <h4 class="card-title"><a href ="{{url('chapter')}}/{{$row->chapter_id}}">Chapter: {!! $row->chapter_title !!}</a></h4>
            <p>Book Volume: {{$row->evname}}</p>
            <p>Book: {!!$row->ename!!}</p>
          @elseif($row->vname)                   
            <p class="card-title"><a href ="{{url('ebook_volume')}}/{{$row->ebook_volume_id}}">Complete Volume: {!! $row->vname !!}</a></p>
            <p>Book: {!!$row->ename!!}</p>
          @endif      
            
          </div>
          <div class="card-footer text-muted">            
            {{ Form::open([ 'method'  => 'delete', 'route' => [ 'marklist.destroy', $row->nid] ]) }}
            <input type="hidden" name="param" value="{{Crypt::encrypt($row->nid)}}">                      
            <button type="submit" id="unmarkitembtn{{$row->nid}}" class="card-link text-dark">Unmark</button>
             {{ Form::close() }}
           {{ Form::open(array('id'=>"addtocartForm",'method' => 'POST','route' => 'cart.store')) }}
          <input type="hidden" name="param" value="{{Crypt::encrypt($row->nid)}}">                  
          <button type="submit" id="addcartbtn" class="card-link text-dark">Purchase PDF</button>
            {{ Form::close() }}
          </div>
        </div>
        @endforeach

        </div>
        <!-- div class="col-md-4">
          
          <div class="card bg-spring-green bigbox-hvr-slow">
              <div class="card-body">
                    <img src="/images/bundle-square.jpg" class="img-fluid" />
              </div>
          </div>
        </div -->
      </div>
    </div>
  </section>
  
</main>
</div>
<!----Main Section Starts----> 
<script type="text/javascript">
  $(function () {
  $('[data-toggle="popover"]').popover()
})
</script>
@endsection