

<?php $__env->startSection('content'); ?>
<div class="container">
	<div class="row">
	    <div class="col-sm-12">
	        <h3 style="margin-top: 0px;">
	            <i class="fa fa-list-ul"></i>
	            List of <mark>Divisions</mark>
	            <?php if (app('Illuminate\Contracts\Auth\Access\Gate')->check('ticket_admin-access')): ?>
		            <a href="<?php echo e(url('division/create')); ?>" class="btn btn-primary pull-right">
		                <i class="fa fa-plus"></i> Create <code><b>Division</b></code>
		            </a>
				<?php endif; ?>
	        </h3>
	        <div class="panel panel-info">
	            <div class="panel-heading">
	                <h3 class="panel-title text-center"><i class="fa fa-list-ul"></i> List of <code><b>Divisions</b></code></h3>
	            </div>
	            <div class="panel-body">
	            	<div class="table-responsive">
		                <table id="myTable" class="table table-bordered table-striped table-hover">
		                    <thead>
		                        <tr class="success">
		                            <th>SL</th>
		                            <th>Division</th>
		                            <?php if (app('Illuminate\Contracts\Auth\Access\Gate')->check('ticket_admin-access')): ?>
		                            	<th>Edit</th>
		                            <?php endif; ?>
		                        </tr>
		                    </thead>
		                    <tbody>
		                    <?php
		                        $i = 0;
		                    ?>
		                    <?php foreach($divisions as $division): ?>
		                        <tr>
		                            <td><?php echo e(++$i); ?></td>
		                            <td><strong><?php echo e($division->name); ?></strong></td>
		                            <?php if (app('Illuminate\Contracts\Auth\Access\Gate')->check('ticket_admin-access')): ?>
		                            	<td><?php echo Html::link("division/$division->id/edit",' Edit', ['class' => 'fa fa-edit btn btn-primary btn-xs']); ?></td>
		                            <?php endif; ?>
		                        </tr>
		                    <?php endforeach; ?>
		                    </tbody>
		                </table>
	            	</div>
	            </div>
	        </div>
	    </div>
	</div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('style'); ?>
    <link rel="stylesheet" href="<?php echo e(asset('assets/css/dataTables.bootstrap.min.css')); ?>">
<?php $__env->stopSection(); ?>

<?php $__env->startSection('script'); ?>
	<script src="<?php echo e(asset('assets/js/jquery.dataTables.min.js')); ?>"></script>
    <script src="<?php echo e(asset('assets/js/dataTables.bootstrap.min.js')); ?>"></script>
    
	<script type="text/javascript">
	    $(document).ready(function(){
	        $('#myTable').DataTable();
	    });
	</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>