
@extends('adminlte::page')
 
@section('content')
<?php Fun::lang()?>
<div class="title-add">
	<div class="page-bar"> 
		<ul class="page-breadcrumb"> 
			<li> <a class="ng-binding" href="#"><i class="fa fa-dashboard"></i> Dashboard</a> </li>
			<li><a href="#">Manage User</a></li>
            <li><a href="#">Positions</a></li>
		</ul> 
	</div>
</div>
<div class="page">
	<div class="top-content">
        <div class="row">
            <div class="col-sm-12 col-xs-12">
                <div class="title-add">
	                <div class="pull-left">
	                    <h3>Positions</h3>
	                </div>
	            </div>
	            @can('Position-Create')
                <div class="pull-right">
                    <a class="button_sm button_primary" href="{{route('positions.create')}}"><span class="fa fa-plus"></span>  Create New</a>
                </div>
                @endcan
            </div>
        </div>
    </div>
	<div class="box-body table-responsive">
		<table id="datatable_department" class="table">
			<thead>
				<tr>
					<th width="10%">No</th>
					<th width="30%">Title</th>
					<th width="30%">Description</th>
					<th width="10%">Action</th>
				</tr>
			</thead>

			<tbody>
				@foreach ($positions as $key => $value)
					<tr>
						<td>{{$key+1}}</td>
						<td>{{$value->name}}</td>
						<td>{{$value->description}}</td>

						<td>
							@can('Position-Edit')
								<a href="{{route("positions.edit", $value->id)}}"><span class="button_success fa fa-edit"></span></a>
							@endcan</td>

					</tr>
				@endforeach
			</tbody>
		</table>
	</div>
</div>
@endsection


@section('js')

    <script> 
    	$(document).ready(function() {
		
			$('#datatable_department').DataTable({		
			
		});
		
		});</script>
@stop