<div class="row">
<div class="col-md-12">
<div class="box">
<div class="box-header">
<h3 class="box-title">Liste des contrats</h3>
<div class="box-tools">
<?php if(in_array($add, $access["Contrat"]->actions)){ ?>
<a href="<?php echo site_url('contrat/add'); ?>" class="btn btn-success btn-sm">Ajouter</a>
<?php } ?>
</div>
</div>
<div class="box-body">
<table class="table table-striped">
<tr>
<th>Utilisateur</th>
<th>Etat</th>
<th>Type contrat </th>
<th>Date debut</th>
<th>Date fin</th>
<th>Solde conge</th>
<th>Solde autorisation</th>
<th>Actions</th>
</tr>
<?php foreach($contrat as $c){ ?>
<tr>
<td><?php echo $c['name']." ".$c['prenom']; ?></td>
<td><?php echo $c['active']; ?></td>
<td><?php echo $c['type']; ?></td>
<td><?php echo $c['datedebut']; ?></td>
<td><?php echo $c['datefin']; ?></td>
<td><?php echo $c['soldeconge']; ?></td>
<td><?php echo $c['soldeautorisation']; ?></td>
<td>
<?php if(in_array($edit, $access["Contrat"]->actions)){ ?>
<a href="<?php echo site_url('contrat/edit/'.$c['idcontrat']); ?>" class="btn btn-info btn-xs"><span class="fa fa-pencil"></span>Edition</a>
<?php } ?>
<?php if(in_array($delete, $access["Contrat"]->actions)){ ?>
<a href="<?php echo site_url('contrat/remove/'.$c['idcontrat']); ?>" class="btn btn-danger btn-xs"><span class="fa fa-trash"></span>Supprimer</a>
<?php } ?>
</td>
</tr>
<?php } ?>
</table>
<div class="pull-right">
<?php echo $this->pagination->create_links(); ?>
</div>
</div>
</div>
</div>
</div>