@extends('admin/layouts/default')

{{-- Page title --}}
@section('title')
Volumes
@parent
@stop

{{-- page level styles --}}
@section('header_styles')
<link href="{{ asset('assets/css/pages/tables.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('assets/vendors/select2/css/select2.min.css') }}" type="text/css" rel="stylesheet">
<link href="{{ asset('assets/vendors/select2/css/select2-bootstrap.css') }}" rel="stylesheet">
    <!-- end of page level css-->
@stop

{{-- Page content --}}
@section('content')
<section class="content-header">
    <!--section starts-->
    <h1>Ebook Volume</h1>
    <ol class="breadcrumb">
        <li>
            <a href="{{ route('admin.dashboard') }}">
                <i class="livicon" data-name="home" data-size="18" data-loop="true"></i>
                Dashboard
            </a>
        </li>
        <li class="active">Ebook Volume List</li>
    </ol>
</section>
<!--section ends-->
<section class="content">
                <div class="row">
                    <div class="col-md-12">
                        <!-- BEGIN SAMPLE TABLE PORTLET-->
                        <div class="portlet box primary">
                            <div class="portlet-title">
                                <div class="caption">
                                    <i class="livicon" data-name="responsive" data-size="16" data-loop="true" data-c="#fff" data-hc="white"></i>
                                    Ebook Volume List
                                </div>
							
                            </div>
                            <div class="portlet-body table-responsive">
							<form action="{{ route('contentreport',['type'=>'ebook_volume']) }}" method="Get"  enctype="multipart/form-data">
								@include('search.ebook_search')         
								
								<div class="form-group">
									<button type="submit" class="btn btn-primary" name="frm_search" value ="true">
										<span class="glyphicon glyphicon-search"></span>  Search
									</button>
									<a href="{{ route('contentreport',['type'=>'ebook_volume']) }}"  id="btn_reset" class="btn btn-default">Reset</a>
								</div>
							</form>
							
					

                                <table class="table table-striped table-bordered" id="volume_table">
                                    <thead>
                                        <tr>
                                            <th>Ebook</th>
											<th>Volume Name</th>
											<th>Year</th>
                                            <th>eISBN</th>
											<th>ISSN</th>
                                            <th>Published Date</th>
                                            <th width="180px">Action</th>
                                        </tr>
                                    </thead>
                                    <tbody>

									@foreach($ebook_volume_list as $key => $value)
                                        <tr>
                                            <td>{{ $value->title }}</td>
                                            <td>{{ $value->volume_name }} @if(strtolower($value->select_ebook_type) == 'video') - (Type  {{$value->select_ebook_type}} ) @endif </td>
											<td>{{ $value->volume_year }}</td>                                            
                                            <td>{{ $value->eisbn }}</td>
                                            <td>{{ $value->issn }}</td>
                                            <td>{{ date('jS M, Y',$value->created) }}</td>
											
                                            <td class="numeric">
											     <a href="{{ route('contentreport',['type'=>'ebook_volume','content_id'=>$value->ebook_volume_id]) }}" class="btn btn-success btn-sm pull-left mb-1" target="_blank">
                                                <i class="livicon" data-name="eye-open" data-loop="true" data-color="#fff" data-hovercolor="white" data-size="14"></i> View Detail
                                                </a> 
											</td>
                                        </tr>
										@endforeach

                                    </tbody>
                                </table>
								<div class="col-md-4">
                                     Showing {{ $ebook_volume_list->firstItem() }} to {{ $ebook_volume_list->lastItem() }} of {{  $ebook_volume_list->total() }} entries
                                </div>
                        <div class="col-md-8  text-right">         {{ $ebook_volume_list->appends(request()->input())->links() }}
                          </div>
                            </div>
                        </div>


                            </div>
                        </div>
                        <!-- END SAMPLE TABLE PORTLET-->
                    </div>
                </div>
            </section>

@stop

{{-- page level scripts --}}
@section('footer_scripts')
<script src="{!! asset('assets/vendors/select2/js/select2.js') !!}"></script>    
<script>
$("#ebook_id").select2({
	theme:"bootstrap",
	placeholder:"Select Ebook",
	width: '100%',
	height: '50px'
});
    		
</script>
@stop