
<?php \Laravel\Section::start('content'); ?>
	<div class="container">
		<div class="page-header">
			<h1>Liste des inscrits scannés</h1>
		</div>
		<div style="margin-bottom: 15px;">
			<a class="btn" href="<?php echo  URL::to_route('new_scan') ; ?>"><i class="icon-plus"></i> Ajouter un nouveau scan</a>&nbsp;
			<a class="btn" href="<?php echo  URL::to_route('csv_scan') ; ?>"><i class="icon-export"></i> Export CSV</a>
		</div>
		<?php echo  BHelpers::notification() ; ?>
		<?php if(!isset($count) || $count <=0): ?>
		Aucun inscrit n'a été scanné pour le moment.
		<?php else: ?>
		<table class="table table-striped table-hover datatablescans">
			<thead>
				<tr>
					<th style="width:4%">#</th>
					<th style="width:50%">Inscrit</th>
					<th>Date</th>
					<th style="text-align:right">Action</th>
				</tr>
			</thead>
			<tbody></tbody>
		</table>
		
		<script type="text/javascript">
		function delete_entry(id)
		{
			if(confirm("Confirmer ?"))
				$('#form_'+id).submit();
			else
				return false;
		}
		$(document).ready(function() {
			$('.datatablescans').dataTable( {
		        "bProcessing": true,
		        "bServerSide": true,
		        "iDisplayLength": 25,
		        "sAjaxSource": "<?php echo  URL::to_route('ajaxscans') ; ?>",
		        "oLanguage": {
			      "sSearch": "<?php echo __('admin.recherche'); ?> : ",
			      "sLengthMenu": "Affichage de _MENU_ résultat(s)"
			    },
		        "aaSorting": [ [0,'asc'], [1,'asc'] ]
		    });
		    
		    $(".dataTables_info, .dataTables_paginate").css({'margin-top':'20px','margin-bottom':'20px'});
		});
		</script>
		<?php endif; ?>
	</div>
<?php \Laravel\Section::stop(); ?>
<?php echo view('backend::template_default')->with(get_defined_vars())->render(); ?>