+++ /dev/null
-<h1>
- <?php echo $this->Html->link(
- 'Nouveau produit',
- array('controller' => 'produits', 'action' => 'add')
-); ?>
-</h1>
-<table>
- <tr>
- <th>Nom</th>
- <th>Versions</th>
- <th>Actions</th>
- </tr>
-
- <?php foreach ($produits as $produit): ?>
- <tr>
- <td><?php echo $produit['Produit']['nom']; ?></td>
- <td>
- <?php echo $this->Html->link(
- 'Nouvelle version',
- array('controller' => 'versions', 'action' => 'add', $produit['Produit']['id'])
- ); ?>
- <table>
- <tr>
- <th>Valeur</th>
- <th>Type</th>
- <th>Actions</th>
- </tr>
- <?php foreach ($versions as $version): if($version['Version']['produit'] == $produit['Produit']['id']) { ?>
- <tr>
- <td><?php echo $version['Version']['valeur']; ?></td>
- <td><?php echo $version['Version']['nature']; ?></td>
- <td>
- <?php echo $this->Html->link(
- $this->Html->image('edit.jpg', array('class' => 'button')),
- array('controller' => 'versions', 'action' => 'edit', $version['Version']['id']),
- array('escape' => false)
- ).' '.
- $this->Form->postLink(
- $this->Html->image('delete.png', array('class' => 'button')),
- array('action' => 'delete', $version['Version']['id']),
- array('escape' => false, 'confirm' => 'Etes-vous certain ?')
- );
- ?>
- </td>
- </tr>
- <?php } endforeach; unset($version); ?>
- </table>
- </td>
- <td>
- <?php echo $this->Html->link(
- $this->Html->image('edit.jpg', array('class' => 'button')),
- array('controller' => 'produits', 'action' => 'edit', $produit['Produit']['id']),
- array('escape' => false)
- ).' '.
- $this->Form->postLink(
- $this->Html->image('delete.png', array('class' => 'button')),
- array('action' => 'delete', $produit['Produit']['id']),
- array('escape' => false, 'confirm' => 'Etes-vous certain ?')
- );
- ?>
- </td>
- </tr>
- <?php endforeach; ?>
- <?php unset($produit); ?>
-</table>