@isset($content)

<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> Add Volumes
		</div>	
	</div>

	<div class="portlet-body table-responsive">
		
<table class="table table-striped table-bordered" style="width:100%">
<tr>
	<th class="align-text-top text-right">
		All Volumes&nbsp; <input id="acces_all_check" type="checkbox"><br>
		All Epub &nbsp; <input id="epub_all_check" type="checkbox">
	</th>
</tr>
</table>

@foreach($content  as $k => $value)
<table class="table table-striped table-bordered" style="width:100%">
<tr>
	<td colspan="2" class="text-left"><strong>{{$value->subtitle}} : (<font color="#9e9e9e"> {{$value->title}} </font>) </strong></td>
	<td class="text-center"><strong>All</strong></td>
</tr>
<tr>
	
	@if ($value->volume_range != "")
		
		<td colspan="2" class="text-left">
		
		@if(isset($param['request_id']))	
		<div class="text-right" style=" border-right:1px solid #ddd; float:left;">
			<div style="margin-top:18px;">Volume :&nbsp;&nbsp;</div>
			<div style="margin-top:5px;">Epub :&nbsp;&nbsp;</div>
			<div style="margin-top:5px;">Year :&nbsp;&nbsp;</div>
		</div>
		@endif	
		
			@foreach(explode(',', $value->volume_range) as $vol)
			
					<div class="text-center" style=" width: 40px; float:left;">
					
					{{explode('-',$vol)[1]}}
					<br>
					
					<label class="container">					  <input type="checkbox"  id="vol_chk_{{$value->journal_id}}_{{explode('-',$vol)[1]}}" name="journal_volume[]" value="{{$value->journal_id}},{{explode('-',$vol)[0] }}" {{ in_array(explode('-', $vol)[0], $access_file_lists) ? 'checked' : '' }}>

					  <span class="checkmark"></span>
					</label>
					
					<br>
					
					<label class="container">					  <input type="checkbox" id="epub_chk_{{$value->journal_id}}_{{explode('-',$vol)[1]}}" name="journal_epub[{{$value->journal_id}}][{{explode('-',$vol)[0]}}]" value="1" {{ in_array(explode('-', $vol)[0], $access_file_lists) ? 'checked' : '' }}>

					  <span class="checkmark"></span>
					</label>
					
					<br>{{explode('-',$vol)[2]}}
					</div>
			@endforeach
			<div style="clear:both;"></div>
		</td>
		<td width="4%" class="text-center">
		<br>
			<label class="container" style="width:4px;">
			  <input  id="access_check_{{ $value->journal_id }}" type="checkbox" value="{{$value->journal_id}}" onclick="check_volume({{$value->journal_id}});"><br>
			  <span class="checkmark"></span>
			</label>
			
			<label class="container" style="width:4px;">
			  <input  id="access_chk_epub{{ $value->journal_id }}" type="checkbox" value="1" onclick="check_epub({{$value->journal_id}});">
			  <span class="checkmark"></span>
			</label>
			
		</td>	
		
	@endif
	
	</td>
	

</tr>
</table>

@endforeach  

<table class="table table-striped table-bordered" style="width:100%">
<tr>
<td colspan="5" class="text-left">
	@if(isset($param['request_id']))	
		<button type="submit" class="btn btn-primary" name="btn_submit" value ="submit"> <span class="glyphicon glyphicon-add"></span>  Submit </button>
	@endif	
</td>
</tr>

</tbody>		
</table>	

@endisset
		
	</div>
</div>
