

@extends('../shared/default')

@section('content')
    <div class="row">
                	<div id="breadcrumb" class="col-xs-12">
                		<a href="#" class="show-sidebar">
                			<i class="fa fa-bars"></i>
                		</a>
                		<ol class="breadcrumb pull-left">
                			<li><a href="{{ route('guardian.index')  }}">Guardians</a></li>
                		</ol>
                	</div>
                </div>


<div class="form-group">
     	<p>
                    <a href="{{ route('guardian.create') }}" type="button" class="btn btn-default">
                      <span><i class="fa fa-plus"></i></span>
                      Create
                    </a>
                </p>
     	</div>


 	<div class="row">
    	<div class="col-xs-12">
    		<div class="box">
    			<div class="box-header">
    				<div class="box-name">
    					<i class="fa fa-users"></i>
    					<span>List of guardians</span>
    				</div>
    			</div>
    			<div class="box-content no-padding">
    				<table class="td_link table table-bordered table-striped table-hover table-heading table-datatable" id="datatable-1">
    					<thead>
    						<tr>
    							<th class="col-md-1">CIN</th>
    							<th class=" col-lg-3">Fist name last name</th>
    							<th class="col-md-1">Age</th>
    							<th>Mobile</th>
    						</tr>
    					</thead>
    					<tbody>
    					<!-- Start: list_row -->
    					@foreach($guardians as $guardian)
    					<tr onclick="document.location = '{{ route('guardian.show', $guardian) }}';">
                            <td>{{ $guardian->cin }}</td>
                            <td>{{ $guardian->first_name ."   "}}{{ $guardian->last_name }}</td>
                            <td>{{ $guardian->date_birth->age }}</td>
                            <td>{{ $guardian->mobile }}</td>
                        </tr>
                        @endforeach
    					<!-- End: list_row -->
    					</tbody>
    					<tfoot>
    						<tr>
    							<th class="col-md-1">CIN</th>
                                <th class=" col-lg-3">Fist name last name</th>
                                <th class="col-md-1">Age</th>
                                <th>Mobile</th>
    						</tr>
    					</tfoot>
    				</table>
    			</div>
    		</div>
    	</div>
    </div>
 @stop