--- /dev/null
+<h1>Liste d'instances</h1>
+<table>
+ <tr>
+ <th>Nom</th>
+ <th>Historique</th>
+ <th>Version</th>
+ <th>Référence</th>
+ <th>Actions</th>
+ </tr>
+
+ <?php foreach ($instances as $instance): ?>
+ <tr>
+ <td>
+ <?php echo $this->Html->link(
+ $instance['Instance']['nom'],
+ array('controller' => 'instances', 'action' => 'edit', $instance['Instance']['id'])
+ );
+ ?>
+ </td>
+ <td>
+ <table>
+ <?php $historique = $historiques[$instance['Instance']['id']]; ?>
+ <tr>
+ <th>Création</th>
+ <?php if(array_key_exists($historique['Historique']['id'], $totalAlertes)) { ?>
+ <th>Alertes</th>
+ <th>Actions</th>
+ <?php } ?>
+ </tr>
+ <tr>
+ <td>
+ <?php echo $historique['Historique']['installation'] ?>
+ </td>
+ <?php if(array_key_exists($historique['Historique']['id'], $totalAlertes)) { ?>
+ <?php foreach ($totalAlertes[$historiques[$instance['Instance']['id']]['Historique']['id']] as $alerte): ?>
+ <td>
+ <?php echo $alerte['Alerte']['message'] ?>
+ </td>
+ <td>
+ <?php
+ echo $this->Html->link(
+ 'Valider',
+ array('controller' => 'historiques', 'action' => 'validerAlerte', $historique['Historique']['id'], $alerte['Alerte']['id'])
+ )
+ . " - " .
+ $this->Html->link(
+ 'Refuser',
+ array('controller' => 'historiques', 'action' => 'refuserAlerte', $historique['Historique']['id'], $alerte['Alerte']['id'])
+ );
+ ?>
+ </td>
+ <?php endforeach; ?>
+ <?php unset($alerte);
+ } ?>
+ </tr>
+ </table>
+ </td>
+ <td><?php echo $instance['Instance']['version']; ?></td>
+ <td><?php echo $instance['Instance']['reference']; ?></td>
+ <td>
+ <?php
+ echo $this->Form->postLink(
+ 'Supprimer',
+ array('action' => 'delete', $instance['Instance']['id']),
+ array('confirm' => 'Etes-vous certain ?')
+ );
+ ?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ <?php unset($instance); ?>
+ <?php echo $this->Html->link(
+ 'Ajouter une instance',
+ array('controller' => 'instances', 'action' => 'add')
+ ); ?>
+</table>